From 6f1cf7b7a09796b3964b39f0b1e778f978ae60fb Mon Sep 17 00:00:00 2001 From: nala Date: Sat, 24 Oct 2026 23:21:33 +0200 Subject: [PATCH] docs(iva): prepare G7I delivery after verified backup and isolated restore --- .../simulations/l1-g7i-delivery-20261024.json | 129 ++++++++++++++++++ .../l1-g7i-readonly-rollback-20261024.patch | 10 ++ 2 files changed, 139 insertions(+) create mode 100644 docs/investmoz/simulations/l1-g7i-delivery-20261024.json create mode 100644 docs/investmoz/simulations/l1-g7i-readonly-rollback-20261024.patch diff --git a/docs/investmoz/simulations/l1-g7i-delivery-20261024.json b/docs/investmoz/simulations/l1-g7i-delivery-20261024.json new file mode 100644 index 00000000..4f5e9fe1 --- /dev/null +++ b/docs/investmoz/simulations/l1-g7i-delivery-20261024.json @@ -0,0 +1,129 @@ +{ + "status": "ready_after_fresh_authenticated_preflight_and_verified_backup_restore", + "candidate": "a4329bb4bfb44546a5c64b8c4baabf4231a1c3c3", + "base_installed": "cd530b248bf9dee5a6e7f1e4d710346084a2421f", + "coverage_complete_branches": { + "AUD-SIM-L1-P089": [ + "free_company_service", + "private_company_asset_use", + "exempt_sector_asset_use" + ] + }, + "branch_count_complete": 1, + "treatment_count": 3, + "runtime_delta": [ + { + "path": "resources/js/lib/iva-service-normal.ts", + "sha256_LF": "e10fa8131534982eae17ce72849fb794a8e0438c85719b872571a33c53e5f019" + }, + { + "path": "resources/js/components/simulation-service-normal.tsx", + "sha256_LF": "b7838cc7dadd058906a3997e218deb79792d587a6daf67f7f3139ff22a0668a5" + }, + { + "path": "resources/js/components/simulation-monthly-iva.tsx", + "sha256_LF": "8581d037947c9d764400e99627952524bcf28ed8b5bf865ba4a1cb4b74acd7ac" + }, + { + "path": "resources/js/lib/project-dossier.ts", + "sha256_LF": "aa15412c46064a9cff6dbe2dba086e1acfe79fe50f313280ccb9ee7c89484c99" + } + ], + "counts_before": { + "delivered": 86, + "QA": 1, + "functional_pending": 45, + "documentary": 1, + "total": 133 + }, + "counts_current": { + "delivered": 86, + "QA": 1, + "functional_pending": 45, + "documentary": 1, + "total": 133 + }, + "counts_after_delivery": { + "delivered": 87, + "QA": 0, + "functional_pending": 45, + "documentary": 1, + "total": 133 + }, + "QA_proofs_reused": [ + "iva-l1-g7i-qa-20261024.json" + ], + "authorization": "Tempo explicitly deploya4329bb4 through existingGit,preserve concurrentchanges and check installeddelta only;P089three treatments,prior deductioncondition limitedto applicableassetuse paths", + "scope": "2026/MZN,P089baseonly;no automaticnormalvaluation orsubstitution byassetpurchaseprice/cost;no IVA/incidence/rate/deduction/field11/regularisation/ModeloAtotals. Prior deductionfact/reference doesnot calculateorgrant deduction. Unknownconditions/normalvalue indeterminate,explicitno notapplicable notzero. Otherbooks includingP103/102/101/095unchanged.", + "meaning": "Free services bycompany forprivate/nonbusinesspurpose4(2)(a);useofcompanygoods forprivate/nonbusinesspurpose or in exemptsector4(2)(b). Previous total/partialdeduction ongoods/elements requiredonlyfor4(2)(b),not4(2)(a). Use distinctfrompermanentgoods transferP088.", + "formula": "normalvalue ofservice under15(4),identifiedbasis/scope andcomposition15(5)/(6),netofownVAT", + "preservation": "86priorclosures and partialP084/P085 preserved;acceptedQA reused;freshbackup/realisolatedrestore beforeinstallation;installeddelta only", + "partial_P084_P085": "Preparation/conditional simulation only,benefits pending;no closure", + "limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred", + "containment": "l1-g7i-readonly-rollback-20261024.patch,checked only,not applied;blocks newP089calculations only,preserves readers/history/otherbranches", + "authenticated_preflight": { + "installed": { + "status": "installed", + "commit": "cd530b248bf9dee5a6e7f1e4d710346084a2421f", + "release": "/var/www/investmoz-homologacao/releases/cd530b248bf9dee5a6e7f1e4d710346084a2421f-0b68e7a9", + "previous_release": "/var/www/investmoz-homologacao/releases/5d5f3b414866969e4b2d38376402b8f264c6d19c-7453aad9", + "database_migrations": 0, + "content_imports": 0 + }, + "current_link": "/var/www/investmoz-homologacao/releases/cd530b248bf9dee5a6e7f1e4d710346084a2421f-0b68e7a9", + "release_revision": { + "commit": "cd530b248bf9dee5a6e7f1e4d710346084a2421f", + "branch": "main", + "built_at": "2026-10-24T21:14:42.034149+00:00", + "manifest_sha256": "ba479b580dd012c09e8f4c94e691a75642da781583a21a6fc46c649b59b6d4e1" + }, + "service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n", + "configuration_keys": [ + "repository", + "branch", + "target_url", + "legacy_root", + "state_root", + "release_root", + "current_link", + "shared_assets", + "php", + "schema_contract", + "ci_environment", + "postgis_image", + "test_database", + "qa_port", + "retention", + "webhook_secret_file" + ], + "safe_paths": { + "repository": "nala/Investidor-V2", + "release_root": "/var/www/investmoz-homologacao/releases", + "postgis_image": "postgis/postgis@sha256:01a6a70e41e6c4467c8f55f6063555ed72db2d6662cd0d571040d42eadaeb6f6" + }, + "pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604" + }, + "backup_restore": { + "backup": { + "stage": "/var/backups/investmoz-l1-g7i-delivery-20261024/backup", + "target": { + "database": "teste_investidor", + "port": 5432 + }, + "tables": 174, + "files_verified": 369, + "dump_sha256": "f521bc779cc87c7bc500c37f44d15748961e098d0a420e9514bbb11adf8eefa4", + "files_sha256": "5d26d4d18c8ee9f09c40f9f99c044c9b7c98d3a33db94dc03347b23aa89dc9cf", + "restore_verified": false + }, + "restore": { + "restore_verified": true, + "tables_verified": 174, + "container_network": "none", + "database": "l1_g7i_restore_20261024", + "port": 55441, + "source_dump_sha256": "f521bc779cc87c7bc500c37f44d15748961e098d0a420e9514bbb11adf8eefa4", + "active_database_writes": 0 + } + } +} diff --git a/docs/investmoz/simulations/l1-g7i-readonly-rollback-20261024.patch b/docs/investmoz/simulations/l1-g7i-readonly-rollback-20261024.patch new file mode 100644 index 00000000..74487af1 --- /dev/null +++ b/docs/investmoz/simulations/l1-g7i-readonly-rollback-20261024.patch @@ -0,0 +1,10 @@ +--- a/resources/js/lib/iva-service-normal.ts ++++ b/resources/js/lib/iva-service-normal.ts +@@ -51,6 +51,7 @@ + function key(draft:Record,book:ServiceNormalBook):string{return JSON.stringify({version:serviceNormalVersion,scope:acquisitionScope(draft),location:draft.selection_labels??{},currency:draft.currency,rows:book.rows});} + export function serviceNormalCurrent(draft:Record,book:ServiceNormalBook):boolean{return!!book.result&&book.result.sourceKey===key(draft,book);} + export function recordServiceNormals(draft:Record,book:ServiceNormalBook):ServiceNormalBook{ ++ throw new Error('Novas bases P089 temporariamente suspensas; dados, histórico, relatórios e restantes ramos preservados.'); + if(!book.rows.length||new Set(book.rows.map(row=>row.id)).size!==book.rows.length)throw new Error('Indique operações com identificadores distintos;originais conservados.'); + const result:ServiceNormalCalculation={version:serviceNormalVersion,revision:(book.result?.revision??0)+1,calculatedAt:new Date().toISOString(),opportunity:acquisitionScope(draft),location:JSON.stringify(draft.selection_labels??{}),sourceKey:key(draft,book),source:serviceNormalSource,inputs:structuredClone(book.rows),rows:book.rows.map(row=>evaluateServiceNormal(row,draft.currency))}; + const next={...book,result,history:[...(book.history??[]),...(book.result?[book.result]:[])]};saveServiceNormalBook(draft,next);return next;