From 03c26d66139f36573cf58362a5076b4d5f98eca2 Mon Sep 17 00:00:00 2001 From: nala Date: Sat, 24 Oct 2026 23:40:32 +0200 Subject: [PATCH] docs(iva): prepare one G8B-G8F delivery after backup and isolated restore --- .../l1-g8-services-delivery-20261024.json | 146 ++++++++++++++++++ ...-services-readonly-rollback-20261024.patch | 10 ++ 2 files changed, 156 insertions(+) create mode 100644 docs/investmoz/simulations/l1-g8-services-delivery-20261024.json create mode 100644 docs/investmoz/simulations/l1-g8-services-readonly-rollback-20261024.patch diff --git a/docs/investmoz/simulations/l1-g8-services-delivery-20261024.json b/docs/investmoz/simulations/l1-g8-services-delivery-20261024.json new file mode 100644 index 00000000..c174b047 --- /dev/null +++ b/docs/investmoz/simulations/l1-g8-services-delivery-20261024.json @@ -0,0 +1,146 @@ +{ + "status": "ready_after_fresh_authenticated_preflight_and_verified_backup_restore", + "candidate": "3f4e71c3f360505dcb53c12376d14ee91643f3cd", + "base_installed": "8f14f5dde24819fce062dc316ed21dfbe033ebf8", + "coverage_complete_branches": { + "AUD-SIM-L1-P106": [ + "general_service" + ], + "AUD-SIM-L1-P107": [ + "immovable_service" + ], + "AUD-SIM-L1-P108": [ + "movable_work" + ], + "AUD-SIM-L1-P109": [ + "activity_service" + ], + "AUD-SIM-L1-P110": [ + "transport_service" + ] + }, + "branch_count_complete": 5, + "treatment_count": 5, + "runtime_delta": [ + { + "path": "resources/js/lib/iva-service-location.ts", + "sha256_LF": "abf13bd0f6f8aed209b38f3fd8d5906b96572de2d13f87b0d742ee3f31095a19" + }, + { + "path": "resources/js/components/simulation-service-location.tsx", + "sha256_LF": "ede4923dc4343949821cdd1c540837261cf816afee3069d031053cac73da5339" + }, + { + "path": "resources/js/components/simulation-monthly-iva.tsx", + "sha256_LF": "dd102e122a243f58c85db0dcde889877066c5aac9c873eb0f8f93905a6d0d848" + }, + { + "path": "resources/js/lib/project-dossier.ts", + "sha256_LF": "03bfad1ac2a443ee4fd0a7c0091f5b3e34e17a9c8b2b75d1249ac0c96729d643" + } + ], + "counts_before": { + "delivered": 88, + "QA": 5, + "functional_pending": 39, + "documentary": 1, + "total": 133 + }, + "counts_current": { + "delivered": 88, + "QA": 5, + "functional_pending": 39, + "documentary": 1, + "total": 133 + }, + "counts_after_delivery": { + "delivered": 93, + "QA": 0, + "functional_pending": 39, + "documentary": 1, + "total": 133 + }, + "QA_proofs_reused": [ + "iva-l1-g8-services-qa-20261024.json" + ], + "authorization": "Tempo explicitly requests one joint delivery of3f4e71c3,P106–P110,main compatibility/concurrent changes preserved,installeddelta only", + "scope": "Recorte2026,classificação territorial de serviços por factos próprios;sem base,taxa,IVA,isenção,dedução/campo11 ou totaisModeloA. Digital/outros6(7)/(8)exigem percursos próprios,não classificados automaticamente. P002transversal não encerrado.", + "source": "CIVA6(3),6(4)/(5)a–d,6(6),Lei13/2016 PDF7–8/p1426(265–266);Aviso BR89-I,de08/06/2017,PDF1,rectifica expressamente6(5)c/d:actividades nacionais e transporte pela distância nacional;Lei10/2025 PDF12mantém6(3–6),altera7–9digitais.", + "meaning": { + "P106": "Sede/EP/domicílio do prestador a partir do qual o serviço é prestado,sem regras especiais aplicáveis. Não usar endereço/nacionalidade do cliente.", + "P107": "Local do imóvel e relação do serviço,incluindo preparação/coordenação de trabalhos imobiliários,peritos/agentes. Independente da sede do prestador.", + "P108": "Execução total ou essencial dos trabalhos/peritagens em bens móveis corpóreos. Independente da sede do prestador.", + "P109": "Local material de actividades artísticas,científicas,desportivas,recreativas,ensino/similares,organizadores e serviços acessórios;6(5)c rectificado2017.", + "P110": "Distância nacional6(5)d rectificada2017;partida/chegada nacionais incluem percurso fora do país6(6);ida/volta são dois trajectos. Identificar distância total/nacional na mesma unidade,sem apuramento monetário." + }, + "formula": "Territorial classification only;P110 exact distances retained as numerator/denominator with6(6)deemednational override,no monetaryapportionment/rounding.", + "preservation": "88prior closures and partialP084/P085 preserved;accepted perbranchQA reused;one integration/backup/real isolatedrestore/check for whole set", + "partial_P084_P085": "Preparation/conditional simulation only,benefits pending;no closure", + "limits": "P084/P085partial,pending;L1open;P00105/06;beveragesL2/L3;Statistics/AIdeferred", + "containment": "l1-g8-services-readonly-rollback-20261024.patch,checked only,not applied;blocks newP106–110classifications,preserves readers/history/otherbranches", + "authenticated_preflight": { + "installed": { + "status": "installed", + "commit": "8f14f5dde24819fce062dc316ed21dfbe033ebf8", + "release": "/var/www/investmoz-homologacao/releases/8f14f5dde24819fce062dc316ed21dfbe033ebf8-6abb42c2", + "previous_release": "/var/www/investmoz-homologacao/releases/6f1cf7b7a09796b3964b39f0b1e778f978ae60fb-e919f615", + "database_migrations": 0, + "content_imports": 0 + }, + "current_link": "/var/www/investmoz-homologacao/releases/8f14f5dde24819fce062dc316ed21dfbe033ebf8-6abb42c2", + "release_revision": { + "commit": "8f14f5dde24819fce062dc316ed21dfbe033ebf8", + "branch": "main", + "built_at": "2026-10-24T21:33:02.101616+00:00", + "manifest_sha256": "0a967a74dd5163728a082b24a62b22b9fae00a3ac428b5bcaa2082340c62ac00" + }, + "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-g8-services-delivery-20261024/backup", + "target": { + "database": "teste_investidor", + "port": 5432 + }, + "tables": 174, + "files_verified": 369, + "dump_sha256": "1188dd6c559ba60472c26a9332765b5157bd2b25ba66655b0311d5584c18b919", + "files_sha256": "252a84497714170faac6088de5e2f343a046092023c52c676f60628039d30f83", + "restore_verified": false + }, + "restore": { + "restore_verified": true, + "tables_verified": 174, + "container_network": "none", + "database": "l1_g8_services_restore_20261024", + "port": 55441, + "source_dump_sha256": "1188dd6c559ba60472c26a9332765b5157bd2b25ba66655b0311d5584c18b919", + "active_database_writes": 0 + } + } +} diff --git a/docs/investmoz/simulations/l1-g8-services-readonly-rollback-20261024.patch b/docs/investmoz/simulations/l1-g8-services-readonly-rollback-20261024.patch new file mode 100644 index 00000000..379477fe --- /dev/null +++ b/docs/investmoz/simulations/l1-g8-services-readonly-rollback-20261024.patch @@ -0,0 +1,10 @@ +--- a/resources/js/lib/iva-service-location.ts ++++ b/resources/js/lib/iva-service-location.ts +@@ -56,6 +56,7 @@ + function key(draft:Record,book:ServiceLocationBook):string{return JSON.stringify({version:serviceLocationVersion,scope:acquisitionScope(draft),location:draft.selection_labels??{},rows:book.rows});} + export function serviceLocationCurrent(draft:Record,book:ServiceLocationBook):boolean{return!!book.result&&book.result.sourceKey===key(draft,book);} + export function recordServiceLocations(draft:Record,book:ServiceLocationBook):ServiceLocationBook{ ++ throw new Error('Novas classificações P106–P110 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:ServiceLocationCalculation={version:serviceLocationVersion,revision:(book.result?.revision??0)+1,calculatedAt:new Date().toISOString(),opportunity:acquisitionScope(draft),location:JSON.stringify(draft.selection_labels??{}),sourceKey:key(draft,book),source:serviceLocationSource,inputs:structuredClone(book.rows),rows:book.rows.map(row=>evaluateServiceLocation(row))}; + const next={...book,result,history:[...(book.history??[]),...(book.result?[book.result]:[])]};saveServiceLocationBook(draft,next);return next;