Compare commits

...
Author SHA1 Message Date
nala 3f7082a3e6 docs: record sequential competitiveness installation and preservation 2026-10-29 13:11:31 +02:00
nala 23ecccfaad feat(clusters): prepare evidence-based five forces analysis
tests / ci (push) Canceled after 0s
2026-10-29 13:03:02 +02:00
nala 332c16ebb5 feat: expose guided manual IVA and IRPC form preparation
tests / ci (push) Canceled after 0s
2026-10-28 21:54:25 +02:00
nala 17444aaaa5 docs(investor): record served release and grouped preservation receipts 2026-10-28 21:43:46 +02:00
nala 789fffd098 fix(sector): use effective creation access and preserve corridor presentation contract
tests / ci (push) Canceled after 0s
2026-10-28 21:35:21 +02:00
nala 502e3ec4d5 fix(investor): simplify preparation flow, profile requests and scoped zone search
tests / ci (push) Canceled after 0s
2026-10-28 21:26:59 +02:00
nala 54d1b2a543 fix(catalogue): keep filtered investment results separate from educational guides 2026-10-28 21:04:10 +02:00
nala 6520d303f7 fix(territory): combine search and selection in one dropdown field 2026-10-28 21:00:30 +02:00
nala 47dae1b77e docs(catalogue): register national verification in existing requirements 2026-10-28 20:54:48 +02:00
nala 2c8eb95e10 test(catalogue): verify provincial coverage nationally and across sectors 2026-10-28 20:54:30 +02:00
nala 1b2ede41e2 fix(catalogue): include approved provincial corridor coverage and show territorial detail 2026-10-28 20:49:30 +02:00
nala d7a9284d5f docs(navigation): record installed Git delivery and pending visual conference 2026-10-28 20:24:28 +02:00
nala 6e8de43ae7 fix(navigation): expose work area and preserve authorised menu destinations in QA
tests / ci (push) Canceled after 0s
2026-10-28 20:08:54 +02:00
nala 77d133ef0e docs(proactive): clarify connector outage and remaining visual conference 2026-10-28 19:33:27 +02:00
nala 930013f920 docs(proactive): record installed private supply delivery and scoped verification 2026-10-28 19:26:40 +02:00
nala 6d14769369 feat(proactive): prepare controlled private catalogue delivery and reject repeated comparisons
tests / ci (push) Canceled after 0s
2026-10-28 19:13:18 +02:00
nala a022ed9848 fix(proactive): retain unnamed administrative rows and preserve accepted import snapshot 2026-10-28 17:28:31 +02:00
nala 2f58b7d438 feat(proactive): integrate private supply observations and demonstrate Gurue comparison in QA 2026-10-28 17:19:55 +02:00
nala 150bef4b89 docs(irpc): record verified grouped Git delivery and concrete remaining L8 scope 2026-10-28 14:52:22 +02:00
nala 569a1cd750 docs(irpc): bind economic QA receipt to tested compatible candidate
tests / ci (push) Canceled after 0s
2026-10-28 14:30:52 +02:00
nala aae67c169d feat(irpc): demonstrate ordinary economic credit and compatible carry in QA 2026-10-28 14:29:55 +02:00
nala 6ededb597a docs(irpc): bind carry QA receipt to tested implementation 2026-10-28 14:01:33 +02:00
nala d134a92d16 feat(irpc): demonstrate documented prior credit and PEC balances in QA 2026-10-28 14:01:07 +02:00
nala cf4e0638c1 docs(irpc): record verified international credit Git delivery 2026-10-27 15:23:21 +02:00
nala 838ad941a2 feat(irpc): demonstrate documented international credit in QA
tests / ci (push) Canceled after 0s
2026-10-27 14:57:18 +02:00
nala 814fe0a9b7 docs: record verified PEC delivery and concrete remaining L8 scope 2026-10-27 14:20:56 +02:00
nala e182d1d79d docs: preserve verified sector delivery receipts in PEC candidate
tests / ci (push) Canceled after 0s
2026-10-27 14:03:07 +02:00
nala 9a093046e5 merge: reconcile accepted PEC QA with installed sector navigation 2026-10-27 14:02:47 +02:00
nala 4ee427bad4 docs: record verified sector navigation installation and preservation receipts 2026-10-27 13:57:29 +02:00
nala 669cb8979b fix: open individual sectors from catalogue cards without repeated detail
tests / ci (push) Canceled after 0s
2026-10-27 13:47:50 +02:00
nala 7fdb6b424b feat: add bounded current-year PEC deduction to annual IRPC QA 2026-10-27 13:15:18 +02:00
nala dc14f01e14 docs: prepare real team use evaluation without repeating accepted technical proof 2026-10-27 12:58:29 +02:00
nala 1ee0c6d21d docs: record verified L8 and proactive installations with fresh restore receipts 2026-10-27 12:53:01 +02:00
nala 9fda6d6e12 test: make proactive API snapshot proof portable without local QA outputs
tests / ci (push) Canceled after 0s
2026-10-27 12:45:32 +02:00
nala 56c0c6a7ca docs: record authorised delivery sequence and SSH execution handoff
tests / ci (push) Canceled after 0s
2026-10-27 12:16:23 +02:00
nala 74f7f93a75 merge: reconcile proactive delivery after L8 capacity preparation 2026-10-27 12:14:40 +02:00
nala 0ff402a11d docs: demonstrate team UI autonomy and consolidate proactive delivery 2026-10-27 12:05:51 +02:00
nala 51d536b7ba fix: keep private idea preparation valid in complement lookup 2026-10-27 12:01:24 +02:00
nala 403c444a3e docs: hand off metrology prospecting and start private Gurue pilot 2026-10-27 11:40:23 +02:00
nala a78abf06d0 docs(investment): delimit regional prospects demand costs and partner capacity 2026-10-27 10:58:05 +02:00
nala 52f54655d2 docs(investment): focus real pilot on opportunities generated by demand 2026-10-27 10:39:34 +02:00
nala 4f9450a71d docs(investment): demonstrate source-based Cahora Bassa idea in private QA dossier 2026-10-27 10:22:33 +02:00
nala 1afab4a2a7 docs(investment): record proactive QA proof guide and concrete residuals 2026-10-27 09:43:04 +02:00
nala 3439f35038 feat(investment): prepare evidence-led territorial needs and ideas in existing workflows 2026-10-27 09:35:20 +02:00
nala c85e772d2f docs(irpc): hold L8 delivery pending server capacity as requested
tests / ci (push) Canceled after 0s
2026-10-27 08:08:49 +02:00
nala 1436074819 docs(irpc): record first L8 QA settlement and concrete remaining scope 2026-10-26 17:03:05 +02:00
nala 11a6cee981 feat(irpc): simulate annual settlement with actual withholding and PPC proofs 2026-10-26 16:59:59 +02:00
nala d5f11462e9 docs(irpc): record combinations installation and delimit first L8 settlement 2026-10-26 16:32:26 +02:00
nala f8d57bddf9 docs(irpc): record current main compatibility and preserved fiscal evidence
tests / ci (push) Canceled after 0s
2026-10-26 16:08:45 +02:00
nala ea2bceb5ce merge: preserve current main catalogue and restore accepted fiscal manual history 2026-10-26 16:07:28 +02:00
nala 245549f9e8 feat(irpc): qualify supported benefit combinations and prevent duplicate deductions in QA 2026-10-26 16:04:05 +02:00
paulomassigue a7434cd27c .
tests / ci (push) Canceled after 0s
2026-10-26 16:04:04 +02:00
paulomassigue 71551deb73 restaturacao da cor nornmal de porque incvestir em Mocambique 2026-10-26 16:02:04 +02:00
nala f33d99b4d5 docs(irpc): record grouped CBF16 installation and remaining L7 scope 2026-10-26 15:37:27 +02:00
nala 632dc06930 docs(irpc): prepare grouped cessation and prior quota QA delivery
tests / ci (push) Canceled after 0s
2026-10-26 15:20:58 +02:00
nala ff84ab648f merge: preserve current main presentation alongside grouped L7 QA 2026-10-26 15:17:11 +02:00
nala 992c97ad4e feat(irpc): reconcile CBF16 cessation and documented prior quotas in QA 2026-10-26 15:16:45 +02:00
paulomassigue ae0d74bb3a azul claro como fundo em porque investir em mocambique
tests / ci (push) Canceled after 0s
2026-10-26 15:06:35 +02:00
paulomassigue 894ca4ec69 correcao de conflitos
tests / ci (push) Canceled after 0s
2026-10-26 14:57:27 +02:00
nala ba83afe7d8 feat(irpc): qualify CBF16 monthly quotas for resident start periods in QA 2026-10-26 14:55:35 +02:00
paulomassigue 4da7a16a50 mudanca da cor em por que investir em Mocambique 2026-10-26 14:54:49 +02:00
nala eccd95f9e7 docs(irpc): record monthly CBF16 installation and next short-period scope 2026-10-26 14:43:40 +02:00
nala 0bd5d49550 feat(irpc): reuse L6 monthly quotas for qualified CBF16 in QA
tests / ci (push) Canceled after 0s
2026-10-26 14:24:28 +02:00
nala aed020d19e docs(irpc): reconcile installed L7 server capacity and next monthly asset scope 2026-10-26 14:02:57 +02:00
nala 1649710cf7 docs(irpc): record grouped L7 installation and concrete remaining scope 2026-10-26 13:05:56 +02:00
nala e07f89da3d Merge demonstrated L7 treatments preserving concurrent portal changes and accepted history
tests / ci (push) Canceled after 0s
2026-10-26 12:53:38 +02:00
nala ab2ff2fdbc feat(irpc): qualify L7 expenses and compatible special treatments in QA 2026-10-26 12:14:52 +02:00
paulomassigue a2122dc34c correcao de conflitos
tests / ci (push) Canceled after 0s
2026-10-26 12:02:22 +02:00
nala d37fffb2d2 docs(irpc): accept bounded L6 operations and delimit L7 treatments 2026-10-26 11:46:33 +02:00
paulomassigue 17d633c99c Adicao do texto por que investir em Moz e ajuste dos elementos 2026-10-26 11:01:35 +02:00
paulomassigue 8f1ab24b22 acrescimo no hero de Porquê investir em Moçambique?
Partir de uma ideia Sectores de investimento
2026-10-26 10:22:17 +02:00
210 changed files with 24840 additions and 567 deletions
@@ -29,7 +29,7 @@ class InvestmentDiscoveryController extends Controller
'corridorGroups' => ($filters['view'] ?? '') === 'corridors' ? app(\App\Services\OpportunityCorridorExplorer::class)->groups($filters) : [],
'territorySelection' => app(InvestmentGeography::class)->selection($filters),
'guides' => app(\App\Services\SectorInvestment::class)->guides(\App\Models\Sector::where('slug', $filters['sector'] ?? '')->where('is_active', true)->whereNotNull('published_at')->first()),
'results' => $catalogue->query($filters)->paginate(12)->withQueryString(),
'results' => $catalogue->query($filters)->paginate(12)->withQueryString()->through(fn ($record) => $catalogue->presentLocation($record)),
'favourites' => $request->user() ? DB::table('opportunity_favourites')->where('user_id', $request->user()->id)->pluck('opportunity_id') : [],
'territorial' => $this->territorial($filters)]);
}
@@ -74,7 +74,7 @@ class InvestmentDiscoveryController extends Controller
public function search(Request $request, InvestmentCatalogue $catalogue): JsonResponse
{
return response()->json($catalogue->query($catalogue->filters($request))->paginate($request->integer('per_page', 12))->withQueryString());
return response()->json($catalogue->query($catalogue->filters($request))->paginate($request->integer('per_page', 12))->withQueryString()->through(fn ($record) => $catalogue->presentLocation($record)));
}
public function references(Request $request, InvestmentCatalogue $catalogue): JsonResponse
@@ -147,7 +147,7 @@ class OpportunityManagementController extends Controller
Inertia::share('publicationPreview', app(OpportunityCanonicalContract::class)->publicProjection($values['canonical'] ?? []));
$classification = $id ? DB::table('audit_events')->where('source_system', 'opportunity-origin-review')->where('after_data->opportunity_id', $id)->orderByDesc('occurred_at')->orderByDesc('id')->value('after_data') : null;
return Inertia::render('management/opportunity-draft', ['resourcesInstalled' => app(OpportunityResources::class)->installed(), 'record' => $record, 'values' => $values, 'etag' => $record ? $service->etag($record) : null, 'readOnly' => str_ends_with($request->path(), '/view') || ($record && ! $access->canEdit($request->user(), $record)), 'closedVersion' => $record ? $service->closed($record) : false, 'classification' => $classification ? json_decode($classification, true)['classification'] : 'undetermined', 'sectors' => Sector::choices()->orderBy('name')->get(['id', 'name', 'slug']), 'categories' => OpportunityManagement::CATEGORIES,
return Inertia::render('management/opportunity-draft', ['proactiveHistory' => app(\App\Services\ProactiveInvestment::class)->history($record), 'proactiveOptions' => app(\App\Services\ProactiveInvestment::class)->options($record), 'resourcesInstalled' => app(OpportunityResources::class)->installed(), 'record' => $record, 'values' => $values, 'etag' => $record ? $service->etag($record) : null, 'readOnly' => str_ends_with($request->path(), '/view') || ($record && ! $access->canEdit($request->user(), $record)), 'closedVersion' => $record ? $service->closed($record) : false, 'classification' => $classification ? json_decode($classification, true)['classification'] : 'undetermined', 'sectors' => Sector::choices()->orderBy('name')->get(['id', 'name', 'slug']), 'categories' => OpportunityManagement::CATEGORIES,
'maturityCatalogue' => ['version' => OpportunityMaturity::VERSION, 'stages' => OpportunityMaturity::STAGES, 'legacyVersion' => OpportunityMaturity::LEGACY, 'legacyLabels' => OpportunityMaturity::LEGACY_LABELS],
'territoryPath' => app(InvestmentGeography::class)->path($values['primary_territory_id'] ?? null, true),
'history' => $id ? DB::table('audit_events')->where('source_system', 'opportunity-management')->where('after_data->record_id', $id)->orderByDesc('occurred_at')->get(['id', 'action', 'actor_user_id', 'occurred_at']) : []]);
@@ -0,0 +1,17 @@
<?php
namespace App\Http\Controllers;
use App\Models\Opportunity;
use App\Services\ProactiveSupply;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
final class ProactiveSupplyController extends Controller
{
public function index(Request $request,ProactiveSupply $service): JsonResponse
{
$v=$request->validate(['record_id'=>'nullable|integer|min:1']);
$record=isset($v['record_id'])?Opportunity::findOrFail($v['record_id']):null;
return response()->json($service->search($request->user(),$request->all(),$record))->header('Cache-Control','private, no-store');
}
}
@@ -25,9 +25,7 @@ class PublicPortalController extends Controller
if ($slug === 'mercado-financeiro/fintech') $slug = 'fintech';
$sector = Sector::where('slug', $slug)->where('is_active', true)->whereNotNull('published_at')->firstOrFail();
return Inertia::render('portal/services', ['section' => 'sector', 'sector' => $sector->only(['id', 'name', 'slug', 'description', 'short_description']),
'sectorEntry' => array_key_exists($sector->slug, SectorInvestment::CONTENT) ? app(SectorInvestment::class)->publicView($sector) : null,
'opportunities' => \App\Services\SectorOrganization::opportunities($sector)->latest('published_at')->limit(12)->get(['id', 'title', 'slug', 'province', 'summary'])]);
return Inertia::render('portal/services', ['section' => 'sector', ...app(SectorInvestment::class)->page($sector)]);
}
public function opportunity(string $slug): Response
@@ -48,13 +48,15 @@ class HandleInertiaRequests extends Middleware
*/
public function share(Request $request): array
{
$contentManagementAccess=app(\App\Services\ContentManagement::class)->access($request->user());
return [
...parent::share($request),
'name' => config('app.name'),
'procurementEnabled' => app(\App\Services\Procurement::class)->available(),
'homologationReserved' => (bool) config('portal.homologation_only', false),
'profileAccess' => app(PortalProfileAccess::class)->navigation($request->user()),
'contentManagementHref' => app(\App\Services\ContentManagement::class)->access($request->user()) !== [] ? '/gestao-conteudos' : null,
'contentManagementHref' => $contentManagementAccess !== [] ? '/gestao-conteudos' : null,
'contentManagementAccess'=>$contentManagementAccess,
'portalOperator' => config('portal.operator_name'),
'portalInstitutionalContactEmail' => filter_var(config('portal.institutional_contact_email'), FILTER_VALIDATE_EMAIL) ?: null,
'legacyContentEnabled' => app(LegacyContent::class)->available(),
@@ -83,6 +85,7 @@ class HandleInertiaRequests extends Middleware
'auth' => [
'user' => $request->user(),
'canManagePortal' => $request->user()?->can('manage-portal') ?? false,
'legacyManagementAccess' => $request->user()?->hasVerifiedEmail() && app(PortalProfileAccess::class)->legacyWriteAllowed($request->user()),
],
'sidebarOpen' => ! $request->hasCookie('sidebar_state') || $request->cookie('sidebar_state') === 'true',
];
+1
View File
@@ -35,6 +35,7 @@ class Opportunity extends Model
{
$data = parent::toArray();
if (isset($data['description'])) $data['description'] = \App\Services\OpportunityPublicText::description($this, $data['description']);
if ($this->exists && ($proactive = app(\App\Services\ProactiveInvestment::class)->publicData($this))) $data['proactive'] = $proactive;
return $data;
}
+44 -4
View File
@@ -17,7 +17,7 @@ class InvestmentCatalogue
/** @return array<string,mixed> */
public function filters(Request $request): array
{
$filters = $request->validate(['q' => ['nullable', 'string', 'max:120'], 'sector' => ['nullable', 'string', 'max:80'],
$filters = $request->validate(['perspective' => ['nullable', 'in:exists,needs,ideas,opportunities'],'q' => ['nullable', 'string', 'max:120'], 'sector' => ['nullable', 'string', 'max:80'],
'preparation' => ['nullable', \Illuminate\Validation\Rule::in(array_column(OpportunityMaturity::searchOptions(), 'value'))],
'opportunity_id' => ['nullable', 'integer', 'min:1'],
'province_id' => ['nullable', 'uuid'], 'district_id' => ['nullable', 'uuid'], 'admin_post_id' => ['nullable', 'uuid'], 'locality_id' => ['nullable', 'uuid'],
@@ -63,13 +63,17 @@ class InvestmentCatalogue
public function query(array $filters): Builder
{
$query = Opportunity::published()->with('sector:id,name,slug');
if (in_array($filters['perspective'] ?? '', ['exists','needs','ideas'], true)) $query->where('workflow_context->promotional_summary->projection->proactive->group', $filters['perspective']);
elseif (($filters['perspective'] ?? '') === 'opportunities') $query->whereNull('workflow_context->promotional_summary->projection->proactive');
$associated = $this->publicAssociatedIds($filters);
if (($filters['territory_basis'] ?? 'all') === 'direct') {
$query->where(fn ($q) => $q->whereNotNull('opportunities.primary_territory_id')->orWhereExists(fn ($l) => $l->selectRaw('1')->from('opportunity_locations')->whereColumn('opportunity_id', 'opportunities.id')));
} elseif (($filters['territory_basis'] ?? 'all') === 'context') {
$query->whereNull('opportunities.primary_territory_id')->whereNotExists(fn ($l) => $l->selectRaw('1')->from('opportunity_locations')->whereColumn('opportunity_id', 'opportunities.id'));
$query->where(fn ($q) => $q->whereExists(fn ($l) => $l->selectRaw('1')->from('opportunity_projects')->whereColumn('opportunity_id', 'opportunities.id')->whereIn('project_id', app(InvestmentRelations::class)->projectIds()))
->orWhereExists(fn ($l) => $l->selectRaw('1')->from('opportunity_clusters')->whereColumn('opportunity_id', 'opportunities.id')->whereIn('cluster_id', $this->publicStructureIds('clusters', 'cluster_id'))));
->orWhereExists(fn ($l) => $l->selectRaw('1')->from('opportunity_clusters')->whereColumn('opportunity_id', 'opportunities.id')->whereIn('cluster_id', $this->publicStructureIds('clusters', 'cluster_id')))
->orWhere(fn ($source) => $source->where('workflow_context->corridor_agribusiness->source_sha256', CorridorAgribusinessOpportunities::SOURCE_HASH)
->whereIn('workflow_context->corridor_agribusiness->corridor', array_column(config('investment_corridors', []), 'name'))));
}
if (! empty($filters['opportunity_id'])) {
$query->whereKey($filters['opportunity_id']);
@@ -78,12 +82,13 @@ class InvestmentCatalogue
$includeNational = filter_var($filters['include_national'] ?? false, FILTER_VALIDATE_BOOLEAN);
if ($path !== []) {
$ids = app(InvestmentGeography::class)->descendants($path[array_key_last($path)]->id);
$query->where(function ($territory) use ($ids, $includeNational, $filters): void {
$query->where(function ($territory) use ($ids, $includeNational, $filters, $path): void {
$territory->whereIn('opportunities.primary_territory_id', $ids)
->orWhereExists(fn ($locations) => $locations->selectRaw('1')->from('opportunity_locations as territory_link')
->whereColumn('territory_link.opportunity_id', 'opportunities.id')->whereIn('territory_link.geo_location_id', $ids));
if (($filters['territory_basis'] ?? 'all') !== 'direct') {
app(InvestmentRelations::class)->opportunityTerritories($territory, $ids);
if (count($path) === 1) $this->approvedCorridorProvince($territory, $path[0]->id);
}
if ($includeNational) {
$territory->orWhere('opportunities.geography_scope', 'national');
@@ -160,6 +165,9 @@ class InvestmentCatalogue
->whereNull('target.deleted_at')->where('target.data_classification', 'public'));
if (($filters['territory_basis'] ?? 'all') !== 'direct') {
app(InvestmentRelations::class)->opportunityTerritories($matches, $locationIds ?? []);
if (app(InvestmentGeography::class)->publicReferences()->where('id', $filters['geo_location_id'])->where('location_type', 'province')->exists()) {
$this->approvedCorridorProvince($matches, $filters['geo_location_id']);
}
}
});
@@ -210,6 +218,38 @@ class InvestmentCatalogue
};
}
private function approvedCorridorProvince($query, string $provinceId): void
{
$code = app(InvestmentGeography::class)->publicReferences()->where('id', $provinceId)->value('source_code');
$names = [];
foreach (config('investment_corridors', []) as $entry) {
if (in_array($code, $entry['provinces'], true)) $names[] = $entry['name'];
}
if (!$names) return;
$query->orWhere(fn ($context) => $context->whereNull('opportunities.primary_territory_id')
->whereNotExists(fn ($link) => $link->selectRaw('1')->from('opportunity_locations')->whereColumn('opportunity_id', 'opportunities.id'))
->where('workflow_context->corridor_agribusiness->source_sha256', CorridorAgribusinessOpportunities::SOURCE_HASH)
->whereIn('workflow_context->corridor_agribusiness->corridor', $names));
}
/** Public result presentation only; no editorial or territorial data is saved. */
public function presentLocation(Opportunity $record): Opportunity
{
$geo = app(InvestmentGeography::class);
$paths = [];
$ids = array_filter([$record->primary_territory_id, ...$record->additionalTerritories()->pluck('geo_locations.id')->all()]);
foreach (array_unique($ids) as $id) {
$path = $geo->path($id);
if ($path) $paths[] = implode(' / ', array_column($path, 'name'));
}
if ($paths) $label = implode('; ', array_unique($paths));
elseif ($provinces = app(InvestmentCorridorContext::class)->catalogueProvinces($record)) {
$label = implode(' / ', array_column($provinces, 'name')).' — contexto provincial do corredor; distrito e posto administrativo não indicados';
} else $label = implode(' / ', array_filter([$record->province, $record->district])) ?: 'Localização não indicada';
$record->setAttribute('territorial_summary', $label);
return $record;
}
/** @param array<string,mixed> $territoryFilters
* @return array<string,mixed> */
public function references(bool $management = false, array $territoryFilters = []): array
@@ -427,7 +467,7 @@ class InvestmentCatalogue
$located = 0;
foreach ($records as $record) {
$properties = ['id' => $record->id, 'title' => $record->title, 'category' => $record->sector?->name,
'location' => trim($record->province.' '.$record->district), 'url' => '/oportunidades/'.$record->slug.($filters === [] ? '' : '?'.http_build_query($filters))];
'location' => $this->presentLocation($record)->getAttribute('territorial_summary'), 'url' => '/oportunidades/'.$record->slug.($filters === [] ? '' : '?'.http_build_query($filters))];
foreach ($relations as $relation => $groups) {
$properties[$relation] = ($groups->get($record->id) ?? collect())->pluck('name')->unique()->values()->all();
}
+4
View File
@@ -46,6 +46,10 @@ final class InvestmentComplements
} else {
$reference = app(InvestorContext::class)->reference($origin);
abort_unless($reference['kind'] === 'opportunity', 422);
// The context resolver has already checked the actor's private scope.
// A private preparation is valid dossier input, not a public offer
// from which this public-complement catalogue can infer services.
if (($reference['visibility'] ?? 'public') === 'private') return [];
$principal = Opportunity::published()->findOrFail($reference['id']);
$text = $principal->summary;
$basis = 'Resumo cadastrado da oportunidade '.$principal->reference;
@@ -14,6 +14,15 @@ final class InvestmentCorridorContext
return null;
}
/** Reuse Tempo's approved provincial context; never infer a district or master link. */
public function catalogueProvinces(Opportunity $record): array
{
if (data_get($record->workflow_context, 'corridor_agribusiness.source_sha256') !== CorridorAgribusinessOpportunities::SOURCE_HASH) return [];
if ($record->primary_territory_id || $record->additionalTerritories()->exists()) return [];
$key = $this->key($record);
return $key ? $this->provinces($key) : [];
}
public function provinces(string $key): array
{
$entry = config('investment_corridors.'.$key);
+5 -2
View File
@@ -63,10 +63,13 @@ class InvestmentZones
$path = app(InvestmentGeography::class)->selection($filters);
if ($path !== []) {
$territoryIds = app(InvestmentGeography::class)->descendants($path[array_key_last($path)]->id);
$query->where(function ($matches) use ($territoryIds, $management): void {
$ancestorIds = array_column($path, 'id');
$query->where(function ($matches) use ($territoryIds, $ancestorIds, $management): void {
$matches->whereIn('primary_territory_id', $territoryIds)
->orWhereExists(fn ($link) => $link->selectRaw('1')->from('investment_zone_locations as zl')
->whereColumn('zl.zone_id', 'investment_zones.id')->whereIn('zl.geo_location_id', $territoryIds)
->whereColumn('zl.zone_id', 'investment_zones.id')->whereIn('zl.scope_type', ['site', 'administrative', 'legal_scope'])
->where(fn ($area) => $area->whereIn('zl.geo_location_id', $territoryIds)
->orWhere(fn ($coverage) => $coverage->where('zl.scope_type', 'legal_scope')->whereIn('zl.geo_location_id', $ancestorIds)))
->where('zl.validation_status', 'validated')->where(fn ($valid) => $valid->whereNull('zl.valid_from')->orWhereDate('zl.valid_from', '<=', today()))
->where(fn ($valid) => $valid->whereNull('zl.valid_until')->orWhereDate('zl.valid_until', '>=', today())));
if (! $management) {
+2
View File
@@ -159,6 +159,8 @@ final class InvestorContext
$fields['sector_id'] = (string) $o->sector_id;
$fields['sector'] = $o->sector->name;
}
$proactive = $published ? app(ProactiveInvestment::class)->publicData($o) : ($draft['proactive'] ?? null);
if ($proactive) $zoneAnalysis = ['proactive' => $proactive, 'source_key' => $key, 'source_version' => $version, 'private_source' => !$published];
// Text labels do not establish a canonical territorial correspondence.
if ($o->province) {
$fields['province'] = $o->province;
+4 -1
View File
@@ -35,8 +35,11 @@ final class OpportunityCorridorExplorer
$path = collect($context['primary_territory_path'] ?? []);
$province = $path->firstWhere('location_type', 'province')->name ?? $record->province;
$district = $path->firstWhere('location_type', 'district')->name ?? $record->district;
$contextProvinces = app(InvestmentCorridorContext::class)->catalogueProvinces($record);
$provinceOptions = $province ? [$province] : array_column($contextProvinces, 'name');
$item = ['id' => $record->id, 'title' => $record->title, 'slug' => $record->slug, 'summary' => $record->summary,
'province' => $province, 'district' => $district, 'chains' => array_values(array_unique($chains)),
'province' => $province, 'district' => $district, 'provinces' => $provinceOptions,
'territorial_summary' => $catalogue->presentLocation($record)->getAttribute('territorial_summary'), 'chains' => array_values(array_unique($chains)),
'stages' => $stages, 'maturity_label' => $record->maturity_label];
foreach ($corridors ?: ['other' => 'Outras localizações'] as $key => $name) {
$groups[$key] ??= ['id' => $key, 'name' => $name, 'opportunities' => []];
+8 -5
View File
@@ -21,7 +21,7 @@ class OpportunityManagement
public const MATURITY_FIELDS = ['maturity_level', 'maturity_label', 'maturity_stage', 'maturity_catalogue_version'];
public const PRIVATE_DRAFT_FIELDS = [...self::MATURITY_FIELDS, 'real_estate', 'canonical'];
public const PRIVATE_DRAFT_FIELDS = [...self::MATURITY_FIELDS, 'real_estate', 'canonical', 'proactive'];
/** @return array<string,mixed> */
public function values(Opportunity $record): array
@@ -63,7 +63,7 @@ class OpportunityManagement
abort_if(array_key_exists('organization_id', $input) && $input['organization_id'] !== $existingRecord->organization_id, 403, 'A organização não pode ser alterada por edição.');
}
} elseif ($profileCreation) {
abort_unless($access->canCreate($actor, $input['organization_id'] ?? null, $input['opportunity_category'] ?? ''), 403);
abort_unless(($access->canCreate($actor, $input['organization_id'] ?? null, $input['opportunity_category'] ?? '') || (isset($input['proactive']) && empty($input['organization_id']) && !$access->has($actor, 'auditor') && $access->internalAssignment($actor, $input['opportunity_category'] ?? '') !== null)), 403);
} else {
abort_unless($access->legacyWriteAllowed($actor), 403, 'O papel v1 não usa a criação legada para contornar o seu âmbito.');
}
@@ -92,6 +92,7 @@ class OpportunityManagement
'opportunity_category' => ['nullable', Rule::in(self::CATEGORIES)],
'real_estate' => ['sometimes', 'array'],
'canonical' => ['sometimes', 'array'],
'proactive' => ['sometimes', 'array'],
'estimated_investment_amount' => ['nullable', 'regex:/^\d{1,16}(\.\d{1,2})?$/'],
'estimated_investment_currency' => ['nullable', 'in:MZN,USD,EUR,ZAR'],
'reason' => ['required', 'string', 'min:20', 'max:1000'],
@@ -127,6 +128,7 @@ class OpportunityManagement
$this->check($record, $data['etag']);
abort_if($record->trashed() || $record->status === 'archived', 409, 'Restaure antes de editar.');
}
if (array_key_exists('proactive', $data)) $data['proactive'] = app(ProactiveInvestment::class)->draft($data['proactive'], $record, $actor);
$before = $record->getAttributes();
$previousCanonical = $record->exists ? ($this->values($record)['canonical'] ?? []) : [];
$changes = array_intersect_key($data, array_flip([...self::FIELDS, ...self::PRIVATE_DRAFT_FIELDS]));
@@ -170,7 +172,7 @@ class OpportunityManagement
$record->management_version = 1;
$record->estimated_investment_currency = null;
if ($profileCreation) {
abort_unless($access->canCreate($actor, $data['organization_id'] ?? null, $data['opportunity_category'] ?? ''), 403);
abort_unless(($access->canCreate($actor, $data['organization_id'] ?? null, $data['opportunity_category'] ?? '') || (isset($data['proactive']) && empty($data['organization_id']) && !$access->has($actor, 'auditor') && $access->internalAssignment($actor, $data['opportunity_category'] ?? '') !== null)), 403);
$record->owner_user_id = $actor->id;
$record->organization_id = $data['organization_id'] ?? null;
$record->workflow_context = ['policy_version' => PortalProfileAccess::VERSION, 'contributors' => [$actor->id]];
@@ -187,12 +189,12 @@ class OpportunityManagement
$record->management_draft = json_encode([...$previous, ...$changes], JSON_THROW_ON_ERROR);
} else {
foreach ($changes as $key => $value) {
if (in_array($key, ['real_estate', 'canonical', 'maturity_stage', 'maturity_catalogue_version'], true) || (($changes['maturity_catalogue_version'] ?? null) === OpportunityMaturity::VERSION && in_array($key, ['maturity_level', 'maturity_label'], true))) {
if (in_array($key, ['real_estate', 'canonical', 'proactive', 'maturity_stage', 'maturity_catalogue_version'], true) || (($changes['maturity_catalogue_version'] ?? null) === OpportunityMaturity::VERSION && in_array($key, ['maturity_level', 'maturity_label'], true))) {
continue;
}
$record->{$key} = $value;
}
if (isset($changes['maturity_catalogue_version']) || array_key_exists('real_estate', $changes) || array_key_exists('canonical', $changes)) {
if (isset($changes['maturity_catalogue_version']) || array_key_exists('real_estate', $changes) || array_key_exists('canonical', $changes) || array_key_exists('proactive', $changes)) {
// The existing draft JSON holds the versioned catalogue; legacy columns stay intact.
$previous = $record->management_draft ? json_decode($record->management_draft, true, 512, JSON_THROW_ON_ERROR) : [];
$record->management_draft = json_encode([...$previous, ...array_intersect_key($changes, array_flip(self::PRIVATE_DRAFT_FIELDS))], JSON_THROW_ON_ERROR);
@@ -225,6 +227,7 @@ class OpportunityManagement
$record = Opportunity::withTrashed()->whereKey($id)->lockForUpdate()->firstOrFail();
abort_if($record->owner_user_id !== null, 403, 'A v1 exige pedido e decisão de arquivo; não concede exclusão ou restauro ao Promotor.');
$this->check($record, $data['etag']);
if (array_key_exists('proactive', $data)) $data['proactive'] = app(ProactiveInvestment::class)->draft($data['proactive'], $record, $actor);
$before = $record->getAttributes();
if ($data['action'] === 'restore') {
abort_unless($record->trashed() || $record->status === 'archived', 409, 'Registo não está eliminado/arquivado.');
+3 -1
View File
@@ -48,7 +48,7 @@ final class OpportunityPromotion
'limitations' => '', 'territory_ids' => $existing ? DB::table('opportunity_locations')->where('opportunity_id', $record->id)->pluck('geo_location_id')->all() : [],
'sector_id' => $record->sector_id];
return ['record' => ['id' => $record->id, 'reference' => $record->reference], 'etag' => app(OpportunityManagement::class)->etag($record),
'initial' => $form, 'publicNow' => $existing && $record->status === 'published',
'proactiveRelations' => app(ProactiveInvestment::class)->publicationRelations($record), 'proactiveKind' => app(OpportunityManagement::class)->values($record)['proactive']['kind'] ?? null, 'proactiveEnabled' => isset(app(OpportunityManagement::class)->values($record)['proactive']), 'proactiveEvidence' => array_values(array_filter(app(OpportunityManagement::class)->values($record)['proactive']['evidence'] ?? [], fn ($e) => $e['access'] === 'public')), 'proactiveOptions' => app(ProactiveInvestment::class)->options(), 'initial' => [...$form, ...($saved['input']['proactive_public'] ?? null ? ['proactive_public' => $saved['input']['proactive_public']] : [])], 'publicNow' => $existing && $record->status === 'published',
'reauthenticationRequired' => ! app(PortalProfileAccess::class)->mfa($actor),
'sectors' => \App\Models\Sector::catalog()->orderBy('name')->get(['id', 'name']),
'territories' => app(InvestmentGeography::class)->publicReferences()->orderBy('name')->get(['id', 'name', 'location_type']),
@@ -63,6 +63,7 @@ final class OpportunityPromotion
'title' => 'required_if:action,disclose|nullable|string|max:255', 'summary' => 'required_if:action,disclose|nullable|string|max:499',
'description' => 'nullable|string|max:6000', 'limitations' => 'nullable|string|max:2500',
'source_reference' => 'nullable|string|max:2000', 'edition' => 'nullable|string|max:150', 'source_date' => 'nullable|date_format:Y-m-d',
'proactive_public' => 'sometimes|array', 'proactive_reviewed' => 'sometimes|boolean',
'sector_id' => ['nullable', 'integer', Rule::in(\App\Models\Sector::catalog()->pluck('id')->all())],
'territory_ids' => 'sometimes|array|max:30', 'territory_ids.*' => 'required|uuid|distinct',
])->validate();
@@ -83,6 +84,7 @@ final class OpportunityPromotion
$projection = ['title' => $text('title'), 'summary' => $text('summary'), 'description' => $body,
'sector_id' => $data['sector_id'] ?? null, 'maturity_label' => 'Em preparação', 'notice' => self::NOTICE,
'territories' => array_map(fn ($p) => ['id' => end($p)->id, 'label' => implode(' / ', array_column($p, 'name'))], $paths)];
if ($data['action'] === 'disclose' && ($proactive = app(ProactiveInvestment::class)->publication($record, $data))) { $projection['proactive'] = $proactive; $projection['description'] .= "\n\n".implode("\n", [$proactive['group'] === 'ideas' ? 'Ideia em preparação' : ($proactive['group'] === 'needs' ? 'Necessidade — '.$proactive['state'] : 'O que existe'), 'Necessidade: '.$proactive['need'], 'Proposta: '.$proactive['proposal'], 'Fundamento: '.$proactive['basis'], 'Limitações: '.$proactive['limitations'], 'Próximo passo: '.$proactive['next_action'], ProactiveInvestment::NOTICE]); }
if ($data['action'] === 'disclose') abort_unless($projection['title'] !== '' && $projection['summary'] !== '', 422, 'Indique título e resumo em texto simples.');
if ($data['action'] === 'withdraw') $projection = [...$projection, ...$record->only(['title', 'summary', 'description', 'sector_id', 'maturity_label'])];
$payload = ['actor_id' => $actor->id, 'record_id' => $record->id, 'etag' => $data['etag'], 'action' => $data['action'],
+3 -1
View File
@@ -245,7 +245,9 @@ class PortalProfileAccess
return $this->canView($actor, $record) && $this->promoterRecordScope($actor, $record) && ! $record->trashed()
&& in_array($this->state($record), ['draft', 'needs_information'], true)
&& $this->scoped($actor, 'promoter', $record->organization_id, $newType ?? $record->opportunity_category)
&& ($this->scoped($actor, 'promoter', $record->organization_id, $newType ?? $record->opportunity_category)
|| ($record->organization_id === null && isset(app(OpportunityManagement::class)->values($record)['proactive'])
&& $this->internalAssignment($actor, $newType ?? $record->opportunity_category) !== null))
&& $this->operational($actor, 'edit', $record->id);
}
+196
View File
@@ -0,0 +1,196 @@
<?php
namespace App\Services;
use App\Models\Opportunity;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Illuminate\Validation\ValidationException;
/** Analysis in the existing opportunity draft; publication and private preparation remain separate. */
final class ProactiveInvestment
{
public const VERSION = 1;
public const NOTICE = 'A ausência de registo não comprova ausência de oferta. Proximidade não comprova contrato, participação, energia acessível, terra disponível ou benefício fiscal. Necessidade confirmada não comprova viabilidade comercial; hipótese de fornecimento não é encomenda.';
public const GROUPS = ['exists' => 'O que existe', 'needs' => 'Necessidades identificadas', 'ideas' => 'Ideias de investimento'];
public function draft(array $input, ?Opportunity $record = null, ?\App\Models\User $actor = null): array
{
$d = Validator::make(['proactive' => $input], [
'proactive' => 'required|array:version,kind,evidence,need,idea,relations,supply_comparisons', 'proactive.version' => 'required|integer|in:1',
'proactive.kind' => 'required|in:exists,needs,ideas', 'proactive.evidence' => 'present|array|max:60',
'proactive.evidence.*' => 'array:id,category,purpose,statement,interpretation,source,locator,period,scope,coverage,verified_on,access,document_id,observation_id',
'proactive.evidence.*.observation_id'=>'sometimes|nullable|string|size:64',
'proactive.supply_comparisons'=>'sometimes|array|max:40',
'proactive.evidence.*.id' => 'required|uuid|distinct',
'proactive.evidence.*.category' => 'required|in:activity,resource,infrastructure,supply,demand',
'proactive.evidence.*.purpose' => 'required|in:local,methodology',
'proactive.evidence.*.access' => 'required|in:internal,public',
'proactive.evidence.*.document_id' => 'nullable|uuid',
'proactive.evidence.*.verified_on' => 'nullable|date_format:Y-m-d|before_or_equal:today',
...collect(['statement','interpretation','source','locator','period','scope','coverage'])->mapWithKeys(fn ($k) => ['proactive.evidence.*.'.$k => 'present|nullable|string|max:4000'])->all(),
'proactive.need' => 'required|array:state,problem,observed_supply,observed_demand,type,clients,evidence_ids,limitations,missing,confirmation',
'proactive.need.state' => 'required|in:hypothesis,confirmed',
'proactive.need.type' => 'nullable|in:quantity,quality,logistics,processing,coordination,support',
...collect(['problem','observed_supply','observed_demand','clients','limitations','missing','confirmation'])->mapWithKeys(fn ($k) => ['proactive.need.'.$k => 'present|nullable|string|max:6000'])->all(),
'proactive.need.evidence_ids' => 'present|array|max:60', 'proactive.need.evidence_ids.*' => 'uuid|distinct',
'proactive.idea' => 'required|array:solution,activity,chain_id,stage,coverage,mode,resources,assumptions,conditions,pending,next_action',
'proactive.idea.chain_id' => ['nullable','uuid',Rule::exists('value_chains','id')->whereNull('deleted_at')],
'proactive.idea.mode' => 'nullable|in:create,expand,associate',
...collect(['solution','activity','stage','coverage','resources','assumptions','conditions','pending','next_action'])->mapWithKeys(fn ($k) => ['proactive.idea.'.$k => 'present|nullable|string|max:6000'])->all(),
'proactive.relations' => 'present|array|max:40',
'proactive.relations.*' => 'array:id,kind,target_id,relation,reference,evidence_ids',
'proactive.relations.*.id' => 'required|uuid|distinct',
'proactive.relations.*.kind' => 'required|in:project,cluster,corridor,park,chain',
'proactive.relations.*.target_id' => 'required|uuid',
'proactive.relations.*.relation' => 'required|in:documented,hypothesis,proximity',
'proactive.relations.*.reference' => 'required|string|max:4000',
'proactive.relations.*.evidence_ids' => 'present|array|max:60', 'proactive.relations.*.evidence_ids.*' => 'uuid|distinct',
])->validate()['proactive'];
$actor??=auth()->user();
if (!empty($d['supply_comparisons'])) $d['supply_comparisons']=app(ProactiveSupply::class)->comparisons($actor,$d['supply_comparisons'],$record);
foreach($d['evidence'] as &$proof){
if(!empty($proof['observation_id'])){
$canonical=app(ProactiveSupply::class)->evidence($actor,$proof['observation_id'],$record);
if($proof['access']!=='internal') $this->fail('evidence','A observação da base interna não pode ser reclassificada como pública.');
$proof=array_replace($proof,$canonical);
}
}
unset($proof);
foreach($d['supply_comparisons']??[] as $comparison){
if(!in_array($comparison['observation_id'],array_column($d['evidence'],'observation_id'),true))$this->fail('supply_comparisons','A comparação deve conservar a evidência interna da observação seleccionada.');
}
$ids = array_column($d['evidence'], 'id');
foreach ([$d['need'], ...$d['relations']] as $row) {
if (array_diff($row['evidence_ids'], $ids)) $this->fail('evidence', 'Seleccione apenas evidências desta análise.');
}
$seen = [];
foreach ($d['evidence'] as $e) {
$key = mb_strtolower(trim(($e['source'] ?? '').'|'.($e['locator'] ?? '').'|'.($e['statement'] ?? '')));
if (trim($key, '| ') !== '' && isset($seen[$key])) $this->fail('evidence', 'A mesma evidência já foi registada; edite a entrada existente.');
$seen[$key] = true;
if (! empty($e['document_id'])) $this->document($record, $e['document_id'], $e['access'] === 'public');
}
$seen = [];
foreach ($d['relations'] as $row) {
$target = app(OpportunityClassification::class)->targets($row['kind'])->where('id', $row['target_id'])->exists();
if (! $target) $this->fail('relations', 'Referência existente indisponível; não foi criada outra empresa, zona ou estrutura.');
$key = $row['kind'].'|'.$row['target_id'];
if (isset($seen[$key])) $this->fail('relations', 'A referência já está nesta análise; reúna o fundamento na entrada existente.');
$seen[$key] = true;
if ($row['relation'] === 'documented' && ! $row['evidence_ids']) $this->fail('relations', 'Relação documentada exige evidência seleccionada; mantenha hipótese ou proximidade quando não demonstrada.');
}
if ($d['kind'] !== 'exists' && $d['need']['state'] === 'confirmed') {
foreach (['problem','observed_supply','observed_demand','type','clients','confirmation'] as $field) {
if (trim($d['need'][$field] ?? '') === '') $this->fail('need.'.$field, 'Confirmação exige observação e fundamento concretos; pode guardar como hipótese.');
}
if (! $d['need']['evidence_ids']) $this->fail('need.evidence_ids', 'Uma hipótese não é confirmada sem evidência seleccionada.');
foreach ($d['evidence'] as $e) {
if (! in_array($e['id'], $d['need']['evidence_ids'], true)) continue;
if ($e['purpose'] !== 'local') $this->fail('need.evidence_ids', 'Uma referência metodológica internacional não confirma oferta ou procura local. Preserve a hipótese e recolha evidência local.');
foreach (['statement','source','locator','period','scope','coverage','verified_on'] as $field) {
if (trim($e[$field] ?? '') === '') $this->fail('evidence', 'Evidência da necessidade confirmada: faltam facto, fonte, localizador, período, abrangência, cobertura ou data de verificação.');
}
}
}
return $d;
}
private function document(?Opportunity $record, string $id, bool $public): void
{
$row = $record?->exists ? DB::table('opportunity_documents as link')->join('documents as d','d.id','=','link.document_id')
->where('link.opportunity_id', $record->id)->where('d.id', $id)->whereNull('link.deleted_at')->first(['d.data_classification','d.status','d.malware_scan_status','d.sha256','d.malware_scanned_sha256','d.rights_status','link.payload','link.deleted_at']) : null;
if (! $row) $this->fail('evidence', 'Documento não associado à ficha neste âmbito; reutilize o gestor documental existente.');
if ($public && ($row->data_classification !== 'public' || $row->status !== 'active' || $row->malware_scan_status !== 'clean' || $row->sha256 !== $row->malware_scanned_sha256 || $row->rights_status === 'restricted' || data_get(json_decode($row->payload, true), 'visibility') !== 'public')) {
$this->fail('evidence', 'Documento interno, restrito ou sem disponibilização pública: preserve a evidência interna, sem a divulgar.');
}
}
/** No private field is copied into the public summary automatically. */
public function publication(Opportunity $record, array $input): ?array
{
$private = app(OpportunityManagement::class)->values($record)['proactive'] ?? null;
if (! $private) {
if (isset($input['proactive_public'])) $this->fail('publication', 'Prepare a análise antes de divulgar esta síntese.');
return null;
}
$d = Validator::make($input, [
'proactive_reviewed' => 'required|accepted',
'proactive_public' => 'required|array:group,state,need,proposal,basis,limitations,next_action,evidence_ids,chain_id,stage,resources,assumptions,conditions,relation_ids',
'proactive_public.group' => 'required|in:exists,needs,ideas',
'proactive_public.resources'=>'nullable|string|max:2500', 'proactive_public.assumptions'=>'nullable|string|max:2500', 'proactive_public.conditions'=>'nullable|string|max:2500',
'proactive_public.relation_ids'=>'sometimes|array|max:40', 'proactive_public.relation_ids.*'=>'uuid|distinct',
'proactive_public.state' => 'required|in:hypothesis,confirmed', 'proactive_public.chain_id' => 'nullable|uuid', 'proactive_public.stage' => 'nullable|string|max:1000',
'proactive_public.need'=>'required_unless:proactive_public.group,exists|nullable|string|max:2500', 'proactive_public.proposal'=>'required_if:proactive_public.group,ideas|nullable|string|max:2500',
...collect(['basis','limitations','next_action'])->mapWithKeys(fn ($k) => ['proactive_public.'.$k => 'required|string|max:2500'])->all(),
'proactive_public.evidence_ids' => 'present|array|max:60', 'proactive_public.evidence_ids.*' => 'uuid|distinct',
])->validate()['proactive_public'];
$d += ['need'=>'','proposal'=>''];
if ($d['group'] !== $private['kind']) $this->fail('publication', 'O grupo público deve corresponder à análise guardada.');
$proofs = [];
foreach ($d['evidence_ids'] as $id) {
$e = collect($private['evidence'])->firstWhere('id', $id);
if (! $e || $e['access'] !== 'public') $this->fail('publication', 'Não pode divulgar evidência interna nem a sua fonte indirectamente. Redija uma síntese independente ou seleccione evidência pública autorizada.');
if (! empty($e['document_id'])) $this->document($record, $e['document_id'], true);
$proofs[] = array_intersect_key($e, array_flip(['id','category','purpose','statement','source','locator','period','scope','coverage','verified_on']));
}
if ($d['group'] !== 'exists' && $d['state'] === 'confirmed' && ($private['need']['state'] !== 'confirmed' || array_diff($private['need']['evidence_ids'], $d['evidence_ids']))) $this->fail('publication', 'Confirmação pública exige a necessidade confirmada e o fundamento público seleccionado; pode divulgar uma hipótese com limitações explícitas.');
if (!empty($d['chain_id']) && !app(OpportunityClassification::class)->targets('chain')->where('id', $d['chain_id'])->exists()) $this->fail('publication', 'Cadeia de valor pública indisponível.');
$relations=[];
foreach ($d['relation_ids'] ?? [] as $id) {
$r=collect($private['relations'])->firstWhere('id',$id);
if (!$r || array_diff($r['evidence_ids'],$d['evidence_ids'])) $this->fail('publication','A relação exige o fundamento público seleccionado; nenhuma referência interna é copiada.');
$target=app(OpportunityClassification::class)->targets($r['kind'])->where('id',$r['target_id'])->first(['id',OpportunityClassification::TARGETS[$r['kind']][1].' as name']);
if (!$target) $this->fail('publication','Referência pública da relação indisponível.');
$relations[]=['kind'=>$r['kind'],'target_id'=>$r['target_id'],'label'=>$target->name,'relationship'=>$r['relation'],'evidence_ids'=>$r['evidence_ids'],'basis'=>$d['basis']];
}
// Catch literal reuse of private statements, interpretations, references and document identities.
$publicText = mb_strtolower(implode(' ', [...array_filter($input, 'is_scalar'), ...array_filter($d, 'is_scalar')]));
foreach ($private['evidence'] as $e) {
if ($e['access'] === 'public') continue;
foreach (['statement','interpretation','source','locator','document_id'] as $key) {
$value = trim($e[$key] ?? '');
if (mb_strlen($value) >= 10 && str_contains($publicText, mb_strtolower($value))) $this->fail('publication', 'O resumo contém informação de evidência interna. Reveja a síntese e a divulgação indirecta antes de publicar.');
}
}
return [...array_map(fn ($v) => is_string($v) ? trim(strip_tags($v)) : $v, $d),
'version' => self::VERSION, 'relations'=>$relations, 'evidence' => $proofs, 'notice' => self::NOTICE,
'availability_confirmed' => false, 'economic_validation' => false];
}
public function publicData(Opportunity $record): ?array
{
$p = data_get($record->workflow_context, 'promotional_summary.projection.proactive');
return is_array($p) && Opportunity::published()->whereKey($record->id)->exists() ? $p : null;
}
public function publicationRelations(Opportunity $record): array
{
return collect(app(OpportunityManagement::class)->values($record)['proactive']['relations'] ?? [])->map(function($r){
$label=app(OpportunityClassification::class)->targets($r['kind'])->where('id',$r['target_id'])->value(OpportunityClassification::TARGETS[$r['kind']][1]);
return $label?['id'=>$r['id'],'label'=>$label,'relationship'=>$r['relation']]:null;
})->filter()->values()->all();
}
public function history(?Opportunity $record): array
{
if (!$record) return [];
return DB::table('audit_events')->where('source_system', 'opportunity-management')->where('after_data->record_id', $record->id)->orderByDesc('occurred_at')->orderByRaw("(after_data->>'version')::integer DESC")->limit(30)->get()->map(function ($event) {
$entry=json_decode($event->after_data,true);$snapshot=json_decode(Crypt::decryptString($entry['snapshot']),true);
$draft=json_decode($snapshot['management_draft'] ?? '{}',true);$need=$draft['proactive']['need'] ?? null;
return $need ? ['at'=>$event->occurred_at,'version'=>$entry['version'],'state'=>$need['state'],'problem'=>$need['problem'],'confirmation'=>$need['confirmation'],'evidence_ids'=>$need['evidence_ids']] : null;
})->filter()->values()->all();
}
public function options(?Opportunity $record = null): array
{
return ['documents' => $record ? DB::table('opportunity_documents as l')->join('documents as d','d.id','=','l.document_id')->where('l.opportunity_id',$record->id)->whereNull('l.deleted_at')->whereNull('d.deleted_at')->get(['d.id','d.file_name as title'])->all() : [], 'groups' => self::GROUPS, 'references' => collect(['project','cluster','corridor','park','chain'])->mapWithKeys(fn ($kind) => [$kind => app(OpportunityClassification::class)->targets($kind)->orderBy(OpportunityClassification::TARGETS[$kind][1])->limit(300)->get(['id', OpportunityClassification::TARGETS[$kind][1].' as name'])])->all()];
}
private function fail(string $key, string $message): never
{
throw ValidationException::withMessages(['proactive.'.$key => $message]);
}
}
+101
View File
@@ -0,0 +1,101 @@
<?php
namespace App\Services;
use App\Models\Opportunity;
use App\Models\User;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
/** Internal observations, never a public business directory or proof of demand. */
final class ProactiveSupply
{
public const LIMITATIONS = 'Informação administrativa histórica e incompleta. Actividade actual, capacidade, procura e compromissos por confirmar. Ausência de registos significa informação insuficiente, nunca ausência de oferta.';
public function authorize(User $actor, ?Opportunity $record = null): void
{
$access=app(PortalProfileAccess::class);
$internal=collect(OpportunityManagement::CATEGORIES)->contains(fn($type)=>$access->internalAssignment($actor,$type)!==null);
abort_unless($access->legacyWriteAllowed($actor)||$internal,403);
if ($record?->exists) $access->authorize($actor,'view',$record);
}
private function read(User $actor, callable $callback): mixed
{
return DB::transaction(function()use($actor,$callback){
DB::select("select set_config('app.actor_user_id',?,true),set_config('app.proactive_supply_read','internal',true)",[(string)$actor->id]);
return $callback();
});
}
public function search(User $actor,array $input,?Opportunity $record=null): array
{
$this->authorize($actor,$record);
$v=Validator::make($input,[
'territory_id'=>['required','uuid',Rule::exists('geo_locations','id')->whereNull('deleted_at')],
'activity'=>'nullable|string|max:150','sector'=>'nullable|string|max:250','page'=>'nullable|integer|min:1|max:100000',
])->validate();
if(!Schema::hasTable('proactive_supply_observations'))return ['installed'=>false,'rows'=>[],'total'=>null,'limitations'=>self::LIMITATIONS,'status'=>'Base interna ainda não carregada neste ambiente.'];
return $this->read($actor,function()use($v){
$ids=[$v['territory_id']];
// Canonical descendants, not a name-only cross-province match.
$front=$ids;
for($depth=0;$depth<5&&$front;$depth++){
$front=DB::table('geo_locations')->whereIn('parent_id',$front)->whereNull('deleted_at')->pluck('id')->all();
$ids=[...$ids,...$front];
}
$base=DB::table('proactive_supply_observations as o')->join('proactive_supply_sources as s','s.sha256','=','o.source_hash')->whereIn('o.territory_id',$ids);
$sectors=(clone $base)->where('o.sector','<>','')->distinct()->orderBy('o.sector')->pluck('o.sector')->all();
if(!empty($v['sector']))$base->where('o.sector',$v['sector']);
if(!empty($v['activity']))$base->where(fn($q)=>$q->where('o.cae','ilike','%'.$v['activity'].'%')->orWhereRaw("translate(lower(o.activity),'áàâãéêíóôõúç','aaaaeeiooouc') LIKE ?",['%'.strtolower(\Illuminate\Support\Str::ascii($v['activity'])).'%']));
$page=$v['page']??1;
// Exact repeated observations are retained in storage, counted separately.
$total=(clone $base)->whereNull('o.duplicate_of')->count();
$duplicates=(clone $base)->whereNotNull('o.duplicate_of')->count();
$rows=(clone $base)->whereNull('o.duplicate_of')->orderBy('o.name')->orderBy('o.id')->offset(($page-1)*25)->limit(25)->get(['o.id','o.entity_key','o.name','o.province','o.district','o.territory_id','o.territory_resolution','o.cae','o.activity','o.sector','o.source_date','o.sheet','o.row_number','o.source_hash','o.identity_conflict','s.name as source_name','s.period as source_period','s.imported_at']);
$coverage=DB::table('proactive_supply_observations')->selectRaw("count(*) FILTER (WHERE territory_id IS NULL) AS unmapped, count(*) FILTER (WHERE territory_resolution='province_only_district_unknown') AS province_only")->first();
return ['installed'=>true,'rows'=>$rows,'total'=>$total,'duplicate_sightings'=>$duplicates,'page'=>$page,'per_page'=>25,'sectors'=>$sectors,'territory_coverage'=>$coverage,'limitations'=>self::LIMITATIONS,'status'=>$total?'Registos documentais encontrados; não equivalem a empresas únicas ou oferta actual confirmada.':'Informação insuficiente nesta base e nestes filtros.'];
});
}
/** Resolve server-side source lineage; a caller cannot fabricate an internal observation. */
public function comparisons(User $actor,array $input,?Opportunity $record): array
{
$this->authorize($actor,$record);
$v=Validator::make(['rows'=>$input],[
'rows'=>'array|max:40','rows.*'=>'array:observation_id,relationship,rationale,limitations',
'rows.*.observation_id'=>'required|string|size:64|distinct',
'rows.*.relationship'=>'required|in:competition,complementarity,partner,uncertain',
'rows.*.rationale'=>'required|string|max:4000','rows.*.limitations'=>'required|string|max:4000',
])->validate()['rows'];
if(!$v)return [];
abort_unless(Schema::hasTable('proactive_supply_observations'),422,'Base interna indisponível.');
return $this->read($actor,function()use($v){
$fingerprints=[];
foreach($v as $row){
$o=DB::table('proactive_supply_observations')->where('id',$row['observation_id'])->first();
if(!$o)throw \Illuminate\Validation\ValidationException::withMessages(['proactive.supply_comparisons'=>'Registo da oferta indisponível; preserve a referência anterior e confira o ambiente.']);
if($o->duplicate_of!==null||isset($fingerprints[$o->fingerprint]))throw \Illuminate\Validation\ValidationException::withMessages(['proactive.supply_comparisons'=>'Esta observação administrativa é repetida. Compare a referência original uma única vez; a repetição e a sua fonte permanecem conservadas na base interna.']);
$fingerprints[$o->fingerprint]=true;
}
return $v;
});
}
public function evidence(User $actor,string $id,?Opportunity $record): array
{
$this->authorize($actor,$record);
return $this->read($actor,function()use($id){
$o=DB::table('proactive_supply_observations as o')->join('proactive_supply_sources as s','s.sha256','=','o.source_hash')->where('o.id',$id)->first(['o.*','s.name as source_name','s.period as source_period']);
if(!$o)throw \Illuminate\Validation\ValidationException::withMessages(['proactive.evidence'=>'Observação interna indisponível neste ambiente.']);
return ['observation_id'=>$o->id,'category'=>'supply','purpose'=>'local','access'=>'internal','document_id'=>null,
'statement'=>'Registo administrativo: '.$o->name.'; CAE '.$o->cae.'; '.($o->activity?:'actividade por classificar').'; '.$o->district.', '.$o->province.'. Não confirma actividade actual.',
'source'=>$o->source_name.'; SHA256 '.$o->source_hash,'locator'=>$o->sheet.'!linha '.$o->row_number,
'period'=>$o->source_date.'; '.$o->source_period,'scope'=>$o->district.', '.$o->province,
'coverage'=>self::LIMITATIONS.($o->identity_conflict?' Identificador partilhado por denominações divergentes: identidade por conferir.':''),
];
});
}
}
+14 -1
View File
@@ -34,8 +34,20 @@ final class SectorInvestment
return [...$sector->only(['id', 'name', 'slug']), 'href' => SectorOrganization::href($sector->slug)];
}
/** Public detail shared by the catalogue and the individual sector page. */
public function page(Sector $sector): array
{
return [
'sector' => $sector->only(['id', 'name', 'slug', 'description', 'short_description']),
'sectorEntry' => $this->publicView($sector),
'opportunities' => SectorOrganization::opportunities($sector)->latest('published_at')
->limit(12)->get(['id', 'title', 'slug', 'province', 'summary']),
];
}
public function publicView(Sector $sector): array
{
$creation = app(ContentManagement::class)->access(request()->user())['opportunities']['create'] ?? null;
$query = SectorOrganization::opportunities($sector);
$articles = $this->guides($sector);
$relations = [];
@@ -56,7 +68,8 @@ final class SectorInvestment
return ['articles' => $articles, 'relations' => collect($relations)->unique('id')->values()->all(), 'locations' => $locations,
'start_href' => app(InvestorPath::class)->available() ? '/investimentos/a-partir-do-setor/'.$sector->slug : null,
'start_notice' => app(InvestorPath::class)->available() ? null : 'O percurso para guardar a ideia está temporariamente indisponível. A consulta e o apoio continuam disponíveis.',
'register_href' => app(PortalProfileAccess::class)->available() ? '/minhas-oportunidades/create?sector_id='.$sector->id : null,
'register_href' => app(PortalProfileAccess::class)->available() ? ($creation ? $creation.'?sector_id='.$sector->id : '/perfil/promotor') : null,
'register_label' => $creation ? 'Cadastrar oportunidade — escolher modalidade' : 'Pedir acesso para cadastrar oportunidades',
'register_notice' => app(PortalProfileAccess::class)->available() ? null : 'O cadastro por perfis está temporariamente indisponível; pode preparar a ideia e contactar o apoio.',
'specialization_href' => in_array($sector->slug, ['tecnologias-de-informacao', 'mercado-financeiro'], true) ? SectorOrganization::href('fintech') : null,
'content_notice' => $sector->slug === 'mercado-financeiro' ? 'O artigo geral de Mercado Financeiro permanece vazio e não foi publicado. A preparação de negócios neste setor está disponível.' : null];
@@ -0,0 +1,49 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('proactive_supply_sources', function ($t) {
$t->char('sha256',64)->primary();
$t->text('name');
$t->text('period');
$t->text('limitations');
$t->jsonb('receipt');
$t->timestampTz('imported_at');
});
Schema::create('proactive_supply_observations', function ($t) {
$t->char('id',64)->primary();
$t->char('source_hash',64);
$t->foreign('source_hash')->references('sha256')->on('proactive_supply_sources')->restrictOnDelete();
$t->text('sheet');
$t->integer('row_number');
$t->char('entity_key',64)->index();
foreach (['name','province','district','cae','activity','sector','source_date'] as $field) $t->text($field);
$t->char('fingerprint',64)->index();
$t->char('duplicate_of',64)->nullable();
$t->boolean('identity_conflict')->default(false);
$t->uuid('territory_id')->nullable()->index();
$t->text('territory_resolution');
$t->index(['province','district']);
$t->unique(['source_hash','sheet','row_number']);
});
// Technical defence of the private-analysis scope, not a new business role.
foreach (['proactive_supply_sources','proactive_supply_observations'] as $table) {
DB::statement("ALTER TABLE {$table} ENABLE ROW LEVEL SECURITY");
DB::statement("ALTER TABLE {$table} FORCE ROW LEVEL SECURITY");
DB::statement("CREATE POLICY {$table}_private_read ON {$table} FOR SELECT USING (current_setting('app.proactive_supply_read',true)='internal' AND NULLIF(current_setting('app.actor_user_id',true),'')::bigint IS NOT NULL)");
}
}
public function down(): void
{
if (DB::table('proactive_supply_sources')->exists()) throw new RuntimeException('Preserve imported source history before rollback.');
Schema::dropIfExists('proactive_supply_observations');
Schema::dropIfExists('proactive_supply_sources');
}
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,861 @@
{
"status": "grouped_QA_ready_not_installed",
"date": "2026-10-26",
"branch": "codex/irpc-l7-cessation-prior-qa-20261026",
"installed_baseline_reported": "0bd5d495505d512088887efd3dc5c61f645b1647",
"accepted_QA_included": "ba83afe7d8a90fd016fd0cf424418811279285cd",
"runtime_commit": "992c97ad",
"main_incorporated": "ae0d74bb3a5e0220c886dd72801a6550dd4ccbbe",
"merge_commit": "ff84ab64",
"main_presentation_and_V2_01_preserved": true,
"remote_installation_or_recheck_this_pass": false,
"version": "IRPC-normal-adjustments/13",
"scope": "resident annual2026 or fullmonth cessation2026;new historicalcost assets entering2025/2026;constant maximum normalrate,monthlyfromstart,documented prioraccounting/fiscal/recoverable balances;no cumulation",
"scope_choice": "2025/2026 is demonstrated implementation coverage,not a new legal date restriction",
"optional_input": "acceleration.monthly.continuation version1/period/reference/historyReference/monthlyFromStart;exclusive of startPeriod",
"versions10_11_12_keys_results_histories_preserved": true,
"runtime_delta": {
"resources/js/lib/irpc-special.ts": "5b729a8a330765a4adb5c367a25d050c1c5286249187cbeacd820b0436aa6711",
"resources/js/lib/irpc-normal.ts": "b76ecbda7aff09a12ec9d88cd5f6bf099f4ee1ed22a0ab7fd6113422f0085ea2",
"resources/js/components/simulation-irpc-special.tsx": "10afdc4544405dc59a58efeae190c62a90d4c75e71b53dbc0b528cbb50d30991"
},
"L6_depreciation_period_fx_engines_unchanged": true,
"cases_recovered": {
"cessation": {
"period": {
"from": "2026-01-01",
"to": "2026-06-30",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "calculated",
"additional_deduction": {
"numerator": "10",
"denominator": "1"
},
"L7_profit": {
"numerator": "3120",
"denominator": "1"
},
"L7_base": {
"numerator": "3120",
"denominator": "1"
},
"L7_colecta": {
"numerator": "4992",
"denominator": "5"
},
"ledger": [
{
"prior": {
"previousAccounting": "0",
"previousFiscal": "0",
"available": "0",
"reference": "QA ausência declarada de quotas anteriores;activo entrou em2026",
"normalUsed": {
"numerator": "0",
"denominator": "1"
},
"normalRemaining": {
"numerator": "0",
"denominator": "1"
},
"acceleratedUsed": {
"numerator": "0",
"denominator": "1"
},
"acceleratedRemaining": {
"numerator": "0",
"denominator": "1"
},
"normalFiscalRemaining": {
"numerator": "950",
"denominator": "1"
},
"acceleratedFiscalRemaining": {
"numerator": "940",
"denominator": "1"
}
},
"exit": {
"state": "absent",
"date": ""
},
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2026-01-15",
"months": 6,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": {
"numerator": "15",
"denominator": "1"
},
"normalQuota": {
"numerator": "50",
"denominator": "1"
},
"acceleratedQuota": {
"numerator": "75",
"denominator": "1"
},
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": {
"numerator": "60",
"denominator": "1"
},
"additionalDeduction": {
"numerator": "10",
"denominator": "1"
},
"applied": true,
"reason": "Activo existente elegível;taxa normal ×1,5,com limite contabilístico e saldo fiscal."
}
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"prior": {
"period": {
"from": "2026-01-01",
"to": "2026-06-30",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "calculated",
"additional_deduction": {
"numerator": "25",
"denominator": "1"
},
"L7_profit": {
"numerator": "3105",
"denominator": "1"
},
"L7_base": {
"numerator": "3105",
"denominator": "1"
},
"L7_colecta": {
"numerator": "4968",
"denominator": "5"
},
"ledger": [
{
"prior": {
"previousAccounting": "150",
"previousFiscal": "100",
"available": "50",
"reference": "QA quotas contabilísticas150,fiscais100,parcela50 temporariamente tributada;sem encargos permanentemente excluídos",
"normalUsed": {
"numerator": "0",
"denominator": "1"
},
"normalRemaining": {
"numerator": "50",
"denominator": "1"
},
"acceleratedUsed": {
"numerator": "15",
"denominator": "1"
},
"acceleratedRemaining": {
"numerator": "35",
"denominator": "1"
},
"normalFiscalRemaining": {
"numerator": "850",
"denominator": "1"
},
"acceleratedFiscalRemaining": {
"numerator": "825",
"denominator": "1"
}
},
"exit": {
"state": "absent",
"date": ""
},
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2025-01-01",
"months": 6,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": {
"numerator": "15",
"denominator": "1"
},
"normalQuota": {
"numerator": "50",
"denominator": "1"
},
"acceleratedQuota": {
"numerator": "75",
"denominator": "1"
},
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": {
"numerator": "75",
"denominator": "1"
},
"additionalDeduction": {
"numerator": "25",
"denominator": "1"
},
"applied": true,
"reason": "Activo existente elegível;taxa normal ×1,5,com limite contabilístico e saldo fiscal."
}
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"annual": {
"period": {
"kind": "calendar",
"from": "2026-01-01",
"to": "2026-12-31",
"reference": "QA doze meses do plano correspondem ao ano civil completo",
"pending": []
},
"L6_profit": {
"numerator": "6260",
"denominator": "1"
},
"L6_base": {
"numerator": "6260",
"denominator": "1"
},
"L6_colecta": {
"numerator": "10016",
"denominator": "5"
},
"status": "calculated",
"additional_deduction": {
"numerator": "50",
"denominator": "1"
},
"L7_profit": {
"numerator": "6210",
"denominator": "1"
},
"L7_base": {
"numerator": "6210",
"denominator": "1"
},
"L7_colecta": {
"numerator": "9936",
"denominator": "5"
},
"ledger": [
{
"prior": {
"previousAccounting": "150",
"previousFiscal": "100",
"available": "50",
"reference": "QA quotas contabilísticas150,fiscais100,parcela50 temporariamente tributada;sem encargos permanentemente excluídos",
"normalUsed": {
"numerator": "0",
"denominator": "1"
},
"normalRemaining": {
"numerator": "50",
"denominator": "1"
},
"acceleratedUsed": {
"numerator": "30",
"denominator": "1"
},
"acceleratedRemaining": {
"numerator": "20",
"denominator": "1"
},
"normalFiscalRemaining": {
"numerator": "800",
"denominator": "1"
},
"acceleratedFiscalRemaining": {
"numerator": "750",
"denominator": "1"
}
},
"exit": {
"state": "absent",
"date": ""
},
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2025-01-01",
"months": 12,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": {
"numerator": "15",
"denominator": "1"
},
"normalQuota": {
"numerator": "100",
"denominator": "1"
},
"acceleratedQuota": {
"numerator": "150",
"denominator": "1"
},
"normalDeduction": {
"numerator": "100",
"denominator": "1"
},
"acceleratedDeduction": {
"numerator": "150",
"denominator": "1"
},
"additionalDeduction": {
"numerator": "50",
"denominator": "1"
},
"applied": true,
"reason": "Activo existente elegível;taxa normal ×1,5,com limite contabilístico e saldo fiscal."
}
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"exit": {
"period": {
"from": "2026-01-01",
"to": "2026-06-30",
"pending": []
},
"L6_profit": {
"numerator": "9415",
"denominator": "3"
},
"L6_base": {
"numerator": "9415",
"denominator": "3"
},
"L6_colecta": {
"numerator": "15064",
"denominator": "15"
},
"status": "calculated",
"additional_deduction": {
"numerator": "125",
"denominator": "6"
},
"L7_profit": {
"numerator": "6235",
"denominator": "2"
},
"L7_base": {
"numerator": "6235",
"denominator": "2"
},
"L7_colecta": {
"numerator": "4988",
"denominator": "5"
},
"ledger": [
{
"prior": {
"previousAccounting": "150",
"previousFiscal": "100",
"available": "50",
"reference": "QA quotas contabilísticas150,fiscais100,parcela50 temporariamente tributada;sem encargos permanentemente excluídos",
"normalUsed": {
"numerator": "0",
"denominator": "1"
},
"normalRemaining": {
"numerator": "50",
"denominator": "1"
},
"acceleratedUsed": {
"numerator": "5",
"denominator": "2"
},
"acceleratedRemaining": {
"numerator": "95",
"denominator": "2"
},
"normalFiscalRemaining": {
"numerator": "2575",
"denominator": "3"
},
"acceleratedFiscalRemaining": {
"numerator": "1675",
"denominator": "2"
}
},
"exit": {
"state": "known",
"date": "2026-06-20"
},
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2025-01-01",
"months": 5,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": {
"numerator": "15",
"denominator": "1"
},
"normalQuota": {
"numerator": "125",
"denominator": "3"
},
"acceleratedQuota": {
"numerator": "125",
"denominator": "2"
},
"normalDeduction": {
"numerator": "125",
"denominator": "3"
},
"acceleratedDeduction": {
"numerator": "125",
"denominator": "2"
},
"additionalDeduction": {
"numerator": "125",
"denominator": "6"
},
"applied": true,
"reason": "Activo existente elegível;taxa normal ×1,5,com limite contabilístico e saldo fiscal."
}
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"missing": {
"period": {
"from": "2026-01-01",
"to": "2026-06-30",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "indeterminate",
"additional_deduction": null,
"L7_profit": null,
"L7_base": null,
"L7_colecta": null,
"ledger": [
{
"prior": {
"previousAccounting": "150",
"previousFiscal": "100",
"available": "50",
"reference": "QA quotas contabilísticas150,fiscais100,parcela50 temporariamente tributada;sem encargos permanentemente excluídos",
"normalUsed": {
"numerator": "0",
"denominator": "1"
},
"normalRemaining": {
"numerator": "50",
"denominator": "1"
},
"acceleratedUsed": null,
"acceleratedRemaining": null,
"normalFiscalRemaining": {
"numerator": "850",
"denominator": "1"
},
"acceleratedFiscalRemaining": null
},
"exit": {
"state": "absent",
"date": ""
},
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2025-01-01",
"months": 6,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": null,
"normalQuota": {
"numerator": "50",
"denominator": "1"
},
"acceleratedQuota": null,
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": null,
"additionalDeduction": null,
"applied": false,
"reason": "CBF16 cessação/quotas anteriores:identifique período,suporte da vigência/condições e das quotas anteriores ou ausência;duodécimos desde a entrada emuso por documentar. Sem recalcular ou presumir saldos anteriores."
}
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"negative": {
"period": {
"from": "2026-01-01",
"to": "2026-06-30",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "calculated",
"additional_deduction": {
"numerator": "0",
"denominator": "1"
},
"L7_profit": {
"numerator": "3130",
"denominator": "1"
},
"L7_base": {
"numerator": "3130",
"denominator": "1"
},
"L7_colecta": {
"numerator": "5008",
"denominator": "5"
},
"ledger": [
{
"prior": {
"previousAccounting": "150",
"previousFiscal": "100",
"available": "50",
"reference": "QA quotas contabilísticas150,fiscais100,parcela50 temporariamente tributada;sem encargos permanentemente excluídos",
"normalUsed": {
"numerator": "0",
"denominator": "1"
},
"normalRemaining": {
"numerator": "50",
"denominator": "1"
},
"acceleratedUsed": null,
"acceleratedRemaining": null,
"normalFiscalRemaining": {
"numerator": "850",
"denominator": "1"
},
"acceleratedFiscalRemaining": null
},
"exit": {
"state": "absent",
"date": ""
},
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2025-01-01",
"months": 6,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": null,
"normalQuota": {
"numerator": "50",
"denominator": "1"
},
"acceleratedQuota": null,
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": null,
"additionalDeduction": {
"numerator": "0",
"denominator": "1"
},
"applied": false,
"reason": "Condição negativa documentada;quota normal mantida."
}
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"absent": {
"period": {
"from": "2026-01-01",
"to": "2026-06-30",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "absent",
"additional_deduction": {
"numerator": "0",
"denominator": "1"
},
"L7_profit": {
"numerator": "3130",
"denominator": "1"
},
"L7_base": {
"numerator": "3130",
"denominator": "1"
},
"L7_colecta": {
"numerator": "5008",
"denominator": "5"
},
"ledger": [],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
}
},
"checks": {
"new_frontend_tests": 11,
"API_tests": 1,
"API_assertions": 123,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_host": "127.0.0.1",
"API_port": 55441,
"transaction_rollback": true,
"wayfinder_with_form": true,
"typescript_after_main": true,
"build_after_main": true,
"HTML_financial_dossier_from_7_API_recoveries": true,
"UI": {
"actualComponent": true,
"explicitPreparationAndCancel": true,
"missingOnlyDependentL7": true,
"assetsAndPeriodNotEdited": true,
"prior15RecoveredWithin75DeductionAdditional25": true,
"prior35RemainingNotConsumed": true,
"annual30RecoveredWithin150DeductionAdditional50": true,
"cessationDoesNotImplyAssetExit": true,
"documentedExit5MonthsExact125over6": true,
"saveRecoverDownload": true,
"negativeAbsenceDistinct": true,
"accepted12DoesNotGainConflictingInput": true,
"L8FinalUnknown": true,
"errors": []
},
"accepted_ba83_proofs_reused_not_rerun": true
},
"preservation": {
"tracked_files_compared_before_documentation": 2816,
"unchanged": 2810,
"changed": [
"docs/investmoz/unification/traceability-and-manual.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
"resources/js/components/simulation-irpc-special.tsx",
"resources/js/lib/irpc-normal.ts",
"resources/js/lib/irpc-special.ts",
"resources/js/pages/portal/why-invest.tsx"
],
"main_changes_reconciled_separately": [
"docs/investmoz/unification/traceability-and-manual.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
"resources/js/pages/portal/why-invest.tsx"
],
"original_files": {
"docs/investmoz/simulations/source-archive/AT-Comunicado-9-2026-ISPC.pdf": "106f8a9ce9255c03549c70bf07fe999d32e6e55302d009b509862aa74ccb4973",
"docs/investmoz/simulations/source-archive/AT-MRFTA-19-39.pdf": "8ea62c53066b482f87078a7a7b1ecf15ca98a12a122e8d7abca63acfc993186b",
"docs/investmoz/simulations/source-archive/AT-Modelo-30-ISPC.pdf": "6802edd06b6ff638a0b851a3ec7ecf69af8f07840faa47446becad67d35d445c",
"docs/investmoz/simulations/source-archive/AT-Modelo-B-Geral.pdf": "bd977c7c59d4d98befd92e2c566b1bf168cb1343bb519f51b41a3807f431fc57",
"docs/investmoz/simulations/source-archive/BM-Mercado-Monetario-MAIBOR-20261025.html": "00e8a7e0d3a1db4ca3beb56d5361b2084a0f1684f3d40fc1c203702a2190e063",
"docs/investmoz/simulations/source-archive/BR-16-I-Serie-2008-04-16.pdf": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
"docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"docs/investmoz/simulations/source-archive/BR-89-I-Serie-2017-06-08.pdf": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
"docs/investmoz/simulations/source-archive/BR-95-I-Suplemento-2025-05-21.pdf": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
"docs/investmoz/simulations/source-archive/BR252-I-Serie-2022-Lei20-PESOE.pdf": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"docs/investmoz/simulations/source-archive/Decreto-22-2021-BR70.pdf": "a8fac38dcfe08f9c7a8e46254cff10e1ec82fc4f7a8d88ad6e4fe7d91ffc21a5",
"docs/investmoz/simulations/source-archive/Decreto-27-2026-BR123.pdf": "26249c3fa58f149c81de36e99d1aac2819a4771379d9e8833159660dabf539bb",
"docs/investmoz/simulations/source-archive/Decreto-29-1998-BR22-5-suplemento.pdf": "6242cbe675faadf085f43f95ec8c7e8868aafe67c3b2ab2bb010992288f954f8",
"docs/investmoz/simulations/source-archive/Decreto-3-2011-BR-11-I-mineiros.pdf": "5bca1133666ba9c69870b89823420175b7b5b8d0eccb667ecdf5c29716f3b6be",
"docs/investmoz/simulations/source-archive/Decreto-37-2023-BR124.pdf": "7e680b191481faa0e2e9057fa5053587eb2a29d1d8c819e0eb9f02814255a04c",
"docs/investmoz/simulations/source-archive/Decreto-9-2008-BR16.pdf": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
"docs/investmoz/simulations/source-archive/Lei-14-1992-BR42.pdf": "089fff7423e99a70a230a73ca379e4ea3a91d124703f91016e57ff82794b9e56",
"docs/investmoz/simulations/source-archive/Lei-17-2022-BR251-exemplar-MCNet5.pdf": "14eb34f0af91a8f5cb1770c7b52d6ff839c6818302d1ed96d79afbfb9fe999d4",
"docs/investmoz/simulations/source-archive/Lei-17-2022-IPP-BR250-Parlamento.pdf": "978cd22403ffd336a631704ecd7a5bbd814a427c815b9acdaca5515591dd9e2a",
"docs/investmoz/simulations/source-archive/Lei-19-2013-BR76.pdf": "bba96d645cc935ffc3d1a79b9f0f73ac1c693d6459c2ad41f56cd2841accae76",
"docs/investmoz/simulations/source-archive/Lei-19-2017-IRPS-BR-OCAM.pdf": "c3a0186cb9ad090d7a9533006295dc9bb6a62ad0d6150173cbd49dba4ee4b52d",
"docs/investmoz/simulations/source-archive/Lei-2-2011-BR-1-4-suplemento-MCNet.pdf": "a7543a68cc3287a46a83c39a04821b40f649dd06c4e9b5dc51ff0b47fba08899",
"docs/investmoz/simulations/source-archive/Lei-20-2009-BR36-AT-exemplar19.pdf": "fc1c8144db42960cbf73e717e095896f511ece0f907f58f78819b27d6917a7ee",
"docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
"docs/investmoz/simulations/source-archive/Lei-34-2007-BR52.pdf": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"docs/investmoz/simulations/source-archive/Lei-4-1994-BR37-3-suplemento.pdf": "210df9db8980d0a5690cd187a6eeec7e37a900d743e39062c16f4e0d12215c7e",
"docs/investmoz/simulations/source-archive/Lei-4-2012-BR3.pdf": "b8845cef41dcbd9ba50c43dbfa743a56030dd3d348242a107e1ae30279eec121",
"docs/investmoz/simulations/source-archive/Lei-7-1991-Partidos-IFES.pdf": "6b783a0bb3330688ef10660a58060d9724aa2da6a873d234fe902f0eaaeda42d",
"docs/investmoz/simulations/source-archive/PT-MZ-CDT-1992.pdf": "d504e1024b28aee5c6acf4592acb96ec9c915a8414f67a61ab6984d6acf9df9d",
"docs/investmoz/simulations/source-archive/PT-MZ-Protocolo-2009.pdf": "f353773dcf41f09f4daa6cf5ba5a5f7994f3e02615867c2dcffc61c3d901bf9b"
},
"histories_plan_assets_and_declared_balances_unchanged": true,
"official_balances_not_consumed": true,
"active_migrations": 0,
"active_writes": 0,
"SGF_TEMPO_touched": false
},
"source_reused": {
"decree": "Decreto72/2013",
"articles": [
"3(3)",
"9(1-3)",
"10"
],
"visual_reused_pages": [
2,
3
],
"local_original": "C:\\laragon\\www\\portal-investidor-irpc-l6-depreciation-qa-20261026\\outputs\\irpc-l6-depreciation\\decreto-72-2013.pdf",
"sha256": "922ef67cb0c1111405c3c0a092d8c302a74fba8a34d627b6e9e13223612e0659",
"CBF": "accepted APIEX compilation,articles3/9/10/16",
"CIRPC": "accepted period7(4)",
"inventory_files": 8143,
"no_broad_research_repeated": true
},
"remaining_code": [
"other autonomousexpense origins/parcels",
"mixed/withheld cooperative income and other9-14entities",
"CBF16 pre2025entries,otherperiods/partialmonths/transition,exits outside demonstratedscope,lowerquota,methods/categories/cumulation",
"capitalgains61-A and specialoperations54-56/41-A",
"CBF17-19 and potential15entitlement;annualuseL8",
"sector/territorial/specificregimes",
"official L7 M20/M22 transport"
],
"document_conditions": [
"nature/parcels/period",
"required recognition or exception",
"reconciliation of actual prioraccounting/fiscal/temporaryrecoverable balances",
"specific normativeperiod/cumulationorder/limits",
"form edition/field/fraction representation"
],
"future_delivery_requires": [
"current main compatibility recheck",
"fresh space/inodes/build/backup capacity",
"fresh backup/restore",
"keep active until new ready"
],
"L6_operational_delimited": true,
"L7_partial": true,
"L8_final_balance_separate": true,
"evidence_directory": "outputs/irpc-l7-cessation-prior"
}
@@ -0,0 +1,789 @@
{
"status": "L7_combinations_installed",
"installed": {
"status": "installed",
"commit": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"release": "/var/www/investmoz-homologacao/releases/f8d57bddf96b4610604a013fcc5bdd703c7dc6d5-7a31e8ac",
"previous_release": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"database_migrations": 0,
"content_imports": 0
},
"previous_installed": "a7434cd27c09df3d8e6c586f9676b67abcde798e",
"preserved_fiscal_delivery": "632dc069",
"backup": {
"stage": "/var/backups/investmoz-irpc-l7-combinations-delivery-20261026/backup",
"created_at": "2026-10-26T14:20:47Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "2a069fcda7a89368323cda9d5339e76e545b85088de594c1e5a585891dd7b3c3",
"files_sha256": "289ebdcb8cf1983f8fcdb237d3fb947d43fbe71a575064cede233368d43b4584",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_l7_combinations_restore_20261026",
"port": 55441,
"source_dump_sha256": "2a069fcda7a89368323cda9d5339e76e545b85088de594c1e5a585891dd7b3c3",
"active_database_writes": 0
},
"backup_restore_verified": true,
"capacity_before_recovery": {
"checked_at_UTC": "2026-10-26T14:16:50.285126+00:00",
"installed": {
"status": "installed",
"commit": "a7434cd27c09df3d8e6c586f9676b67abcde798e",
"release": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"previous_release": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"release_revision": {
"commit": "a7434cd27c09df3d8e6c586f9676b67abcde798e",
"branch": "main",
"built_at": "2026-10-26T14:07:54.031522+00:00",
"manifest_sha256": "06af8bbd9ffabeac215cbb0357531f4e4169955461d8cfac380f3776e923e64e"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5430136832,
"available_inodes": 21367883,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5430136832,
"available_inodes": 21367883,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5430136832,
"available_inodes": 21367883,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5430136832,
"available_inodes": 21367883,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5430136832,
"available_inodes": 21367883,
"total_inodes": 29089792
}
],
"free_bytes": 5430136832,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175918494,
"same_partition_release_and_backup": true,
"space_guard_satisfied": false,
"current_release_entry_reference": 31237,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"regenerable_Node_cache_recovery": {
"at_UTC": "2026-10-26T14:18:26.184720+00:00",
"target": "/tmp/node-compile-cache",
"kind": "Node versioned compilation cache;source and node_modules retained;regenerable by Node",
"files_removed": 6893,
"logical_bytes": 206715844,
"free_before": 5429366784,
"free_after": 5652504576,
"recovered_bytes": 223137792,
"installed_record_unchanged": true,
"directory_owner_permissions_preserved": true,
"projects_releases_backups_originals_logs_untouched": true,
"active_business_writes": 0
},
"capacity_before": {
"checked_at_UTC": "2026-10-26T14:19:01.971003+00:00",
"installed": {
"status": "installed",
"commit": "a7434cd27c09df3d8e6c586f9676b67abcde798e",
"release": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"previous_release": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"release_revision": {
"commit": "a7434cd27c09df3d8e6c586f9676b67abcde798e",
"branch": "main",
"built_at": "2026-10-26T14:07:54.031522+00:00",
"manifest_sha256": "06af8bbd9ffabeac215cbb0357531f4e4169955461d8cfac380f3776e923e64e"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5652262912,
"available_inodes": 21374782,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5652262912,
"available_inodes": 21374782,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5652262912,
"available_inodes": 21374782,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5652262912,
"available_inodes": 21374782,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5652242432,
"available_inodes": 21374780,
"total_inodes": 29089792
}
],
"free_bytes": 5652262912,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175918494,
"same_partition_release_and_backup": true,
"space_guard_satisfied": true,
"current_release_entry_reference": 31237,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"capacity_after_backup": {
"checked_at_UTC": "2026-10-26T14:22:54.407089+00:00",
"installed": {
"status": "installed",
"commit": "a7434cd27c09df3d8e6c586f9676b67abcde798e",
"release": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"previous_release": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"release_revision": {
"commit": "a7434cd27c09df3d8e6c586f9676b67abcde798e",
"branch": "main",
"built_at": "2026-10-26T14:07:54.031522+00:00",
"manifest_sha256": "06af8bbd9ffabeac215cbb0357531f4e4169955461d8cfac380f3776e923e64e"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5472501760,
"available_inodes": 21374766,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5472501760,
"available_inodes": 21374766,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5472501760,
"available_inodes": 21374766,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5472501760,
"available_inodes": 21374766,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5472501760,
"available_inodes": 21374766,
"total_inodes": 29089792
}
],
"free_bytes": 5472501760,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175918494,
"same_partition_release_and_backup": true,
"space_guard_satisfied": false,
"current_release_entry_reference": 31237,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"post_backup_existing_build_minimum_satisfied": true,
"post_backup_next_fresh_backup_guard_not_required_for_already_completed_backup": true,
"capacity_after_installation": {
"checked_at_UTC": "2026-10-26T14:29:30.537317+00:00",
"installed": {
"status": "installed",
"commit": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"release": "/var/www/investmoz-homologacao/releases/f8d57bddf96b4610604a013fcc5bdd703c7dc6d5-7a31e8ac",
"previous_release": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/f8d57bddf96b4610604a013fcc5bdd703c7dc6d5-7a31e8ac",
"release_revision": {
"commit": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"branch": "main",
"built_at": "2026-10-26T14:26:51.629481+00:00",
"manifest_sha256": "367be71b25b56a83571d610e211ea11beae2af87989d62ef6cc7b9c54eabf580"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4441751552,
"available_inodes": 21342698,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4441751552,
"available_inodes": 21342698,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4441751552,
"available_inodes": 21342698,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4441747456,
"available_inodes": 21342697,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4441747456,
"available_inodes": 21342696,
"total_inodes": 29089792
}
],
"free_bytes": 4441751552,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175918494,
"same_partition_release_and_backup": true,
"space_guard_satisfied": false,
"current_release_entry_reference": 31259,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"next_delivery_capacity_adjustment_required": true,
"delta": [
{
"path": "resources/js/lib/irpc-special.ts",
"sha256_LF": "aea0e55b9317ca8ebb313a02e5e92c5b0bac805157d67d54f7c30c71068f46e6"
},
{
"path": "resources/js/lib/irpc-normal.ts",
"sha256_LF": "bce82366ab4ae41fc5f889d9a68d041604e1c032823e4a9384a1227e170c649b"
},
{
"path": "resources/js/components/simulation-irpc-special.tsx",
"sha256_LF": "de77c20af4f07cb2fda31b94cb2c163b627b987d816b43e196590afe59d22fb8"
},
{
"path": "resources/js/lib/irpc-special-combinations.ts",
"sha256_LF": "0c80d39930e2a3f598ba2fed6d7e31252bc24211b5a908778367e2451fcbc90c"
}
],
"preservation": {
"previous_release_preserved": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"installed": {
"status": "installed",
"commit": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"release": "/var/www/investmoz-homologacao/releases/f8d57bddf96b4610604a013fcc5bdd703c7dc6d5-7a31e8ac",
"previous_release": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"database_migrations": 0,
"content_imports": 0
},
"runtime_files_verified": 4,
"preserved_L3_ISPC_FX_runtime_files_verified": 68,
"documentary_files_verified": 31,
"persistent_files_and_env_verified": 369,
"tables_compared": 174,
"changed_tables": {
"cache": {
"before": {
"rows": 106,
"checksum": "0d909f267cc44165e41d5ac5e966448f"
},
"after": {
"rows": 106,
"checksum": "8381b51b093febcc81854e20cb22bec8"
}
},
"sessions": {
"before": {
"rows": 12,
"checksum": "aa6448d95c23f325f4e2004fb48315ce"
},
"after": {
"rows": 13,
"checksum": "e64cf16446c054a7e852f4944574dabf"
}
}
},
"preserved_counts": {
"published_fiches": 29,
"relations": 28,
"geometries": 408
},
"migration_count": 0,
"content_imports": 0,
"comparison_role": "postgres_before_and_after;sameexportedsnapshotbaseline;noapplicationRLSvisibilityinference",
"writes_by_verification": 0
},
"schema_permissions_after": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 106,
"after_rows": 106,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 12,
"after_rows": 14,
"changes": [
{
"key_sha256": "d8e8fff391c7cb6369d141adae95227c9616f39055ffd58b5fda3f0cc6eda2a4",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "1618c52511f4c5d1fba6bbf74167ce464d7fbe7a121a937cab645415fa7f0878",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"public": {
"status": "installed_delta_verified",
"served_revision": {
"commit": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"branch": "main",
"built_at": "2026-10-26T14:26:51.629481+00:00",
"manifest_sha256": "367be71b25b56a83571d610e211ea11beae2af87989d62ef6cc7b9c54eabf580"
},
"manifest_hash_matches": true,
"compiled_delta_markers": {
"IRPC-normal-adjustments/14": [
"assets/project-dossier-JLJx7klI.js"
],
"Preparar cumulações dos tratamentos L7 registados": [
"assets/services-BKUDFoA6.js"
],
"Combinação incompatível": [
"assets/project-dossier-JLJx7klI.js"
],
"única diferença adicional:": [
"assets/project-dossier-JLJx7klI.js"
],
"IRPC-normal-adjustments/13": [
"assets/project-dossier-JLJx7klI.js"
],
"Preparar CBF16 para início de actividade": [
"assets/services-BKUDFoA6.js"
],
"Preparar CBF16 para cessação e quotas anteriores": [
"assets/services-BKUDFoA6.js"
],
"sem consumo de saldos oficiais": [
"assets/project-dossier-JLJx7klI.js"
],
"Preparar CBF16 com duodécimos": [
"assets/services-BKUDFoA6.js"
],
"CBF16 — duodécimos reutilizados de L6": [
"assets/project-dossier-JLJx7klI.js"
],
"Suporte dos duodécimos CBF16": [
"assets/services-BKUDFoA6.js"
],
"Manter preparação anual CBF16": [
"assets/services-BKUDFoA6.js"
],
"CBF16 por duodécimos — ": [
"assets/project-dossier-JLJx7klI.js"
],
"diferença adicional:": [
"assets/project-dossier-JLJx7klI.js"
],
"IRPC-normal-adjustments/10": [
"assets/project-dossier-JLJx7klI.js"
]
},
"assets": [
{
"file": "assets/project-dossier-document-W46BRNSe.js",
"status": 200,
"sha256": "80e14fba26e9e81f840ba09eb3f9e24a70404bbe7e6933b490b3085299a6186f"
},
{
"file": "assets/services-BKUDFoA6.js",
"status": 200,
"sha256": "0ac8c266fcecec0e564619948f4cec28cd2572975aff70acc6997971a67fcfd9"
},
{
"file": "assets/project-dossier-JLJx7klI.js",
"status": 200,
"sha256": "1016cb33e4476a95e1a06ce17fad4312efc93aef01994a2674e251d00c884f0b"
},
{
"file": "assets/simulation-form-zFZ4YNrB.js",
"status": 200,
"sha256": "338068b86cce1c3215ee71b1328a6cb2f754b903ed78ff1886f8554df506d2d6"
}
],
"simulator_status": 200,
"simulator_entry": "assets/app-BPLj40Iz.js",
"synthetic_private_writes": 0,
"method": "Read-only installedrevision/manifest/newcompiledcatalogueandreaders/simulatorentry;acceptedQAproofsreused"
},
"pipeline": {
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"installed": {
"status": "installed",
"commit": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"release": "/var/www/investmoz-homologacao/releases/f8d57bddf96b4610604a013fcc5bdd703c7dc6d5-7a31e8ac",
"previous_release": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"database_migrations": 0,
"content_imports": 0
},
"latest_report": {
"status": "installed",
"commit": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"release": "/var/www/investmoz-homologacao/releases/f8d57bddf96b4610604a013fcc5bdd703c7dc6d5-7a31e8ac",
"previous_release": "/var/www/investmoz-homologacao/releases/a7434cd27c09df3d8e6c586f9676b67abcde798e-60070b10",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"f8d57bddf96b4610604a013fcc5bdd703c7dc6d5"
],
"finished_at": "2026-10-26T14:26:54.452008+00:00"
},
"log_file": "1793024604346159017.log",
"summaries": [
"OK (1 test, 3106 assertions)",
"built in 32.14s",
"OK (59 tests, 317 assertions)",
"# tests 1054",
"# pass 1054",
"# fail 0"
],
"log_bytes": 299642
},
"accepted_QA_proofs_reused": {
"new_frontend_tests": 12,
"API_tests": 1,
"API_assertions": 133,
"QA_database": "simulator_fiscal_delta_20261021_test",
"QA_host": "127.0.0.1",
"QA_port": 55441,
"QA_transaction_rollback": true,
"wayfinder_with_form": true,
"typescript": true,
"build": true,
"recovered_HTML_and_financial_dossier": 7,
"UI": {
"actualComponent": true,
"explicitPrepareCancel": true,
"assetsPeriodsBenefitsNotEdited": true,
"missingOnlyDependentL7": true,
"CBF16Additional25ThenCooperative16": true,
"prior15AlreadyIncluded": true,
"specificGenericIncompatibilityNoAutomaticChoice": true,
"unmappedExceptionIndeterminate": true,
"autonomous35NotHalved": true,
"saveRecoverDownload": true,
"accepted13InputPreserved": true,
"L8FinalUnknown": true,
"errors": []
},
"accepted13_exact_model_key_history_comparison": true,
"accepted_suites_not_rerun": true,
"typescript_build_after_main": true
},
"no_custom_QA_suite_repeated": true,
"L7_remaining_code": [
"other combinations and express exceptions",
"CBF17-19 and potential15 entitlement",
"specific sector/territorial regimes",
"mixed/withheld cooperativeincome and otherentities",
"other autonome expense origins",
"furtherCBF16 scopes",
"capitalgains/specialoperations",
"officialL7M20M22transport"
],
"L7_resume_conditions": [
"disposition/article/scope/period/order/limit and segregatedparcel for combination",
"implement not-yet-supported treatment before adding its effect",
"specific document only for dependentcase/field"
],
"L8_first_increment": {
"status": "L8_first_increment_delimited_not_implemented",
"date": "2026-10-26",
"installed_L7": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"no_new_L8_calculator_installed": true,
"initial_scope": "resident general IRPC,annualcivil2026,MZN,currentdetermined assessment,documented absence of positive PEC/unmappedcredits and autonomoustax needing ownsettlement",
"inputs_reused": [
"current L6 or applicable qualifiedL7 assessment key/version/subjectNUIT/period;never add both",
"L5 received/effective/on_account qualified and reconciled withholding proofs",
"actual documented PPC payments by subject/period/receipt",
"known/declaredabsence/missing states for every credit/paymentfamily"
],
"wrong_credits_excluded": [
"withholding remitted by enterprise on payments to others",
"definitive withholding",
"projected amount without effective proof",
"duplicate receipt/allocation/year",
"unmapped positive PEC/investment/doubletax credit"
],
"sequence": [
"validassessment",
"admissibledeductions and explicitabsence",
"effective onaccount withholdings",
"actual PPC",
"signed arithmeticbalance",
"applicable collection/refund minimum rules",
"simulatedpayable orrecoverable;not submittedor receivedrefund"
],
"proposed_acceptance_cases": [
{
"colecta": "1408",
"withholdings": "300",
"PPC": "500",
"arithmetic_balance": "608"
},
{
"colecta": "1408",
"withholdings": "1000",
"PPC": "600",
"arithmetic_balance": "-192"
},
{
"colecta": "1408",
"withholdings": "408",
"PPC": "1000",
"arithmetic_balance": "0"
},
"minimumrule boundaries afterperiod/version mapping",
"knownzero vs declaredabsence vs missing",
"wrongbeneficiary/definitive/duplicates",
"calculation-save-recover-report with oldhistories unchanged"
],
"cases_tested_now": false,
"rule_work_before_implementation": [
"CIRPC63/67 with Lei12/2025 nature applicable",
"Decreto9/2008 art21(2-5) deductionorder/limits and27(1-2/6) settlement",
"100MZN minimum in accepted2008 exemplar:link to applicable version/period before enabling parameter;no generic credibility revalidation",
"retain PEC/credits distinct and nonrefundable limits;no3/5year automaticcarry"
],
"boundaries": [
"qualified cooperative withoutwithheldincome cannot silently acceptpositivereceivedwithholdings without L7segregation",
"no L6fallback toignore applicablependingL7effect",
"autonomoustax/61Apositive needs own settlement articulation",
"fraction exact;unmapped formrepresentation onlyblocks affectedtransport"
],
"deferred": [
"automatic PPC/PEC obligationcalculation",
"positivePEC/creditorderlimitscarry",
"autonomoustaxsettlement",
"specialperiods/foreigncurrencypayments",
"interest/penalties/calendar/guideremittance",
"AT submission/refundprocessing",
"unmappedM20M22fields"
],
"sources_reused": [
{
"file": "C:\\laragon\\www\\portal-investidor-irpc-l7-common-qa-20261026\\docs\\investmoz\\simulations\\source-archive\\Lei-34-2007-BR52.pdf",
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"articles": "CIRPC63/67",
"PDF_pages": [
18,
19
],
"official_source_acceptance_preserved": true
},
{
"file": "C:\\laragon\\www\\portal-investidor-irpc-l7-common-qa-20261026\\docs\\investmoz\\simulations\\source-archive\\Decreto-9-2008-BR16.pdf",
"sha256": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"articles": "RIRPC21/27",
"PDF_pages": [
6,
7
],
"official_source_acceptance_preserved": true
},
{
"file": "C:\\laragon\\www\\portal-investidor-irpc-l7-common-qa-20261026\\docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"articles": "Lei12/2025 IRPC67/version2026",
"PDF_pages": [
18,
19,
20
],
"official_source_acceptance_preserved": true
}
],
"global_effort": {
"initial_L8_L14_reference_hours": [
240,
416
],
"is_current_remainingforecast": false,
"reconciliation_before_globalforecast": [
"implemented/reusable vs remainingcode perlot",
"reuseacceptedproofs;no duplicate sharedcomponentestimate",
"documentarywait separately",
"L1-L7residuals,integration/delivery,L15-L16 included"
]
},
"L7_partial": true,
"L8_final_still_not_implemented": true
},
"global_effort_forecast_not_assumed": true,
"L6_operational_delimited": true,
"L7_partial": true,
"L8_final_separate": true,
"SGF_TEMPO_untouched": true
}
@@ -0,0 +1,614 @@
{
"status": "combinations_QA_ready_not_installed",
"date": "2026-10-26",
"branch": "codex/irpc-l7-combinations-qa-20261026",
"installed_baseline": "632dc06930d6b4f1b012feb3b4daa3b1cfc53f39",
"documentation_baseline": "f33d99b4",
"version": "IRPC-normal-adjustments/14",
"optional_input": "special.combinations version1;document presence/absence of specific/other benefits and express exception;reuse existing qualification/period/assets",
"scope": "CIRPC12 qualified pure cooperative + genericCBF16;separate expense61(4);CBF4/13 incompatibility of specific+generic without express exception;unmapped exception/other benefit remain indeterminate",
"calculation_order": [
"CBF16 net difference once",
"existing taxablebase deductions/losses",
"16percent on fullyeligible cooperativebase",
"35percent autonomous expenses separately",
"L8 final remains unknown"
],
"positive_unmapped_L6_benefit_not_reapplied": true,
"runtime_delta": {
"resources/js/lib/irpc-special.ts": "bc72c0c045fa7d7fc2a6b98ca95205479aa448f0c2a9819b930e72f7c93f6ade",
"resources/js/lib/irpc-normal.ts": "4741c2bdecb8570fe786e51f777c633da34dcb0052bb000f9b63ebfde48b1f4a",
"resources/js/components/simulation-irpc-special.tsx": "bb567f06cf2c844419341fa298751752ef94a2f493972d28f68b5f2245b95e00",
"resources/js/lib/irpc-special-combinations.ts": "b638fdf96e33a27c1c73492fb5690c7b170ecbe97dd4ad9881465b2c4eaa6a22"
},
"L6_depreciation_period_fx_engines_unchanged": true,
"cases_recovered": {
"combined": {
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "compatible",
"order": [
"Diferença adicionalCBF16 aplicada uma vez ao lucroL6",
"Matéria colectável recalculada com as mesmas deduções/perdasL6",
"Cooperativa12:50% da taxa geral32%=16% apenas na base integralmente elegível",
"Imposto autónomo61(4) separado a35%,sem redução cooperativa",
"Saldo final a pagar/recuperar permaneceL8"
],
"asset_claims": [
{
"assetId": "server",
"document": "QA-activo-servidor",
"line": "1",
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": {
"numerator": "75",
"denominator": "1"
},
"priorRecoveredIncluded": {
"numerator": "15",
"denominator": "1"
},
"additionalDeduction": {
"numerator": "25",
"denominator": "1"
},
"remainingFiscal": {
"numerator": "825",
"denominator": "1"
}
}
],
"L7_profit": {
"numerator": "3105",
"denominator": "1"
},
"L7_base": {
"numerator": "3105",
"denominator": "1"
},
"L7_colecta": {
"numerator": "2484",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": {
"numerator": "2484",
"denominator": "5"
},
"pending": [],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"autonomous": {
"L6_profit": {
"numerator": "3230",
"denominator": "1"
},
"L6_base": {
"numerator": "3230",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5168",
"denominator": "5"
},
"status": "compatible",
"order": [
"Diferença adicionalCBF16 aplicada uma vez ao lucroL6",
"Matéria colectável recalculada com as mesmas deduções/perdasL6",
"Cooperativa12:50% da taxa geral32%=16% apenas na base integralmente elegível",
"Imposto autónomo61(4) separado a35%,sem redução cooperativa",
"Saldo final a pagar/recuperar permaneceL8"
],
"asset_claims": [
{
"assetId": "server",
"document": "QA-activo-servidor",
"line": "1",
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": {
"numerator": "75",
"denominator": "1"
},
"priorRecoveredIncluded": {
"numerator": "15",
"denominator": "1"
},
"additionalDeduction": {
"numerator": "25",
"denominator": "1"
},
"remainingFiscal": {
"numerator": "825",
"denominator": "1"
}
}
],
"L7_profit": {
"numerator": "3205",
"denominator": "1"
},
"L7_base": {
"numerator": "3205",
"denominator": "1"
},
"L7_colecta": {
"numerator": "2564",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "35",
"denominator": "1"
},
"combined_colecta": {
"numerator": "2739",
"denominator": "5"
},
"pending": [],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"incompatible": {
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "incompatible",
"order": [
"Diferença adicionalCBF16 aplicada uma vez ao lucroL6",
"Matéria colectável recalculada com as mesmas deduções/perdasL6",
"Cooperativa12:50% da taxa geral32%=16% apenas na base integralmente elegível",
"Imposto autónomo61(4) separado a35%,sem redução cooperativa",
"Saldo final a pagar/recuperar permaneceL8"
],
"asset_claims": [
{
"assetId": "server",
"document": "QA-activo-servidor",
"line": "1",
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": null,
"priorRecoveredIncluded": null,
"additionalDeduction": null,
"remainingFiscal": null
}
],
"L7_profit": null,
"L7_base": null,
"L7_colecta": null,
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": null,
"pending": [
"IncompatibilidadeCBF4/13:benefício específico declarado e genéricoCBF16 sem excepção expressa;nenhum benefício é escolhido ou removido automaticamente."
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"missing": {
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "indeterminate",
"order": [
"Diferença adicionalCBF16 aplicada uma vez ao lucroL6",
"Matéria colectável recalculada com as mesmas deduções/perdasL6",
"Cooperativa12:50% da taxa geral32%=16% apenas na base integralmente elegível",
"Imposto autónomo61(4) separado a35%,sem redução cooperativa",
"Saldo final a pagar/recuperar permaneceL8"
],
"asset_claims": [
{
"assetId": "server",
"document": "QA-activo-servidor",
"line": "1",
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": null,
"priorRecoveredIncluded": null,
"additionalDeduction": null,
"remainingFiscal": null
}
],
"L7_profit": null,
"L7_base": null,
"L7_colecta": null,
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": null,
"pending": [
"Benefícios específicosCBF:identifique presença ou ausência documentada;localização não prova estatuto."
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"exception": {
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "indeterminate",
"order": [
"Diferença adicionalCBF16 aplicada uma vez ao lucroL6",
"Matéria colectável recalculada com as mesmas deduções/perdasL6",
"Cooperativa12:50% da taxa geral32%=16% apenas na base integralmente elegível",
"Imposto autónomo61(4) separado a35%,sem redução cooperativa",
"Saldo final a pagar/recuperar permaneceL8"
],
"asset_claims": [
{
"assetId": "server",
"document": "QA-activo-servidor",
"line": "1",
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": null,
"priorRecoveredIncluded": null,
"additionalDeduction": null,
"remainingFiscal": null
}
],
"L7_profit": null,
"L7_base": null,
"L7_colecta": null,
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": null,
"pending": [
"Excepção expressa invocada:ligar artigo,âmbito,período e limites à combinação antes de calcular;esta excepção ainda não está correspondida."
],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"negative": {
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "compatible",
"order": [
"Diferença adicionalCBF16 aplicada uma vez ao lucroL6",
"Matéria colectável recalculada com as mesmas deduções/perdasL6",
"Cooperativa12:50% da taxa geral32%=16% apenas na base integralmente elegível",
"Imposto autónomo61(4) separado a35%,sem redução cooperativa",
"Saldo final a pagar/recuperar permaneceL8"
],
"asset_claims": [
{
"assetId": "server",
"document": "QA-activo-servidor",
"line": "1",
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": {
"numerator": "75",
"denominator": "1"
},
"priorRecoveredIncluded": {
"numerator": "15",
"denominator": "1"
},
"additionalDeduction": {
"numerator": "25",
"denominator": "1"
},
"remainingFiscal": {
"numerator": "825",
"denominator": "1"
}
}
],
"L7_profit": {
"numerator": "3105",
"denominator": "1"
},
"L7_base": {
"numerator": "3105",
"denominator": "1"
},
"L7_colecta": {
"numerator": "4968",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": {
"numerator": "4968",
"denominator": "5"
},
"pending": [],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"absent": {
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "compatible",
"order": [
"Diferença adicionalCBF16 aplicada uma vez ao lucroL6",
"Matéria colectável recalculada com as mesmas deduções/perdasL6",
"Cooperativa12:50% da taxa geral32%=16% apenas na base integralmente elegível",
"Imposto autónomo61(4) separado a35%,sem redução cooperativa",
"Saldo final a pagar/recuperar permaneceL8"
],
"asset_claims": [],
"L7_profit": {
"numerator": "3130",
"denominator": "1"
},
"L7_base": {
"numerator": "3130",
"denominator": "1"
},
"L7_colecta": {
"numerator": "2504",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": {
"numerator": "2504",
"denominator": "5"
},
"pending": [],
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
}
},
"checks": {
"new_frontend_tests": 12,
"API_tests": 1,
"API_assertions": 133,
"QA_database": "simulator_fiscal_delta_20261021_test",
"QA_host": "127.0.0.1",
"QA_port": 55441,
"QA_transaction_rollback": true,
"wayfinder_with_form": true,
"typescript": true,
"build": true,
"recovered_HTML_and_financial_dossier": 7,
"UI": {
"actualComponent": true,
"explicitPrepareCancel": true,
"assetsPeriodsBenefitsNotEdited": true,
"missingOnlyDependentL7": true,
"CBF16Additional25ThenCooperative16": true,
"prior15AlreadyIncluded": true,
"specificGenericIncompatibilityNoAutomaticChoice": true,
"unmappedExceptionIndeterminate": true,
"autonomous35NotHalved": true,
"saveRecoverDownload": true,
"accepted13InputPreserved": true,
"L8FinalUnknown": true,
"errors": []
},
"accepted13_exact_model_key_history_comparison": true,
"accepted_suites_not_rerun": true,
"typescript_build_after_main": true
},
"preservation": {
"tracked_files_compared_before_docs": 2822,
"unchanged": 2819,
"modified": [
"resources/js/components/simulation-irpc-special.tsx",
"resources/js/lib/irpc-normal.ts",
"resources/js/lib/irpc-special.ts"
],
"new_runtime_module": "resources/js/lib/irpc-special-combinations.ts",
"originals": {
"docs/investmoz/simulations/source-archive/AT-Comunicado-9-2026-ISPC.pdf": "106f8a9ce9255c03549c70bf07fe999d32e6e55302d009b509862aa74ccb4973",
"docs/investmoz/simulations/source-archive/AT-MRFTA-19-39.pdf": "8ea62c53066b482f87078a7a7b1ecf15ca98a12a122e8d7abca63acfc993186b",
"docs/investmoz/simulations/source-archive/AT-Modelo-30-ISPC.pdf": "6802edd06b6ff638a0b851a3ec7ecf69af8f07840faa47446becad67d35d445c",
"docs/investmoz/simulations/source-archive/AT-Modelo-B-Geral.pdf": "bd977c7c59d4d98befd92e2c566b1bf168cb1343bb519f51b41a3807f431fc57",
"docs/investmoz/simulations/source-archive/BM-Mercado-Monetario-MAIBOR-20261025.html": "00e8a7e0d3a1db4ca3beb56d5361b2084a0f1684f3d40fc1c203702a2190e063",
"docs/investmoz/simulations/source-archive/BR-16-I-Serie-2008-04-16.pdf": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
"docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"docs/investmoz/simulations/source-archive/BR-89-I-Serie-2017-06-08.pdf": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
"docs/investmoz/simulations/source-archive/BR-95-I-Suplemento-2025-05-21.pdf": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
"docs/investmoz/simulations/source-archive/BR252-I-Serie-2022-Lei20-PESOE.pdf": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"docs/investmoz/simulations/source-archive/Decreto-22-2021-BR70.pdf": "a8fac38dcfe08f9c7a8e46254cff10e1ec82fc4f7a8d88ad6e4fe7d91ffc21a5",
"docs/investmoz/simulations/source-archive/Decreto-27-2026-BR123.pdf": "26249c3fa58f149c81de36e99d1aac2819a4771379d9e8833159660dabf539bb",
"docs/investmoz/simulations/source-archive/Decreto-29-1998-BR22-5-suplemento.pdf": "6242cbe675faadf085f43f95ec8c7e8868aafe67c3b2ab2bb010992288f954f8",
"docs/investmoz/simulations/source-archive/Decreto-3-2011-BR-11-I-mineiros.pdf": "5bca1133666ba9c69870b89823420175b7b5b8d0eccb667ecdf5c29716f3b6be",
"docs/investmoz/simulations/source-archive/Decreto-37-2023-BR124.pdf": "7e680b191481faa0e2e9057fa5053587eb2a29d1d8c819e0eb9f02814255a04c",
"docs/investmoz/simulations/source-archive/Decreto-9-2008-BR16.pdf": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
"docs/investmoz/simulations/source-archive/Lei-14-1992-BR42.pdf": "089fff7423e99a70a230a73ca379e4ea3a91d124703f91016e57ff82794b9e56",
"docs/investmoz/simulations/source-archive/Lei-17-2022-BR251-exemplar-MCNet5.pdf": "14eb34f0af91a8f5cb1770c7b52d6ff839c6818302d1ed96d79afbfb9fe999d4",
"docs/investmoz/simulations/source-archive/Lei-17-2022-IPP-BR250-Parlamento.pdf": "978cd22403ffd336a631704ecd7a5bbd814a427c815b9acdaca5515591dd9e2a",
"docs/investmoz/simulations/source-archive/Lei-19-2013-BR76.pdf": "bba96d645cc935ffc3d1a79b9f0f73ac1c693d6459c2ad41f56cd2841accae76",
"docs/investmoz/simulations/source-archive/Lei-19-2017-IRPS-BR-OCAM.pdf": "c3a0186cb9ad090d7a9533006295dc9bb6a62ad0d6150173cbd49dba4ee4b52d",
"docs/investmoz/simulations/source-archive/Lei-2-2011-BR-1-4-suplemento-MCNet.pdf": "a7543a68cc3287a46a83c39a04821b40f649dd06c4e9b5dc51ff0b47fba08899",
"docs/investmoz/simulations/source-archive/Lei-20-2009-BR36-AT-exemplar19.pdf": "fc1c8144db42960cbf73e717e095896f511ece0f907f58f78819b27d6917a7ee",
"docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
"docs/investmoz/simulations/source-archive/Lei-34-2007-BR52.pdf": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"docs/investmoz/simulations/source-archive/Lei-4-1994-BR37-3-suplemento.pdf": "210df9db8980d0a5690cd187a6eeec7e37a900d743e39062c16f4e0d12215c7e",
"docs/investmoz/simulations/source-archive/Lei-4-2012-BR3.pdf": "b8845cef41dcbd9ba50c43dbfa743a56030dd3d348242a107e1ae30279eec121",
"docs/investmoz/simulations/source-archive/Lei-7-1991-Partidos-IFES.pdf": "6b783a0bb3330688ef10660a58060d9724aa2da6a873d234fe902f0eaaeda42d",
"docs/investmoz/simulations/source-archive/PT-MZ-CDT-1992.pdf": "d504e1024b28aee5c6acf4592acb96ec9c915a8414f67a61ab6984d6acf9df9d",
"docs/investmoz/simulations/source-archive/PT-MZ-Protocolo-2009.pdf": "f353773dcf41f09f4daa6cf5ba5a5f7994f3e02615867c2dcffc61c3d901bf9b"
},
"histories_assets_balances_plan_otherbooks_preserved": true,
"official_balances_not_consumed": true,
"active_writes": 0,
"migrations": 0,
"SGF_TEMPO_untouched": true
},
"sources_reused": [
{
"path": "C:/laragon/www/portal-investidor-irpc-l7-scope-20261026/outputs/irpc-l7-scope/APIEX-legislacao-investimentos-2025.pdf",
"sha256": "ba1e9eaabfec5d0c4cb2d9f2444a6860f7a90f222034764197829be402d408ed",
"pages": [
66,
70,
72
],
"articles": "CBF4/13/16"
},
{
"path": "C:\\laragon\\www\\portal-investidor-irpc-l7-common-qa-20261026\\docs\\investmoz\\simulations\\source-archive\\Lei-34-2007-BR52.pdf",
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"pages": [
5
],
"articles": "CIRPC12/14"
}
],
"inventory_reused": 8143,
"remaining_code": [
"other combinations and express exceptions",
"CBF17-19 and potential15 entitlement",
"specific sector/territorial regimes",
"mixed/withheld cooperativeincome and otherentities",
"other autonome expense origins",
"furtherCBF16 scopes",
"capitalgains/specialoperations",
"officialL7M20M22transport"
],
"resume_conditions": [
"disposition/article/scope/period/order/limit and segregatedparcel for combination",
"implement not-yet-supported treatment before adding its effect",
"specific document only for dependentcase/field"
],
"effort_reference": {
"type": "initial planning figures,not updated remainingestimate",
"L8_to_L14_hours": [
240,
416
],
"eight_hour_days": [
30,
52
],
"excludes": [
"L1-L7residuals",
"L15-L16unestimated",
"documentarywait"
],
"global_completion_percentage_not_established": true
},
"future_delivery_requires_fresh_main_capacity_backup_restore": true,
"L6_operational_delimited": true,
"L7_partial": true,
"L8_final_balance_separate": true,
"evidence_directory": "outputs/irpc-l7-combinations",
"main_incorporated": "a7434cd27c09df3d8e6c586f9676b67abcde798e",
"main_merge_commit": "ea2bceb5ce0c089698603da4cfd268ac1cafbb7a",
"main_source_delta_preserved": [
"app/Http/Controllers/PortalServicesController.php",
"app/Http/Controllers/PublicPortalController.php",
"app/Services/SectorInvestment.php",
"docs/investmoz/unification/traceability-and-manual.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
"resources/js/components/educational-article-card.tsx",
"resources/js/components/sector-content.tsx",
"resources/js/components/sector-entry.tsx",
"resources/js/pages/portal/services.tsx",
"resources/js/pages/portal/why-invest.tsx",
"tests/Feature/SectorCatalogueContentTest.php"
],
"accepted_QA13_manual_appendix_restored": true,
"served_revision_not_rechecked_this_QA": true
}
@@ -0,0 +1,585 @@
{
"status": "installed_first_grouped_L7_demonstrated_scope",
"installed": {
"status": "installed",
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"previous_release": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"database_migrations": 0,
"content_imports": 0
},
"QA_candidate": "ab2ff2fdbcbe6fb94f03e4bc4cc7ccbd647d94fc",
"integration_candidate": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"previous_main": "a2122dc34cc9d3e8b64938c3d6b31cc36f336154",
"previous_installed": "5aaf1a56f9d928331364fcc8b0d1528e51dba327",
"authorization": "Tempo:disponibilizar entrega agrupadaL7 peloGit,backup/restauro fresco,conferência do delta,preservarL6/provas aceites e apresentar saldo concreto",
"backup": {
"stage": "/var/backups/investmoz-irpc-l7-common-delivery-20261026/backup",
"created_at": "2026-10-26T10:55:59Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "a3d46de6c10b37bd6f211125686da8c489f879ab243f082e7b72a397638901f9",
"files_sha256": "409d378ce59ca3d82e39cbf44f139114a839e1aa56457755316a2fecdd7e5b07",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_l7_restore_20261026",
"port": 55441,
"source_dump_sha256": "a3d46de6c10b37bd6f211125686da8c489f879ab243f082e7b72a397638901f9",
"active_database_writes": 0
},
"preservation": {
"previous_release_preserved": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"installed": {
"status": "installed",
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"previous_release": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"database_migrations": 0,
"content_imports": 0
},
"runtime_files_verified": 13,
"preserved_L3_ISPC_FX_runtime_files_verified": 50,
"documentary_files_verified": 31,
"persistent_files_and_env_verified": 369,
"tables_compared": 174,
"changed_tables": {
"cache": {
"before": {
"rows": 106,
"checksum": "63f3ceed97ce2f40106530ef6eb6e083"
},
"after": {
"rows": 106,
"checksum": "38aa09dc08f13ff12ac1e71dbae22d0b"
}
},
"sessions": {
"before": {
"rows": 11,
"checksum": "823228a21cb8173718f6010a9aaa319a"
},
"after": {
"rows": 14,
"checksum": "1529684ad387db4b9aaa40ac775ebe74"
}
}
},
"preserved_counts": {
"published_fiches": 29,
"relations": 28,
"geometries": 408
},
"migration_count": 0,
"content_imports": 0,
"comparison_role": "postgres_before_and_after;sameexportedsnapshotbaseline;noapplicationRLSvisibilityinference",
"writes_by_verification": 0
},
"schema_permissions_before": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected"
},
"schema_permissions_after": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 106,
"after_rows": 106,
"changes": [
{
"key_sha256": "8d6ea77eb4b34d86d207362d583cfa8bf2880b907becd9b00398964482c6b4bd",
"kind": "updated",
"fields": [
"expiration"
],
"key_pattern": "investemoz-cache-{hash}",
"is_queue_restart_key": false,
"expiration_unchanged": false,
"throttle_timer_pair": true,
"same_value_home_cache_expiry_refresh": false
},
{
"key_sha256": "2f251473865d14b953236ab95b1521764754d76abd79b58ca7d38c96dfe2fab1",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-{hash}:timer",
"is_queue_restart_key": false,
"expiration_unchanged": false,
"throttle_timer_pair": true,
"same_value_home_cache_expiry_refresh": false
},
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 11,
"after_rows": 14,
"changes": [
{
"key_sha256": "cd8c2106a4f4ab7802317e6602c26cfa4cf82a23a86f67a0abbc27fbd82edfb8",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "a89dca10cb8a95f4451ff60eeefe7ac3cd7751b779b0bf97a7e5f5b894f9b115",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "7fb2119013f872a5e4dd70952cc896a4ac8291134e02362bd60805eb77e9587a",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"public": {
"status": "installed_delta_verified",
"served_revision": {
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"branch": "main",
"built_at": "2026-10-26T11:02:32.435267+00:00",
"manifest_sha256": "d78a1bdb503c10849f5ea8d8879753653c2c2fc22f6182f6d68ec9f6adf635b5"
},
"manifest_hash_matches": true,
"compiled_delta_markers": {
"IRPC-normal-adjustments/10": [
"assets/project-dossier-KEyrPtc6.js"
],
"Preparar qualificação L7": [
"assets/services-BSj1SuMk.js"
],
"Despesas — imposto autónomo": [
"assets/project-dossier-KEyrPtc6.js"
],
"Cooperativa — redução da taxa": [
"assets/project-dossier-KEyrPtc6.js"
],
"Amortizações aceleradas": [
"assets/services-BSj1SuMk.js",
"assets/project-dossier-KEyrPtc6.js"
],
"novo ajustamento ao lucro:": [
"assets/project-dossier-KEyrPtc6.js"
],
"colecta combinada:": [
"assets/project-dossier-KEyrPtc6.js"
],
"Saldo final — âmbito L8": [
"assets/project-dossier-KEyrPtc6.js"
],
"Reutilizar selecção cambial": [
"assets/services-BSj1SuMk.js"
]
},
"assets": [
{
"file": "assets/project-dossier-document-BRdhvWgC.js",
"status": 200,
"sha256": "5b1de561be552259de776a2dbaf4b49909a3edd2647fec7c296a96054c929a9f"
},
{
"file": "assets/services-BSj1SuMk.js",
"status": 200,
"sha256": "ea1a3812cbced72f4df115e8e379ae6d2307e97b2152d288b1c80d357f03f78b"
},
{
"file": "assets/simulation-form-BqVD91Ek.js",
"status": 200,
"sha256": "85cbd533c5bc92af5a448db71da006d4346d2d0adb09dde825db0aa19ad5048c"
},
{
"file": "assets/project-dossier-KEyrPtc6.js",
"status": 200,
"sha256": "b6ae250a30b5030a6e40e7dfb140a3335ce6d5bc16835098d3d7c5828fc526c5"
}
],
"simulator_status": 200,
"simulator_entry": "assets/app-ByAQSjfI.js",
"existing_fiscal_availability": {
"data": {
"enabled": true,
"coverage_start": "2026-01-01",
"coverage_end": "2026-12-31",
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
}
},
"synthetic_private_writes": 0,
"method": "Read-only installedrevision/manifest/newcompiledcatalogueandreaders/simulatorentry;acceptedQAproofsreused"
},
"pipeline": {
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"installed": {
"status": "installed",
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"previous_release": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"database_migrations": 0,
"content_imports": 0
},
"latest_report": {
"status": "installed",
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"previous_release": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"e07f89da3d59d06aa1b8c50c22a478b7b167bfdd"
],
"finished_at": "2026-10-26T11:02:35.885260+00:00"
},
"log_file": "1793012270105316629.log",
"summaries": [
"OK (1 test, 3106 assertions)",
"built in 33.69s",
"OK (59 tests, 317 assertions)",
"# tests 1007",
"# pass 1007",
"# fail 0"
],
"log_bytes": 287128
},
"concurrent_main_reconciliation": {
"QA_candidate": "ab2ff2fdbcbe6fb94f03e4bc4cc7ccbd647d94fc",
"concurrent_main": "a2122dc34cc9d3e8b64938c3d6b31cc36f336154",
"installed_baseline": "5aaf1a56f9d928331364fcc8b0d1528e51dba327",
"runtime_QA_files_exact": [
"resources/js/lib/irpc-special.ts",
"resources/js/components/simulation-irpc-special.tsx",
"resources/js/lib/irpc-normal.ts",
"resources/js/lib/irpc-normal-depreciation.ts",
"resources/js/components/simulation-irpc-normal.tsx",
"resources/js/lib/project-dossier-report.ts"
],
"concurrent_files_preserved": {
"resources/js/components/portal-hero.tsx": "0ebe2c3e2ae2615d966d050864699a90dac2fef36ebfc174aa1059b83db9a514",
"resources/js/components/tempo-brand.tsx": "27c01d317ec59c9a4ddb2a184c0a8a9427fcf92d34a916060287d07226364d02",
"resources/js/layouts/portal-navigation.tsx": "f1f66b645035f56c9bcc7fbc8c2983e84eb29ae3ecb99461e3963a7deefbaaa6",
"resources/js/lib/portal-navigation.ts": "12aad264eeb5cebe7c9bf467391c611f58d1b84cc9d5fd30db983ba640e25951",
"resources/js/pages/PortalInvestidor.tsx": "d418f960f82ae0d054acfe094047bc80a16f7b418506f054e6d7da07edf6ef00",
"resources/js/pages/investment/shared.tsx": "00098334435de3bb5c7b13608c0e53c63a4bdee7d9cdf07f24b3aec54441f05e",
"resources/js/pages/portal/why-invest.tsx": "3917efa7b0d33fe8fe6e4562c3b9e2f53200b9e07807cd29bade328f8e5ae7e2",
"tests/frontend/portal-navigation.test.mjs": "518c7e1de6fb1b385caffe39914e2905bf8f561d938f0527561156602a0e3098"
},
"CSV_concurrent_V2_01_preserved": true,
"removed_manual_history_lines_restored": 586,
"resolution": "main changed only by removing586tail lines from the manual;candidate manual retained in full;CSV auto-merge preserved V2-01 and changed only fiscal rowAUD-SIM-INT02",
"new_functional_round": false,
"accepted_QA_proofs_reused": {
"new_frontend_tests": 19,
"API_tests": 1,
"API_assertions": 108,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_host": "127.0.0.1",
"API_port": 55441,
"API_transaction_rollback": true,
"QA_identity_guard": true,
"Wayfinder_generated_with_form": true,
"typescript_noEmit": true,
"QA_build": true,
"API_recovered_to_HTML_and_financial_dossier_cases": 6,
"UI": {
"actualComponent": true,
"expenseL6Addback100Autonomous35": true,
"missingClassificationDoesNotEraseNormalProfit": true,
"absenceExplicit": true,
"cooperative16MixedCaseBlockedOnly": true,
"acceleratedQuota150LimitedToAccounted120": true,
"netAdditionalDeduction20": true,
"cumulationMissingExplicit": true,
"saveRecoveryDownload": true,
"finalBalanceL8Unknown": true,
"errors": []
},
"old_functional_suites_repeated": false,
"building_and_lower_optional_quota_cases": true
}
},
"dependency_archiving": {
"status": "dependencies_archived_and_verified",
"versions": 8,
"free_before": 4349009920,
"free_after": 6454341632,
"receipt": "/var/backups/investmoz-build-dependencies-irpc-l7-common-20261026/receipt.json",
"protected": [
"/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"/var/www/investmoz-homologacao/releases/56475acb2f39e58cb51664913f7fb499f58eb7ab-694b3932"
],
"active_or_previous_release_modified": false,
"source_data_backups_deleted": 0
},
"accepted_QA_proofs_reused": {
"new_frontend_tests": 19,
"API_tests": 1,
"API_assertions": 108,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_host": "127.0.0.1",
"API_port": 55441,
"API_transaction_rollback": true,
"QA_identity_guard": true,
"Wayfinder_generated_with_form": true,
"typescript_noEmit": true,
"QA_build": true,
"API_recovered_to_HTML_and_financial_dossier_cases": 6,
"UI": {
"actualComponent": true,
"expenseL6Addback100Autonomous35": true,
"missingClassificationDoesNotEraseNormalProfit": true,
"absenceExplicit": true,
"cooperative16MixedCaseBlockedOnly": true,
"acceleratedQuota150LimitedToAccounted120": true,
"netAdditionalDeduction20": true,
"cumulationMissingExplicit": true,
"saveRecoveryDownload": true,
"finalBalanceL8Unknown": true,
"errors": []
},
"old_functional_suites_repeated": false,
"building_and_lower_optional_quota_cases": true
},
"source_inventory_reused": {
"files_reused": 8143,
"broad_search_repeated": false,
"receipt": "irpc-l7-scope-20261026.json",
"sources": [
{
"id": "CIRPC",
"title": "Lei34/2007",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\Lei-34-2007-BR52.pdf",
"bytes": 1676884,
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"references": "PDF5/p768(59):12,14,15; PDF15–16:54–56; PDF17/p768(71):61",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "IRPC-2026",
"title": "Lei12/2025",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
"bytes": 440018,
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"references": "PDF18–20; PDF20:art2/61-A,art3,art6; vigência01/01/2026",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "IRPC-2022",
"title": "Lei20/2022",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\BR252-I-Serie-2022-Lei20-PESOE.pdf",
"bytes": 17966640,
"sha256": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"references": "PDF1/p2731:61(2), termo31/12/2025",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "CBF-local",
"title": "Lei4/2009",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\CBF-Lei4-2009-APIEX.pdf",
"bytes": 10998765,
"sha256": "4231a5b6783e603cedb98992f3e93ecaf1c1d5be341b093560cf2fdd0845b0dc",
"references": "Original local disponível; scan sem extracção textual útil; cotejo textual pela compilação oficial",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false,
"authorised_original": "\\\\Mac\\Home\\Documents\\TEMPO\\Portal Tempo\\Legislacao\\Apiex\\3.-Lei-no4-2009-de-12-de-Janeiro-Codigo-dos-Beneficios-Fiscais.pdf"
},
{
"id": "APIEX",
"title": "Compilação oficial APIEX",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\APIEX-legislacao-investimentos-2025.pdf",
"bytes": 6467655,
"sha256": "ba1e9eaabfec5d0c4cb2d9f2444a6860f7a90f222034764197829be402d408ed",
"references": "pp8–32:Lei8/2023; pp36–59:Decreto8/2024; pp64–92:CBF4/2009; p68:9/10;p71–74:15–19",
"official_url": "https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf",
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "RCBF",
"title": "Decreto56/2009",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\Decreto56-2009-BR40.pdf",
"bytes": 422005,
"sha256": "6ea1b8d93daed48c6d590481d874010fa1708211d8f27c319dc9a31328456017",
"references": "Procedimento já cotejado em iva-l1-p084-p085-model-i1-cotejo-20261024.json; não estende isenções IVA a IRPC",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
}
],
"document_consultation_activates_calculation": false
},
"L6_operational_demonstrated_scope_preserved": true,
"L6_pending_code_and_documentation_preserved": true,
"L7_integrally_complete": false,
"IRPC_integrally_complete": false,
"new_private_synthetic_writes_on_active": 0,
"location_grants_benefit": false,
"L8_retentions_payments_annual_credit_application_final_balance_separate": true,
"remaining_scope": {
"implementation": [
"61(4) sources/partial segregation outside calculated36g",
"cooperative mixed/withheld income and other entity exemptions9–14",
"CBF16 other assets/methods/optional lower quota/periods/prior quotas and combinations",
"61-A capital gains and special operations54–56/41-A",
"CBF17–19 deductions/magnifications andCBF15 potential credit origin/eligibility",
"sector/territory and specific special regimes",
"L7 M20/M22 official transport"
],
"documentary_case_dependencies": [
"nature/incidence/parcel and correct period",
"individual statute/title/recognition or applicable exception only where required",
"specific norm/validity/compatibility/order/limit not corresponded",
"affected form edition/field/representation"
],
"examples_and_resume_conditions": "same consolidated matrix and manual section:saldo concreto de L7 após a primeira entrega agrupada"
},
"evidence": {
"backup.txt": "dac1a5cddac111160d64f4f34184f999cb40655b210582b9a18dbef20aedd8d0",
"baseline.txt": "6e4bf2e80c29cc3c81d14c3da9f44e1ef3d576b0eb25f9c7ecb85f060c15b196",
"compact-dependencies.txt": "a2385728e917cc20008da8b8144ff57a1bcbe3a1a352848c548b11bdf38fbbf0",
"concurrent-main-reconciliation.json": "8a6aefa957e2b28905f89dca161de53bcffdc9dba2575e9f76efb13ac80a6c16",
"installed-protected.txt": "e2fc267572cf8c29ee15e4efa524679843377766d19456ccba4e9187b7c55a21",
"installed-public-delta.json": "557cbdc9ec7db9b0eb6865d0998c83a9c4a957ee041ba1bce0e54cd2df4ee3cb",
"installed-public.txt": "4efa54256c1de8af63f80f0ff245f529cb581746f165a1299d7389ffd8047ee9",
"integration.txt": "c320a8d33ea33e1f70a291b7da2fa4934658b2f87fc9a26a9521325e23cfac7d",
"manifest-served.json": "d78a1bdb503c10849f5ea8d8879753653c2c2fc22f6182f6d68ec9f6adf635b5",
"operational-delta.txt": "18793b0013b52e87ad088317b49ef3ef31e582dfb073500fa29a5822e237f61c",
"preflight-ready.txt": "ffe2dfba440adebbd45ba72336d56668735f4916d3ae5385a4d750c5775a6a04",
"preflight.txt": "6bf42bb982a7e5807123569ba9a4951bd639132b628965586b7ed60f36b5f0ea",
"preparation.json": "46c078247bb3b68f2aabdb9aa5c0e40bf648dbc07e467933ce82d749b9741a00",
"process-progress.txt": "721a9cf3e8b3892122dabe8b05e8c377b097d94ed0123b7135dcf83c53a40cd6",
"progress-2.txt": "df6ae7b7f2e49c9da3ffbe12c0de6746a191f51dcf30428a93a3db4693c7972b",
"progress-3.txt": "de4fa512b1e124d6c48c34eec14ab50fb66ebb718b49c0fd039e6a148598688d",
"progress-4.txt": "de4fa512b1e124d6c48c34eec14ab50fb66ebb718b49c0fd039e6a148598688d",
"restore.txt": "fcf1cbf5a6de6c0ac9172c3b5acd39c7c0438f950a2297be5f84964268ef4c24",
"schema-permissions-after.txt": "76b5a4d8af11e4898a205062766cfb7ab6ec0783200e77e60a1927aa1ca18597",
"schema-permissions-before.txt": "0ab7c964792acdd8917bce256c472e55e034b103500a58b49f020b5084823ed7",
"status-before.txt": "290e99722a17dabbeb4bb609b2c3df423357dd1e34b3cc6f4e45cd64e758c797",
"status-final.txt": "3814636ae1e3d45f6da832b42b3a9215503598bc20c0c080b3ab5181a074bea0",
"status-progress-1.txt": "b289c9824a293d6b97db770712ce92e65c714fe72f22e0410ef6447b655d47d6"
}
}
@@ -0,0 +1,570 @@
{
"status": "L7_common_qualification_autonomous_expenses_cooperative_acceleration_QA_prepared_not_installed",
"recorded_date": "2026-10-26",
"installed_baseline": "5aaf1a56f9d928331364fcc8b0d1528e51dba327",
"scope_baseline": "d37fffb2d2eacef6300f1c81fc29993178532f35",
"branch": "codex/irpc-l7-common-autonomous-qa-20261026",
"version": "IRPC-normal-adjustments/10",
"installed": false,
"L6_operational_scope_preserved": true,
"IRPC_integrally_complete": false,
"runtime_delta": {
"resources/js/lib/irpc-special.ts": "5d261cdb54506bd892fa49776bb53a20600e62e64a4c180ef26cdcdb8b6a3806",
"resources/js/components/simulation-irpc-special.tsx": "9ccd89e46703f9dd14c1110459b22673623a19bd652d137f40ec83e0f7c223db",
"resources/js/lib/irpc-normal.ts": "7e63e7e5928a90c5305fd1fca49db883fec32666381ee99ae6fa4b06c711d9a7",
"resources/js/lib/irpc-normal-depreciation.ts": "00ba22e449b23e570bfbbf3895bd334029a16f938d5a5ff999ca67b4318f58c3",
"resources/js/components/simulation-irpc-normal.tsx": "e01e54dee4cd2555a8a27ed77512cf220056b5899ea9dacbaaae6d4063ce2d42",
"resources/js/lib/project-dossier-report.ts": "cba66c88391da83b4fdb345a9570eca5ae83979cbbd508eb44b53995d812718d"
},
"cases_recovered": {
"expense": {
"L6_reference": {
"taxableProfit": {
"numerator": "3230",
"denominator": "1"
},
"taxableBase": {
"numerator": "3230",
"denominator": "1"
},
"colecta": {
"numerator": "5168",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "3230",
"denominator": "1"
},
"L7_base": {
"numerator": "3230",
"denominator": "1"
},
"L7_colecta": {
"numerator": "5168",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "35",
"denominator": "1"
},
"combined_colecta": {
"numerator": "5343",
"denominator": "5"
},
"expense_status": "calculated",
"cooperative_status": "absent",
"acceleration_status": "absent",
"additional_depreciation_deduction": {
"numerator": "0",
"denominator": "1"
},
"history_versions": [
"IRPC-normal-adjustments/1",
"IRPC-normal-adjustments/2",
"IRPC-normal-adjustments/3",
"IRPC-normal-adjustments/4",
"IRPC-normal-adjustments/5",
"IRPC-normal-adjustments/6",
"IRPC-normal-adjustments/7",
"IRPC-normal-adjustments/8",
"IRPC-normal-adjustments/9"
],
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"missing": {
"L6_reference": {
"taxableProfit": {
"numerator": "3230",
"denominator": "1"
},
"taxableBase": {
"numerator": "3230",
"denominator": "1"
},
"colecta": {
"numerator": "5168",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "3230",
"denominator": "1"
},
"L7_base": {
"numerator": "3230",
"denominator": "1"
},
"L7_colecta": {
"numerator": "5168",
"denominator": "5"
},
"autonomous_tax": null,
"combined_colecta": null,
"expense_status": "indeterminate",
"cooperative_status": "absent",
"acceleration_status": "absent",
"additional_depreciation_deduction": {
"numerator": "0",
"denominator": "1"
},
"history_versions": [
"IRPC-normal-adjustments/1",
"IRPC-normal-adjustments/2",
"IRPC-normal-adjustments/3",
"IRPC-normal-adjustments/4",
"IRPC-normal-adjustments/5",
"IRPC-normal-adjustments/6",
"IRPC-normal-adjustments/7",
"IRPC-normal-adjustments/8",
"IRPC-normal-adjustments/9"
],
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"negative": {
"L6_reference": {
"taxableProfit": {
"numerator": "3230",
"denominator": "1"
},
"taxableBase": {
"numerator": "3230",
"denominator": "1"
},
"colecta": {
"numerator": "5168",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "3230",
"denominator": "1"
},
"L7_base": {
"numerator": "3230",
"denominator": "1"
},
"L7_colecta": {
"numerator": "5168",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": {
"numerator": "5168",
"denominator": "5"
},
"expense_status": "calculated",
"cooperative_status": "absent",
"acceleration_status": "absent",
"additional_depreciation_deduction": {
"numerator": "0",
"denominator": "1"
},
"history_versions": [
"IRPC-normal-adjustments/1",
"IRPC-normal-adjustments/2",
"IRPC-normal-adjustments/3",
"IRPC-normal-adjustments/4",
"IRPC-normal-adjustments/5",
"IRPC-normal-adjustments/6",
"IRPC-normal-adjustments/7",
"IRPC-normal-adjustments/8",
"IRPC-normal-adjustments/9"
],
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"absent": {
"L6_reference": {
"taxableProfit": {
"numerator": "3130",
"denominator": "1"
},
"taxableBase": {
"numerator": "3130",
"denominator": "1"
},
"colecta": {
"numerator": "5008",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "3130",
"denominator": "1"
},
"L7_base": {
"numerator": "3130",
"denominator": "1"
},
"L7_colecta": {
"numerator": "5008",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": {
"numerator": "5008",
"denominator": "5"
},
"expense_status": "absent",
"cooperative_status": "absent",
"acceleration_status": "absent",
"additional_depreciation_deduction": {
"numerator": "0",
"denominator": "1"
},
"history_versions": [
"IRPC-normal-adjustments/1",
"IRPC-normal-adjustments/2",
"IRPC-normal-adjustments/3",
"IRPC-normal-adjustments/4",
"IRPC-normal-adjustments/5",
"IRPC-normal-adjustments/6",
"IRPC-normal-adjustments/7",
"IRPC-normal-adjustments/8",
"IRPC-normal-adjustments/9"
],
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"cooperative": {
"L6_reference": {
"taxableProfit": {
"numerator": "3130",
"denominator": "1"
},
"taxableBase": {
"numerator": "3130",
"denominator": "1"
},
"colecta": {
"numerator": "5008",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "3130",
"denominator": "1"
},
"L7_base": {
"numerator": "3130",
"denominator": "1"
},
"L7_colecta": {
"numerator": "2504",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": {
"numerator": "2504",
"denominator": "5"
},
"expense_status": "absent",
"cooperative_status": "calculated",
"acceleration_status": "absent",
"additional_depreciation_deduction": {
"numerator": "0",
"denominator": "1"
},
"history_versions": [
"IRPC-normal-adjustments/1",
"IRPC-normal-adjustments/2",
"IRPC-normal-adjustments/3",
"IRPC-normal-adjustments/4",
"IRPC-normal-adjustments/5",
"IRPC-normal-adjustments/6",
"IRPC-normal-adjustments/7",
"IRPC-normal-adjustments/8",
"IRPC-normal-adjustments/9"
],
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"acceleration": {
"L6_reference": {
"taxableProfit": {
"numerator": "6260",
"denominator": "1"
},
"taxableBase": {
"numerator": "6260",
"denominator": "1"
},
"colecta": {
"numerator": "10016",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "6240",
"denominator": "1"
},
"L7_base": {
"numerator": "6240",
"denominator": "1"
},
"L7_colecta": {
"numerator": "9984",
"denominator": "5"
},
"autonomous_tax": {
"numerator": "0",
"denominator": "1"
},
"combined_colecta": {
"numerator": "9984",
"denominator": "5"
},
"expense_status": "absent",
"cooperative_status": "absent",
"acceleration_status": "calculated",
"additional_depreciation_deduction": {
"numerator": "20",
"denominator": "1"
},
"history_versions": [
"IRPC-normal-adjustments/1",
"IRPC-normal-adjustments/2",
"IRPC-normal-adjustments/3",
"IRPC-normal-adjustments/4",
"IRPC-normal-adjustments/5",
"IRPC-normal-adjustments/6",
"IRPC-normal-adjustments/7",
"IRPC-normal-adjustments/8",
"IRPC-normal-adjustments/9"
],
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
}
},
"source_inventory": {
"files_reused": 8143,
"broad_search_repeated": false,
"receipt": "irpc-l7-scope-20261026.json",
"sources": [
{
"id": "CIRPC",
"title": "Lei34/2007",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\Lei-34-2007-BR52.pdf",
"bytes": 1676884,
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"references": "PDF5/p768(59):12,14,15; PDF15–16:54–56; PDF17/p768(71):61",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "IRPC-2026",
"title": "Lei12/2025",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
"bytes": 440018,
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"references": "PDF18–20; PDF20:art2/61-A,art3,art6; vigência01/01/2026",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "IRPC-2022",
"title": "Lei20/2022",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\BR252-I-Serie-2022-Lei20-PESOE.pdf",
"bytes": 17966640,
"sha256": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"references": "PDF1/p2731:61(2), termo31/12/2025",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "CBF-local",
"title": "Lei4/2009",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\CBF-Lei4-2009-APIEX.pdf",
"bytes": 10998765,
"sha256": "4231a5b6783e603cedb98992f3e93ecaf1c1d5be341b093560cf2fdd0845b0dc",
"references": "Original local disponível; scan sem extracção textual útil; cotejo textual pela compilação oficial",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false,
"authorised_original": "\\\\Mac\\Home\\Documents\\TEMPO\\Portal Tempo\\Legislacao\\Apiex\\3.-Lei-no4-2009-de-12-de-Janeiro-Codigo-dos-Beneficios-Fiscais.pdf"
},
{
"id": "APIEX",
"title": "Compilação oficial APIEX",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\APIEX-legislacao-investimentos-2025.pdf",
"bytes": 6467655,
"sha256": "ba1e9eaabfec5d0c4cb2d9f2444a6860f7a90f222034764197829be402d408ed",
"references": "pp8–32:Lei8/2023; pp36–59:Decreto8/2024; pp64–92:CBF4/2009; p68:9/10;p71–74:15–19",
"official_url": "https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf",
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "RCBF",
"title": "Decreto56/2009",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\Decreto56-2009-BR40.pdf",
"bytes": 422005,
"sha256": "6ea1b8d93daed48c6d590481d874010fa1708211d8f27c319dc9a31328456017",
"references": "Procedimento já cotejado em iva-l1-p084-p085-model-i1-cotejo-20261024.json; não estende isenções IVA a IRPC",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
}
],
"document_consultation_activates_calculation": false
},
"coverage": {
"optional_input_backward_compatible": true,
"accepted_version9_current_key_and_result_unchanged_without_L7": true,
"expense_source": "calculated36(1)g schedule ID;full amount reused;no parallel amount",
"expense_rate": "35/100",
"expense_additional_profit_adjustment": "0",
"cooperative_rate": "32/100 × 1/2 =16/100;eligible ordinary base only",
"accelerated_rate": "normal maximum table rate ×3/2;lower optional quota not covered;first full civil2026,new supported asset,prior quotas zero",
"accelerated_deduction": "min calculated quota/accounted eligible amount/fiscal remaining balance;only difference over normal map",
"mixed_cases": "cooperative+autonomous expense demonstrated;cooperative+CBF16 not supported",
"context": "reuses documented sector/territory/provenance;no benefit by location alone;raw snapshots not dumped in report",
"states": [
"information_missing",
"declared_absence",
"not_applicable_or_negative_condition",
"calculated"
],
"report": "same normalReportRows/HTML and financial project dossier;L6 reference separated from L7 effects",
"final_settlement": "not calculated;L8"
},
"pending": {
"code": [
"autonomous expenses outside already-calculated36g parcel",
"mixed cooperative income/withheld parcels",
"CBF16 rehabilitated/other categories/lower optional quota/methods/months/prior quotas/later years",
"specific benefit combinations and cumulation",
"61-A capital gains and other previously delimited treatment families",
"L7 official form transport"
],
"documents_per_case": [
"individual status/title/exception and qualification proof when required by applicable norm",
"parcel/limit/order/cumulation/chronology not evidenced",
"affected form field/edition/representation correspondence"
],
"resume_conditions": "same existing matrix/manual L7 QA section;no blanket validation or repeated transversal research",
"L6_pending_unchanged": true,
"L8_annual_credit_application_retentions_payments_final_balance_separate": true
},
"checks": {
"new_frontend_tests": 19,
"API_tests": 1,
"API_assertions": 108,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_host": "127.0.0.1",
"API_port": 55441,
"API_transaction_rollback": true,
"QA_identity_guard": true,
"Wayfinder_generated_with_form": true,
"typescript_noEmit": true,
"QA_build": true,
"API_recovered_to_HTML_and_financial_dossier_cases": 6,
"UI": {
"actualComponent": true,
"expenseL6Addback100Autonomous35": true,
"missingClassificationDoesNotEraseNormalProfit": true,
"absenceExplicit": true,
"cooperative16MixedCaseBlockedOnly": true,
"acceleratedQuota150LimitedToAccounted120": true,
"netAdditionalDeduction20": true,
"cumulationMissingExplicit": true,
"saveRecoveryDownload": true,
"finalBalanceL8Unknown": true,
"errors": []
},
"old_functional_suites_repeated": false,
"building_and_lower_optional_quota_cases": true
},
"preservation": {
"baseline": "d37fffb2d2eacef6300f1c81fc29993178532f35",
"files_compared": 662,
"only_existing_changed": [
"resources/js/lib/irpc-normal-depreciation.ts",
"resources/js/lib/irpc-normal.ts",
"resources/js/lib/project-dossier-report.ts"
],
"protected_code_schema_config_routes_contract_files": 576,
"originals": {
"docs/investmoz/simulations/source-archive/AT-Comunicado-9-2026-ISPC.pdf": "106f8a9ce9255c03549c70bf07fe999d32e6e55302d009b509862aa74ccb4973",
"docs/investmoz/simulations/source-archive/AT-MRFTA-19-39.pdf": "8ea62c53066b482f87078a7a7b1ecf15ca98a12a122e8d7abca63acfc993186b",
"docs/investmoz/simulations/source-archive/AT-Modelo-30-ISPC.pdf": "6802edd06b6ff638a0b851a3ec7ecf69af8f07840faa47446becad67d35d445c",
"docs/investmoz/simulations/source-archive/AT-Modelo-B-Geral.pdf": "bd977c7c59d4d98befd92e2c566b1bf168cb1343bb519f51b41a3807f431fc57",
"docs/investmoz/simulations/source-archive/BM-Mercado-Monetario-MAIBOR-20261025.html": "00e8a7e0d3a1db4ca3beb56d5361b2084a0f1684f3d40fc1c203702a2190e063",
"docs/investmoz/simulations/source-archive/BR-16-I-Serie-2008-04-16.pdf": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
"docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"docs/investmoz/simulations/source-archive/BR-89-I-Serie-2017-06-08.pdf": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
"docs/investmoz/simulations/source-archive/BR-95-I-Suplemento-2025-05-21.pdf": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
"docs/investmoz/simulations/source-archive/BR252-I-Serie-2022-Lei20-PESOE.pdf": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"docs/investmoz/simulations/source-archive/Decreto-22-2021-BR70.pdf": "a8fac38dcfe08f9c7a8e46254cff10e1ec82fc4f7a8d88ad6e4fe7d91ffc21a5",
"docs/investmoz/simulations/source-archive/Decreto-27-2026-BR123.pdf": "26249c3fa58f149c81de36e99d1aac2819a4771379d9e8833159660dabf539bb",
"docs/investmoz/simulations/source-archive/Decreto-29-1998-BR22-5-suplemento.pdf": "6242cbe675faadf085f43f95ec8c7e8868aafe67c3b2ab2bb010992288f954f8",
"docs/investmoz/simulations/source-archive/Decreto-3-2011-BR-11-I-mineiros.pdf": "5bca1133666ba9c69870b89823420175b7b5b8d0eccb667ecdf5c29716f3b6be",
"docs/investmoz/simulations/source-archive/Decreto-37-2023-BR124.pdf": "7e680b191481faa0e2e9057fa5053587eb2a29d1d8c819e0eb9f02814255a04c",
"docs/investmoz/simulations/source-archive/Decreto-9-2008-BR16.pdf": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
"docs/investmoz/simulations/source-archive/Lei-14-1992-BR42.pdf": "089fff7423e99a70a230a73ca379e4ea3a91d124703f91016e57ff82794b9e56",
"docs/investmoz/simulations/source-archive/Lei-17-2022-BR251-exemplar-MCNet5.pdf": "14eb34f0af91a8f5cb1770c7b52d6ff839c6818302d1ed96d79afbfb9fe999d4",
"docs/investmoz/simulations/source-archive/Lei-17-2022-IPP-BR250-Parlamento.pdf": "978cd22403ffd336a631704ecd7a5bbd814a427c815b9acdaca5515591dd9e2a",
"docs/investmoz/simulations/source-archive/Lei-19-2013-BR76.pdf": "bba96d645cc935ffc3d1a79b9f0f73ac1c693d6459c2ad41f56cd2841accae76",
"docs/investmoz/simulations/source-archive/Lei-19-2017-IRPS-BR-OCAM.pdf": "c3a0186cb9ad090d7a9533006295dc9bb6a62ad0d6150173cbd49dba4ee4b52d",
"docs/investmoz/simulations/source-archive/Lei-2-2011-BR-1-4-suplemento-MCNet.pdf": "a7543a68cc3287a46a83c39a04821b40f649dd06c4e9b5dc51ff0b47fba08899",
"docs/investmoz/simulations/source-archive/Lei-20-2009-BR36-AT-exemplar19.pdf": "fc1c8144db42960cbf73e717e095896f511ece0f907f58f78819b27d6917a7ee",
"docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
"docs/investmoz/simulations/source-archive/Lei-34-2007-BR52.pdf": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"docs/investmoz/simulations/source-archive/Lei-4-1994-BR37-3-suplemento.pdf": "210df9db8980d0a5690cd187a6eeec7e37a900d743e39062c16f4e0d12215c7e",
"docs/investmoz/simulations/source-archive/Lei-4-2012-BR3.pdf": "b8845cef41dcbd9ba50c43dbfa743a56030dd3d348242a107e1ae30279eec121",
"docs/investmoz/simulations/source-archive/Lei-7-1991-Partidos-IFES.pdf": "6b783a0bb3330688ef10660a58060d9724aa2da6a873d234fe902f0eaaeda42d",
"docs/investmoz/simulations/source-archive/PT-MZ-CDT-1992.pdf": "d504e1024b28aee5c6acf4592acb96ec9c915a8414f67a61ab6984d6acf9df9d",
"docs/investmoz/simulations/source-archive/PT-MZ-Protocolo-2009.pdf": "f353773dcf41f09f4daa6cf5ba5a5f7994f3e02615867c2dcffc61c3d901bf9b"
},
"active_writes": 0,
"migrations": 0,
"permission_changes": false
},
"evidence_directory": "outputs/irpc-l7-common",
"delivery": {
"prepared_only": true,
"Git_branch_isolated": true,
"active_installation": false,
"fresh_backup_restore_and_delta_check_required_at_future_installation": true
}
}
@@ -0,0 +1,937 @@
{
"status": "CBF16_start_cessation_prior_group_installed",
"installed": {
"status": "installed",
"commit": "632dc06930d6b4f1b012feb3b4daa3b1cfc53f39",
"release": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"previous_release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"database_migrations": 0,
"content_imports": 0
},
"previous_installed": "0bd5d495505d512088887efd3dc5c61f645b1647",
"included_QA": [
"ba83afe7d8a90fd016fd0cf424418811279285cd",
"632dc06930d6b4f1b012feb3b4daa3b1cfc53f39"
],
"main_preserved_before_integration": "ae0d74bb3a5e0220c886dd72801a6550dd4ccbbe",
"backup": {
"stage": "/var/backups/investmoz-irpc-l7-grouped-delivery-20261026/backup",
"created_at": "2026-10-26T13:29:24Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "80e6149d9d1eb001b32893e40ae484bcb6ed618d41bff1489ab7a5bccbdf306e",
"files_sha256": "2f0d1fff3e0b6237b01af52377ea71718e9970550f9b017b58817ec2a560adcf",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_l7_grouped_restore_20261026",
"port": 55441,
"source_dump_sha256": "80e6149d9d1eb001b32893e40ae484bcb6ed618d41bff1489ab7a5bccbdf306e",
"active_database_writes": 0
},
"capacity_block_before": {
"checked_at_UTC": "2026-10-26T13:25:42.513605+00:00",
"installed": {
"status": "installed",
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"previous_release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"release_revision": {
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"branch": "main",
"built_at": "2026-10-26T12:39:22.332516+00:00",
"manifest_sha256": "ce3110f77afcaefb5943e50fff77cc8feb34b4c1af20aea1fb64602ffa739264"
},
"service": "MainPID=0\nExecMainStatus=1\nActiveState=failed\nSubState=failed\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4636987392,
"available_inodes": 21416284,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4636987392,
"available_inodes": 21416284,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4636987392,
"available_inodes": 21416284,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4636987392,
"available_inodes": 21416284,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 4636987392,
"available_inodes": 21416284,
"total_inodes": 29089792
}
],
"free_bytes": 4636987392,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175917995,
"same_partition_release_and_backup": true,
"space_guard_satisfied": false,
"current_release_entry_reference": 31197,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"regenerable_npm_cache_recovery": {
"at_UTC": "2026-10-26T13:28:45.839223+00:00",
"target": "/root/.npm/_cacache",
"method": "npm cache clean --force with separate new log directory",
"free_before": 4648849408,
"free_after": 7681077248,
"recovered_bytes": 3032227840,
"old_npm_logs_verified": 32,
"npx_bytes_preserved": 109912064,
"installed_record_unchanged": true,
"project_dependencies_releases_backups_untouched": true,
"active_business_writes": 0
},
"capacity_before": {
"checked_at_UTC": "2026-10-26T13:29:08.917728+00:00",
"installed": {
"status": "installed",
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"previous_release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"release_revision": {
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"branch": "main",
"built_at": "2026-10-26T12:39:22.332516+00:00",
"manifest_sha256": "ce3110f77afcaefb5943e50fff77cc8feb34b4c1af20aea1fb64602ffa739264"
},
"service": "MainPID=0\nExecMainStatus=1\nActiveState=failed\nSubState=failed\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7680946176,
"available_inodes": 21431150,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7680946176,
"available_inodes": 21431150,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7680946176,
"available_inodes": 21431150,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7680946176,
"available_inodes": 21431150,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7680946176,
"available_inodes": 21431150,
"total_inodes": 29089792
}
],
"free_bytes": 7680946176,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175917995,
"same_partition_release_and_backup": true,
"space_guard_satisfied": true,
"current_release_entry_reference": 31197,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"capacity_after_backup": {
"checked_at_UTC": "2026-10-26T13:30:52.665710+00:00",
"installed": {
"status": "installed",
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"previous_release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"release_revision": {
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"branch": "main",
"built_at": "2026-10-26T12:39:22.332516+00:00",
"manifest_sha256": "ce3110f77afcaefb5943e50fff77cc8feb34b4c1af20aea1fb64602ffa739264"
},
"service": "MainPID=0\nExecMainStatus=1\nActiveState=failed\nSubState=failed\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7501979648,
"available_inodes": 21431137,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7501979648,
"available_inodes": 21431137,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7501979648,
"available_inodes": 21431137,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7501979648,
"available_inodes": 21431137,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 7501979648,
"available_inodes": 21431137,
"total_inodes": 29089792
}
],
"free_bytes": 7501979648,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175917995,
"same_partition_release_and_backup": true,
"space_guard_satisfied": true,
"current_release_entry_reference": 31197,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"capacity_after_installation": {
"checked_at_UTC": "2026-10-26T13:36:32.849652+00:00",
"installed": {
"status": "installed",
"commit": "632dc06930d6b4f1b012feb3b4daa3b1cfc53f39",
"release": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"previous_release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"release_revision": {
"commit": "632dc06930d6b4f1b012feb3b4daa3b1cfc53f39",
"branch": "main",
"built_at": "2026-10-26T13:34:38.155848+00:00",
"manifest_sha256": "a19a56e9ecf5e15cdbac92baefa483af70905a530c39927d30f0abfaaebcdf3f"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 6477869056,
"available_inodes": 21399599,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 6477869056,
"available_inodes": 21399599,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 6477869056,
"available_inodes": 21399599,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 6477869056,
"available_inodes": 21399599,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 6477869056,
"available_inodes": 21399599,
"total_inodes": 29089792
}
],
"free_bytes": 6477869056,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175917995,
"same_partition_release_and_backup": true,
"space_guard_satisfied": true,
"current_release_entry_reference": 31234,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"backup_restore_verified": true,
"fiscal_runtime_delta": [
{
"path": "resources/js/lib/irpc-special.ts",
"sha256_LF": "89f1eafa35111b92ec739d8e36c3279f20224024a1629869b85199566d642c24"
},
{
"path": "resources/js/lib/irpc-normal.ts",
"sha256_LF": "5b182929ed984f41abe17c9b744c2b76a75532aefd00e2d967063e2b03f76322"
},
{
"path": "resources/js/components/simulation-irpc-special.tsx",
"sha256_LF": "5baedb1df299babef8850022a06f88845f747c008d7773bc226ce9fe9210b5b0"
}
],
"concurrent_main_presentation_delta_preserved": [
"resources/js/pages/portal/why-invest.tsx"
],
"preservation": {
"previous_release_preserved": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"installed": {
"status": "installed",
"commit": "632dc06930d6b4f1b012feb3b4daa3b1cfc53f39",
"release": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"previous_release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"database_migrations": 0,
"content_imports": 0
},
"runtime_files_verified": 3,
"preserved_L3_ISPC_FX_runtime_files_verified": 60,
"documentary_files_verified": 31,
"persistent_files_and_env_verified": 369,
"tables_compared": 174,
"changed_tables": {
"cache": {
"before": {
"rows": 106,
"checksum": "d0ab7ac01e245cd9a1b545db96cbdf2c"
},
"after": {
"rows": 106,
"checksum": "b725d24eab666bda380f94df620c7b1c"
}
},
"sessions": {
"before": {
"rows": 22,
"checksum": "7ad93d9dd3b3b34dee00d256213cf6a2"
},
"after": {
"rows": 10,
"checksum": "3034d8ede70cb5c6aa4cccb181d828b2"
}
}
},
"preserved_counts": {
"published_fiches": 29,
"relations": 28,
"geometries": 408
},
"migration_count": 0,
"content_imports": 0,
"comparison_role": "postgres_before_and_after;sameexportedsnapshotbaseline;noapplicationRLSvisibilityinference",
"writes_by_verification": 0
},
"schema_permissions_after": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 106,
"after_rows": 106,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 22,
"after_rows": 11,
"changes": [
{
"key_sha256": "dd5c5235e9b48e28573884145b201d1f92cdabfea21a1602307c2569efe5d56c",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "d3d49a6f04c09c9852119084de7f840a69a14872847f363523457bcc567f2220",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "d1963bf84cb07dfc540935a88fbeb14f272763938b4db1fb68ffd28e6be9e157",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "5b744c29cc4e8a7d20f33814b52fa522e2c04dc525e7e82fa1c00e18ba91d528",
"kind": "updated",
"fields": [
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "7cd11e7b663d5c5b1b6b31703b8b702ccef9a51f5ae9003f6ea177f3bde8c576",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "3da37b843afdc870f2c0b1336344e97218a264ab5a7b44825a194c89a48fab32",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "6e12944bc8f670195d0c6d2638337e2bf922261a158d130ba09f640a5722f0df",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "cd8c2106a4f4ab7802317e6602c26cfa4cf82a23a86f67a0abbc27fbd82edfb8",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "8cb63d0938103966b238f3aef867a970f2d3f3f66fe62b663457b3f7f2814b10",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "11bbe5f81c536cf605ed71f402fbaa6e9ef551d97c0a76e098078521d9f37f71",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "0efd8f20e81562999badc07fe5af262be1705f08554208e03d281055cd38e34e",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "a89dca10cb8a95f4451ff60eeefe7ac3cd7751b779b0bf97a7e5f5b894f9b115",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "f8e1fa11cf234c2c9f498402557b4c4aed3b89c83dace57af783ae840e4dc821",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "6827c4d8b9a804dc85c3ba12ec33f715b5e753ca00ad0f707e7cbd0e48e5e173",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "9bb5ab5f9a5a161579f25f0d029de6a3a5a9b6a8d03868682bf3fc73c9af6720",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "d0a4dbafaf19e2eee3af4ea41ce9aabf52cb42d5a61a598c54b37d8863b533d7",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "7fb2119013f872a5e4dd70952cc896a4ac8291134e02362bd60805eb77e9587a",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
},
{
"key_sha256": "9bce01e56add682b9d4f3f1829ee83129ab6b18a21c6cf221b04357a8b1232c6",
"kind": "deleted",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": true,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": false
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"public": {
"status": "installed_delta_verified",
"served_revision": {
"commit": "632dc06930d6b4f1b012feb3b4daa3b1cfc53f39",
"branch": "main",
"built_at": "2026-10-26T13:34:38.155848+00:00",
"manifest_sha256": "a19a56e9ecf5e15cdbac92baefa483af70905a530c39927d30f0abfaaebcdf3f"
},
"manifest_hash_matches": true,
"compiled_delta_markers": {
"IRPC-normal-adjustments/12": [
"assets/project-dossier-MN0piFXE.js"
],
"IRPC-normal-adjustments/13": [
"assets/project-dossier-MN0piFXE.js"
],
"Preparar CBF16 para início de actividade": [
"assets/services-Dwp9X13w.js"
],
"Preparar CBF16 para cessação e quotas anteriores": [
"assets/services-Dwp9X13w.js"
],
"sem consumo de saldos oficiais": [
"assets/project-dossier-MN0piFXE.js"
],
"Preparar CBF16 com duodécimos": [
"assets/services-Dwp9X13w.js"
],
"CBF16 — duodécimos reutilizados de L6": [
"assets/project-dossier-MN0piFXE.js"
],
"Suporte dos duodécimos CBF16": [
"assets/services-Dwp9X13w.js"
],
"Manter preparação anual CBF16": [
"assets/services-Dwp9X13w.js"
],
"CBF16 por duodécimos — ": [
"assets/project-dossier-MN0piFXE.js"
],
"diferença adicional:": [
"assets/project-dossier-MN0piFXE.js"
],
"IRPC-normal-adjustments/10": [
"assets/project-dossier-MN0piFXE.js"
]
},
"assets": [
{
"file": "assets/project-dossier-document-CNhBEvbI.js",
"status": 200,
"sha256": "b9b847d250ac7868f3751371cd49009a3b7d6ad88bdbcb18890b711157508074"
},
{
"file": "assets/simulation-form-BqVD91Ek.js",
"status": 200,
"sha256": "85cbd533c5bc92af5a448db71da006d4346d2d0adb09dde825db0aa19ad5048c"
},
{
"file": "assets/services-Dwp9X13w.js",
"status": 200,
"sha256": "3b102fdc35d71ba203451d784264e949f2fec8ad55de84ecdee44a4920dc35c2"
},
{
"file": "assets/project-dossier-MN0piFXE.js",
"status": 200,
"sha256": "7dc6c894ba3b9cd83dea620c0f6412fdb219d75970e15a5e2e81af479066c3d6"
}
],
"simulator_status": 200,
"simulator_entry": "assets/app-BLx8DOj2.js",
"synthetic_private_writes": 0,
"method": "Read-only installedrevision/manifest/newcompiledcatalogueandreaders/simulatorentry;acceptedQAproofsreused"
},
"pipeline": {
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"installed": {
"status": "installed",
"commit": "632dc06930d6b4f1b012feb3b4daa3b1cfc53f39",
"release": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"previous_release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"database_migrations": 0,
"content_imports": 0
},
"latest_report": {
"status": "installed",
"commit": "632dc06930d6b4f1b012feb3b4daa3b1cfc53f39",
"release": "/var/www/investmoz-homologacao/releases/632dc06930d6b4f1b012feb3b4daa3b1cfc53f39-4c020686",
"previous_release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"632dc06930d6b4f1b012feb3b4daa3b1cfc53f39"
],
"finished_at": "2026-10-26T13:34:41.383616+00:00"
},
"log_file": "1793021473834371945.log",
"summaries": [
"OK (1 test, 3106 assertions)",
"built in 32.94s",
"OK (59 tests, 317 assertions)",
"# tests 1042",
"# pass 1042",
"# fail 0"
],
"log_bytes": 296124
},
"accepted_QA_proofs_reused": {
"irpc-l7-start-period-qa-20261026.json": {
"new_frontend_tests": 9,
"API_tests": 1,
"API_assertions": 97,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_host": "127.0.0.1",
"API_port": 55441,
"API_transaction_rollback": true,
"wayfinder_with_form": true,
"typescript": true,
"isolated_build": true,
"HTML_financial_dossier_from_5_API_recoveries": true,
"actual_component": {
"actualComponent": true,
"explicitStartOptionAndCancel": true,
"reuseL6PeriodEvidenceExplicit": true,
"assetsAndPeriodUnchanged": true,
"missingPreservesNormal1001_60": true,
"sixActualMonths50Normal75Accelerated60Cap10Additional": true,
"simulatedColecta998_40": true,
"exactFraction5over3": true,
"saveRecoveryDownload": true,
"negativeAbsenceDistinct": true,
"L8FinalUnknown": true,
"errors": []
}
},
"irpc-l7-cessation-prior-qa-20261026.json": {
"new_frontend_tests": 11,
"API_tests": 1,
"API_assertions": 123,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_host": "127.0.0.1",
"API_port": 55441,
"transaction_rollback": true,
"wayfinder_with_form": true,
"typescript_after_main": true,
"build_after_main": true,
"HTML_financial_dossier_from_7_API_recoveries": true,
"UI": {
"actualComponent": true,
"explicitPreparationAndCancel": true,
"missingOnlyDependentL7": true,
"assetsAndPeriodNotEdited": true,
"prior15RecoveredWithin75DeductionAdditional25": true,
"prior35RemainingNotConsumed": true,
"annual30RecoveredWithin150DeductionAdditional50": true,
"cessationDoesNotImplyAssetExit": true,
"documentedExit5MonthsExact125over6": true,
"saveRecoverDownload": true,
"negativeAbsenceDistinct": true,
"accepted12DoesNotGainConflictingInput": true,
"L8FinalUnknown": true,
"errors": []
},
"accepted_ba83_proofs_reused_not_rerun": true
}
},
"no_custom_QA_suite_repeated": true,
"demonstrated_example": {
"normal_deduction_MZN": "50",
"accelerated_deduction_MZN": "75",
"prior_recovered_included_in_75_MZN": "15",
"additional_deduction_MZN": "25",
"prior_remaining_arithmetic_MZN": "35",
"colecta_simulated_MZN": "993.60",
"declared_prior_balances_unchanged": [
"150",
"100",
"50"
],
"official_balances_consumed": false,
"final_balance": "L8_not_calculated"
},
"remaining_L7": "cumulation and remaining implementation/document dependencies retained in same matrix;no full completion",
"next_scope": "qualify combinations per applicable dispositions and segregated parcels;do not add positive benefits or apply automatic global cumulation",
"L6_operational_delimited": true,
"L7_partial": true,
"L8_final_separate": true,
"SGF_TEMPO_untouched": true
}
@@ -0,0 +1,532 @@
{
"status": "CBF16_monthly_installed",
"installed": {
"status": "installed",
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"previous_release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"database_migrations": 0,
"content_imports": 0
},
"previous_installed": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"backup": {
"stage": "/var/backups/investmoz-irpc-l7-months-delivery-20261026/backup",
"created_at": "2026-10-26T12:34:42Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "a4e23c6647eeb88ad14b697fafb4728be34118ad0fcfb73f02430fdc8a29135c",
"files_sha256": "11143477968fecb78ddccaba1d36842fa18c1ccf0f2c84ae60704b4cbe4c8274",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_l7_months_restore_20261026",
"port": 55441,
"source_dump_sha256": "a4e23c6647eeb88ad14b697fafb4728be34118ad0fcfb73f02430fdc8a29135c",
"active_database_writes": 0
},
"capacity_before": {
"checked_at_UTC": "2026-10-26T12:33:43.711257+00:00",
"installed": {
"status": "installed",
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"previous_release": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"release_revision": {
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"branch": "main",
"built_at": "2026-10-26T11:02:32.435267+00:00",
"manifest_sha256": "d78a1bdb503c10849f5ea8d8879753653c2c2fc22f6182f6d68ec9f6adf635b5"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5901660160,
"available_inodes": 21448052,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5901660160,
"available_inodes": 21448052,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5901660160,
"available_inodes": 21448052,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5901660160,
"available_inodes": 21448052,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5901660160,
"available_inodes": 21448052,
"total_inodes": 29089792
}
],
"free_bytes": 5901660160,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175917329,
"same_partition_release_and_backup": true,
"space_guard_satisfied": true,
"current_release_entry_reference": 31179,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"capacity_after_backup": {
"checked_at_UTC": "2026-10-26T12:35:49.897136+00:00",
"installed": {
"status": "installed",
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"previous_release": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"release_revision": {
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"branch": "main",
"built_at": "2026-10-26T11:02:32.435267+00:00",
"manifest_sha256": "d78a1bdb503c10849f5ea8d8879753653c2c2fc22f6182f6d68ec9f6adf635b5"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5723119616,
"available_inodes": 21448040,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5723119616,
"available_inodes": 21448040,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5723119616,
"available_inodes": 21448040,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5723119616,
"available_inodes": 21448040,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 5723119616,
"available_inodes": 21448040,
"total_inodes": 29089792
}
],
"free_bytes": 5723119616,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175917329,
"same_partition_release_and_backup": true,
"space_guard_satisfied": true,
"current_release_entry_reference": 31179,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"delta": [
{
"path": "resources/js/lib/irpc-special.ts",
"sha256_LF": "a6efbece159a118c5900a6c0d1ebd7b57091b62853c0ad589538546b377aa184"
},
{
"path": "resources/js/lib/irpc-normal.ts",
"sha256_LF": "f21868298d050c72149bcc814858123cb5c7320a93399b30c994b09b5117087c"
},
{
"path": "resources/js/components/simulation-irpc-special.tsx",
"sha256_LF": "da8160778c75935e8b7061ed5722616240189be818e1e04f5711d5b14ec6672d"
}
],
"preservation": {
"previous_release_preserved": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"installed": {
"status": "installed",
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"previous_release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"database_migrations": 0,
"content_imports": 0
},
"runtime_files_verified": 3,
"preserved_L3_ISPC_FX_runtime_files_verified": 60,
"documentary_files_verified": 31,
"persistent_files_and_env_verified": 369,
"tables_compared": 174,
"changed_tables": {
"cache": {
"before": {
"rows": 106,
"checksum": "716daf400150d9b23980e9c93b3e2f69"
},
"after": {
"rows": 106,
"checksum": "512b1ff328aa6bd8c495408be1ab804f"
}
},
"sessions": {
"before": {
"rows": 17,
"checksum": "7fa218eac3ce56d098b61c1dd270c47d"
},
"after": {
"rows": 20,
"checksum": "8f0c8ef146080d0b1bea08aaaddf0446"
}
}
},
"preserved_counts": {
"published_fiches": 29,
"relations": 28,
"geometries": 408
},
"migration_count": 0,
"content_imports": 0,
"comparison_role": "postgres_before_and_after;sameexportedsnapshotbaseline;noapplicationRLSvisibilityinference",
"writes_by_verification": 0
},
"schema_permissions_after": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 106,
"after_rows": 106,
"changes": [
{
"key_sha256": "dbb99b7e17f5b4b9bb7a8bdf9350d9b2ae368aaa4bc44593a2522d87617d8461",
"kind": "updated",
"fields": [
"expiration"
],
"key_pattern": "investemoz-cache-{hash}",
"is_queue_restart_key": false,
"expiration_unchanged": false,
"throttle_timer_pair": true,
"same_value_home_cache_expiry_refresh": false
},
{
"key_sha256": "c1c7bc86ef3255c103a0be6aeb651b824eb07259e993cc5daf3665c1a6afff2d",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-{hash}:timer",
"is_queue_restart_key": false,
"expiration_unchanged": false,
"throttle_timer_pair": true,
"same_value_home_cache_expiry_refresh": false
},
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 17,
"after_rows": 20,
"changes": [
{
"key_sha256": "5b744c29cc4e8a7d20f33814b52fa522e2c04dc525e7e82fa1c00e18ba91d528",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "26b9b547d6b141fc234b6ea7dac11a679e4bcc54771dfccfcd48a0a5e5abd472",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "db3bcd670b9bafa55a0eb8069cdb3687fd0b7af8640fb4dc464c8adda4aaeccb",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"public": {
"status": "installed_delta_verified",
"served_revision": {
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"branch": "main",
"built_at": "2026-10-26T12:39:22.332516+00:00",
"manifest_sha256": "ce3110f77afcaefb5943e50fff77cc8feb34b4c1af20aea1fb64602ffa739264"
},
"manifest_hash_matches": true,
"compiled_delta_markers": {
"IRPC-normal-adjustments/11": [
"assets/project-dossier-BFw3okex.js"
],
"Preparar CBF16 com duodécimos": [
"assets/services-BDq13GEq.js"
],
"CBF16 — duodécimos reutilizados de L6": [
"assets/project-dossier-BFw3okex.js"
],
"Suporte dos duodécimos CBF16": [
"assets/services-BDq13GEq.js"
],
"Manter preparação anual CBF16": [
"assets/services-BDq13GEq.js"
],
"CBF16 por duodécimos — ": [
"assets/project-dossier-BFw3okex.js"
],
"diferença adicional:": [
"assets/project-dossier-BFw3okex.js"
],
"IRPC-normal-adjustments/10": [
"assets/project-dossier-BFw3okex.js"
]
},
"assets": [
{
"file": "assets/project-dossier-document-BE3GlToo.js",
"status": 200,
"sha256": "ff2cddc6e148022c6358910dc7bc3deb002887fc9851c2a46bb2ce69b9c39aaa"
},
{
"file": "assets/project-dossier-BFw3okex.js",
"status": 200,
"sha256": "7d7263d2fb030111d5ea842eb0ee8b98565e9208b6c8ad7dfd4ff58e4a4b1346"
},
{
"file": "assets/simulation-form-BqVD91Ek.js",
"status": 200,
"sha256": "85cbd533c5bc92af5a448db71da006d4346d2d0adb09dde825db0aa19ad5048c"
},
{
"file": "assets/services-BDq13GEq.js",
"status": 200,
"sha256": "05d13e2e1f454db1f6430de4882468ade75f130b3044f781e68853e4367a1732"
}
],
"simulator_status": 200,
"simulator_entry": "assets/app-C9i2PsI1.js",
"synthetic_private_writes": 0,
"method": "Read-only installedrevision/manifest/newcompiledcatalogueandreaders/simulatorentry;acceptedQAproofsreused"
},
"pipeline": {
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"installed": {
"status": "installed",
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"previous_release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"database_migrations": 0,
"content_imports": 0
},
"latest_report": {
"status": "installed",
"commit": "0bd5d495505d512088887efd3dc5c61f645b1647",
"release": "/var/www/investmoz-homologacao/releases/0bd5d495505d512088887efd3dc5c61f645b1647-ad28558b",
"previous_release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"0bd5d495505d512088887efd3dc5c61f645b1647"
],
"finished_at": "2026-10-26T12:39:25.297008+00:00"
},
"log_file": "1793018162607468190.log",
"summaries": [
"OK (1 test, 3106 assertions)",
"built in 30.45s",
"OK (59 tests, 317 assertions)",
"# tests 1022",
"# pass 1022",
"# fail 0"
],
"log_bytes": 290854
},
"accepted_QA_proofs_reused": {
"frontend_new_tests": 15,
"API_tests": 1,
"API_assertions": 89,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_port": 55441,
"API_identity_guard": true,
"API_transaction_rollback": true,
"API_to_report_cases": 5,
"UI": {
"actualComponent": true,
"explicitOptionalMonthlyDoesNotEditAssets": true,
"cancelPreservesDeliveredAnnual": true,
"missingSupportPreservesNormalReference": true,
"L6TimingEditedAndReused": true,
"quota75LimitedTo60Additional10": true,
"OctoberUses3MonthsAdditional12_50": true,
"exactFraction25over6": true,
"saveRecoveryDownload": true,
"negativeAbsenceDistinct": true,
"finalL8Unknown": true,
"errors": []
},
"Wayfinder_with_form_generated": true,
"typescript_noEmit": true,
"QA_build": true,
"unaffected_functional_suites_repeated": false
},
"demonstrated_example": {
"normal_quota_MZN": "50",
"CBF16_quota_MZN": "75",
"deduction_after_accounting_cap_MZN": "60",
"additional_deduction_MZN": "10",
"colecta_simulated_MZN": "2016",
"final_balance": "L8_not_calculated"
},
"next_compatible_QA_scope": "CBF16 for a resident beginning activity during2026:documented short period and monthly asset timing reused from L6;explicit scope;no cessation/transition/priorquotas/cumulation",
"L7_partial": true,
"L6_and_first_L7_treatments_preserved": true,
"L8_final_settlement_separate": true,
"SGF_affected": false,
"cleanup_executed": false,
"new_private_synthetic_writes_on_active": 0,
"evidence": {
"backup.txt": "08e14e4dc56973954fdafb3ecca8fb586894e6d50188a0c450f714cc69bd442a",
"baseline.txt": "3838c6d8327fe90ef9f5e19dacaf9c2fcdd61f44d95127520a61da09399bd81c",
"capacity-after-backup.txt": "347647d26d78d4da2c21602f7ca9d58dbfdacf987af1a3dda8d13595790e0f58",
"installed-protected.txt": "d7c47360d40bcf1380ba419dbf55cffb84651bf11b3b073547328bfee0c76cb5",
"installed-public-delta.json": "1a882e238d57af6b7d8b551905011e39e8d5ade96852aeddca7e6c2e76df2df8",
"installed-public.txt": "d79a2ebea5691ed85fb432b3b5ec1e68fc83585431b86caa22b8c07f64e6b852",
"integration.txt": "58473f88aadc2f40d0cb1f6cafc4bad5f19a74fd94fced4007150c8bc4e72033",
"manifest-served.json": "ce3110f77afcaefb5943e50fff77cc8feb34b4c1af20aea1fb64602ffa739264",
"operational-delta.txt": "ec794652c7de2e71ee3126d741c330961cde9b123477185c1f9bdb5b530b9afb",
"preflight.txt": "1bb024b6c1d66fc07ae0a181961729d4af532d3c51570c1aec06ca5b0039033a",
"preparation.json": "22c21051049a495d3aa98c83c3faaddad6ddd0200489647bb137cb5c7fdb5bcc",
"progress-1.txt": "4556381c15abcb5c96d6b675f328b6ee9baa20e9e83495becc58106a224dcaed",
"progress-2.txt": "c882b2b1c75e7e462f59b97fb4b4d570d772fb331c4d4676a660d94619b8c778",
"progress-3.txt": "1e02bd58bf4477f0573cecdcec6ec086820401a2628a02df7518a969d7115dc1",
"restore.txt": "7f987653a5a41b4e586bb88247548a3e4ab1ef94080fbef4d448dc2e249e1baa",
"schema-permissions-after.txt": "76b5a4d8af11e4898a205062766cfb7ab6ec0783200e77e60a1927aa1ca18597",
"schema-permissions-before.txt": "0ab7c964792acdd8917bce256c472e55e034b103500a58b49f020b5084823ed7",
"status-final.txt": "3353b0b2e359627d9987fff4df576b5c466ba903235d60bbc40feac5d8082efa"
}
}
@@ -0,0 +1,527 @@
{
"status": "CBF16_monthly_QA_prepared_not_installed",
"date": "2026-10-26",
"branch": "codex/irpc-l7-months-qa-20261026",
"QA_workspace_reused_without_deleting_old_proofs": "C:\\laragon\\www\\portal-investidor-irpc-l7-common-qa-20261026",
"installed_baseline": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"documentation_baseline": "aed020d19eff800ac970ac43b7e0b7a157df5486",
"version": "IRPC-normal-adjustments/11",
"optional_input": "special.acceleration.monthly version1 and explicit reference;no automatic date/value changes",
"delivered_version10_keys_models_histories_preserved": true,
"runtime_delta": {
"resources/js/lib/irpc-special.ts": "a6efbece159a118c5900a6c0d1ebd7b57091b62853c0ad589538546b377aa184",
"resources/js/lib/irpc-normal.ts": "f21868298d050c72149bcc814858123cb5c7320a93399b30c994b09b5117087c",
"resources/js/components/simulation-irpc-special.tsx": "da8160778c75935e8b7061ed5722616240189be818e1e04f5711d5b14ec6672d"
},
"L6_depreciation_engine_unchanged": true,
"cases_recovered": {
"monthly": {
"L6_reference": {
"taxableProfit": {
"numerator": "6310",
"denominator": "1"
},
"taxableBase": {
"numerator": "6310",
"denominator": "1"
},
"colecta": {
"numerator": "10096",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "6300",
"denominator": "1"
},
"L7_base": {
"numerator": "6300",
"denominator": "1"
},
"L7_colecta": {
"numerator": "2016",
"denominator": "1"
},
"additional_deduction": {
"numerator": "10",
"denominator": "1"
},
"status": "calculated",
"monthly": {
"input": {
"version": 1,
"reference": "QA opção de duodécimos desde a entrada emuso,datas/meses do mesmo activoL6"
},
"period": {
"kind": "calendar",
"from": "2026-01-01",
"to": "2026-12-31",
"reference": "QA doze meses do plano correspondem ao ano civil completo",
"pending": []
},
"source": "CBF16 com Decreto72/2013 art9:taxa normal máxima ×1,5 ×duodécimos/12,meses reutilizados do mapaL6. Exercício anual civil2026,entrada emuso no ano,método constante,sem saída/quotas anteriores/cumulação. Dedução limitada ao contabilizado elegível e saldo fiscal;apenas diferença adicional,não nova amortização contabilística.",
"assets": [
{
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2026-07-15",
"months": 6,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": {
"numerator": "15",
"denominator": "1"
},
"normalQuota": {
"numerator": "50",
"denominator": "1"
},
"acceleratedQuota": {
"numerator": "75",
"denominator": "1"
},
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": {
"numerator": "60",
"denominator": "1"
},
"additionalDeduction": {
"numerator": "10",
"denominator": "1"
},
"applied": true,
"reason": "Activo existente elegível;taxa normal ×1,5,com limite contabilístico e saldo fiscal."
}
]
},
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"fraction": {
"L6_reference": {
"taxableProfit": {
"numerator": "19055",
"denominator": "3"
},
"taxableBase": {
"numerator": "19055",
"denominator": "3"
},
"colecta": {
"numerator": "30488",
"denominator": "15"
}
},
"L7_profit": {
"numerator": "12695",
"denominator": "2"
},
"L7_base": {
"numerator": "12695",
"denominator": "2"
},
"L7_colecta": {
"numerator": "10156",
"denominator": "5"
},
"additional_deduction": {
"numerator": "25",
"denominator": "6"
},
"status": "calculated",
"monthly": {
"input": {
"version": 1,
"reference": "QA opção de duodécimos desde a entrada emuso,datas/meses do mesmo activoL6"
},
"period": {
"kind": "calendar",
"from": "2026-01-01",
"to": "2026-12-31",
"reference": "QA doze meses do plano correspondem ao ano civil completo",
"pending": []
},
"source": "CBF16 com Decreto72/2013 art9:taxa normal máxima ×1,5 ×duodécimos/12,meses reutilizados do mapaL6. Exercício anual civil2026,entrada emuso no ano,método constante,sem saída/quotas anteriores/cumulação. Dedução limitada ao contabilizado elegível e saldo fiscal;apenas diferença adicional,não nova amortização contabilística.",
"assets": [
{
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2026-12-15",
"months": 1,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": {
"numerator": "15",
"denominator": "1"
},
"normalQuota": {
"numerator": "25",
"denominator": "3"
},
"acceleratedQuota": {
"numerator": "25",
"denominator": "2"
},
"normalDeduction": {
"numerator": "25",
"denominator": "3"
},
"acceleratedDeduction": {
"numerator": "25",
"denominator": "2"
},
"additionalDeduction": {
"numerator": "25",
"denominator": "6"
},
"applied": true,
"reason": "Activo existente elegível;taxa normal ×1,5,com limite contabilístico e saldo fiscal."
}
]
},
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"missing": {
"L6_reference": {
"taxableProfit": {
"numerator": "6310",
"denominator": "1"
},
"taxableBase": {
"numerator": "6310",
"denominator": "1"
},
"colecta": {
"numerator": "10096",
"denominator": "5"
}
},
"L7_profit": null,
"L7_base": null,
"L7_colecta": null,
"additional_deduction": null,
"status": "indeterminate",
"monthly": {
"input": {
"version": 1,
"reference": ""
},
"period": {
"kind": "calendar",
"from": "2026-01-01",
"to": "2026-12-31",
"reference": "QA doze meses do plano correspondem ao ano civil completo",
"pending": []
},
"source": "CBF16 com Decreto72/2013 art9:taxa normal máxima ×1,5 ×duodécimos/12,meses reutilizados do mapaL6. Exercício anual civil2026,entrada emuso no ano,método constante,sem saída/quotas anteriores/cumulação. Dedução limitada ao contabilizado elegível e saldo fiscal;apenas diferença adicional,não nova amortização contabilística.",
"assets": [
{
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2026-07-15",
"months": 6,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": null,
"normalQuota": {
"numerator": "50",
"denominator": "1"
},
"acceleratedQuota": null,
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": null,
"additionalDeduction": null,
"applied": false,
"reason": "Falta suporte da reutilização dos meses e da opção por duodécimosCBF16 no mapaL6."
}
]
},
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"negative": {
"L6_reference": {
"taxableProfit": {
"numerator": "6310",
"denominator": "1"
},
"taxableBase": {
"numerator": "6310",
"denominator": "1"
},
"colecta": {
"numerator": "10096",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "6310",
"denominator": "1"
},
"L7_base": {
"numerator": "6310",
"denominator": "1"
},
"L7_colecta": {
"numerator": "10096",
"denominator": "5"
},
"additional_deduction": {
"numerator": "0",
"denominator": "1"
},
"status": "calculated",
"monthly": {
"input": {
"version": 1,
"reference": "QA opção de duodécimos desde a entrada emuso,datas/meses do mesmo activoL6"
},
"period": {
"kind": "calendar",
"from": "2026-01-01",
"to": "2026-12-31",
"reference": "QA doze meses do plano correspondem ao ano civil completo",
"pending": []
},
"source": "CBF16 com Decreto72/2013 art9:taxa normal máxima ×1,5 ×duodécimos/12,meses reutilizados do mapaL6. Exercício anual civil2026,entrada emuso no ano,método constante,sem saída/quotas anteriores/cumulação. Dedução limitada ao contabilizado elegível e saldo fiscal;apenas diferença adicional,não nova amortização contabilística.",
"assets": [
{
"id": "accelerated1",
"assetId": "server",
"assetKey": "asset-server",
"description": "Máquina industrial existente QA",
"start": "2026-07-15",
"months": 6,
"taxBasis": {
"numerator": "1000",
"denominator": "1"
},
"normalRate": {
"numerator": "10",
"denominator": "1"
},
"acceleratedRate": null,
"normalQuota": {
"numerator": "50",
"denominator": "1"
},
"acceleratedQuota": null,
"normalDeduction": {
"numerator": "50",
"denominator": "1"
},
"acceleratedDeduction": null,
"additionalDeduction": {
"numerator": "0",
"denominator": "1"
},
"applied": false,
"reason": "Condição negativa documentada;quota normal mantida."
}
]
},
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"absent": {
"L6_reference": {
"taxableProfit": {
"numerator": "6310",
"denominator": "1"
},
"taxableBase": {
"numerator": "6310",
"denominator": "1"
},
"colecta": {
"numerator": "10096",
"denominator": "5"
}
},
"L7_profit": {
"numerator": "6310",
"denominator": "1"
},
"L7_base": {
"numerator": "6310",
"denominator": "1"
},
"L7_colecta": {
"numerator": "10096",
"denominator": "5"
},
"additional_deduction": {
"numerator": "0",
"denominator": "1"
},
"status": "absent",
"monthly": {
"input": {
"version": 1,
"reference": "QA opção de duodécimos desde a entrada emuso,datas/meses do mesmo activoL6"
},
"period": {
"kind": "calendar",
"from": "2026-01-01",
"to": "2026-12-31",
"reference": "QA doze meses do plano correspondem ao ano civil completo",
"pending": []
},
"source": "CBF16 com Decreto72/2013 art9:taxa normal máxima ×1,5 ×duodécimos/12,meses reutilizados do mapaL6. Exercício anual civil2026,entrada emuso no ano,método constante,sem saída/quotas anteriores/cumulação. Dedução limitada ao contabilizado elegível e saldo fiscal;apenas diferença adicional,não nova amortização contabilística.",
"assets": []
},
"final_balance": {
"scope": "L8",
"payable": null,
"recoverable": null
}
}
},
"checks": {
"frontend_new_tests": 15,
"API_tests": 1,
"API_assertions": 89,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_port": 55441,
"API_identity_guard": true,
"API_transaction_rollback": true,
"API_to_report_cases": 5,
"UI": {
"actualComponent": true,
"explicitOptionalMonthlyDoesNotEditAssets": true,
"cancelPreservesDeliveredAnnual": true,
"missingSupportPreservesNormalReference": true,
"L6TimingEditedAndReused": true,
"quota75LimitedTo60Additional10": true,
"OctoberUses3MonthsAdditional12_50": true,
"exactFraction25over6": true,
"saveRecoveryDownload": true,
"negativeAbsenceDistinct": true,
"finalL8Unknown": true,
"errors": []
},
"Wayfinder_with_form_generated": true,
"typescript_noEmit": true,
"QA_build": true,
"unaffected_functional_suites_repeated": false
},
"preservation": {
"tracked_files_compared": 1006,
"unchanged": 1003,
"protected_code_schema_config_routes_contract_files": 584,
"original_files": {
"docs/investmoz/simulations/source-archive/AT-Comunicado-9-2026-ISPC.pdf": "106f8a9ce9255c03549c70bf07fe999d32e6e55302d009b509862aa74ccb4973",
"docs/investmoz/simulations/source-archive/AT-MRFTA-19-39.pdf": "8ea62c53066b482f87078a7a7b1ecf15ca98a12a122e8d7abca63acfc993186b",
"docs/investmoz/simulations/source-archive/AT-Modelo-30-ISPC.pdf": "6802edd06b6ff638a0b851a3ec7ecf69af8f07840faa47446becad67d35d445c",
"docs/investmoz/simulations/source-archive/AT-Modelo-B-Geral.pdf": "bd977c7c59d4d98befd92e2c566b1bf168cb1343bb519f51b41a3807f431fc57",
"docs/investmoz/simulations/source-archive/BM-Mercado-Monetario-MAIBOR-20261025.html": "00e8a7e0d3a1db4ca3beb56d5361b2084a0f1684f3d40fc1c203702a2190e063",
"docs/investmoz/simulations/source-archive/BR-16-I-Serie-2008-04-16.pdf": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
"docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"docs/investmoz/simulations/source-archive/BR-89-I-Serie-2017-06-08.pdf": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
"docs/investmoz/simulations/source-archive/BR-95-I-Suplemento-2025-05-21.pdf": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
"docs/investmoz/simulations/source-archive/BR252-I-Serie-2022-Lei20-PESOE.pdf": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"docs/investmoz/simulations/source-archive/Decreto-22-2021-BR70.pdf": "a8fac38dcfe08f9c7a8e46254cff10e1ec82fc4f7a8d88ad6e4fe7d91ffc21a5",
"docs/investmoz/simulations/source-archive/Decreto-27-2026-BR123.pdf": "26249c3fa58f149c81de36e99d1aac2819a4771379d9e8833159660dabf539bb",
"docs/investmoz/simulations/source-archive/Decreto-29-1998-BR22-5-suplemento.pdf": "6242cbe675faadf085f43f95ec8c7e8868aafe67c3b2ab2bb010992288f954f8",
"docs/investmoz/simulations/source-archive/Decreto-3-2011-BR-11-I-mineiros.pdf": "5bca1133666ba9c69870b89823420175b7b5b8d0eccb667ecdf5c29716f3b6be",
"docs/investmoz/simulations/source-archive/Decreto-37-2023-BR124.pdf": "7e680b191481faa0e2e9057fa5053587eb2a29d1d8c819e0eb9f02814255a04c",
"docs/investmoz/simulations/source-archive/Decreto-9-2008-BR16.pdf": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
"docs/investmoz/simulations/source-archive/Lei-14-1992-BR42.pdf": "089fff7423e99a70a230a73ca379e4ea3a91d124703f91016e57ff82794b9e56",
"docs/investmoz/simulations/source-archive/Lei-17-2022-BR251-exemplar-MCNet5.pdf": "14eb34f0af91a8f5cb1770c7b52d6ff839c6818302d1ed96d79afbfb9fe999d4",
"docs/investmoz/simulations/source-archive/Lei-17-2022-IPP-BR250-Parlamento.pdf": "978cd22403ffd336a631704ecd7a5bbd814a427c815b9acdaca5515591dd9e2a",
"docs/investmoz/simulations/source-archive/Lei-19-2013-BR76.pdf": "bba96d645cc935ffc3d1a79b9f0f73ac1c693d6459c2ad41f56cd2841accae76",
"docs/investmoz/simulations/source-archive/Lei-19-2017-IRPS-BR-OCAM.pdf": "c3a0186cb9ad090d7a9533006295dc9bb6a62ad0d6150173cbd49dba4ee4b52d",
"docs/investmoz/simulations/source-archive/Lei-2-2011-BR-1-4-suplemento-MCNet.pdf": "a7543a68cc3287a46a83c39a04821b40f649dd06c4e9b5dc51ff0b47fba08899",
"docs/investmoz/simulations/source-archive/Lei-20-2009-BR36-AT-exemplar19.pdf": "fc1c8144db42960cbf73e717e095896f511ece0f907f58f78819b27d6917a7ee",
"docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
"docs/investmoz/simulations/source-archive/Lei-34-2007-BR52.pdf": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"docs/investmoz/simulations/source-archive/Lei-4-1994-BR37-3-suplemento.pdf": "210df9db8980d0a5690cd187a6eeec7e37a900d743e39062c16f4e0d12215c7e",
"docs/investmoz/simulations/source-archive/Lei-4-2012-BR3.pdf": "b8845cef41dcbd9ba50c43dbfa743a56030dd3d348242a107e1ae30279eec121",
"docs/investmoz/simulations/source-archive/Lei-7-1991-Partidos-IFES.pdf": "6b783a0bb3330688ef10660a58060d9724aa2da6a873d234fe902f0eaaeda42d",
"docs/investmoz/simulations/source-archive/PT-MZ-CDT-1992.pdf": "d504e1024b28aee5c6acf4592acb96ec9c915a8414f67a61ab6984d6acf9df9d",
"docs/investmoz/simulations/source-archive/PT-MZ-Protocolo-2009.pdf": "f353773dcf41f09f4daa6cf5ba5a5f7994f3e02615867c2dcffc61c3d901bf9b"
},
"active_writes": 0,
"migrations": 0,
"imports": 0,
"configuration_or_permission_changes": false,
"SGF_affected": false
},
"sources_reused": {
"inventory_files": 8143,
"evidence_receipts": [
"irpc-l6-depreciation-qa-20261026.json",
"irpc-l7-scope-20261026.json",
"irpc-l7-common-qa-20261026.json"
],
"rules": "CBF16 and Decreto72/2013 art3(3)/9;same L6 monthly timing/maximum normal rate/accounting caps",
"broad_research_repeated": false
},
"remaining_scope": [
"short/noncivil fiscal periods and exits",
"lateryears/priorquotas/selected lower rate/decliningmethod",
"rehabilitated/used/revalued/unmappedassets",
"benefitcumulation,cooperative+CBF16 and other L7 families",
"L7 official M20/M22 field transport"
],
"resume_condition": "Case-specific rule/period/accounting/compatibility and existing evidence linked,then only new effects demonstrated;L6 dependency limits its asset only",
"delivery_prepared_only": true,
"remote_capacity_before_next_installation": {
"last_observed": "2026-10-26T13:56:51.412248+02:00",
"historical_available_bytes": 5922545664,
"historical_available_inodes": 21448231,
"existing_pipeline_guard_bytes": 5368709120,
"mandatory_fresh_check_for_build_and_new_backup": true,
"backup_restore_fresh_required": true,
"main_compatibility_recheck_required": true,
"active_release_preserved_until_ready": true,
"no_local_or_SGF_cleanup_dependency": true
},
"L7_partial": true,
"L8_final_balance_separate": true,
"evidence_directory": "outputs/irpc-l7-months"
}
@@ -0,0 +1,225 @@
{
"status": "L6_operational_demonstrated_scope_accepted_L7_delimited_not_implemented",
"recorded_date": "2026-10-26",
"authority": {
"origin": "express_user_instruction",
"decision": "L6 operacional no âmbito demonstrado, com limitações explícitas; delimitar L7; L8 conserva liquidação final",
"new_generic_approval_required": false
},
"baseline": {
"installed_commit": "5aaf1a56f9d928331364fcc8b0d1528e51dba327",
"reused_delivery_receipt": "irpc-l6-values-forms-delivery-20261026.json",
"documentation_parent": "45fd591c7faa765f33de0a0b9000c3ceb4057abe",
"root_documentation_parent": "31651a76b11ed50576c52cd274e3c59cda0f8924"
},
"L6": {
"operational_scope_accepted": true,
"integrally_complete": false,
"existing_code_pending_groups": 5,
"existing_documentary_pending_groups": 5,
"pending_list": "same matrix/manual: saldo consolidado de L6",
"old_pending_decision_records_preserved_as_history": true,
"dependent_cases_only_blocked": true,
"accepted_proofs_reused": true
},
"L7": {
"state": "delimited; no new executable treatment",
"context_reused": [
"opportunity/dossier snapshots",
"sector and territorial IDs/labels/provenance",
"subject/NUIT/residence/EP/period",
"business_plan_snapshot",
"modelo_a_snapshot.irpcNormal versions",
"asset and expense IDs/previous quotas",
"exact rational values and demonstrated form mappings"
],
"location_grants_benefit": false,
"effect_types": [
"profit_adjustment",
"taxable_base_deduction",
"rate_by_eligible_parcel",
"separate_autonomous_tax",
"potential_credit_entitlement_for_L8"
],
"families": [
"61(4) expenses autonomous tax",
"61-A capital gains autonomous tax from2026",
"CIRPC9–14 entity exemptions/cooperative12",
"CBF16 accelerated depreciation",
"CBF17–19 deductions/magnifications",
"CBF15 potential investment credit; annual use L8",
"CBF sector/territory specific provisions",
"special operations54–56/41-A and specifically mapped sector regimes"
],
"first_increment": [
"common qualification, provenance, period and separate effects",
"61(4) expense35% with existing36g addback, no duplicate",
"missing-information and negative-condition cases"
],
"next_compatible_cases": [
"cooperative12 eligible parcel",
"CBF16 supported asset and reconciled prior quotas"
],
"not_implemented_yet": [
"specific qualification/persistence",
"new treatment calculations and per-parcel reconciliation",
"treatment-specific reporting/exports"
],
"documentary_pending_scope": "Only individual status/title where required, parcel/limit/chronology, unmapped specific sector norm or affected form edition/field; examples and resume conditions in same matrix/manual",
"historical_mutation_permitted": false
},
"L8": {
"retentions_payments_annual_credit_application_final_settlement": true,
"final_balance_calculated": false
},
"source_inventory": {
"reused_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\ispc-l4a-20261025\\preservation-before-tests.json",
"files": 8143,
"fresh_broad_scan": false,
"sources": [
{
"id": "CIRPC",
"title": "Lei34/2007",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\Lei-34-2007-BR52.pdf",
"bytes": 1676884,
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"references": "PDF5/p768(59):12,14,15; PDF15–16:54–56; PDF17/p768(71):61",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "IRPC-2026",
"title": "Lei12/2025",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
"bytes": 440018,
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"references": "PDF18–20; PDF20:art2/61-A,art3,art6; vigência01/01/2026",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "IRPC-2022",
"title": "Lei20/2022",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\docs\\investmoz\\simulations\\source-archive\\BR252-I-Serie-2022-Lei20-PESOE.pdf",
"bytes": 17966640,
"sha256": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"references": "PDF1/p2731:61(2), termo31/12/2025",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "CBF-local",
"title": "Lei4/2009",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\CBF-Lei4-2009-APIEX.pdf",
"bytes": 10998765,
"sha256": "4231a5b6783e603cedb98992f3e93ecaf1c1d5be341b093560cf2fdd0845b0dc",
"references": "Original local disponível; scan sem extracção textual útil; cotejo textual pela compilação oficial",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false,
"authorised_original": "\\\\Mac\\Home\\Documents\\TEMPO\\Portal Tempo\\Legislacao\\Apiex\\3.-Lei-no4-2009-de-12-de-Janeiro-Codigo-dos-Beneficios-Fiscais.pdf"
},
{
"id": "APIEX",
"title": "Compilação oficial APIEX",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\APIEX-legislacao-investimentos-2025.pdf",
"bytes": 6467655,
"sha256": "ba1e9eaabfec5d0c4cb2d9f2444a6860f7a90f222034764197829be402d408ed",
"references": "pp8–32:Lei8/2023; pp36–59:Decreto8/2024; pp64–92:CBF4/2009; p68:9/10;p71–74:15–19",
"official_url": "https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf",
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
},
{
"id": "RCBF",
"title": "Decreto56/2009",
"exemplar": "C:\\laragon\\www\\portal-investidor-irpc-l7-scope-20261026\\outputs\\irpc-l7-scope\\Decreto56-2009-BR40.pdf",
"bytes": 422005,
"sha256": "6ea1b8d93daed48c6d590481d874010fa1708211d8f27c319dc9a31328456017",
"references": "Procedimento já cotejado em iva-l1-p084-p085-model-i1-cotejo-20261024.json; não estende isenções IVA a IRPC",
"official_url": null,
"available_for_consultation": true,
"documentary_status": "official_source_accepted; applicability/version/period_per_treatment",
"new_calculation_activation": false
}
],
"rendered_pages_reviewed": [
"CIRPC PDF5",
"CIRPC PDF17",
"APIEX PDF68",
"APIEX PDF72",
"Lei12/2025 PDF20"
],
"no_period_extension_presumed": "61(2) Law20/2022 ends31/12/2025; no automatic2026 rate",
"availability_is_not_rule_activation": true
},
"preservation": {
"source_archive_files": {
"docs/investmoz/simulations/source-archive/AT-Comunicado-9-2026-ISPC.pdf": "106f8a9ce9255c03549c70bf07fe999d32e6e55302d009b509862aa74ccb4973",
"docs/investmoz/simulations/source-archive/AT-Modelo-30-ISPC.pdf": "6802edd06b6ff638a0b851a3ec7ecf69af8f07840faa47446becad67d35d445c",
"docs/investmoz/simulations/source-archive/AT-Modelo-B-Geral.pdf": "bd977c7c59d4d98befd92e2c566b1bf168cb1343bb519f51b41a3807f431fc57",
"docs/investmoz/simulations/source-archive/AT-MRFTA-19-39.pdf": "8ea62c53066b482f87078a7a7b1ecf15ca98a12a122e8d7abca63acfc993186b",
"docs/investmoz/simulations/source-archive/BM-Mercado-Monetario-MAIBOR-20261025.html": "00e8a7e0d3a1db4ca3beb56d5361b2084a0f1684f3d40fc1c203702a2190e063",
"docs/investmoz/simulations/source-archive/BR-16-I-Serie-2008-04-16.pdf": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
"docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"docs/investmoz/simulations/source-archive/BR-89-I-Serie-2017-06-08.pdf": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
"docs/investmoz/simulations/source-archive/BR-95-I-Suplemento-2025-05-21.pdf": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
"docs/investmoz/simulations/source-archive/BR252-I-Serie-2022-Lei20-PESOE.pdf": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"docs/investmoz/simulations/source-archive/Decreto-22-2021-BR70.pdf": "a8fac38dcfe08f9c7a8e46254cff10e1ec82fc4f7a8d88ad6e4fe7d91ffc21a5",
"docs/investmoz/simulations/source-archive/Decreto-27-2026-BR123.pdf": "26249c3fa58f149c81de36e99d1aac2819a4771379d9e8833159660dabf539bb",
"docs/investmoz/simulations/source-archive/Decreto-29-1998-BR22-5-suplemento.pdf": "6242cbe675faadf085f43f95ec8c7e8868aafe67c3b2ab2bb010992288f954f8",
"docs/investmoz/simulations/source-archive/Decreto-3-2011-BR-11-I-mineiros.pdf": "5bca1133666ba9c69870b89823420175b7b5b8d0eccb667ecdf5c29716f3b6be",
"docs/investmoz/simulations/source-archive/Decreto-37-2023-BR124.pdf": "7e680b191481faa0e2e9057fa5053587eb2a29d1d8c819e0eb9f02814255a04c",
"docs/investmoz/simulations/source-archive/Decreto-9-2008-BR16.pdf": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
"docs/investmoz/simulations/source-archive/Lei-14-1992-BR42.pdf": "089fff7423e99a70a230a73ca379e4ea3a91d124703f91016e57ff82794b9e56",
"docs/investmoz/simulations/source-archive/Lei-17-2022-BR251-exemplar-MCNet5.pdf": "14eb34f0af91a8f5cb1770c7b52d6ff839c6818302d1ed96d79afbfb9fe999d4",
"docs/investmoz/simulations/source-archive/Lei-17-2022-IPP-BR250-Parlamento.pdf": "978cd22403ffd336a631704ecd7a5bbd814a427c815b9acdaca5515591dd9e2a",
"docs/investmoz/simulations/source-archive/Lei-19-2013-BR76.pdf": "bba96d645cc935ffc3d1a79b9f0f73ac1c693d6459c2ad41f56cd2841accae76",
"docs/investmoz/simulations/source-archive/Lei-19-2017-IRPS-BR-OCAM.pdf": "c3a0186cb9ad090d7a9533006295dc9bb6a62ad0d6150173cbd49dba4ee4b52d",
"docs/investmoz/simulations/source-archive/Lei-2-2011-BR-1-4-suplemento-MCNet.pdf": "a7543a68cc3287a46a83c39a04821b40f649dd06c4e9b5dc51ff0b47fba08899",
"docs/investmoz/simulations/source-archive/Lei-20-2009-BR36-AT-exemplar19.pdf": "fc1c8144db42960cbf73e717e095896f511ece0f907f58f78819b27d6917a7ee",
"docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
"docs/investmoz/simulations/source-archive/Lei-34-2007-BR52.pdf": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"docs/investmoz/simulations/source-archive/Lei-4-1994-BR37-3-suplemento.pdf": "210df9db8980d0a5690cd187a6eeec7e37a900d743e39062c16f4e0d12215c7e",
"docs/investmoz/simulations/source-archive/Lei-4-2012-BR3.pdf": "b8845cef41dcbd9ba50c43dbfa743a56030dd3d348242a107e1ae30279eec121",
"docs/investmoz/simulations/source-archive/Lei-7-1991-Partidos-IFES.pdf": "6b783a0bb3330688ef10660a58060d9724aa2da6a873d234fe902f0eaaeda42d",
"docs/investmoz/simulations/source-archive/PT-MZ-CDT-1992.pdf": "d504e1024b28aee5c6acf4592acb96ec9c915a8414f67a61ab6984d6acf9df9d",
"docs/investmoz/simulations/source-archive/PT-MZ-Protocolo-2009.pdf": "f353773dcf41f09f4daa6cf5ba5a5f7994f3e02615867c2dcffc61c3d901bf9b"
},
"source_archive_count": 31,
"root_existing_source_files": 28,
"root_preexisting_branch_absences": [
"docs/investmoz/simulations/source-archive/BM-Mercado-Monetario-MAIBOR-20261025.html",
"docs/investmoz/simulations/source-archive/PT-MZ-CDT-1992.pdf",
"docs/investmoz/simulations/source-archive/PT-MZ-Protocolo-2009.pdf"
],
"root_absences_introduced_by_this_change": false,
"runtime_schema_config_permissions_changed": false,
"active_writes": 0,
"migrations": 0,
"imports": 0,
"deployment": false,
"functional_tests_repeated": false,
"existing_accepted_proofs_reused": true
},
"validation": {
"expected_tracked_delta": [
"docs/investmoz/consolidated-review-matrix-2026-10-03.md",
"docs/investmoz/unification/traceability-and-manual.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
"docs/investmoz/simulations/irpc-l7-scope-20261026.json"
],
"csv_only_changed_id": "AUD-SIM-INT02",
"scope_present_in_existing_matrix_and_manual": true,
"new_backlog_created": false
}
}
@@ -0,0 +1,270 @@
{
"status": "L7_installed_reconfirmed_not_reinstalled",
"checked_at_UTC": "2026-10-26T11:56:51.412248+00:00",
"checked_at_Africa_Johannesburg": "2026-10-26T13:56:51.412248+02:00",
"main": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"QA_origin": "ab2ff2fdbcbe6fb94f03e4bc4cc7ccbd647d94fc",
"installed_commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"previous_delivery_receipt": "irpc-l7-common-delivery-20261026.json",
"server_read_only": {
"checked_at_UTC": "2026-10-26T11:56:51.412248+00:00",
"read_only": true,
"installed": {
"status": "installed",
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"previous_release": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"database_migrations": 0,
"content_imports": 0
},
"release_revision": {
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"branch": "main",
"built_at": "2026-10-26T11:02:32.435267+00:00",
"manifest_sha256": "d78a1bdb503c10849f5ea8d8879753653c2c2fc22f6182f6d68ec9f6adf635b5"
},
"latest_report": {
"status": "installed",
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"release": "/var/www/investmoz-homologacao/releases/e07f89da3d59d06aa1b8c50c22a478b7b167bfdd-6b82c3f2",
"previous_release": "/var/www/investmoz-homologacao/releases/5aaf1a56f9d928331364fcc8b0d1528e51dba327-c1543f3e",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"e07f89da3d59d06aa1b8c50c22a478b7b167bfdd"
],
"finished_at": "2026-10-26T11:02:35.885260+00:00"
},
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"total_bytes": 467909804032,
"available_bytes": 5922545664,
"total_inodes": 29089792,
"available_inodes": 21448231
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"total_bytes": 467909804032,
"available_bytes": 5922545664,
"total_inodes": 29089792,
"available_inodes": 21448231
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"total_bytes": 467909804032,
"available_bytes": 5922545664,
"total_inodes": 29089792,
"available_inodes": 21448231
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"total_bytes": 467909804032,
"available_bytes": 5922545664,
"total_inodes": 29089792,
"available_inodes": 21448231
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"total_bytes": 467909804032,
"available_bytes": 5922545664,
"total_inodes": 29089792,
"available_inodes": 21448231
}
],
"existing_pipeline_space_guard_excerpt": [
" self.releases.mkdir(parents=True,exist_ok=True)",
" if shutil.disk_usage(self.releases).free < 5 * 1024**3:",
" raise RuntimeError('Insufficient free space for an isolated build; active release preserved')",
" release=self.releases/(target+'-'+uuid.uuid4().hex[:8]);release.mkdir(mode=0o750)"
],
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"L7_delta_hashes_match": {
"resources/js/components/simulation-irpc-normal.tsx": true,
"resources/js/components/simulation-irpc-special.tsx": true,
"resources/js/lib/irpc-normal-depreciation.ts": true,
"resources/js/lib/irpc-normal.ts": true,
"resources/js/lib/irpc-special.ts": true,
"resources/js/lib/project-dossier-report.ts": true
},
"installed_release_nonlinked_files": 28674,
"installed_release_nonlinked_directories": 2503,
"inode_requirement_note": "Current release file/directory counts are an observed reference,not a guarantee for another build;no new inode threshold introduced.",
"prior_installation_backup": {
"created_at": "2026-10-26T10:55:59Z",
"tables": 174,
"files": 369,
"dump_sha256": "a3d46de6c10b37bd6f211125686da8c489f879ab243f082e7b72a397638901f9",
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_l7_restore_20261026",
"port": 55441,
"source_dump_sha256": "a3d46de6c10b37bd6f211125686da8c489f879ab243f082e7b72a397638901f9",
"active_database_writes": 0
},
"files_present": {
"database.dump": {
"present": true,
"bytes": 22880589
},
"files-before.tar.gz": {
"present": true,
"bytes": 153036740
},
"backup-receipt.json": {
"present": true,
"bytes": 94539
},
"restore-receipt.json": {
"present": true,
"bytes": 269
}
}
},
"new_backup_or_restore_executed": false,
"deployment_executed": false,
"cleanup_executed": false,
"active_data_writes": 0
},
"capacity_assessment": {
"mount": "/dev/md2 / ext4",
"existing_pipeline_guard_bytes": 5368709120,
"available_bytes": 5922545664,
"available_inodes": 21448231,
"total_inodes": 29089792,
"same_partition_for_release_state_backup_tmp_docker": true,
"observed_existing_backup_files_bytes": 176012137,
"available_minus_guard_and_one_observed_backup_bytes": 377824407,
"existing_space_guard_plus_observed_backup_satisfied": true,
"inode_reference_files_plus_directories": 31177,
"inode_note": "Available21million vs31thousand entries in current nonlinked release;no new arbitrary threshold or guarantee for changed future payload",
"new_deployment_needed": false
},
"existing_backup_integrity": {
"backup_created_at": "2026-10-26T10:55:59Z",
"existing_dump_hash_matches": true,
"existing_files_archive_hash_matches": true,
"accepted_restore_proof_matches_same_dump": true,
"restored_tables": 174,
"new_backup_or_restore_executed": false,
"active_writes": 0
},
"public_delta": {
"status": "installed_delta_verified",
"served_revision": {
"commit": "e07f89da3d59d06aa1b8c50c22a478b7b167bfdd",
"branch": "main",
"built_at": "2026-10-26T11:02:32.435267+00:00",
"manifest_sha256": "d78a1bdb503c10849f5ea8d8879753653c2c2fc22f6182f6d68ec9f6adf635b5"
},
"manifest_hash_matches": true,
"compiled_delta_markers": {
"IRPC-normal-adjustments/10": [
"assets/project-dossier-KEyrPtc6.js"
],
"Preparar qualificação L7": [
"assets/services-BSj1SuMk.js"
],
"Despesas — imposto autónomo": [
"assets/project-dossier-KEyrPtc6.js"
],
"Cooperativa — redução da taxa": [
"assets/project-dossier-KEyrPtc6.js"
],
"Amortizações aceleradas": [
"assets/project-dossier-KEyrPtc6.js",
"assets/services-BSj1SuMk.js"
],
"novo ajustamento ao lucro:": [
"assets/project-dossier-KEyrPtc6.js"
],
"colecta combinada:": [
"assets/project-dossier-KEyrPtc6.js"
]
},
"assets": [
{
"file": "assets/project-dossier-KEyrPtc6.js",
"status": 200,
"sha256": "b6ae250a30b5030a6e40e7dfb140a3335ce6d5bc16835098d3d7c5828fc526c5"
},
{
"file": "assets/simulation-form-BqVD91Ek.js",
"status": 200,
"sha256": "85cbd533c5bc92af5a448db71da006d4346d2d0adb09dde825db0aa19ad5048c"
},
{
"file": "assets/services-BSj1SuMk.js",
"status": 200,
"sha256": "ea1a3812cbced72f4df115e8e379ae6d2307e97b2152d288b1c80d357f03f78b"
},
{
"file": "assets/project-dossier-document-BRdhvWgC.js",
"status": 200,
"sha256": "5b1de561be552259de776a2dbaf4b49909a3edd2647fec7c296a96054c929a9f"
}
],
"simulator_status": 200,
"simulator_entry": "assets/app-ByAQSjfI.js",
"synthetic_private_writes": 0,
"method": "Read-only L7 revision/manifest/compiled delta/simulator entry;accepted functional proofs reused"
},
"accepted_proofs_reused": {
"QA_frontend_tests": 19,
"QA_API_assertions": 108,
"QA_UI_types_build": true,
"prior_installation_backup_restore_tables": 174,
"prior_installation_files": 369,
"prior_preservation_runtime_files": 50,
"prior_originals": 31,
"new_functional_round": false
},
"next_compatible_QA_scope": {
"status": "delimited_for_next_QA_not_implemented",
"treatment": "CBF16 constant-method depreciation by monthly fractions for supported new assets entering service during2026",
"reuse": [
"existing asset IDs/classification and maximum normal catalogue rates",
"L6 monthly timing/financial source and normal reference result",
"existing qualification/source/title/provenance and versioned book"
],
"first_case": "Civil annual2026,new supported industrial/agroindustrial machine or new project building entering service during the year;documented CBF eligibility,no previous quotas/no other benefits",
"acceptance": [
"normal vs accelerated quota and accounted/fiscal balance caps",
"additional effect only,without second deduction or changes to original asset/history",
"conditions true,false,missing and declared absence",
"calculation-save-recover-report with profit/base/colecta effects and final L8 balance unknown"
],
"out_of_scope": [
"declining method",
"rehabilitated/used/revalued assets",
"recovery of previous quotas",
"cooperative+CBF16 or other benefit combinations",
"unmapped official form fields"
],
"resume_condition": "Link already-demonstrated L6 monthly timing to qualified CBF16 rate increment,retain exact values/caps and prove only new effects in isolated QA;missing project evidence affects that asset only"
},
"remaining_L7_groups_preserved": {
"implementation_groups": 7,
"documentary_case_dependencies": 4,
"section": "saldo concreto de L7 após a primeira entrega agrupada"
},
"L6_operational_scope_and_pending_preserved": true,
"L7_integrally_complete": false,
"L8_final_settlement_separate": true,
"local_cleanup": false,
"SGF_affected": false,
"new_backup_restore_or_installation": false
}
@@ -0,0 +1,309 @@
{
"status": "QA_ready_not_installed",
"date": "2026-10-26",
"branch": "codex/irpc-l7-start-period-qa-20261026",
"installed_baseline": "0bd5d495505d512088887efd3dc5c61f645b1647",
"documentation_baseline": "eccd95f9e79c871b592839aceca5f968440d067d",
"scope": "CBF16:resident start of activity,short complete-month period ending2026-12-31,new supported asset entering inperiod,constant maximum table rate,no priorquotas/exit/cumulation",
"version": "IRPC-normal-adjustments/12",
"explicit_optional_input": "acceleration.monthly.startPeriod version1/reference;without it versions10/11 retain keys/models/history",
"runtime_delta": {
"resources/js/lib/irpc-special.ts": "052bd703cdfd7fbb10ea8089146d5e52ea247d612ce557b1e2c9c20730600261",
"resources/js/lib/irpc-normal.ts": "290d7d66621668d2b684850729c57c0435cce144acf0704f9fd9e1d4a6d491f3",
"resources/js/components/simulation-irpc-special.tsx": "6f6b203062df36fedbdfa341bba8b8aa7796d2f3169f1bd84395ada8f71fd749"
},
"reused_L6_period_fx_and_depreciation_engines_unchanged": true,
"cases_recovered": {
"start": {
"period": {
"from": "2026-07-01",
"to": "2026-12-31",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "calculated",
"additional_deduction": {
"numerator": "10",
"denominator": "1"
},
"L7_profit": {
"numerator": "3120",
"denominator": "1"
},
"L7_base": {
"numerator": "3120",
"denominator": "1"
},
"L7_colecta": {
"numerator": "4992",
"denominator": "5"
},
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"fraction": {
"period": {
"from": "2026-12-01",
"to": "2026-12-31",
"pending": []
},
"L6_profit": {
"numerator": "1565",
"denominator": "3"
},
"L6_base": {
"numerator": "1565",
"denominator": "3"
},
"L6_colecta": {
"numerator": "2504",
"denominator": "15"
},
"status": "calculated",
"additional_deduction": {
"numerator": "5",
"denominator": "3"
},
"L7_profit": {
"numerator": "520",
"denominator": "1"
},
"L7_base": {
"numerator": "520",
"denominator": "1"
},
"L7_colecta": {
"numerator": "832",
"denominator": "5"
},
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"missing": {
"period": {
"from": "2026-07-01",
"to": "2026-12-31",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "indeterminate",
"additional_deduction": null,
"L7_profit": null,
"L7_base": null,
"L7_colecta": null,
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"negative": {
"period": {
"from": "2026-07-01",
"to": "2026-12-31",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "calculated",
"additional_deduction": {
"numerator": "0",
"denominator": "1"
},
"L7_profit": {
"numerator": "3130",
"denominator": "1"
},
"L7_base": {
"numerator": "3130",
"denominator": "1"
},
"L7_colecta": {
"numerator": "5008",
"denominator": "5"
},
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
},
"absent": {
"period": {
"from": "2026-07-01",
"to": "2026-12-31",
"pending": []
},
"L6_profit": {
"numerator": "3130",
"denominator": "1"
},
"L6_base": {
"numerator": "3130",
"denominator": "1"
},
"L6_colecta": {
"numerator": "5008",
"denominator": "5"
},
"status": "absent",
"additional_deduction": {
"numerator": "0",
"denominator": "1"
},
"L7_profit": {
"numerator": "3130",
"denominator": "1"
},
"L7_base": {
"numerator": "3130",
"denominator": "1"
},
"L7_colecta": {
"numerator": "5008",
"denominator": "5"
},
"L8_final": {
"scope": "L8",
"payable": null,
"recoverable": null
}
}
},
"checks": {
"new_frontend_tests": 9,
"API_tests": 1,
"API_assertions": 97,
"API_database": "simulator_fiscal_delta_20261021_test",
"API_host": "127.0.0.1",
"API_port": 55441,
"API_transaction_rollback": true,
"wayfinder_with_form": true,
"typescript": true,
"isolated_build": true,
"HTML_financial_dossier_from_5_API_recoveries": true,
"actual_component": {
"actualComponent": true,
"explicitStartOptionAndCancel": true,
"reuseL6PeriodEvidenceExplicit": true,
"assetsAndPeriodUnchanged": true,
"missingPreservesNormal1001_60": true,
"sixActualMonths50Normal75Accelerated60Cap10Additional": true,
"simulatedColecta998_40": true,
"exactFraction5over3": true,
"saveRecoveryDownload": true,
"negativeAbsenceDistinct": true,
"L8FinalUnknown": true,
"errors": []
}
},
"preservation": {
"protected_code_schema_config_routes_contract_files": 584,
"original_files": {
"docs/investmoz/simulations/source-archive/AT-Comunicado-9-2026-ISPC.pdf": "106f8a9ce9255c03549c70bf07fe999d32e6e55302d009b509862aa74ccb4973",
"docs/investmoz/simulations/source-archive/AT-MRFTA-19-39.pdf": "8ea62c53066b482f87078a7a7b1ecf15ca98a12a122e8d7abca63acfc993186b",
"docs/investmoz/simulations/source-archive/AT-Modelo-30-ISPC.pdf": "6802edd06b6ff638a0b851a3ec7ecf69af8f07840faa47446becad67d35d445c",
"docs/investmoz/simulations/source-archive/AT-Modelo-B-Geral.pdf": "bd977c7c59d4d98befd92e2c566b1bf168cb1343bb519f51b41a3807f431fc57",
"docs/investmoz/simulations/source-archive/BM-Mercado-Monetario-MAIBOR-20261025.html": "00e8a7e0d3a1db4ca3beb56d5361b2084a0f1684f3d40fc1c203702a2190e063",
"docs/investmoz/simulations/source-archive/BR-16-I-Serie-2008-04-16.pdf": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
"docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"docs/investmoz/simulations/source-archive/BR-89-I-Serie-2017-06-08.pdf": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
"docs/investmoz/simulations/source-archive/BR-95-I-Suplemento-2025-05-21.pdf": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
"docs/investmoz/simulations/source-archive/BR252-I-Serie-2022-Lei20-PESOE.pdf": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"docs/investmoz/simulations/source-archive/Decreto-22-2021-BR70.pdf": "a8fac38dcfe08f9c7a8e46254cff10e1ec82fc4f7a8d88ad6e4fe7d91ffc21a5",
"docs/investmoz/simulations/source-archive/Decreto-27-2026-BR123.pdf": "26249c3fa58f149c81de36e99d1aac2819a4771379d9e8833159660dabf539bb",
"docs/investmoz/simulations/source-archive/Decreto-29-1998-BR22-5-suplemento.pdf": "6242cbe675faadf085f43f95ec8c7e8868aafe67c3b2ab2bb010992288f954f8",
"docs/investmoz/simulations/source-archive/Decreto-3-2011-BR-11-I-mineiros.pdf": "5bca1133666ba9c69870b89823420175b7b5b8d0eccb667ecdf5c29716f3b6be",
"docs/investmoz/simulations/source-archive/Decreto-37-2023-BR124.pdf": "7e680b191481faa0e2e9057fa5053587eb2a29d1d8c819e0eb9f02814255a04c",
"docs/investmoz/simulations/source-archive/Decreto-9-2008-BR16.pdf": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
"docs/investmoz/simulations/source-archive/Lei-14-1992-BR42.pdf": "089fff7423e99a70a230a73ca379e4ea3a91d124703f91016e57ff82794b9e56",
"docs/investmoz/simulations/source-archive/Lei-17-2022-BR251-exemplar-MCNet5.pdf": "14eb34f0af91a8f5cb1770c7b52d6ff839c6818302d1ed96d79afbfb9fe999d4",
"docs/investmoz/simulations/source-archive/Lei-17-2022-IPP-BR250-Parlamento.pdf": "978cd22403ffd336a631704ecd7a5bbd814a427c815b9acdaca5515591dd9e2a",
"docs/investmoz/simulations/source-archive/Lei-19-2013-BR76.pdf": "bba96d645cc935ffc3d1a79b9f0f73ac1c693d6459c2ad41f56cd2841accae76",
"docs/investmoz/simulations/source-archive/Lei-19-2017-IRPS-BR-OCAM.pdf": "c3a0186cb9ad090d7a9533006295dc9bb6a62ad0d6150173cbd49dba4ee4b52d",
"docs/investmoz/simulations/source-archive/Lei-2-2011-BR-1-4-suplemento-MCNet.pdf": "a7543a68cc3287a46a83c39a04821b40f649dd06c4e9b5dc51ff0b47fba08899",
"docs/investmoz/simulations/source-archive/Lei-20-2009-BR36-AT-exemplar19.pdf": "fc1c8144db42960cbf73e717e095896f511ece0f907f58f78819b27d6917a7ee",
"docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
"docs/investmoz/simulations/source-archive/Lei-34-2007-BR52.pdf": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"docs/investmoz/simulations/source-archive/Lei-4-1994-BR37-3-suplemento.pdf": "210df9db8980d0a5690cd187a6eeec7e37a900d743e39062c16f4e0d12215c7e",
"docs/investmoz/simulations/source-archive/Lei-4-2012-BR3.pdf": "b8845cef41dcbd9ba50c43dbfa743a56030dd3d348242a107e1ae30279eec121",
"docs/investmoz/simulations/source-archive/Lei-7-1991-Partidos-IFES.pdf": "6b783a0bb3330688ef10660a58060d9724aa2da6a873d234fe902f0eaaeda42d",
"docs/investmoz/simulations/source-archive/PT-MZ-CDT-1992.pdf": "d504e1024b28aee5c6acf4592acb96ec9c915a8414f67a61ab6984d6acf9df9d",
"docs/investmoz/simulations/source-archive/PT-MZ-Protocolo-2009.pdf": "f353773dcf41f09f4daa6cf5ba5a5f7994f3e02615867c2dcffc61c3d901bf9b"
},
"prior_result_and_entire_history_preserved": true,
"plan_assets_and_other_tax_books_unchanged": true,
"active_migrations": 0,
"active_private_writes": 0,
"SGF_TEMPO_touched": false
},
"sources_reused": [
"CBF3/9/10/16 accepted APIEX compilation pp66-68/72",
"CIRPC7(4) accepted shortperiod implementation",
"Decreto72/2013 art3(3)/9(3),accepted source inventory8143"
],
"remaining_code": [
"other autonomous expense origins/parcels",
"mixed/withheld cooperative income and other CIRPC9-14 entities",
"CBF16 cessation/transition/noncivil/previousquotas/exit/lateryears/lowerquota/othercategories/methods/cumulation",
"capitalgains61-A and specialoperations54-56/41-A",
"CBF17-19 and potential15 entitlement;annualuseL8",
"sector/territorial/specificregimes",
"official L7 M20/M22 transport"
],
"document_conditions": [
"classification/parcels/period evidence",
"statute/recognition required by disposition or exception",
"specific normativeperiod and cumulation order/limits",
"form edition/field/fraction representation"
],
"remote_capacity_before_future_installation": {
"fresh_space_inodes_build_backup_measurement": true,
"main_compatibility_recheck": true,
"fresh_backup_restore": true,
"keep_active_until_ready": true
},
"L6_operational_delimited": true,
"L7_partial": true,
"L8_final_balance_separate": true,
"evidence_directory": "outputs/irpc-l7-start-period"
}
@@ -0,0 +1,185 @@
{
"date": "2026-10-28",
"status": "implemented and demonstrated in isolated QA; not installed",
"branch": "codex/irpc-l8-carry-qa-20261028",
"base": "cf4e0638",
"installed_reference_unchanged": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"scope": {
"year": "2026",
"subject": "same subject, resident general",
"period": "annual ordinary origins; calendar-year current close",
"currency": "documented MZN; exact foreign-credit fractions supported",
"international": "eligible origin credit minus origin deduction and documented actual later uses; five subsequent exercises, art65(3)",
"pec": "actual PEC eligible origin minus origin deduction and actual later uses; three subsequent exercises, art66(1–2)",
"allocation": "explicit documented selection between current and prior exercises, confirmed against current assessment; no presumed FIFO or automatic reduction",
"expiry": "ordinary window ended excludes current deduction but keeps source and arithmetic historical remainder",
"origin_rules": "origin assessment, inclusion/limits/insufficient collection and applicable period documented; exceptional/transitional rules outside scope"
},
"restriction_origins": {
"Tempo": "preserve approved sources, accepted deliveries, data/history, QA isolation; continue L8",
"accepted_requirement": "CIRPC65(3),66(1–2), source already accepted; no new provenance approval",
"technical_choices": "optional versioned snapshot extension; consolidated nature/country/origin-year balance; explicit selection avoids invented interyear priority"
},
"verification": {
"new_frontend_tests": 16,
"affected_previously_accepted_tests": 49,
"total_frontend_pass": 65,
"frontend_fail": 0,
"API_tests": 1,
"API_assertions": 119,
"API_cases": 6,
"API_database": "proactive_investment_20261027_test",
"API_port": 55441,
"API_transactions_rolled_back": true,
"recovered_recalculated_HTML_dossier": 6,
"frozen_prior_results_preserved": true,
"typescript": "passed",
"build": "passed, actual subprocess exit0",
"PHP_formatting": "pint passed",
"browser_manual": "not performed; no manual UI acceptance claimed"
},
"preservation": {
"previous_deliveries": [
"international838ad941",
"PECe182d1d7",
"sectors669cb897"
],
"source_files_byte_identical": 31,
"existing_QA_records": {
"database": "proactive_investment_20261027_test",
"tables": {
"opportunities": {
"existing_rows": 55,
"unchanged": true
},
"documents": {
"existing_rows": 64,
"unchanged": true
},
"opportunity_documents": {
"existing_rows": 1,
"unchanged": true
},
"simulation_form_drafts": {
"existing_rows": 19,
"unchanged": true
},
"users": {
"existing_rows": 40,
"unchanged": true
},
"organizations": {
"existing_rows": 3,
"unchanged": true
},
"audit_events": {
"existing_rows": 409,
"unchanged": true
}
},
"transaction_rollback": true
},
"matrix": "existing AUD-SIM-INT02 updated; all other rows semantically unchanged",
"new_accounts_permissions_migrations": false,
"active_data_or_configuration_written": false,
"remote_deployment_or_publication": false,
"Songo_Gurue": "no pilot changes; remain private",
"other_dossiers": "same-snapshot origins checked, no global official account reconciliation"
},
"cases": [
{
"name": "payable",
"status": "payable",
"balance": {
"numerator": "550",
"denominator": "1"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "expired",
"status": "indeterminate",
"balance": null,
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "missing-use",
"status": "indeterminate",
"balance": null,
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "overallocated",
"status": "indeterminate",
"balance": null,
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "fractional",
"status": "payable",
"balance": {
"numerator": "1822",
"denominator": "3"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "recoverable",
"status": "recoverable",
"balance": {
"numerator": "-500",
"denominator": "1"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
}
],
"remaining_L8": [
"automatic national-fraction derivation and case-specific treaty correspondence",
"economic credit art64/53 and benefit-specific credits with own qualification/limits",
"PPC/PEC obligation and calendar, interest/penalties and payment guides with applicable edition",
"autonomous taxation, special periods, other currencies, M20/M22 transport/submission",
"exceptional or transitional interyear cases outside ordinary source window; no official ledger created"
],
"next_independent_increment": {
"item": "economic double-tax credit",
"source": "existing accepted CIRPC64,53(1)a and exclusion40; BR52 original",
"required_correspondence": "distributed profits included, payer/recipient residence and IRPC nonexemption, art40 distinction, source tax, gross-up53, proportional cap64, actual use and nonduplication; do not infer from declared dividend alone"
},
"L8_complete": false,
"evidence": {
"api.log": "ef604fbe7a289930cb0b6dfa35407e0f115092894d32fd98c04a9e1f3b732415",
"build-result.json": "80bb1b6bb0ccadaf94f241ace9b0b19f77461b193b8b7522afa655d414d36198",
"build.log": "d93839f94f37e181acafe3f6295c10982e036475b1f5186aedba9a9ae3cd6bd9",
"existing-records-preservation.json": "b45b3306d3c9dee63fbbaf9a04bba31008019e65892bd16322460b5ef53eda7d",
"frontend-tests.log": "86a878a794a8f1ed7db56d689f0b9d5a2bdbc6079aa66e3cfe4b65ae64e656f6",
"protected-consumers.json": "9f147ea688a79a77a8d7507cf1c322a6a3c03b959be8fc5ed114db63dac05761",
"recovered-report-receipt.json": "82df86eaabbb79d760e4f2f1efb0f900d9e9607e11ea49502746dbafc46fed03",
"source-preservation.json": "c28df37db83989fe5746dcb5382a75c4f39471a16a7cbe64670260209cf6ad79"
},
"qa_commit": "d134a92d169f9159a692ed158e3a051889f7ab3a",
"qa_branch_pushed": false
}
@@ -0,0 +1,95 @@
{
"status": "prepared_delivery_deferred_by_user_capacity_not_satisfied",
"date": "2026-10-27",
"candidate": "14360748194f3658d91a7d7ae5615efd0fcbfbb7",
"QA_runtime_commit": "11a6cee981f0a425b0fceefb6ed85485bb298245",
"candidate_branch": "codex/irpc-l8-settlement-qa-20261026",
"remote_main_verified": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"installed_remote_verified": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"capacity": {
"checked_at_UTC": "2026-10-27T06:05:28.744338+00:00",
"partition": "/dev/md2 / ext4",
"free_bytes": 4402343936,
"free_GiB": 4.100002288818359,
"required_after_backup_bytes": 5368709120,
"previous_backup_reference_bytes": 175917490,
"estimated_required_before_backup_bytes": 5544626610,
"additional_free_bytes_needed": 1142282674,
"additional_GiB_needed_rounded_up": 1.07,
"inodes_available": 21340182,
"release_entries_reference": 31259,
"inodes_sufficient_against_reference": true,
"fresh_measurement_required_on_resume": true,
"installer_threshold_not_changed": true
},
"baseline": {
"baseline": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"files_verified": 168,
"active_writes": 0
},
"prepared_runtime_delta_files": 5,
"preserved_runtime_files": 134,
"originals_preserved": 31,
"caches_read_only": {
"caches": [
{
"path": "/root/.cache/composer/files",
"resolved": "/root/.cache/composer/files",
"symlink": false,
"bytes": 127242240,
"first_entries": [
"carbonphp",
"maatwebsite",
"iamcal",
"bordoni",
"fidry",
"mockery",
"symfony",
"mtdowling",
"inertiajs",
"tcg",
"nyholm",
"dflydev"
]
},
{
"path": "/tmp/node-compile-cache",
"resolved": "/tmp/node-compile-cache",
"symlink": false,
"bytes": 4009984,
"first_entries": [
"v22.23.4-x64-d04b8edd-1001"
]
}
],
"package_manager_processes": [],
"open_cache_handles": [],
"service": "ActiveState=inactive\nSubState=dead\n",
"active_writes": 0
},
"caches_insufficient_to_resolve_gap": true,
"cleanup_performed": false,
"fresh_backup_executed": false,
"fresh_restore_executed": false,
"main_push_executed": false,
"installation_executed": false,
"server_persistent_writes": 0,
"business_database_writes": 0,
"user_decision": "Manter a entrega preparada por agora",
"next_action": "New space/inode and main/servedrevision checks;confirm capacity for freshbackup/restore and isolatedbuild;then authorized Git delivery and onlydelta verification. Keep active release until new is ready.",
"QA_proofs_reused": {
"frontend": 19,
"API_assertions": 170,
"UI_round_trip": true,
"typescript": true,
"isolatedbuild": true,
"not_repeated": true
},
"L8_partial": true,
"PEC_and_own_credits_separate": true,
"L7_residuals_unchanged": true,
"SGF_TEMPO_untouched": true,
"preflight_pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"resume_candidate_branch": "codex/irpc-l8-settlement-qa-20261026",
"notes_branch": "codex/irpc-l8-delivery-capacity-20261027"
}
@@ -0,0 +1,318 @@
{
"date": "2026-10-28",
"status": "ordinary economic credit implemented and demonstrated in isolated QA; not installed",
"branch": "codex/irpc-l8-economic-qa-20261028",
"base": "6ededb59",
"last_installed_receipt_reference": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"remote_status_read_this_turn": false,
"scope": {
"current_year": "2026",
"current_period": "calendar year, resident general",
"currency": "documented MZN; exact fractions without fiscal rounding",
"profit_kind": "ordinary distributions art64(1–2)",
"eligibility": "same-country seat/effective management; payer subject to IRPC and nonexempt; nonapplication of40(1) documented, including2009 version",
"nominal_credit": "60 percent of documented IRPC corresponding to included distributed profits; no assumed rate on net dividend",
"gross_up": "expected nominal60 percent reconciled with53(1)a amount already included in current L6; does not overwrite or recalculate source base",
"proportional_ceiling": "case-specific documented input tied to current assessment; not automatically derived",
"prior_use": "actual documented economic credit use, distinct from simulation history and prior source-tax attributions",
"order": [
"economic credit up to collecta",
"international credit current/prior according to existing explicit selection",
"PEC current/prior according to existing explicit selection",
"own withholdings and PPC"
],
"refund": "no economic-credit refund or carry created; PPC can create simulated recoverable balance"
},
"proof_parcels": {
"stable_identity": "issuer/document/parcel; distribution identity also independent of source-tax document,date and row id",
"economic_vs_international": "same physical tax parcel cannot fund both credit natures",
"same_paper_different_tax": "supported distinct parcels can coexist; old proof without a parcel overlaps the whole paper until reconciled",
"capacity": "same proof parcel amounts and prior attributions must agree and total allocation remains within available amount across snapshot contexts",
"L5": "existing withholding source/allocation checks preserved; parcel relabelling cannot turn repeated L5 use into new tax",
"partial_information": "saved and recovered as indeterminate, never reset or silently assumed absent",
"global_official_account_reconciliation": false
},
"compatibility_group": {
"included_prior_QA": "d134a92d169f9159a692ed158e3a051889f7ab3a; receipt6ededb59",
"candidate_contains_carry_increment": true,
"combined_API_case": "1408-12economic-8currentInternational-50priorInternational-200currentPEC-100priorPEC-500PPC=538MZN payable simulated",
"previous_carry_history_preserved": "550 MZN prior simulated result retained unchanged",
"changed_allocation": "economic priority checks remaining collecta but keeps user prior/current allocations; over-allocation becomes pending rather than reduced automatically",
"installation": false
},
"restriction_origins": {
"Tempo": "next economic increment, distinction from international, no duplicate same parcel, preserve approved evidence/history; compatible grouping allowed",
"accepted_requirement": "CIRPC64(1–2),53(1)a,40(1) amended by20/2009; RIRPC21(2/5)",
"implementation_choices": "optional versioned detail; normal resident general2026/MZN scope; documentary inclusion/gross-up/proportional quota; optional parcel annotations on existing proof types; no additional organizational authority"
},
"verification": {
"economic_new_frontend_tests": 20,
"previous_affected_tests": 65,
"frontend_pass": 85,
"frontend_fail": 0,
"API_tests": 1,
"API_assertions": 210,
"API_cases": 11,
"database": "proactive_investment_20261027_test",
"loopback_port": 55441,
"API_transactions_rolled_back": true,
"recovered_cases_recalculated_with_HTML_and_dossier": 11,
"frozen_histories_preserved": true,
"typescript": "passed",
"build": "isolated QA, subprocess exit0, final component hashes recorded",
"PHP_formatting": "pint passed",
"new_browser_manual_proof": false,
"team_usability_evaluation": "unchanged; awaiting team feedback"
},
"preservation": {
"protected_files_same_git_content": 558,
"raw_checkout_difference": {
"kind": "LF/CRLF environment difference only, no semantic loss",
"files": [
"docs/investmoz/simulations/irpc-l8-carry-qa-20261028.json"
]
},
"source_originals_same_bytes": 31,
"existing_QA_records": {
"database": "proactive_investment_20261027_test",
"tables": {
"opportunities": {
"existing_rows": 55,
"unchanged": true
},
"documents": {
"existing_rows": 64,
"unchanged": true
},
"opportunity_documents": {
"existing_rows": 1,
"unchanged": true
},
"simulation_form_drafts": {
"existing_rows": 19,
"unchanged": true
},
"users": {
"existing_rows": 40,
"unchanged": true
},
"organizations": {
"existing_rows": 3,
"unchanged": true
},
"audit_events": {
"existing_rows": 409,
"unchanged": true
}
},
"transaction_rollback": true
},
"existing_matrix": "only AUD-SIM-INT02 evidence updated; other records unchanged semantically",
"old_carry_receipt_and_fixture": "unchanged",
"schema_permissions_configuration": "no schema/configuration/migration/grant changes; no new live comparison claimed",
"active_data_writes": false,
"new_accounts": false,
"new_imports_or_publication": false,
"remote_operations": false,
"Songo_Gurue_SGF_TEMPO": "untouched"
},
"cases": [
{
"name": "payable",
"status": "payable",
"balance": {
"numerator": "688",
"denominator": "1"
},
"economicDeduction": {
"numerator": "12",
"denominator": "1"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "combined",
"status": "payable",
"balance": {
"numerator": "538",
"denominator": "1"
},
"economicDeduction": {
"numerator": "12",
"denominator": "1"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "quota",
"status": "payable",
"balance": {
"numerator": "695",
"denominator": "1"
},
"economicDeduction": {
"numerator": "5",
"denominator": "1"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "prior-use",
"status": "payable",
"balance": {
"numerator": "691",
"denominator": "1"
},
"economicDeduction": {
"numerator": "9",
"denominator": "1"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "duplicate",
"status": "indeterminate",
"balance": null,
"economicDeduction": null,
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "missing-gross-up",
"status": "indeterminate",
"balance": null,
"economicDeduction": null,
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "article40",
"status": "indeterminate",
"balance": null,
"economicDeduction": null,
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "shared-paper",
"status": "payable",
"balance": {
"numerator": "688",
"denominator": "1"
},
"economicDeduction": {
"numerator": "12",
"denominator": "1"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "partial-parcel",
"status": "indeterminate",
"balance": null,
"economicDeduction": null,
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "fractional",
"status": "payable",
"balance": {
"numerator": "349997",
"denominator": "500"
},
"economicDeduction": {
"numerator": "3",
"denominator": "500"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
},
{
"name": "recoverable",
"status": "recoverable",
"balance": {
"numerator": "-500",
"denominator": "1"
},
"economicDeduction": {
"numerator": "12",
"denominator": "1"
},
"apiRecovered": true,
"recalculationEqual": true,
"html": true,
"dossier": true,
"frozenHistoryPreserved": true
}
],
"remaining": {
"economic": [
"automatic inclusion/correction of distributed profits and53 addition in L6",
"automatic proportional ceiling derivation and complete40(1) exclusion treatment at base stage",
"liquidation64(3),associations64(4),special-period and other-currency cases"
],
"other_L8": [
"specific benefit credits and their qualification,cumulation and limits",
"automatic international national-fraction and case-specific treaty matching",
"PPC/PEC obligation/calendar,interest/penalties and payment guides with applicable edition",
"autonomous taxation,special periods,other currencies and M20/M22 transport/submission",
"exceptional/transitional interyear cases beyond accepted ordinary carry scope"
]
},
"L8_complete": false,
"evidence": {
"api-result.json": "124fd50cb6d223cdd18fedc166d00af7254199b6e6dedf9be82f71db87af6d01",
"api.log": "e5cb58ba25c82feb1a14a8259cd112a58455b8cc1c17d8540b08ec30b87583c7",
"build-result.json": "256bb54e1d47ec73de37810b9673f10464c65fb970ea3b7ae28bbea36ba222e3",
"build.log": "69f17893b47b8d748651933f6a88a5f4206d58173397c1695d58472db9a26cf6",
"existing-records-preservation.json": "b45b3306d3c9dee63fbbaf9a04bba31008019e65892bd16322460b5ef53eda7d",
"frontend-result.json": "f73293b96cda7c81c86a6716a04a18d632e10361bf7d3f616695dbdc7695aeb0",
"frontend.log": "ff784389cda3f2c232f4760f74c053bc16b6d134ef975d0aad13132373e5e275",
"pint-result.json": "124fd50cb6d223cdd18fedc166d00af7254199b6e6dedf9be82f71db87af6d01",
"pint.log": "cd1a94fc2cf6a965b86e1a4809d6c7fb9148b1ee374e1010ed2ac96ff4876ec2",
"protected-consumers.json": "172542788e44fe604ca90d95a71d87f47a3baeae0c61950bc50d342658aa82ad",
"recovered-report-receipt.json": "ecce91a9c00c3a88d234486c020b5aa1681928eb1b1aeaeef0e7a569a2e17654",
"source-preservation.json": "6aceebe1cf883ca709ccbbbef7f2a756ee5dc51c12b3281c3659e83abfd90b70",
"types-result.json": "256bb54e1d47ec73de37810b9673f10464c65fb970ea3b7ae28bbea36ba222e3",
"types.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
"qa_commit": "aae67c169dc0d14f95cf2ee6fa28e5ff05341dcf",
"qa_branch_pushed": false,
"grouped_delivery_manifest": "outputs/irpc-l8-economic-20261028/grouped-delivery-prepared.json"
}
@@ -0,0 +1,382 @@
{
"status": "QA_complete_ready_for_grouped_delivery_not_installed",
"date": "2026-10-26",
"branch": "codex/irpc-l8-settlement-qa-20261026",
"runtime_revision": "11a6cee981f0a425b0fceefb6ed85485bb298245",
"installed_revision_per_user": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"remote_main_checked": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"version": "IRPC-annual-settlement/1",
"scope": "resident general IRPC,annualcivil2026,MZN,currentdetermined assessment,documented absence of positive PEC/unmappedcredits and autonomoustax needing ownsettlement",
"inputs_reused": [
"current L6 or applicable qualifiedL7 assessment key/version/subjectNUIT/period;never add both",
"L5 received/effective/on_account qualified and reconciled withholding proofs",
"actual documented PPC payments by subject/period/receipt",
"known/declaredabsence/missing states for every credit/paymentfamily"
],
"PEC_and_special_credits_separate": true,
"official_credit_consumption_or_central_reservation": false,
"duplicate_guards": [
"same L5 allocation/pair",
"normalised issuer/document even if date changed",
"same receipt as withholding and PPC",
"receipt total including partial allocations in other contexts in same dossier",
"same sourceKey L5 allocation cannot consume larger receipt twice",
"different entity/year or inconsistent proven amount"
],
"cases": {
"payable": {
"status": "payable",
"knownWithholdings": {
"numerator": "300",
"denominator": "1"
},
"knownPpc": {
"numerator": "500",
"denominator": "1"
},
"arithmeticBalance": {
"numerator": "608",
"denominator": "1"
},
"payable": {
"numerator": "608",
"denominator": "1"
},
"recoverable": {
"numerator": "0",
"denominator": "1"
},
"pending": []
},
"recoverable": {
"status": "recoverable",
"knownWithholdings": {
"numerator": "1000",
"denominator": "1"
},
"knownPpc": {
"numerator": "600",
"denominator": "1"
},
"arithmeticBalance": {
"numerator": "-192",
"denominator": "1"
},
"payable": {
"numerator": "0",
"denominator": "1"
},
"recoverable": {
"numerator": "192",
"denominator": "1"
},
"pending": []
},
"balanced": {
"status": "balanced",
"knownWithholdings": {
"numerator": "408",
"denominator": "1"
},
"knownPpc": {
"numerator": "1000",
"denominator": "1"
},
"arithmeticBalance": {
"numerator": "0",
"denominator": "1"
},
"payable": {
"numerator": "0",
"denominator": "1"
},
"recoverable": {
"numerator": "0",
"denominator": "1"
},
"pending": []
},
"absent": {
"status": "payable",
"knownWithholdings": {
"numerator": "0",
"denominator": "1"
},
"knownPpc": {
"numerator": "0",
"denominator": "1"
},
"arithmeticBalance": {
"numerator": "1408",
"denominator": "1"
},
"payable": {
"numerator": "1408",
"denominator": "1"
},
"recoverable": {
"numerator": "0",
"denominator": "1"
},
"pending": []
},
"missing": {
"status": "indeterminate",
"knownWithholdings": {
"numerator": "300",
"denominator": "1"
},
"knownPpc": {
"numerator": "0",
"denominator": "1"
},
"arithmeticBalance": null,
"payable": null,
"recoverable": null,
"pending": [
"QA-PPC-2026-1: Error: PPC exige comprovativo efectivo,MZN,data,entidade e exercício correspondentes;projecção/tesouraria não é pagamento"
]
},
"duplicate": {
"status": "indeterminate",
"knownWithholdings": {
"numerator": "300",
"denominator": "1"
},
"knownPpc": {
"numerator": "0",
"denominator": "1"
},
"arithmeticBalance": null,
"payable": null,
"recoverable": null,
"pending": [
"QA-PPC-2026-1: Comprovativo utilizado além do montante disponível ou com montantes divergentes neste/outro mapa."
]
},
"pec": {
"status": "indeterminate",
"knownWithholdings": {
"numerator": "300",
"denominator": "1"
},
"knownPpc": {
"numerator": "500",
"denominator": "1"
},
"arithmeticBalance": null,
"payable": null,
"recoverable": null,
"pending": [
"PEC: Error: montante positivo fora deste recorte:corresponder ordem,limite e transporte próprios;sem abatimento ou reembolso automático"
]
}
},
"checks": {
"frontend_tests": 19,
"frontend_pass": 19,
"API_tests": 1,
"API_assertions": 170,
"API_cases": 7,
"database": "simulator_fiscal_delta_20261021_test",
"host": "127.0.0.1",
"port": 55441,
"transaction_rollback": true,
"actual_components_UI": {
"actualComponents": true,
"explicitPreparation": true,
"onlyActualOnAccountProofSelectable": true,
"duplicateSelectionDisabled": true,
"missingNotZero": true,
"ownBeneficiaryAndIncludedIncomeConfirmed": true,
"actualPPCConfirmed": true,
"PECAndCreditsSeparate": true,
"payable608": true,
"recoverable192": true,
"balanced": true,
"duplicateIndeterminate": true,
"positivePECIndeterminate": true,
"oldBooksAndPlanUnchanged": true,
"saveReloadRecoverReportDownload": true,
"errors": []
},
"wayfinder_with_form": "passed",
"typescript": "passed",
"isolated_QA_build": "passed",
"build_existing_warnings": [
"chunk size over500kB;plugin timing diagnostic"
],
"prior_accepted_suites_not_repeated": true
},
"runtime_delta": [
"resources/js/components/simulation-form.tsx",
"resources/js/components/simulation-irpc-annual.tsx",
"resources/js/lib/irpc-annual-settlement.ts",
"resources/js/lib/project-dossier-report.ts",
"resources/js/lib/project-dossier.ts",
"tests/Feature/IrpcAnnualSettlementDraftTest.php",
"tests/frontend/irpc-annual-settlement.test.mjs",
"tools/irpc-annual-settlement-qa.php"
],
"preservation": {
"baseline": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"documentation_base": "d5f11462",
"existing_tracked_files": 2832,
"changed_existing_files": [
"docs/investmoz/consolidated-review-matrix-2026-10-03.md",
"docs/investmoz/unification/traceability-and-manual.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
"resources/js/components/simulation-form.tsx",
"resources/js/lib/project-dossier-report.ts",
"resources/js/lib/project-dossier.ts"
],
"all_other_existing_files_byte_identical": true,
"schema_configuration_permissions_unchanged": true,
"L5_L6_L7_engines_and_fixtures_byte_identical": true,
"originals_count": 31,
"originals": {
"docs/investmoz/simulations/source-archive/AT-Comunicado-9-2026-ISPC.pdf": "106f8a9ce9255c03549c70bf07fe999d32e6e55302d009b509862aa74ccb4973",
"docs/investmoz/simulations/source-archive/AT-MRFTA-19-39.pdf": "8ea62c53066b482f87078a7a7b1ecf15ca98a12a122e8d7abca63acfc993186b",
"docs/investmoz/simulations/source-archive/AT-Modelo-30-ISPC.pdf": "6802edd06b6ff638a0b851a3ec7ecf69af8f07840faa47446becad67d35d445c",
"docs/investmoz/simulations/source-archive/AT-Modelo-B-Geral.pdf": "bd977c7c59d4d98befd92e2c566b1bf168cb1343bb519f51b41a3807f431fc57",
"docs/investmoz/simulations/source-archive/BM-Mercado-Monetario-MAIBOR-20261025.html": "00e8a7e0d3a1db4ca3beb56d5361b2084a0f1684f3d40fc1c203702a2190e063",
"docs/investmoz/simulations/source-archive/BR-16-I-Serie-2008-04-16.pdf": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
"docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"docs/investmoz/simulations/source-archive/BR-89-I-Serie-2017-06-08.pdf": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
"docs/investmoz/simulations/source-archive/BR-95-I-Suplemento-2025-05-21.pdf": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
"docs/investmoz/simulations/source-archive/BR252-I-Serie-2022-Lei20-PESOE.pdf": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d",
"docs/investmoz/simulations/source-archive/Decreto-22-2021-BR70.pdf": "a8fac38dcfe08f9c7a8e46254cff10e1ec82fc4f7a8d88ad6e4fe7d91ffc21a5",
"docs/investmoz/simulations/source-archive/Decreto-27-2026-BR123.pdf": "26249c3fa58f149c81de36e99d1aac2819a4771379d9e8833159660dabf539bb",
"docs/investmoz/simulations/source-archive/Decreto-29-1998-BR22-5-suplemento.pdf": "6242cbe675faadf085f43f95ec8c7e8868aafe67c3b2ab2bb010992288f954f8",
"docs/investmoz/simulations/source-archive/Decreto-3-2011-BR-11-I-mineiros.pdf": "5bca1133666ba9c69870b89823420175b7b5b8d0eccb667ecdf5c29716f3b6be",
"docs/investmoz/simulations/source-archive/Decreto-37-2023-BR124.pdf": "7e680b191481faa0e2e9057fa5053587eb2a29d1d8c819e0eb9f02814255a04c",
"docs/investmoz/simulations/source-archive/Decreto-9-2008-BR16.pdf": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
"docs/investmoz/simulations/source-archive/Lei-14-1992-BR42.pdf": "089fff7423e99a70a230a73ca379e4ea3a91d124703f91016e57ff82794b9e56",
"docs/investmoz/simulations/source-archive/Lei-17-2022-BR251-exemplar-MCNet5.pdf": "14eb34f0af91a8f5cb1770c7b52d6ff839c6818302d1ed96d79afbfb9fe999d4",
"docs/investmoz/simulations/source-archive/Lei-17-2022-IPP-BR250-Parlamento.pdf": "978cd22403ffd336a631704ecd7a5bbd814a427c815b9acdaca5515591dd9e2a",
"docs/investmoz/simulations/source-archive/Lei-19-2013-BR76.pdf": "bba96d645cc935ffc3d1a79b9f0f73ac1c693d6459c2ad41f56cd2841accae76",
"docs/investmoz/simulations/source-archive/Lei-19-2017-IRPS-BR-OCAM.pdf": "c3a0186cb9ad090d7a9533006295dc9bb6a62ad0d6150173cbd49dba4ee4b52d",
"docs/investmoz/simulations/source-archive/Lei-2-2011-BR-1-4-suplemento-MCNet.pdf": "a7543a68cc3287a46a83c39a04821b40f649dd06c4e9b5dc51ff0b47fba08899",
"docs/investmoz/simulations/source-archive/Lei-20-2009-BR36-AT-exemplar19.pdf": "fc1c8144db42960cbf73e717e095896f511ece0f907f58f78819b27d6917a7ee",
"docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
"docs/investmoz/simulations/source-archive/Lei-34-2007-BR52.pdf": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"docs/investmoz/simulations/source-archive/Lei-4-1994-BR37-3-suplemento.pdf": "210df9db8980d0a5690cd187a6eeec7e37a900d743e39062c16f4e0d12215c7e",
"docs/investmoz/simulations/source-archive/Lei-4-2012-BR3.pdf": "b8845cef41dcbd9ba50c43dbfa743a56030dd3d348242a107e1ae30279eec121",
"docs/investmoz/simulations/source-archive/Lei-7-1991-Partidos-IFES.pdf": "6b783a0bb3330688ef10660a58060d9724aa2da6a873d234fe902f0eaaeda42d",
"docs/investmoz/simulations/source-archive/PT-MZ-CDT-1992.pdf": "d504e1024b28aee5c6acf4592acb96ec9c915a8414f67a61ab6984d6acf9df9d",
"docs/investmoz/simulations/source-archive/PT-MZ-Protocolo-2009.pdf": "f353773dcf41f09f4daa6cf5ba5a5f7994f3e02615867c2dcffc61c3d901bf9b"
},
"all_seven_recovered_cases_match_final_inputs": true,
"no_active_database_or_server_operations": true,
"no_SGF_TEMPO_operations": true,
"runtime_changed_existing_files": [
"resources/js/components/simulation-form.tsx",
"resources/js/lib/project-dossier-report.ts",
"resources/js/lib/project-dossier.ts"
],
"documentation_changed_existing_files": [
"docs/investmoz/consolidated-review-matrix-2026-10-03.md",
"docs/investmoz/unification/traceability-and-manual.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv"
],
"documentation_only_appends_and_target_AUD_record": true
},
"sources_reused": [
{
"file": "docs/investmoz/simulations/source-archive/Lei-34-2007-BR52.pdf",
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"articles": "CIRPC63/67",
"PDF_pages": [
18,
19
],
"official_source_acceptance_preserved": true
},
{
"file": "docs/investmoz/simulations/source-archive/Decreto-9-2008-BR16.pdf",
"sha256": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"articles": "RIRPC21/27",
"PDF_pages": [
6,
7
],
"official_source_acceptance_preserved": true
},
{
"file": "docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf",
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"articles": "Lei12/2025 IRPC67/version2026",
"PDF_pages": [
18,
19,
20
],
"official_source_acceptance_preserved": true
}
],
"minimum": {
"rule": "Decreto9/2008 art27(6)",
"scope": "2026 resident_general/calendar/MZN",
"less_than": "100 MZN",
"strict_boundary_tests": [
"+99.99",
"+100",
"-99.99",
"-100"
],
"arithmetic_exact": true,
"new_rounding": false,
"automatic_carry": false
},
"remaining_code": [
"automatic PPC/PEC obligationcalculation",
"positivePEC/creditorderlimitscarry",
"autonomoustaxsettlement",
"specialperiods/foreigncurrencypayments",
"interest/penalties/calendar/guideremittance",
"AT submission/refundprocessing",
"unmappedM20M22fields"
],
"documentary_dependencies": {
"previous_L5_L6_L7_matrix_items_preserved": true,
"examples": [
"mixed/withheld cooperativeincome needs L7 segregation",
"express cumulation exception requires disposition/period/limits",
"divergent M20M22 field needs exactedition and representation"
],
"only_dependent_case_blocked": true
},
"L6_operational_delimited": true,
"L7_partial": true,
"L8_partial": true,
"submitted_or_payment_or_refund_received": false,
"server_operations_this_turn": false,
"reported_server_free_GiB": 4.14,
"reported_capacity_not_measured_this_turn": true,
"capacity_blocks_future_install_not_QA": true,
"future_delivery": {
"fresh_main_compatibility": true,
"measure_space_and_inodes": true,
"confirm_backup_and_isolated_build_capacity": true,
"fresh_backup_restore": true,
"keep_active_until_new_ready": true,
"verify_served_revision_and_only_delta": true
},
"evidence_directory": "outputs/irpc-l8-settlement/",
"global_effort": {
"initial_L8_L14_reference_hours": [
240,
416
],
"is_current_remainingforecast": false,
"reconciliation_before_globalforecast": [
"implemented/reusable vs remainingcode perlot",
"reuseacceptedproofs;no duplicate sharedcomponentestimate",
"documentarywait separately",
"L1-L7residuals,integration/delivery,L15-L16 included"
]
},
"root_checkout_runtime_not_merged": true,
"SGF_TEMPO_untouched": true
}
@@ -0,0 +1,123 @@
{
"status": "L8_first_increment_delimited_not_implemented",
"date": "2026-10-26",
"installed_L7": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"no_new_L8_calculator_installed": true,
"initial_scope": "resident general IRPC,annualcivil2026,MZN,currentdetermined assessment,documented absence of positive PEC/unmappedcredits and autonomoustax needing ownsettlement",
"inputs_reused": [
"current L6 or applicable qualifiedL7 assessment key/version/subjectNUIT/period;never add both",
"L5 received/effective/on_account qualified and reconciled withholding proofs",
"actual documented PPC payments by subject/period/receipt",
"known/declaredabsence/missing states for every credit/paymentfamily"
],
"wrong_credits_excluded": [
"withholding remitted by enterprise on payments to others",
"definitive withholding",
"projected amount without effective proof",
"duplicate receipt/allocation/year",
"unmapped positive PEC/investment/doubletax credit"
],
"sequence": [
"validassessment",
"admissibledeductions and explicitabsence",
"effective onaccount withholdings",
"actual PPC",
"signed arithmeticbalance",
"applicable collection/refund minimum rules",
"simulatedpayable orrecoverable;not submittedor receivedrefund"
],
"proposed_acceptance_cases": [
{
"colecta": "1408",
"withholdings": "300",
"PPC": "500",
"arithmetic_balance": "608"
},
{
"colecta": "1408",
"withholdings": "1000",
"PPC": "600",
"arithmetic_balance": "-192"
},
{
"colecta": "1408",
"withholdings": "408",
"PPC": "1000",
"arithmetic_balance": "0"
},
"minimumrule boundaries afterperiod/version mapping",
"knownzero vs declaredabsence vs missing",
"wrongbeneficiary/definitive/duplicates",
"calculation-save-recover-report with oldhistories unchanged"
],
"cases_tested_now": false,
"rule_work_before_implementation": [
"CIRPC63/67 with Lei12/2025 nature applicable",
"Decreto9/2008 art21(2-5) deductionorder/limits and27(1-2/6) settlement",
"100MZN minimum in accepted2008 exemplar:link to applicable version/period before enabling parameter;no generic credibility revalidation",
"retain PEC/credits distinct and nonrefundable limits;no3/5year automaticcarry"
],
"boundaries": [
"qualified cooperative withoutwithheldincome cannot silently acceptpositivereceivedwithholdings without L7segregation",
"no L6fallback toignore applicablependingL7effect",
"autonomoustax/61Apositive needs own settlement articulation",
"fraction exact;unmapped formrepresentation onlyblocks affectedtransport"
],
"deferred": [
"automatic PPC/PEC obligationcalculation",
"positivePEC/creditorderlimitscarry",
"autonomoustaxsettlement",
"specialperiods/foreigncurrencypayments",
"interest/penalties/calendar/guideremittance",
"AT submission/refundprocessing",
"unmappedM20M22fields"
],
"sources_reused": [
{
"file": "C:\\laragon\\www\\portal-investidor-irpc-l7-common-qa-20261026\\docs\\investmoz\\simulations\\source-archive\\Lei-34-2007-BR52.pdf",
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e",
"articles": "CIRPC63/67",
"PDF_pages": [
18,
19
],
"official_source_acceptance_preserved": true
},
{
"file": "C:\\laragon\\www\\portal-investidor-irpc-l7-common-qa-20261026\\docs\\investmoz\\simulations\\source-archive\\Decreto-9-2008-BR16.pdf",
"sha256": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697",
"articles": "RIRPC21/27",
"PDF_pages": [
6,
7
],
"official_source_acceptance_preserved": true
},
{
"file": "C:\\laragon\\www\\portal-investidor-irpc-l7-common-qa-20261026\\docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
"articles": "Lei12/2025 IRPC67/version2026",
"PDF_pages": [
18,
19,
20
],
"official_source_acceptance_preserved": true
}
],
"global_effort": {
"initial_L8_L14_reference_hours": [
240,
416
],
"is_current_remainingforecast": false,
"reconciliation_before_globalforecast": [
"implemented/reusable vs remainingcode perlot",
"reuseacceptedproofs;no duplicate sharedcomponentestimate",
"documentarywait separately",
"L1-L7residuals,integration/delivery,L15-L16 included"
]
},
"L7_partial": true,
"L8_final_still_not_implemented": true
}
@@ -0,0 +1,793 @@
{
"date": "2026-10-28",
"status": "installed_and_verified",
"served_commit": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"previous_commit": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"accepted_QA": {
"economic": "aae67c169dc0d14f95cf2ee6fa28e5ff05341dcf",
"carry": "d134a92d169f9159a692ed158e3a051889f7ab3a"
},
"scope": {
"economic": {
"current_year": "2026",
"current_period": "calendar year, resident general",
"currency": "documented MZN; exact fractions without fiscal rounding",
"profit_kind": "ordinary distributions art64(1–2)",
"eligibility": "same-country seat/effective management; payer subject to IRPC and nonexempt; nonapplication of40(1) documented, including2009 version",
"nominal_credit": "60 percent of documented IRPC corresponding to included distributed profits; no assumed rate on net dividend",
"gross_up": "expected nominal60 percent reconciled with53(1)a amount already included in current L6; does not overwrite or recalculate source base",
"proportional_ceiling": "case-specific documented input tied to current assessment; not automatically derived",
"prior_use": "actual documented economic credit use, distinct from simulation history and prior source-tax attributions",
"order": [
"economic credit up to collecta",
"international credit current/prior according to existing explicit selection",
"PEC current/prior according to existing explicit selection",
"own withholdings and PPC"
],
"refund": "no economic-credit refund or carry created; PPC can create simulated recoverable balance"
},
"carry": {
"year": "2026",
"subject": "same subject, resident general",
"period": "annual ordinary origins; calendar-year current close",
"currency": "documented MZN; exact foreign-credit fractions supported",
"international": "eligible origin credit minus origin deduction and documented actual later uses; five subsequent exercises, art65(3)",
"pec": "actual PEC eligible origin minus origin deduction and actual later uses; three subsequent exercises, art66(1–2)",
"allocation": "explicit documented selection between current and prior exercises, confirmed against current assessment; no presumed FIFO or automatic reduction",
"expiry": "ordinary window ended excludes current deduction but keeps source and arithmetic historical remainder",
"origin_rules": "origin assessment, inclusion/limits/insufficient collection and applicable period documented; exceptional/transitional rules outside scope"
},
"grouped_example": "1408-12economic-8currentInternational-50priorInternational-200currentPEC-100priorPEC-500PPC=538MZN payable simulated",
"same_parcel_nonduplication": {
"stable_identity": "issuer/document/parcel; distribution identity also independent of source-tax document,date and row id",
"economic_vs_international": "same physical tax parcel cannot fund both credit natures",
"same_paper_different_tax": "supported distinct parcels can coexist; old proof without a parcel overlaps the whole paper until reconciled",
"capacity": "same proof parcel amounts and prior attributions must agree and total allocation remains within available amount across snapshot contexts",
"L5": "existing withholding source/allocation checks preserved; parcel relabelling cannot turn repeated L5 use into new tax",
"partial_information": "saved and recovered as indeterminate, never reset or silently assumed absent",
"global_official_account_reconciliation": false
}
},
"compatibility": {
"main_normal_fast_forward": true,
"force_used": false,
"runtime_files_identical_to_accepted_QA": true,
"runtime_delta": [
{
"file": "resources/js/components/fiscal-proof-parcel.tsx",
"before_sha256": null,
"after_sha256": "9712108707e20c60ed625b296aa8cec92a6ce1b7f6af5c51355d52b6b08a4f7a"
},
{
"file": "resources/js/components/simulation-irpc-annual.tsx",
"before_sha256": "307725306df321fc89caf3d1a9efcf7463bb93d9d515d44347f8e14d4fd3136b",
"after_sha256": "75176ae721b88f2686987be5b499bf8909fc1d958a497bfdffde8ae22fca9586"
},
{
"file": "resources/js/components/simulation-irpc-carry.tsx",
"before_sha256": null,
"after_sha256": "020e2c26643b8b0dcf31d673db55217a7285b2187bdb8abf020bdfc6cc78e868"
},
{
"file": "resources/js/components/simulation-irpc-economic.tsx",
"before_sha256": null,
"after_sha256": "57a019d4359f0ee119d9d52202104ca846518b1bfba2bfb8fddb769c168ecd44"
},
{
"file": "resources/js/components/simulation-irpc-international.tsx",
"before_sha256": "6a9f796cc1e678823ed1dc14fbc28ca0e270752b2650518de239424dc75d167c",
"after_sha256": "64b6077bfb673b918476f923a045d39cfde73c07aca2ae066772a24bef9a396d"
},
{
"file": "resources/js/components/simulation-irpc-pec.tsx",
"before_sha256": "c3f0ea9ff9389cf856ecda3894c7a1486f44193eb893c341ef10c67f888a2fc6",
"after_sha256": "d0bba7015521d9d143c819e4203e03cf2f6d076093f5cd29deb96c3a11fc6aa1"
},
{
"file": "resources/js/lib/fiscal-proof-parcel.ts",
"before_sha256": null,
"after_sha256": "9eb500a7be2e05f39203c5cebf86cd3c64bbace7a615b9b62161f34dbe4a63da"
},
{
"file": "resources/js/lib/irpc-annual-settlement.ts",
"before_sha256": "47d4167d0f80c649e6d89a586e0d206d2d2a12b8553a7e98be362ea56203a540",
"after_sha256": "ac2896dca3002b27bf5f6bfd2e670295dcfaa3dc24f77b8e52469ed551cb1877"
},
{
"file": "resources/js/lib/irpc-credit-carry.ts",
"before_sha256": null,
"after_sha256": "5e88833842304f8e8e580916e2be657c33ad1fc53b7d544fa453b51ea27004e1"
},
{
"file": "resources/js/lib/irpc-economic-credit.ts",
"before_sha256": null,
"after_sha256": "fa19b289cba504d3636d76b3232694327e63674c907305425c2043d847046af1"
},
{
"file": "resources/js/lib/irpc-international-credit.ts",
"before_sha256": "40b46fbaaff6071ce6a35fd82de586158bf1f58fae8f46bcf6e4ddbbf84287f1",
"after_sha256": "4fc68f1fbe0cb82ca01a3c30dcb505adb60eced1de92213260b9a5ea1711fe7b"
},
{
"file": "resources/js/lib/irpc-pec.ts",
"before_sha256": "eb40b0601b6a1a69a6e81ad210589cc8744d74c6ef65e12132de13a5fcd6a90e",
"after_sha256": "9715ba106fd44b9ef16a55f2e85c2169ad09413a75167990e78ee644556fa381"
}
],
"source_files_before": 1005,
"source_files_after": 1011,
"all_other_compared_sources_preserved": true,
"schema_configuration_routes_permissions_preserved": true,
"previous_accepted_receipts_and_frozen_history_preserved": true
},
"accepted_QA_reused": {
"economic_new_frontend_tests": 20,
"previous_affected_tests": 65,
"frontend_pass": 85,
"frontend_fail": 0,
"API_tests": 1,
"API_assertions": 210,
"API_cases": 11,
"database": "proactive_investment_20261027_test",
"loopback_port": 55441,
"API_transactions_rolled_back": true,
"recovered_cases_recalculated_with_HTML_and_dossier": 11,
"frozen_histories_preserved": true,
"typescript": "passed",
"build": "isolated QA, subprocess exit0, final component hashes recorded",
"PHP_formatting": "pint passed",
"new_browser_manual_proof": false,
"team_usability_evaluation": "unchanged; awaiting team feedback"
},
"backup": {
"stage": "/var/backups/investmoz-irpc-l8-grouped-20261028/backup",
"created_at": "2026-10-28T12:38:25Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "007cd1851d5bd51a54265ab99a342d6a312de06ef642fc42b38b7a5e771d4d9a",
"files_sha256": "cd81cc9421e1d324648c706d8e56cbb6ad8766eb13e9a1a9cfda87814388b51f",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_grouped_restore_20261028",
"port": 55441,
"source_dump_sha256": "007cd1851d5bd51a54265ab99a342d6a312de06ef642fc42b38b7a5e771d4d9a",
"active_database_writes": 0
},
"capacity_before": {
"checked_at_UTC": "2026-10-28T12:38:00.155432+00:00",
"installed": {
"status": "installed",
"commit": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"release": "/var/www/investmoz-homologacao/releases/838ad941a24ae76ec4bf91ccc3f92012668fe8cf-ca7817df",
"previous_release": "/var/www/investmoz-homologacao/releases/e182d1d79dc945f35d2079c6b8ca2ac93048cec3-e2a185b3",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/838ad941a24ae76ec4bf91ccc3f92012668fe8cf-ca7817df",
"release_revision": {
"commit": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"branch": "main",
"built_at": "2026-10-27T13:20:18.055286+00:00",
"manifest_sha256": "b873c14f3e0e43435fa8f67fa9a65ff8978123cd8792c5f7c2e0cf6f8f84a3b2"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 88808570880,
"available_inodes": 23523855,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 88808570880,
"available_inodes": 23523855,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 88808570880,
"available_inodes": 23523855,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 88808570880,
"available_inodes": 23523855,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 88808570880,
"available_inodes": 23523855,
"total_inodes": 29089792
}
],
"free_bytes": 88808570880,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175921269,
"same_partition_release_and_backup": true,
"space_guard_satisfied": true,
"current_release_entry_reference": 31327,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"capacity_after_backup": {
"at": "2026-10-28T12:40:09.841070+00:00",
"baseline": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"capacity_after_backup_satisfied": true,
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"free_bytes": 88629272576,
"free_inodes": 23523836
},
{
"path": "/var/lib/investmoz-deploy",
"free_bytes": 88629272576,
"free_inodes": 23523836
},
{
"path": "/var/backups",
"free_bytes": 88629272576,
"free_inodes": 23523836
},
{
"path": "/tmp",
"free_bytes": 88629272576,
"free_inodes": 23523836
},
{
"path": "/var/lib/docker",
"free_bytes": 88629272576,
"free_inodes": 23523836
}
],
"backup_age_seconds": 104.841034,
"backup_dump_sha256": "007cd1851d5bd51a54265ab99a342d6a312de06ef642fc42b38b7a5e771d4d9a",
"restore_verified": true,
"tables_verified": 174,
"files_verified": 369,
"backup_paths": {
"dump": "/var/backups/investmoz-irpc-l8-grouped-20261028/backup/database.dump",
"files": "/var/backups/investmoz-irpc-l8-grouped-20261028/backup/files-before.tar.gz"
},
"active_writes": 0
},
"schema_permissions": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "5f0c554373e879fa9db81c3e746886a40a3c47875e6f41c61cfc0b3aee2dfd2b",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"preservation": {
"checked_at": "2026-10-28T12:47:37.401210+00:00",
"installed": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"business_tables_unchanged": 172,
"total_tables": 174,
"operational_tables_to_reconcile": {
"cache": {
"before": {
"rows": 110,
"checksum": "59099e8b28be3b1cd3b30a0be1b22519"
},
"after": {
"rows": 110,
"checksum": "832a86e7c4ccd6c9b5d725a45a63f2cb"
}
},
"sessions": {
"before": {
"rows": 2,
"checksum": "09d77c0790973a0ed80f9dbb177f186c"
},
"after": {
"rows": 4,
"checksum": "570c460243c35d5c20b2e700077c15b3"
}
}
},
"persistent_files_unchanged": 369,
"original_configuration_preserved": true,
"synthetic_QA_storage_not_served": true,
"QA_storage_saved_outside_active": "/var/lib/investmoz-deploy/qa-runtime/569a1cd750f3d2a0b87f130e992e73e070bbd1ab-53a57d6f",
"fixture_or_content_imports": 0,
"migrations": 0,
"comparison_identity": "postgres;UTC;consistent before snapshot and after read-only transaction",
"active_database_writes": 0
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 110,
"after_rows": 110,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 2,
"after_rows": 4,
"changes": [
{
"key_sha256": "61ee61858f50dc6bb6b3c42a15ea2a158e29a8de51071570a48e245072f35647",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "93d2f8d1f352499a4b04fe6ffe15ecd52738871794282140a78bfef2ad6ba80b",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"installer": {
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"installed": {
"status": "installed",
"commit": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"release": "/var/www/investmoz-homologacao/releases/569a1cd750f3d2a0b87f130e992e73e070bbd1ab-53a57d6f",
"previous_release": "/var/www/investmoz-homologacao/releases/838ad941a24ae76ec4bf91ccc3f92012668fe8cf-ca7817df",
"database_migrations": 0,
"content_imports": 0
},
"latest_report": {
"status": "installed",
"commit": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"release": "/var/www/investmoz-homologacao/releases/569a1cd750f3d2a0b87f130e992e73e070bbd1ab-53a57d6f",
"previous_release": "/var/www/investmoz-homologacao/releases/838ad941a24ae76ec4bf91ccc3f92012668fe8cf-ca7817df",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"569a1cd750f3d2a0b87f130e992e73e070bbd1ab"
],
"finished_at": "2026-10-28T12:44:28.780095+00:00"
},
"log_file": "1793191252185211711.log",
"mandatory_summaries": [
"OK (1 test, 3106 assertions)",
"✓ built in 30.82s",
"OK (59 tests, 317 assertions)",
"# tests 1146",
"# pass 1146",
"# fail 0"
]
},
"public_delta": {
"phase": "after",
"revision": {
"commit": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"branch": "main",
"built_at": "2026-10-28T12:44:25.642859+00:00",
"manifest_sha256": "9cb557f62c0dbe49ec87d7ccb532f6c7dc29fc980658ffc51ff024755c26f186"
},
"manifest_verified": true,
"simulator_HTTP": 200,
"simulator_component": "portal/services",
"active_QA_records_created": false,
"compiled_markers": {
"IRPC-credit-carry/1": [
"assets/project-dossier-BUI-Tqnq.js"
],
"IRPC-economic-credit/1": [
"assets/project-dossier-BUI-Tqnq.js"
],
"Preparar saldos anteriores": [
"assets/services-DOMV1YET.js"
],
"Preparar crédito económico": [
"assets/services-DOMV1YET.js"
],
"Crédito económico — antes do internacional": [
"assets/project-dossier-BUI-Tqnq.js"
],
"Confirmar afectação à colecta seleccionada": [
"assets/services-DOMV1YET.js"
],
"IRPC-international-credit/1": [
"assets/project-dossier-BUI-Tqnq.js"
],
"IRPC-PEC/1": [
"assets/project-dossier-BUI-Tqnq.js"
]
}
},
"remote_backup": "/var/backups/investmoz-irpc-l8-grouped-20261028/backup",
"remote_receipt": "/var/backups/investmoz-irpc-l8-grouped-20261028/installed-receipt.json",
"remaining": {
"economic": [
"automatic inclusion/correction of distributed profits and53 addition in L6",
"automatic proportional ceiling derivation and complete40(1) exclusion treatment at base stage",
"liquidation64(3),associations64(4),special-period and other-currency cases"
],
"other_L8": [
"specific benefit credits and their qualification,cumulation and limits",
"automatic international national-fraction and case-specific treaty matching",
"PPC/PEC obligation/calendar,interest/penalties and payment guides with applicable edition",
"autonomous taxation,special periods,other currencies and M20/M22 transport/submission",
"exceptional/transitional interyear cases beyond accepted ordinary carry scope"
]
},
"L8_complete": false,
"limits": [
"No global annual IRPC closure claimed",
"No official tax-account balance consumed,submitted or refunded",
"Economic credit limited to ordinary documented current-year case;source inclusion/gross-up and proportional quota not automatically derived",
"Carry retains its documented ordinary-year scope;no exceptional/transitional rule inferred",
"No new manual team usability acceptance claimed",
"Songo/Gurue remain private;SGF TEMPO untouched;no active QA fixture/content imports"
],
"local_evidence_directory": "outputs/irpc-l8-grouped-delivery-20261028",
"local_artifacts": [
{
"file": "authenticate.ps1",
"sha256": "80109eafe4fe5c065debcb3ebf626638904f09c04450565b0be940a6372ddc1d",
"bytes": 214
},
{
"file": "backup.py",
"sha256": "f1e02236d97caaed537249dfc8c7a002c18bd8cc067af5bd11f94cc4dc1ad027",
"bytes": 5448
},
{
"file": "capacity-after.py",
"sha256": "9f1e2df54963469c670098b77392020f2719bb3f795cd04e5ecdad6f1fad1b84",
"bytes": 1621
},
{
"file": "compatibility-and-preservation-plan.json",
"sha256": "00e4f0b33e5ea46007c74a2d8a7976fec363baf5cace55063b764fa3fceb822a",
"bytes": 1160
},
{
"file": "git-main-delivery.json",
"sha256": "28c6503ad9229afdefd7f3466e7ab235417c1f2f7a7372ce269951db0657ef6f",
"bytes": 242
},
{
"file": "group-backup-20261028-response.json",
"sha256": "9860fd3a9f4c1abb5e9298965a604cfa5efc0198ee8069aaf7ed9844b2bf00d6",
"bytes": 606
},
{
"file": "group-backup-20261028.json",
"sha256": "f1e0096263b3b8a83401c3a83035e67e0c8f50e647030812811fe1b1700c6dea",
"bytes": 437
},
{
"file": "group-capacity-after-20261028-response.json",
"sha256": "ce5b65cc2e31b9f938dac177d0420baaca6ad2df95e417c43e6fd79b474bc2d5",
"bytes": 1394
},
{
"file": "group-capacity-after-20261028.json",
"sha256": "0d63c97cecd57683cd4046f3d327d489a966b67508e5f8c54c5829da85e8e869",
"bytes": 1200
},
{
"file": "group-operational-20261028-response.json",
"sha256": "d7ca760c85a2deb24084167701aafb389bcd0a807c95bce5a6a9cddd4f6480ff",
"bytes": 2483
},
{
"file": "group-operational-20261028.json",
"sha256": "dd0476edc7212ca0cc25646441c7f73aa5e406201563070e9adb3930751d21b6",
"bytes": 2434
},
{
"file": "group-preflight-20261028-response.json",
"sha256": "b98a6d1970dc4f681e99c8500e863b24dc30bafe3d536d256183924911c2da6c",
"bytes": 3029
},
{
"file": "group-preflight-20261028.json",
"sha256": "5f70b0af720beb1199c09cb21118a6d13f47e07ab55f4eeef3ae969ad1fcac14",
"bytes": 2595
},
{
"file": "group-preserve-20261028-response.json",
"sha256": "9f96f52a494c5d29702cc9abd1ace94d314a8cda54281ec6ac1b810efc6b8c50",
"bytes": 1324
},
{
"file": "group-preserve-20261028.json",
"sha256": "f655c23059156461f49200a419fafffdf0cecab62df99b5995bcab59eaf7e7de",
"bytes": 1137
},
{
"file": "group-progress-a1-20261028-response.json",
"sha256": "b968fa1a79f043c1b2f9440e7e1828eea466c7b77e45c8f66dec47cc59202305",
"bytes": 2715
},
{
"file": "group-progress-a1-20261028.json",
"sha256": "8f3cd7de2b9c10ea72a04783f2740301a96f641f07189515c386908aad7bf139",
"bytes": 2294
},
{
"file": "group-progress-a2-20261028-response.json",
"sha256": "05432b187845dd4ea7ba3a966fea54023877c7bc0cb1c5721539f9591b8c174d",
"bytes": 1567
},
{
"file": "group-progress-a2-20261028.json",
"sha256": "19ee1ec59ed4d91487a765c079cb042d84e70d8c6f575385425132832f4a8f88",
"bytes": 1247
},
{
"file": "group-restore-20261028-response.json",
"sha256": "4ce2051902d1c00d04bef1f34fd88671c0be6b5b65228d4c13271bb541453a0f",
"bytes": 427
},
{
"file": "group-restore-20261028.json",
"sha256": "aa3a90c80a037d4977988d7d9935a52f226b25ea414e54012446e528b69769c2",
"bytes": 282
},
{
"file": "group-schema-after-20261028-response.json",
"sha256": "740062552f5a4747fc0151ab32956774f8cb8cef6be6fef116a9c8b0505db67c",
"bytes": 772
},
{
"file": "group-schema-after-20261028.json",
"sha256": "265a0f0bb3b8e8232c8a8f2f72802664091ff8f9127e7a3868694f1373fc7b51",
"bytes": 668
},
{
"file": "group-schema-before-20261028-response.json",
"sha256": "ba122cba99109784b22699391efc6359c53d17e44dbe4bb14184389589cb0d80",
"bytes": 745
},
{
"file": "group-schema-before-20261028.json",
"sha256": "8c171cfaae6feef78fbd43f8046ffb62c1daad9a258d95e6df43d20ba4b335c4",
"bytes": 646
},
{
"file": "group-source-after-20261028-response.json",
"sha256": "be446ca8152ea5d940a8650d38fc8d141ee94cebafab8406d7c33b9a97cb6b4f",
"bytes": 284
},
{
"file": "group-source-after-20261028.json",
"sha256": "f9a457698c36c0e433ff5c10956cef3f4548534ae0a9d8718a03af2f3101360b",
"bytes": 165
},
{
"file": "group-source-before-20261028-response.json",
"sha256": "e2f155845283962a0729a295856d0ba0b631530faa40074c317a57b90836e1b5",
"bytes": 285
},
{
"file": "group-source-before-20261028.json",
"sha256": "3383b6c77419378eac7fb078dad3e57989a8def0965c29477f0a827e1972a67c",
"bytes": 166
},
{
"file": "group-status-a1-20261028-response.json",
"sha256": "860ba2f40d709ff491113c54cd253926adb0b21e22179b02e978a388ef6e2bc9",
"bytes": 1809
},
{
"file": "group-status-a1-20261028.json",
"sha256": "38c718738dad722e06069993894ad9eba2f61b946d6e2042cfbc33e6d1c6aa10",
"bytes": 1442
},
{
"file": "group-status-a2-20261028-response.json",
"sha256": "2f6815214d9b0240cc298f78b7838fd2b7061333e4cfda1ecab2779a688be130",
"bytes": 2117
},
{
"file": "group-status-a2-20261028.json",
"sha256": "328e6fc9e8ce7f488e83c9c7154472f76cacf08381ad48ea38af8c6139317b7f",
"bytes": 1706
},
{
"file": "group-status-a3-20261028-response.json",
"sha256": "a9af2b8c3c53341a0dbc030ceaa984818af1710b9be1f13437026093edc9b9ea",
"bytes": 2117
},
{
"file": "group-status-a3-20261028.json",
"sha256": "e79288f392bd00c31059031c653ba703a4546d853945f0859f426bbccb8f381d",
"bytes": 1706
},
{
"file": "group-status-final-20261028-response.json",
"sha256": "1e54588459017ee079eae4759d07cf4629287f053df50679fcf4026052696a9c",
"bytes": 2220
},
{
"file": "group-status-final-20261028.json",
"sha256": "dca34a8237f9d019d3f36976668dd8b4a86e492e3d29c3eac8294c0d5294edee",
"bytes": 1795
},
{
"file": "pipeline-progress.py",
"sha256": "848be5b9c462802395e2944fb30487407d86668ff27640125885994acdd4c241",
"bytes": 1006
},
{
"file": "preflight.py",
"sha256": "92113ce782cc6cce88e3146dcc34363ad21d888f83b26b4e5a0d26fbf60e640f",
"bytes": 2338
},
{
"file": "preparation.json",
"sha256": "47007bfe846aa9e22dc723b320e4a580396e413a75bb846c44c9cfda60ad84eb",
"bytes": 251405
},
{
"file": "preserve-data.py",
"sha256": "e56d27b726c5e710b9bd5721d729cc019d57011b2ea1e2699fee6685f1f1bfbd",
"bytes": 2304
},
{
"file": "public-after.json",
"sha256": "db39a1bd518eddcc4b23ee1fa28ae7a06d51e289d549790cfb64b04100976b6b",
"bytes": 1149
},
{
"file": "public-before.json",
"sha256": "05a748e8a0f08ba438026f4e53c2d8260586c93061748ad3428188afe86e9b2a",
"bytes": 414
},
{
"file": "reconcile-operational-delta.py",
"sha256": "1ad5c3663364e59d54bfaff2a0686b43fe7d658f5445076f670fb9aa69c1321c",
"bytes": 5336
},
{
"file": "remote_delivery_inspection.py",
"sha256": "7c95ba88a9d5a62a15ec2bf581fa62f5151e548014d106f081487889e56b2703",
"bytes": 1947
},
{
"file": "restore.py",
"sha256": "dcb4952f56d2524f36bc4b24164f8041f99de8e98d461bd40bafbb5102c28349",
"bytes": 2792
},
{
"file": "rpc.py",
"sha256": "9c9ebe126d345d20ab46a07469f41bac3e76dbfbcdb64ac32606796c9c0f9520",
"bytes": 1650
},
{
"file": "schema-permissions-after.py",
"sha256": "44fd24feb568ca5b9488c923fbd3967756c0fbb2e6fee4016f6c0272c536cac1",
"bytes": 1862
},
{
"file": "schema-permissions-before.py",
"sha256": "d17fbac06b88b189171da56ea2d4e501eae331a39bd78c14cbd3fc65d19e59c4",
"bytes": 1705
},
{
"file": "source-after-input.json",
"sha256": "3716126155fcff9b74fb34c408b57bc7b9482e62ed1b3f29dfd994d1c894f11a",
"bytes": 240716
},
{
"file": "source-before-input.json",
"sha256": "8ca115700b7df7db7b306d7a0ff1063a54716977465674a31d5d2cd588d8f2e2",
"bytes": 240717
},
{
"file": "source-check.py",
"sha256": "1cec620043b013e6b6f79b9f67e4e5588117d91ee7dc0c93592fc6b8d6d0557f",
"bytes": 676
},
{
"file": "ssh-session.py",
"sha256": "e81df6aae12e03b0faac33e03108ef6dcdc5c0d3598538c4db5bb4bb65e9f3f4",
"bytes": 3084
},
{
"file": "status.py",
"sha256": "41d3a13211c4d4725178477aa48e10f27fe313f41a2b33e555f7ae04a8a14bdd",
"bytes": 1204
},
{
"file": "store-receipt.py",
"sha256": "9c671b6019c7fd80df91c9af795b16a8a80c119a79877ad6cf57c8fea436ef9c",
"bytes": 864
},
{
"file": "update-existing-docs.py",
"sha256": "e088143d2e3e24390b36c5a08dd3312537b2b3f5778633c8086fcbdde00b2b60",
"bytes": 1478
},
{
"file": "verify-public.py",
"sha256": "f6b5ad42ead0f6a7f2ddcb6f16a648293ad5eba1001b591dc32f4ddfa4f68f00",
"bytes": 2107
}
]
}
@@ -0,0 +1,722 @@
{
"date": "2026-10-27",
"status": "installed_and_verified",
"served_commit": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"accepted_qa": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"previous_commit": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"sector_fix_preserved": "669cb8979b0c372659fc2ad3876aebc919d5df19",
"scope": {
"year": "2026",
"resident": "general",
"period": "calendar year",
"currency": "documented MZN",
"foreign_tax": "actual income tax paid; inclusion in taxable base documented",
"national_fraction": "documented exact input, not automatically derived",
"treaty": "case-specific applicability and ceiling documented, not inferred from country",
"order": [
"international credit limited to eligible available amount and collection",
"PEC limited to remaining collection",
"withholdings and PPC"
],
"known_absent_missing_distinct": true,
"proof_deduplication": "issuer/document across tax natures, dates and snapshot contexts; consolidate country-year quota",
"officialBalancesConsumed": false,
"carryCreated": false
},
"example": {
"foreign_tax_paid": "10 MZN",
"documented_national_limit": "8 MZN",
"documented_treaty_nonapplication": "synthetic only, not actual country entitlement",
"credit": "8 MZN",
"calculation": "1408 - 8 = 1400; - PEC200 = 1200; - PPC500 = 700 MZN simulated payable",
"above_eligibility_limit": "2 MZN, not a carry",
"insufficient_collection_example": "available2000, deducted1408, insufficient592; PEC200 not deducted; recoverable500 derives from PPC only"
},
"accepted_QA_reused": {
"frontend_new": 18,
"frontend_affected_annual_pec": 31,
"api_assertions": 171,
"recovered_HTML_dossier_cases": 7
},
"cases": [
{
"name": "payable",
"status": "payable",
"balance": {
"numerator": "700",
"denominator": "1"
},
"current": true,
"history_records": 0,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "treaty",
"status": "payable",
"balance": {
"numerator": "702",
"denominator": "1"
},
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "missing",
"status": "indeterminate",
"balance": null,
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "limited-collecta",
"status": "recoverable",
"balance": {
"numerator": "-500",
"denominator": "1"
},
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "duplicate",
"status": "indeterminate",
"balance": null,
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "absent",
"status": "payable",
"balance": {
"numerator": "708",
"denominator": "1"
},
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "prior-use",
"status": "payable",
"balance": {
"numerator": "703",
"denominator": "1"
},
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
}
],
"compatibility": {
"fast_forward_over": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"runtime_files_byte_identical_to_accepted_QA": true,
"runtime_delta": [
{
"file": "resources/js/components/simulation-irpc-annual.tsx",
"before_sha256": "7f18abcaa1100251c5c2780fdfac32e21979d8e6ffed52f732e4a0d345ab4f40",
"after_sha256": "307725306df321fc89caf3d1a9efcf7463bb93d9d515d44347f8e14d4fd3136b"
},
{
"file": "resources/js/components/simulation-irpc-international.tsx",
"before_sha256": null,
"after_sha256": "6a9f796cc1e678823ed1dc14fbc28ca0e270752b2650518de239424dc75d167c"
},
{
"file": "resources/js/lib/country-iso-codes.ts",
"before_sha256": null,
"after_sha256": "1c4e2b6d67457ea2dba3dda28a9b6ce09242c36dfcf04855a8bc1f44506a9fac"
},
{
"file": "resources/js/lib/irpc-annual-settlement.ts",
"before_sha256": "6d80889677c1904b3236b5e43fa5a3dc28327745679392529dfb5fbf5a273f7d",
"after_sha256": "47d4167d0f80c649e6d89a586e0d206d2d2a12b8553a7e98be362ea56203a540"
},
{
"file": "resources/js/lib/irpc-international-credit.ts",
"before_sha256": null,
"after_sha256": "40b46fbaaff6071ce6a35fd82de586158bf1f58fae8f46bcf6e4ddbbf84287f1"
}
],
"all_other_compared_sources_unchanged": true,
"schema_config_routes_permissions_unchanged": true,
"legacy_annual_and_PEC_history_preserved": true,
"no_new_manual_retest_of_independent_accepted_proofs": true
},
"source_files_verified": {
"before": 1002,
"after": 1005
},
"backup": {
"stage": "/var/backups/investmoz-irpc-l8-international-20261027/backup",
"created_at": "2026-10-27T13:15:39Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "b1e9740653a8664c23268e228efd3ed6a0514bf3e8786dd5adf43342cdb475e1",
"files_sha256": "9d3a790f9c7f4a35ebf660d304e92d69f86557d20d2f8be1e996c828711b19ac",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_international_restore_20261027",
"port": 55441,
"source_dump_sha256": "b1e9740653a8664c23268e228efd3ed6a0514bf3e8786dd5adf43342cdb475e1",
"active_database_writes": 0
},
"capacity_before": {
"checked_at_UTC": "2026-10-27T13:15:02.501911+00:00",
"installed": {
"status": "installed",
"commit": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"release": "/var/www/investmoz-homologacao/releases/e182d1d79dc945f35d2079c6b8ca2ac93048cec3-e2a185b3",
"previous_release": "/var/www/investmoz-homologacao/releases/669cb8979b0c372659fc2ad3876aebc919d5df19-6a2f00c6",
"database_migrations": 0,
"content_imports": 0
},
"current_link": "/var/www/investmoz-homologacao/releases/e182d1d79dc945f35d2079c6b8ca2ac93048cec3-e2a185b3",
"release_revision": {
"commit": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"branch": "main",
"built_at": "2026-10-27T12:10:18.923517+00:00",
"manifest_sha256": "47bbdd09864d0587133deec179781018e439f9c83b7b328c9dcd52482eaf6d31"
},
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 92293206016,
"available_inodes": 23699087,
"total_inodes": 29089792
},
{
"path": "/var/lib/investmoz-deploy",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 92293206016,
"available_inodes": 23699087,
"total_inodes": 29089792
},
{
"path": "/var/backups",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 92293206016,
"available_inodes": 23699087,
"total_inodes": 29089792
},
{
"path": "/tmp",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 92293206016,
"available_inodes": 23699087,
"total_inodes": 29089792
},
{
"path": "/var/lib/docker",
"mount": "/dev/md2 / ext4",
"device": 2306,
"available_bytes": 92293206016,
"available_inodes": 23699087,
"total_inodes": 29089792
}
],
"free_bytes": 92293206016,
"existing_pipeline_minimum_bytes": 5368709120,
"observed_previous_backup_bytes": 175920446,
"same_partition_release_and_backup": true,
"space_guard_satisfied": true,
"current_release_entry_reference": 31315,
"inodes_available_vs_reference": true,
"inode_note": "Observed current release footprint for scale;no new arbitrary inode threshold. Capacity rechecked after fresh backup.",
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"active_writes": 0
},
"capacity_after_backup": {
"at": "2026-10-27T13:16:13.360261+00:00",
"baseline": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"capacity_after_backup_satisfied": true,
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"free_bytes": 92114915328,
"free_inodes": 23699075
},
{
"path": "/var/lib/investmoz-deploy",
"free_bytes": 92114915328,
"free_inodes": 23699075
},
{
"path": "/var/backups",
"free_bytes": 92114915328,
"free_inodes": 23699075
},
{
"path": "/tmp",
"free_bytes": 92114915328,
"free_inodes": 23699075
},
{
"path": "/var/lib/docker",
"free_bytes": 92114915328,
"free_inodes": 23699075
}
],
"backup_age_seconds": 34.36022,
"backup_dump_sha256": "b1e9740653a8664c23268e228efd3ed6a0514bf3e8786dd5adf43342cdb475e1",
"restore_verified": true,
"tables_verified": 174,
"files_verified": 369,
"backup_paths": {
"dump": "/var/backups/investmoz-irpc-l8-international-20261027/backup/database.dump",
"files": "/var/backups/investmoz-irpc-l8-international-20261027/backup/files-before.tar.gz"
},
"active_writes": 0
},
"schema_permissions": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"preservation": {
"checked_at": "2026-10-27T13:21:25.836367+00:00",
"installed": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"business_tables_unchanged": 172,
"total_tables": 174,
"operational_tables_to_reconcile": {
"cache": {
"before": {
"rows": 108,
"checksum": "c5e94e4bb71bf085e36447c1da35696e"
},
"after": {
"rows": 108,
"checksum": "ddbdb9e11a50777bd84bc353d178608a"
}
},
"sessions": {
"before": {
"rows": 53,
"checksum": "fe52dca3e79f71d1f5a3bd474c7d72d1"
},
"after": {
"rows": 55,
"checksum": "359f4b80ea80b807a1f3a50687fe2309"
}
}
},
"persistent_files_unchanged": 369,
"original_configuration_preserved": true,
"synthetic_QA_storage_not_served": true,
"QA_storage_saved_outside_active": "/var/lib/investmoz-deploy/qa-runtime/838ad941a24ae76ec4bf91ccc3f92012668fe8cf-ca7817df",
"fixture_or_content_imports": 0,
"migrations": 0,
"comparison_identity": "postgres;UTC;consistent before snapshot and after read-only transaction",
"active_database_writes": 0
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 108,
"after_rows": 108,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 53,
"after_rows": 55,
"changes": [
{
"key_sha256": "cc9234289e8c94733fb352f52407a2863d547165e1ee7f6eb4523c1ed7b33c1a",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "dbf3b24ccc55e4bf0a14aad872309de7d890942acb4f68b0c1ec608ff5e49035",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"installer": {
"service": "MainPID=0\nExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"installed": {
"status": "installed",
"commit": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"release": "/var/www/investmoz-homologacao/releases/838ad941a24ae76ec4bf91ccc3f92012668fe8cf-ca7817df",
"previous_release": "/var/www/investmoz-homologacao/releases/e182d1d79dc945f35d2079c6b8ca2ac93048cec3-e2a185b3",
"database_migrations": 0,
"content_imports": 0
},
"latest_report": {
"status": "installed",
"commit": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"release": "/var/www/investmoz-homologacao/releases/838ad941a24ae76ec4bf91ccc3f92012668fe8cf-ca7817df",
"previous_release": "/var/www/investmoz-homologacao/releases/e182d1d79dc945f35d2079c6b8ca2ac93048cec3-e2a185b3",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"838ad941a24ae76ec4bf91ccc3f92012668fe8cf"
],
"finished_at": "2026-10-27T13:20:20.796156+00:00"
},
"log_file": "1793107006281021543.log",
"log_bytes": 313361,
"mandatory_summaries": [
"OK (1 test, 3106 assertions)",
"✓ built in 31.55s",
"OK (59 tests, 317 assertions)",
"# tests 1110",
"# pass 1110",
"# fail 0"
]
},
"public_delta": {
"phase": "after",
"revision": {
"commit": "838ad941a24ae76ec4bf91ccc3f92012668fe8cf",
"branch": "main",
"built_at": "2026-10-27T13:20:18.055286+00:00",
"manifest_sha256": "b873c14f3e0e43435fa8f67fa9a65ff8978123cd8792c5f7c2e0cf6f8f84a3b2"
},
"manifest_verified": true,
"simulator_HTTP": 200,
"simulator_component": "portal/services",
"active_QA_records_created": false,
"compiled_markers": {
"IRPC-international-credit/1": [
"assets/project-dossier-bSv3Ugr2.js"
],
"Preparar crédito internacional": [
"assets/services-YUy8XgPr.js"
],
"Vincular inclusão e limites ao país": [
"assets/services-YUy8XgPr.js"
],
"Crédito internacional — antes do PEC": [
"assets/project-dossier-bSv3Ugr2.js"
],
"Não determina a fracção nacional": [
"assets/project-dossier-bSv3Ugr2.js"
],
"IRPC-PEC/1": [
"assets/project-dossier-bSv3Ugr2.js"
]
}
},
"remote_backup": "/var/backups/investmoz-irpc-l8-international-20261027/backup",
"remote_receipt": "/var/backups/investmoz-irpc-l8-international-20261027/installed-receipt.json",
"limits": [
"L8 partial",
"no new PEC excess/carry scope",
"no automatic foreign exchange or official rounding rule",
"no official tax balance consumption, submission or refund execution",
"same-snapshot deduplication is not a global inter-dossier official ledger",
"synthetic QA examples do not assert any actual foreign treaty",
"L8 partial after this bounded delivery",
"Songo/Gurue remain private; no QA fixture or content import into active data"
],
"remaining_code": [
"automatic national fraction and case-specific treaty matching",
"economic double-tax and CBF benefit credits with own rules",
"international carry/expiry65(3), separate from PEC66 carry/expiry",
"PPC/PEC obligation/calendar; autonomous tax, special periods, other currencies and M20/M22 transport/submission"
],
"document_dependencies": [
{
"missing": "income inclusion and national fraction",
"example": "tax10 but no included income/base correspondence",
"resume_when": "income/base and documented fraction matched"
},
{
"missing": "treaty article/period/ceiling",
"example": "country selected but no applicable article or eligible tax",
"resume_when": "case-specific article, effective period and eligible ceiling identified"
},
{
"missing": "proof/titular/previous actual use/temporal link",
"example": "payment2027 selected for2026 without correspondence",
"resume_when": "actual payment and explicit2026 link supported, prior use reconciled"
}
],
"local_startup_fix": {
"cause": "Local inspect.py shadowed Python stdlib before SSH connection",
"renamed_to": "remote_delivery_inspection.py",
"inspect_module": "C:/laragon/bin/python/python-3.10/lib/inspect.py",
"python": "C:/laragon/bin/python/python-3.10/python.exe",
"paramiko": "5.1.0",
"remote_linux_geteuid_ssh_guard_preserved": true,
"credentials_changed": false,
"server_failure_inferred": false
},
"local_evidence_directory": "outputs/irpc-l8-international-delivery-20261027",
"local_artifacts": [
{
"file": "authenticate.ps1",
"bytes": 237,
"sha256": "89492b8a16b8d5ec8dbe1d6a1a44af0bfbf8e99ccef2abfc5568a831623c05ba"
},
{
"file": "backup.py",
"bytes": 5460,
"sha256": "ef5406ffa735d3d563e9b4da0e8ac067c6978710df455d24e2c8e2cbc305fa49"
},
{
"file": "capacity-after.py",
"bytes": 1621,
"sha256": "9f1e2df54963469c670098b77392020f2719bb3f795cd04e5ecdad6f1fad1b84"
},
{
"file": "diagnose-session-delta.py",
"bytes": 7395,
"sha256": "312e2446a489a99bf9060797e785de4d16d28866b6f9a05a9d99fb60e3a9c838"
},
{
"file": "int-backup-20261027.json",
"bytes": 443,
"sha256": "5314107e4438ea22bc6c3261dda9b893faac3cf131c596f30dc6517bc35cd30f"
},
{
"file": "int-capacity-after-20261027.json",
"bytes": 1210,
"sha256": "72934b91dcc7ecf5370d7a667ef26ecf8a78a0ceeeeeb71a3062abab33925767"
},
{
"file": "int-operational-20261027.json",
"bytes": 2436,
"sha256": "f8936062bdf569740ea4bafc618c88c08ef8a1def30dcf1240c6afa3113ec1c3"
},
{
"file": "int-preflight-20261027.json",
"bytes": 2595,
"sha256": "cd339ef9913f8d89644e45ee5d337003cecb758d827764a79f4cfacc1b350dca"
},
{
"file": "int-preserve-20261027.json",
"bytes": 1139,
"sha256": "110ec10adf5d2a4de426dd3e6f947026dbff6ef828a56c0353b1e7a0426e2c78"
},
{
"file": "int-read-20261027.json",
"bytes": 2919,
"sha256": "12ba15343b9485e08f654a7abb0305e4f10f396b1d20f7aaca844e9ea5317fdc"
},
{
"file": "int-restore-20261027.json",
"bytes": 288,
"sha256": "7d9c3fb60ea87407441db867edf8e872e58aeb9aaf209c1b89830b0e0eedea59"
},
{
"file": "int-schema-after-20261027.json",
"bytes": 668,
"sha256": "e1767424312345a28a28223c67c424df1ac68d9d1aecec30a4856a71fbe91bfc"
},
{
"file": "int-schema-before-20261027.json",
"bytes": 646,
"sha256": "da666867fc18a60b0473e04bcd7966328135dcb684fb974b405b66e53e5a4377"
},
{
"file": "int-source-after-20261027.json",
"bytes": 165,
"sha256": "46c3a8f356197988ebbb4325a7a43807a0e5f097eb5eee5c09c063f68dc022cc"
},
{
"file": "int-source-before-20261027.json",
"bytes": 166,
"sha256": "3130bda62b9b5b736d8b3a884c34973e2c7387564c1f3e9edfcf626075d4fbbd"
},
{
"file": "int-status-a1-20261027.json",
"bytes": 1442,
"sha256": "c895209842c6f59f552a5b9af9542e0a4c58515d91213b188c1ee4300037b3ba"
},
{
"file": "int-status-final-20261027.json",
"bytes": 1795,
"sha256": "2c57678c23eabf455295695214f9d87cca99be25245417310c12d25a6ac69e41"
},
{
"file": "preflight.py",
"bytes": 2328,
"sha256": "2fccdc6dcd727db3b9599f5c4882b3ca389036ccbf12b91f2953d3789726e13c"
},
{
"file": "preparation.json",
"bytes": 247525,
"sha256": "61d83eb63dd5f14d99cd0cce2f460150812b1831a27850c876a991d847b7febc"
},
{
"file": "preserve-data.py",
"bytes": 2304,
"sha256": "e56d27b726c5e710b9bd5721d729cc019d57011b2ea1e2699fee6685f1f1bfbd"
},
{
"file": "public-after.json",
"bytes": 986,
"sha256": "65a39cc9e37575d5da4731e185728d8762387d28abf34c7991c1f81b8c24479d"
},
{
"file": "public-before.json",
"bytes": 414,
"sha256": "010725fedaa5b820efaea13d52140f07b450221f14d71624b6141fbdf5bb6b33"
},
{
"file": "reconcile-operational-delta.py",
"bytes": 5342,
"sha256": "1fa90ff8496d2210dee1e01c0ee409abe0f4f1713f844ac99fa6f4b4c889e645"
},
{
"file": "remote_delivery_inspection.py",
"bytes": 1947,
"sha256": "7c95ba88a9d5a62a15ec2bf581fa62f5151e548014d106f081487889e56b2703"
},
{
"file": "restore.py",
"bytes": 2828,
"sha256": "fcfd6eb0adfff107ee9259b5825ac1afc550c9bd8eabf111fa0b1739d7dd3efd"
},
{
"file": "schema-permissions-after.py",
"bytes": 1868,
"sha256": "d71436183c0cf121381e4119560d70f1bcaf850439830b822b728b6e86a04005"
},
{
"file": "schema-permissions-before.py",
"bytes": 1711,
"sha256": "10c8acceabaebaeeb5d2e5161d37c3b7927b9f4e44e725e19f0a2eb738638b07"
},
{
"file": "source-after-input.json",
"bytes": 237267,
"sha256": "b735f3c10108a40de67eba37cdac203329baea164fe8e48020087ee636462481"
},
{
"file": "source-before-input.json",
"bytes": 237268,
"sha256": "3835b8ab18392212a54c4560be32807b5573b22378ff3403ecd10637ff81d59f"
},
{
"file": "source-check.py",
"bytes": 676,
"sha256": "1cec620043b013e6b6f79b9f67e4e5588117d91ee7dc0c93592fc6b8d6d0557f"
},
{
"file": "ssh-import-collision-resolution.json",
"bytes": 411,
"sha256": "a997a96b0ab7fcd9cb8797c788f4ec27b46df8e70a7008f59400a3af57b99286"
},
{
"file": "ssh-session.py",
"bytes": 3058,
"sha256": "f506635c84dcc7c75c1b1cb244f8d1ffa98bcb6a1d906d6c70c5bfc5771bf177"
},
{
"file": "status.py",
"bytes": 1195,
"sha256": "2282805a03dcbc4c82d5f8be3504c6408f49a5ddb63d7a3deeed1dbd650d021f"
},
{
"file": "store-receipt.py",
"bytes": 870,
"sha256": "e407ff7db3b36fd554f6760dbd05c574c656770a18bf4631b430a8457293b6ea"
},
{
"file": "update-docs.py",
"bytes": 8322,
"sha256": "be77002ecad1640fc1999a05d5a50584290e03294c2328cf403768005d4e2b35"
},
{
"file": "verify-public.py",
"bytes": 2037,
"sha256": "df9aa7ec8b8581192abf8b3c726668205b4c50413005faa872a3fc8ecefbd5ad"
}
],
"remote_receipt_sha256": "d80324b898fd160ab3e7a2fd0b11ea2decd0b99a9324255850062ee4a13e0f0f"
}
@@ -0,0 +1,220 @@
{
"date": "2026-10-27",
"status": "QA demonstrated; not installed",
"branch": "codex/irpc-l8-international-credit-qa-20261027",
"base": "814fe0a9",
"installed_reference": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"sector_fix_preserved": "669cb8979b0c372659fc2ad3876aebc919d5df19",
"scope": {
"year": "2026",
"resident": "general",
"period": "calendar year",
"currency": "documented MZN",
"foreign_tax": "actual income tax paid; inclusion in taxable base documented",
"national_fraction": "documented exact input, not automatically derived",
"treaty": "case-specific applicability and ceiling documented, not inferred from country",
"order": [
"international credit limited to eligible available amount and collection",
"PEC limited to remaining collection",
"withholdings and PPC"
],
"known_absent_missing_distinct": true,
"proof_deduplication": "issuer/document across tax natures, dates and snapshot contexts; consolidate country-year quota",
"officialBalancesConsumed": false,
"carryCreated": false
},
"sources": {
"reuse": "accepted CIRPC65(1–2), Lei34/2007 BR52 PDF18/printed768-(72); CIRPC66/RIRPC21 order",
"originals_preserved": 30,
"source_preservation_artifact": "outputs/irpc-l8-international-20261027/source-preservation.json",
"automatic_treaty_entitlement": false
},
"verification": {
"frontend_new": 18,
"frontend_annual_pec_affected": 31,
"frontend_pass": 49,
"frontend_fail": 0,
"api_tests": 1,
"api_assertions": 171,
"api_cases": 7,
"api_path": "POST/PUT/GET private simulation drafts; DatabaseTransactions rollback in isolated guarded PostgreSQL55441",
"recovered_reports": "fresh recalculation of all7 API recoveries; existing HTML and dossier finance report; frozen previous result",
"wayfinder_routes_actions": "passed --with-form",
"typescript": "passed",
"isolated_build": "passed",
"new_browser_manual_proof": false,
"team_usability_evaluation": "awaiting team return; separate"
},
"cases": [
{
"name": "payable",
"status": "payable",
"balance": {
"numerator": "700",
"denominator": "1"
},
"current": true,
"history_records": 0,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "treaty",
"status": "payable",
"balance": {
"numerator": "702",
"denominator": "1"
},
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "missing",
"status": "indeterminate",
"balance": null,
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "limited-collecta",
"status": "recoverable",
"balance": {
"numerator": "-500",
"denominator": "1"
},
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "duplicate",
"status": "indeterminate",
"balance": null,
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "absent",
"status": "payable",
"balance": {
"numerator": "708",
"denominator": "1"
},
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
},
{
"name": "prior-use",
"status": "payable",
"balance": {
"numerator": "703",
"denominator": "1"
},
"current": true,
"history_records": 1,
"apiRoundTrip": true,
"dossier": true
}
],
"example": {
"foreign_tax_paid": "10 MZN",
"documented_national_limit": "8 MZN",
"documented_treaty_nonapplication": "synthetic only, not actual country entitlement",
"credit": "8 MZN",
"calculation": "1408 - 8 = 1400; - PEC200 = 1200; - PPC500 = 700 MZN simulated payable",
"above_eligibility_limit": "2 MZN, not a carry",
"insufficient_collection_example": "available2000, deducted1408, insufficient592; PEC200 not deducted; recoverable500 derives from PPC only"
},
"preservation": {
"existing_records": {
"database": "proactive_investment_20261027_test",
"tables": {
"opportunities": {
"existing_rows": 55,
"unchanged": true
},
"documents": {
"existing_rows": 64,
"unchanged": true
},
"opportunity_documents": {
"existing_rows": 1,
"unchanged": true
},
"simulation_form_drafts": {
"existing_rows": 19,
"unchanged": true
},
"users": {
"existing_rows": 40,
"unchanged": true
},
"organizations": {
"existing_rows": 3,
"unchanged": true
},
"audit_events": {
"existing_rows": 409,
"unchanged": true
}
},
"transaction_rollback": true
},
"originals": 30,
"protected_consumers_count": 11,
"no_migrations_or_permissions_changes": true,
"legacy_summary_and_frozen_history_preserved": true,
"private_pilots": "Songo/Gurue unchanged and private",
"production_written": false,
"SGF_TEMPO": "unchanged"
},
"remaining_code": [
"automatic national fraction and case-specific treaty matching",
"economic double-tax and CBF benefit credits with own rules",
"international carry/expiry65(3), separate from PEC66 carry/expiry",
"PPC/PEC obligation/calendar; autonomous tax, special periods, other currencies and M20/M22 transport/submission"
],
"document_dependencies": [
{
"missing": "income inclusion and national fraction",
"example": "tax10 but no included income/base correspondence",
"resume_when": "income/base and documented fraction matched"
},
{
"missing": "treaty article/period/ceiling",
"example": "country selected but no applicable article or eligible tax",
"resume_when": "case-specific article, effective period and eligible ceiling identified"
},
{
"missing": "proof/titular/previous actual use/temporal link",
"example": "payment2027 selected for2026 without correspondence",
"resume_when": "actual payment and explicit2026 link supported, prior use reconciled"
}
],
"limits": [
"L8 partial",
"no new PEC excess/carry scope",
"no automatic foreign exchange or official rounding rule",
"no official tax balance consumption, submission or refund execution",
"same-snapshot deduplication is not a global inter-dossier official ledger",
"synthetic QA examples do not assert any actual foreign treaty",
"no production deployment or publication of pilots"
],
"local_evidence": {
"outputs\\irpc-l8-international-20261027\\frontend-tests.log": "7f981dc819ffe0947565994c9a29a72c408eb94a9cd687dba1d1b93903949b87",
"outputs\\irpc-l8-international-20261027\\types.log": "82962651e47f564de653ad2883f8fd34e7dae4b4468e4ac459cb3331962a3879",
"outputs\\irpc-l8-international-20261027\\build.log": "d9a173ef26392275e42f6ef8927c2c9a79039a16c98a371e8bbcccbeea17776b",
"outputs\\irpc-l8-international-20261027\\existing-records-preservation.json": "b45b3306d3c9dee63fbbaf9a04bba31008019e65892bd16322460b5ef53eda7d",
"outputs\\irpc-l8-international-20261027\\source-preservation.json": "d82c68f709793103373f2110b3b55ef226fd5e6a51a6835c62425c7407bcf0bd",
"outputs\\irpc-l8-international-20261027\\recovered-report-receipt.json": "080d61ad1e3e4a849ea8b71642fb256881aa05a9fef81144cb7cf56848383cb2"
}
}
@@ -0,0 +1,901 @@
{
"date": "2026-10-27",
"status": "installed_and_verified",
"served_commit": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"includes_accepted_qa": "7fdb6b424b70ef6462a4f88338e52e2750b9e222",
"previous_commit": "669cb8979b0c372659fc2ad3876aebc919d5df19",
"sector_regression_preserved": "669cb897",
"remote_backup": "/var/backups/investmoz-irpc-l8-pec-20261027/backup",
"remote_receipt": "/var/backups/investmoz-irpc-l8-pec-20261027/installed-receipt.json",
"scope": {
"subject": "resident general",
"year": "2026",
"period": "calendar",
"currency": "MZN",
"treatment": "actual documented PEC of own exercise,selected available amount after prior use,capped to valid collecta before RF/PPC",
"preceding_credits": "absent or documented known zero;positive/missing remains indeterminate",
"no_automatic": [
"PEC obligation",
"prior-year carry",
"expiry",
"excess PEC refund",
"official balance consumption",
"special positive credits",
"declaration submission"
]
},
"accepted_qa_reused": {
"new_PEC_tests": 12,
"affected_annual_tests": 19,
"api_assertions": 102,
"cases_recovered_to_HTML_and_dossier": 5,
"runtime_files_byte_identical_to_QA": 4
},
"compatibility": {
"runtime_delta": [
"resources/js/components/simulation-irpc-annual.tsx",
"resources/js/components/simulation-irpc-pec.tsx",
"resources/js/lib/irpc-annual-settlement.ts",
"resources/js/lib/irpc-pec.ts"
],
"runtime_PEC_identity_to_accepted_QA": true,
"sector_code_and_tests_identity_to669cb897": true,
"changed_matrix_ids": [
"RF-CLU-003",
"MASTER-9dee08d0-0067",
"MASTER-471012ab-0010",
"MASTER-471012ab-0067",
"AUD-SIM-INT02"
],
"matrix_note": "Four accepted team-use documentation updates from PEC ancestry preserved;plus PEC AUD-SIM-INT02. Sector rows unchanged.",
"other_records_unchanged": true,
"schema_config_routes_unchanged": true
},
"runtime_delta": [
{
"file": "resources/js/components/simulation-irpc-annual.tsx",
"before_sha256": "91ac4ed53ab3f05129f2173cbcf196cef2db1da080a5de5f37e0cd3c5ef74554",
"after_sha256": "7f18abcaa1100251c5c2780fdfac32e21979d8e6ffed52f732e4a0d345ab4f40"
},
{
"file": "resources/js/components/simulation-irpc-pec.tsx",
"before_sha256": null,
"after_sha256": "c3f0ea9ff9389cf856ecda3894c7a1486f44193eb893c341ef10c67f888a2fc6"
},
{
"file": "resources/js/lib/irpc-annual-settlement.ts",
"before_sha256": "8cca5316259e3ebabfa75be9f64143a8664a447ac30b23b882318edfd70a68f1",
"after_sha256": "6d80889677c1904b3236b5e43fa5a3dc28327745679392529dfb5fbf5a273f7d"
},
{
"file": "resources/js/lib/irpc-pec.ts",
"before_sha256": null,
"after_sha256": "eb40b0601b6a1a69a6e81ad210589cc8744d74c6ef65e12132de13a5fcd6a90e"
}
],
"source_files_verified": {
"before": 1000,
"after": 1002
},
"installer": {
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"installed": {
"status": "installed",
"commit": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"release": "/var/www/investmoz-homologacao/releases/e182d1d79dc945f35d2079c6b8ca2ac93048cec3-e2a185b3",
"previous_release": "/var/www/investmoz-homologacao/releases/669cb8979b0c372659fc2ad3876aebc919d5df19-6a2f00c6",
"database_migrations": 0,
"content_imports": 0
},
"latest_report": {
"status": "installed",
"commit": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"release": "/var/www/investmoz-homologacao/releases/e182d1d79dc945f35d2079c6b8ca2ac93048cec3-e2a185b3",
"previous_release": "/var/www/investmoz-homologacao/releases/669cb8979b0c372659fc2ad3876aebc919d5df19-6a2f00c6",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"e182d1d79dc945f35d2079c6b8ca2ac93048cec3"
],
"finished_at": "2026-10-27T12:10:22.122557+00:00"
},
"log_file": "1793102808310738327.log",
"summaries": [
"OK (1 test, 3106 assertions)",
"built in 30.51s",
"OK (59 tests, 317 assertions)",
"# tests 1092",
"# pass 1092",
"# fail 0"
],
"log_bytes": 308894
},
"backup": {
"stage": "/var/backups/investmoz-irpc-l8-pec-20261027/backup",
"created_at": "2026-10-27T12:05:00Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "eff57769cda1e9d0f3d507348b57fc455c0bbc6e38beeb3688135109a6e219fd",
"files_sha256": "7830fd2f7671405777d7e5001edade7d5b08b1ebc1f86defb4bf3ec62a10446e",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_pec_restore_20261027",
"port": 55441,
"source_dump_sha256": "eff57769cda1e9d0f3d507348b57fc455c0bbc6e38beeb3688135109a6e219fd",
"active_database_writes": 0
},
"capacity_after_backup": {
"at": "2026-10-27T12:06:10.511691+00:00",
"baseline": "669cb8979b0c372659fc2ad3876aebc919d5df19",
"capacity_after_backup_satisfied": true,
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"free_bytes": 93404454912,
"free_inodes": 23730955
},
{
"path": "/var/lib/investmoz-deploy",
"free_bytes": 93404454912,
"free_inodes": 23730955
},
{
"path": "/var/backups",
"free_bytes": 93404454912,
"free_inodes": 23730955
},
{
"path": "/tmp",
"free_bytes": 93404454912,
"free_inodes": 23730955
},
{
"path": "/var/lib/docker",
"free_bytes": 93404454912,
"free_inodes": 23730955
}
],
"backup_age_seconds": 70.511645,
"backup_dump_sha256": "eff57769cda1e9d0f3d507348b57fc455c0bbc6e38beeb3688135109a6e219fd",
"restore_verified": true,
"tables_verified": 174,
"files_verified": 369,
"backup_paths": {
"dump": "/var/backups/investmoz-irpc-l8-pec-20261027/backup/database.dump",
"files": "/var/backups/investmoz-irpc-l8-pec-20261027/backup/files-before.tar.gz"
},
"active_writes": 0
},
"schema_permissions": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"preservation": {
"checked_at": "2026-10-27T12:11:58.610510+00:00",
"installed": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"business_tables_unchanged": 172,
"total_tables": 174,
"operational_tables_to_reconcile": {
"cache": {
"before": {
"rows": 108,
"checksum": "8ad8adb3b4cee975cebcb15806c60af5"
},
"after": {
"rows": 108,
"checksum": "5079060f1cdc89bf00b1bb3abdc2ff40"
}
},
"sessions": {
"before": {
"rows": 41,
"checksum": "738960921c69e7c0272c0fdac68ce33b"
},
"after": {
"rows": 53,
"checksum": "7a5824a4f4e5bbe8b9d745a975aad665"
}
}
},
"persistent_files_unchanged": 369,
"original_configuration_preserved": true,
"synthetic_QA_storage_not_served": true,
"QA_storage_saved_outside_active": "/var/lib/investmoz-deploy/qa-runtime/e182d1d79dc945f35d2079c6b8ca2ac93048cec3-e2a185b3",
"fixture_or_content_imports": 0,
"migrations": 0,
"comparison_identity": "postgres;UTC;consistent before snapshot and after read-only transaction",
"active_database_writes": 0
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "Anonymous delivery sessions or individually correlated public requests;one existing anonymous session had only token/previous-URL changes in payload and IP/activity metadata,with exact UA/IP/time/HTTP200 document request proof;no identity or other payload change. Deleted sessions,if any,individually expired. No session overwritten.",
"delta": {
"cache": {
"before_rows": 108,
"after_rows": 108,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 41,
"after_rows": 59,
"changes": [
{
"key_sha256": "4e78c6a57b8f1771f6b334d7dd2697275c222d72620007b8e86e3f049427a8b3",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "f4fa6adfd3d6918ec9e7de8022a61c9cffe66f75800cf521c12aeb98bc3f062f",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "af76f65ffd28dfed5e35dd2111184a06a4e974608cbd2cc07314dae0dfc09a7f",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "a23c33b4c0cc464b1d78f36f59fb3e63b12a476983d19692f3cc003a629f7f52",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "1b9d5c268f04935e5c4daebefd1edfc1ef88c6581d7c5ebb7034b9790a37ec87",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "805dd129ffaa6ef2e03fff399836bc1945ddee46e714fb0ab8b6ffbf62305a3b",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "d5c7afdfe907c762e30c9036fa3821a2b6ba10eab06a87db9adfbb6e3c51c0dc",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "4ed17597603a4ea407a9a48740ea36ae8831e484a18a6cac9fb8fd29e17d2bcd",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "9d33a9812dcec08990f3f5e525f1d2045a0178e55c52b01e6b766c18db970909",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "38f6c88aecd61073863027dedbdfea596cddfd088ce26bc181461381d790263d",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "6590dfcbfa25d90e3cf00b5f3ed65ebe0385c1fdb8bbd4cfefee45775f3fb394",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "82c72ffd5859310ca5d1ab4781d1c297e69f32808382491eb5dbae4739560a08",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "301015a1771a6e3142105fe8267d63716d480bf2012c62f5ee1b21e5d9018cba",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "4c3537f85bb2c588fb86f5f832f08bfafcae211c951b2b65709cb63813cc2dae",
"kind": "updated",
"fields": [
"ip_address",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true,
"payload_diagnostic": {
"changed_keys": [
"_token",
"_previous"
],
"token_shapes_valid": true,
"token_unchanged": false,
"before_previous_path": "/sectores/bens-de-consumo-e-franquias",
"after_previous_path": "/documentos/27/view"
},
"public_navigation_log_matches": true,
"current_ip_matches_public_request": true,
"both_anonymous": true
},
{
"key_sha256": "58f135bb096ab4309792562b7cef59cd64eef92cb22baf5a1fbbf3a1410106b9",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "312f863d14b15caadb4c8d69bfe56af46cc3046f6443a540de9f4fae4bddb9c7",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "f7c9c5ef85f5adbe12adba07b05275d5405cdab6b01cee0a97344939f12d6ee0",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "e34c74bd2b7e86dfb654e2b65ff97a60b146925ca76169866b31fa4954398bbf",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "63d475bd758e4fd66f1e23c5bf5424e572c1e5ce2cb4ea533261ce0858040e6a",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"public_delta": {
"revision": {
"commit": "e182d1d79dc945f35d2079c6b8ca2ac93048cec3",
"branch": "main",
"built_at": "2026-10-27T12:10:18.923517+00:00",
"manifest_sha256": "47bbdd09864d0587133deec179781018e439f9c83b7b328c9dcd52482eaf6d31"
},
"manifest_verified": true,
"pec_compiled_markers": {
"IRPC-PEC/1": [
"assets/project-dossier-D001tZjC.js"
],
"Preparar detalhe PEC": [
"assets/services-I_s1lj16.js"
],
"Registar comprovativo PEC": [
"assets/services-I_s1lj16.js"
],
"Não calcula a obrigação PEC": [
"assets/project-dossier-D001tZjC.js"
],
"Excedente sem reembolso PEC": [
"assets/project-dossier-D001tZjC.js"
]
},
"sector_cards_unchanged": 10,
"three_selected_sector_pages_and_guides_unchanged": true,
"sector_index_still_without_aggregated_details": true,
"filter_preserved": "agronegocio",
"active_QA_records_created": false
},
"l8_remainder_and_credit_resumption": {
"scope": "L8 partial after bounded current-year PEC delivery",
"next_increment": {
"name": "Own-exercise international double-tax credit",
"status": "delimited for QA implementation; not yet implemented",
"source": "Accepted CIRPC art65,Lei34/2007,PDF18/printed768-(72);order relative to PEC in art66 and RIRPC21",
"reuse": [
"entity and exercise",
"valid L6/L7 collecta",
"annual withholding/PPC/PEC book and frozen histories",
"existing documents and source references",
"existing currency records when an applicable conversion is documented"
],
"required_case_facts": [
"foreign-source income included in the taxable base",
"actual foreign income tax, not projected withholding/remittance",
"subject, country, exercise, document and available unused amount",
"documented domestic IRPC fraction for that foreign income",
"known convention applicability and its limit if applicable",
"known state of preceding credit groups; no missing-as-zero"
],
"calculation_contract": "Eligible current credit limited by proven foreign tax and corresponding domestic IRPC fraction, and treaty limit when applicable;then residual collecta for PEC before RF/PPC. No automatic carry/refund/official balance consumption.",
"illustrative_case": {
"synthetic": true,
"foreign_tax": 10,
"domestic_limit_documented": 8,
"convention_not_applicable_documented": true,
"eligible_credit": 8,
"collecta": 1408,
"after_credit": 1400,
"pec": 200,
"after_pec": 1200,
"withholdings": 0,
"ppc": 500,
"simulated_payable": 700,
"implemented": false,
"unutilized_above_limit": "2 is not automatically a carry credit"
},
"delta_acceptance": [
"known/absent/missing and qualification",
"country/subject/year and physical proof identity",
"no double use across credit/PEC/PPC/RF in the same snapshot",
"credit before PEC;separate amounts and limits",
"frozen history;save/recover/report",
"indeterminate dependent annual balance when facts or preceding credits are missing"
]
},
"remaining_code": [
{
"item": "international credit eligibility,limits and own-year deduction",
"condition": "Implement the documented input contract and demonstrate only new totals and persistence."
},
{
"item": "economic double-tax credit",
"condition": "Art64 own conditions,profit inclusion and corresponding tax evidence;separate from international credit."
},
{
"item": "investment/benefit credit",
"condition": "Reuse L7 qualification and specific CBF period,amount,limit and accumulation;location alone never grants credit."
},
{
"item": "prior-year PEC/credit transport,usage and expiry",
"condition": "Implement provenance by year and actual prior use;distinguish PEC art66 from credit art65;do not equate excess above eligibility limit with lack of collecta."
},
{
"item": "PPC/PEC obligation,instalments,interest and guides",
"condition": "Specific facts and applicable rule/edition;actual paid PEC deduction already delivered is separate."
},
{
"item": "autonomous tax,special periods,non-MZN,M20/M22 transport and submission",
"condition": "Keep existing separate dependencies;no silent offset or provisional official fields."
}
],
"documentary_dependencies": [
{
"item": "actual case evidence",
"example": "10 MZN foreign tax with no proof of income inclusion or domestic limit",
"resume_when": "Identify the existing evidence and amount;no generic revalidation of accepted sources."
},
{
"item": "international convention",
"example": "Treaty applies but the article/ceiling and foreign tax paid under it are unknown",
"resume_when": "Exact country,convention,article,period and limit;block only dependent case."
},
{
"item": "2026 regulatory amendment for obligation/calendars",
"example": "Announcement without published operative articles",
"resume_when": "Published diploma,changed articles and effective date for affected obligation/calendar only."
}
],
"private_pilots": "Songo/Gurue remain private",
"team_evaluation": "Await actual feedback;do not repeat accepted technical tests."
},
"private_pilots": "Songo/Gurue private;no publication,fixtures or content import",
"team_use_evaluation": "Await actual feedback;accepted technical proofs retained",
"artifacts": [
{
"file": "after.json",
"sha256": "0a156acdc9665995f99553a8ffba04e0515ee7250e5266b1115c10d641d0bef7",
"bytes": 235814
},
{
"file": "backup.py",
"sha256": "6342cf198110b4e5adbc8f3de524667cf30cb0779b3a5208fd2d4d85cb7ae6cc",
"bytes": 5440
},
{
"file": "backup.txt",
"sha256": "c57f4716111352a2560ebbfd03e2fc9c24745d88067ed78dd15e83b6a108c7a7",
"bytes": 810
},
{
"file": "before.json",
"sha256": "d50f7e56cdc84aa9ebcf690a6f2614cc81b6a2268fe61da01ba3e6c8ed7a887f",
"bytes": 235815
},
{
"file": "capacity-after.py",
"sha256": "5fc773a1f74a3f6028c2d190c452c8d58f8b4a2f56afc508c61002d4eb892371",
"bytes": 1610
},
{
"file": "capacity-after.txt",
"sha256": "9ee2aef5d44b3fb142e0af17e6992de052bfa9e987ffbfd39ea174aca5300af8",
"bytes": 983
},
{
"file": "compatibility.json",
"sha256": "a9579d644b1dbd4cce1acca10374addeca11971604c5f1a4b87bcde4aac98310",
"bytes": 715
},
{
"file": "diagnose-session-delta.py",
"sha256": "b6c0ca60258b920333e124d89252fd740587eb6081d2f965c97c13c44297941d",
"bytes": 7385
},
{
"file": "inspect.py",
"sha256": "7c95ba88a9d5a62a15ec2bf581fa62f5151e548014d106f081487889e56b2703",
"bytes": 1947
},
{
"file": "inspect.txt",
"sha256": "e3aa850ab8f75765fba2f18777223ea217139768a5fe3b151542462fb576e3fc",
"bytes": 4930
},
{
"file": "integrated.json",
"sha256": "e81548bd610d293a4919c3727128681edec70badb26209d372c6cc1079cd8c76",
"bytes": 281
},
{
"file": "l8-remaining-and-credit-resumption.json",
"sha256": "9f04414ad329af20a3f6026152477457481a8ea248367a7c2c21e6a7451df667",
"bytes": 4496
},
{
"file": "operational-delta.txt",
"sha256": "fe6e21047fe47803c9f5040e296bc78137b9ef3c564bd3edc4005e4894c3d4b8",
"bytes": 15960
},
{
"file": "preflight.py",
"sha256": "16c4a12ffa9766cf1350351c91c0c935776ed36fc9e214cd864d22d0941bcb42",
"bytes": 2334
},
{
"file": "preflight.txt",
"sha256": "8d2b03d441da3f46ec268fb9b9274e41cf5ac88ae81af3284f64f1d143db316d",
"bytes": 4446
},
{
"file": "preparation.json",
"sha256": "933e276820b297a268264a47c909fd7f8b82b2ae95d0b0b657be19fb1458b13f",
"bytes": 245902
},
{
"file": "preservation.txt",
"sha256": "80d56892cc29aee66b012fbce808e685b409fb04ea8587c2b535a18b7e49457a",
"bytes": 945
},
{
"file": "preserve-data.py",
"sha256": "9f0c3097467fe171508e741fa1e360df7747aab15f2feb1465adaf38520e69c3",
"bytes": 2288
},
{
"file": "public-after.json",
"sha256": "5e9f81a2b5430e944ccb9c6cbc6a8df5e1f448d6d8e296b7bb282524972bbb49",
"bytes": 43379
},
{
"file": "public-before.json",
"sha256": "07717e8041b44bc3b39f6e2f3f3eb78a9cf8349d88bb097faa9b41e088038f80",
"bytes": 42785
},
{
"file": "reconcile-operational-delta.py",
"sha256": "7f85064f6d733024f4233c2fd2de05504297f033db37d70c1d7fd9a068f2fd89",
"bytes": 8276
},
{
"file": "restore.py",
"sha256": "8a2e85c85dcf37bc1169f42d4f4164421e914ba06b8630875a68a2b122b16714",
"bytes": 2768
},
{
"file": "restore.txt",
"sha256": "21a4b64404a16d341014e310beba4a8f802ed0dea140d6c85e474d7fbe4b6277",
"bytes": 536
},
{
"file": "schema-after.txt",
"sha256": "d5855a7a0a16c1762cce140750c3b8c984e9ea61817bdf02e684cc9ae1c01592",
"bytes": 526
},
{
"file": "schema-before.txt",
"sha256": "64e445bb8d8546aa399a151adbfe53a64383ea23380f77991d3ddf11721c7127",
"bytes": 507
},
{
"file": "schema-permissions-after.py",
"sha256": "03b3eafc23c7598fa90bfbcb3e8fb6ee76e5404f3594a69206661538ab9d2a1d",
"bytes": 1858
},
{
"file": "schema-permissions-before.py",
"sha256": "bc720ff8d3c0814f8a55a5808efd1481da111b75d538e79a3fa15d4ffc2ca74e",
"bytes": 1701
},
{
"file": "session-diagnostic.txt",
"sha256": "b6d3e7871b1c20153dce3e3182b5a618c1172725bf3be4d4c45b978c10e472ee",
"bytes": 1384
},
{
"file": "source-after.txt",
"sha256": "756651eb3db81a1e50ee369a62d05d6cfc86e36878194cc509324dcffdda9ad8",
"bytes": 160
},
{
"file": "source-before.txt",
"sha256": "1a349bee2c2aff9ad38ede72205dc6a1ececea89148e0d67eab126fde5945dd2",
"bytes": 161
},
{
"file": "source-check.py",
"sha256": "2ea95b35eb8c2eb950216ab77e2a3127b2400372e5034179953edae058b0eb84",
"bytes": 669
},
{
"file": "status-a1.txt",
"sha256": "f6f22631054fa0920a3c897db7bc6e3a00bce5420e4893f08125bd103dc5fb8f",
"bytes": 2244
},
{
"file": "status-a2.txt",
"sha256": "6711c9d6d9f93625851c4e161d4bd56997a77626d1df045020fce30e34fd31cf",
"bytes": 2162
},
{
"file": "status-a3.txt",
"sha256": "6711c9d6d9f93625851c4e161d4bd56997a77626d1df045020fce30e34fd31cf",
"bytes": 2162
},
{
"file": "status-a4.txt",
"sha256": "d45f8c746654e183e058066ae494ddbe65dd60c157f0e8ba349e256df8758a0a",
"bytes": 2244
},
{
"file": "verify-public.py",
"sha256": "c5a7535398e0c8ad79458178bd835fa68812b540363495af6abbb38ad2cdd87d",
"bytes": 3349
}
],
"remote_receipt_sha256": "a970266625807803ce73f1e63d0da1a540cff264ab88a19d3a8a387a85b26c34"
}
@@ -0,0 +1,505 @@
{
"date": "2026-10-27",
"status": "QA implemented, not installed",
"branch": "codex/irpc-l8-pec-qa-20261027",
"baseline": "dc14f01e1479f6bef48be60d2fbe961d9d445e0e",
"portal_reference_from_previous_receipt": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"active_changed": false,
"main_changed": false,
"scope": {
"year": "2026",
"regime": "resident_general",
"currency": "MZN",
"period": "calendar",
"payment": "documented current-year PEC, available amount after prior use",
"deduction": "min(available selected PEC, valid collecta after preceding credits), before RF/PPC",
"special_credits": "only documented absent or known zero; positive/missing stays indeterminate",
"excess": "selected amount not deducted, no PEC refund or official carry created"
},
"examples": [
{
"case": "payable",
"status": "payable",
"balance": {
"numerator": "708",
"denominator": "1"
},
"pec": {
"version": "IRPC-PEC/1",
"available": {
"numerator": "200",
"denominator": "1"
},
"deducted": {
"numerator": "200",
"denominator": "1"
},
"remaining": {
"numerator": "0",
"denominator": "1"
},
"afterPec": {
"numerator": "1208",
"denominator": "1"
},
"source": "CIRPC, art. 66(1–2), Lei 34/2007, exemplar BR52, p. 768-(72): dedução após créditos anteriores, até à colecta, sem reembolso do PEC. Recorte demonstrado: pagamento efectivo do próprio exercício 2026, residente geral, ano civil, MZN. Não calcula a obrigação PEC, transporte, caducidade ou consumo de saldos oficiais.",
"officialBalancesConsumed": false,
"carryCreated": false
},
"rows": 7,
"history": 0,
"apiRoundTrip": true,
"current": true,
"dossier": true
},
{
"case": "capped",
"status": "balanced",
"balance": {
"numerator": "0",
"denominator": "1"
},
"pec": {
"version": "IRPC-PEC/1",
"available": {
"numerator": "2000",
"denominator": "1"
},
"deducted": {
"numerator": "1408",
"denominator": "1"
},
"remaining": {
"numerator": "592",
"denominator": "1"
},
"afterPec": {
"numerator": "0",
"denominator": "1"
},
"source": "CIRPC, art. 66(1–2), Lei 34/2007, exemplar BR52, p. 768-(72): dedução após créditos anteriores, até à colecta, sem reembolso do PEC. Recorte demonstrado: pagamento efectivo do próprio exercício 2026, residente geral, ano civil, MZN. Não calcula a obrigação PEC, transporte, caducidade ou consumo de saldos oficiais.",
"officialBalancesConsumed": false,
"carryCreated": false
},
"rows": 6,
"history": 1,
"apiRoundTrip": true,
"current": true,
"dossier": true
},
{
"case": "recoverable",
"status": "recoverable",
"balance": {
"numerator": "-500",
"denominator": "1"
},
"pec": {
"version": "IRPC-PEC/1",
"available": {
"numerator": "2000",
"denominator": "1"
},
"deducted": {
"numerator": "1408",
"denominator": "1"
},
"remaining": {
"numerator": "592",
"denominator": "1"
},
"afterPec": {
"numerator": "0",
"denominator": "1"
},
"source": "CIRPC, art. 66(1–2), Lei 34/2007, exemplar BR52, p. 768-(72): dedução após créditos anteriores, até à colecta, sem reembolso do PEC. Recorte demonstrado: pagamento efectivo do próprio exercício 2026, residente geral, ano civil, MZN. Não calcula a obrigação PEC, transporte, caducidade ou consumo de saldos oficiais.",
"officialBalancesConsumed": false,
"carryCreated": false
},
"rows": 7,
"history": 1,
"apiRoundTrip": true,
"current": true,
"dossier": true
},
{
"case": "missing",
"status": "indeterminate",
"balance": null,
"pec": {
"version": "IRPC-PEC/1",
"available": {
"numerator": "0",
"denominator": "1"
},
"deducted": null,
"remaining": null,
"afterPec": null,
"source": "CIRPC, art. 66(1–2), Lei 34/2007, exemplar BR52, p. 768-(72): dedução após créditos anteriores, até à colecta, sem reembolso do PEC. Recorte demonstrado: pagamento efectivo do próprio exercício 2026, residente geral, ano civil, MZN. Não calcula a obrigação PEC, transporte, caducidade ou consumo de saldos oficiais.",
"officialBalancesConsumed": false,
"carryCreated": false
},
"rows": 7,
"history": 1,
"apiRoundTrip": true,
"current": true,
"dossier": true
},
{
"case": "prior-use",
"status": "payable",
"balance": {
"numerator": "1208",
"denominator": "1"
},
"pec": {
"version": "IRPC-PEC/1",
"available": {
"numerator": "200",
"denominator": "1"
},
"deducted": {
"numerator": "200",
"denominator": "1"
},
"remaining": {
"numerator": "0",
"denominator": "1"
},
"afterPec": {
"numerator": "1208",
"denominator": "1"
},
"source": "CIRPC, art. 66(1–2), Lei 34/2007, exemplar BR52, p. 768-(72): dedução após créditos anteriores, até à colecta, sem reembolso do PEC. Recorte demonstrado: pagamento efectivo do próprio exercício 2026, residente geral, ano civil, MZN. Não calcula a obrigação PEC, transporte, caducidade ou consumo de saldos oficiais.",
"officialBalancesConsumed": false,
"carryCreated": false
},
"rows": 6,
"history": 1,
"apiRoundTrip": true,
"current": true,
"dossier": true
}
],
"proofs": {
"new_frontend_tests": 12,
"affected_annual_tests": 19,
"api_tests": 1,
"api_assertions": 102,
"api_cases": 5,
"api_round_trip_reports": 5,
"routes": "wayfinder --with-form passed",
"typescript": "passed",
"isolated_build": "passed; optional fontaine/chunk-size notices only",
"manual_browser_test": false,
"real_team_evaluation": "pending external feedback"
},
"preservation": {
"database": "proactive_investment_20261027_test",
"tables": {
"opportunities": {
"existing_rows": 55,
"unchanged": true
},
"documents": {
"existing_rows": 64,
"unchanged": true
},
"opportunity_documents": {
"existing_rows": 1,
"unchanged": true
},
"simulation_form_drafts": {
"existing_rows": 19,
"unchanged": true
},
"users": {
"existing_rows": 40,
"unchanged": true
},
"organizations": {
"existing_rows": 3,
"unchanged": true
},
"audit_events": {
"existing_rows": 409,
"unchanged": true
}
},
"transaction_rollback": true
},
"source_preservation": {
"baseline": "dc14f01e",
"count": 30,
"all_equal": true,
"files": [
{
"file": "AT-Comunicado-9-2026-ISPC.pdf",
"sha256": "106f8a9ce9255c03549c70bf07fe999d32e6e55302d009b509862aa74ccb4973"
},
{
"file": "AT-Modelo-30-ISPC.pdf",
"sha256": "6802edd06b6ff638a0b851a3ec7ecf69af8f07840faa47446becad67d35d445c"
},
{
"file": "AT-Modelo-B-Geral.pdf",
"sha256": "bd977c7c59d4d98befd92e2c566b1bf168cb1343bb519f51b41a3807f431fc57"
},
{
"file": "AT-MRFTA-19-39.pdf",
"sha256": "8ea62c53066b482f87078a7a7b1ecf15ca98a12a122e8d7abca63acfc993186b"
},
{
"file": "BR-16-I-Serie-2008-04-16.pdf",
"sha256": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee"
},
{
"file": "BR-248-I-Suplemento-1-2025.pdf",
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251"
},
{
"file": "BR-89-I-Serie-2017-06-08.pdf",
"sha256": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5"
},
{
"file": "BR-95-I-Suplemento-2025-05-21.pdf",
"sha256": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358"
},
{
"file": "BR252-I-Serie-2022-Lei20-PESOE.pdf",
"sha256": "1159fd3ce1ba5581671796d083534da48bd3c5578298819e896f1c2a8026318d"
},
{
"file": "Decreto-22-2021-BR70.pdf",
"sha256": "a8fac38dcfe08f9c7a8e46254cff10e1ec82fc4f7a8d88ad6e4fe7d91ffc21a5"
},
{
"file": "Decreto-27-2026-BR123.pdf",
"sha256": "26249c3fa58f149c81de36e99d1aac2819a4771379d9e8833159660dabf539bb"
},
{
"file": "Decreto-29-1998-BR22-5-suplemento.pdf",
"sha256": "6242cbe675faadf085f43f95ec8c7e8868aafe67c3b2ab2bb010992288f954f8"
},
{
"file": "Decreto-3-2011-BR-11-I-mineiros.pdf",
"sha256": "5bca1133666ba9c69870b89823420175b7b5b8d0eccb667ecdf5c29716f3b6be"
},
{
"file": "Decreto-37-2023-BR124.pdf",
"sha256": "7e680b191481faa0e2e9057fa5053587eb2a29d1d8c819e0eb9f02814255a04c"
},
{
"file": "Decreto-9-2008-BR16.pdf",
"sha256": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697"
},
{
"file": "Lei-13-2016-CIVA-BR-156-10-suplemento.pdf",
"sha256": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b"
},
{
"file": "Lei-14-1992-BR42.pdf",
"sha256": "089fff7423e99a70a230a73ca379e4ea3a91d124703f91016e57ff82794b9e56"
},
{
"file": "Lei-17-2022-BR251-exemplar-MCNet5.pdf",
"sha256": "14eb34f0af91a8f5cb1770c7b52d6ff839c6818302d1ed96d79afbfb9fe999d4"
},
{
"file": "Lei-17-2022-IPP-BR250-Parlamento.pdf",
"sha256": "978cd22403ffd336a631704ecd7a5bbd814a427c815b9acdaca5515591dd9e2a"
},
{
"file": "Lei-19-2013-BR76.pdf",
"sha256": "bba96d645cc935ffc3d1a79b9f0f73ac1c693d6459c2ad41f56cd2841accae76"
},
{
"file": "Lei-19-2017-IRPS-BR-OCAM.pdf",
"sha256": "c3a0186cb9ad090d7a9533006295dc9bb6a62ad0d6150173cbd49dba4ee4b52d"
},
{
"file": "Lei-2-2011-BR-1-4-suplemento-MCNet.pdf",
"sha256": "a7543a68cc3287a46a83c39a04821b40f649dd06c4e9b5dc51ff0b47fba08899"
},
{
"file": "Lei-20-2009-BR36-AT-exemplar19.pdf",
"sha256": "fc1c8144db42960cbf73e717e095896f511ece0f907f58f78819b27d6917a7ee"
},
{
"file": "Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf",
"sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53"
},
{
"file": "Lei-34-2007-BR52.pdf",
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e"
},
{
"file": "Lei-4-1994-BR37-3-suplemento.pdf",
"sha256": "210df9db8980d0a5690cd187a6eeec7e37a900d743e39062c16f4e0d12215c7e"
},
{
"file": "Lei-4-2012-BR3.pdf",
"sha256": "b8845cef41dcbd9ba50c43dbfa743a56030dd3d348242a107e1ae30279eec121"
},
{
"file": "Lei-7-1991-Partidos-IFES.pdf",
"sha256": "6b783a0bb3330688ef10660a58060d9724aa2da6a873d234fe902f0eaaeda42d"
},
{
"file": "PT-MZ-CDT-1992.pdf",
"sha256": "d504e1024b28aee5c6acf4592acb96ec9c915a8414f67a61ab6984d6acf9df9d"
},
{
"file": "PT-MZ-Protocolo-2009.pdf",
"sha256": "f353773dcf41f09f4daa6cf5ba5a5f7994f3e02615867c2dcffc61c3d901bf9b"
}
]
},
"rule_sources": [
{
"file": "Lei-34-2007-BR52.pdf",
"pdf_page": 18,
"printed_page": "768-(72)",
"article": "66(1–2)",
"sha256": "cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e"
},
{
"file": "Decreto-9-2008-BR16.pdf",
"pdf_pages": [
6,
7
],
"articles": "21(2/5),27;29 for deferred obligation context",
"sha256": "96fccdecbfdc11c9eafb90fbc6c7bc259f88bbd4c7507d1ac3af1fa03f960697"
}
],
"remaining_code": [
"PEC obligation and instalments, separate from actual payment",
"Prior-year carry, expiry and usage ledger",
"Special credits/autonomous tax/special periods/non-MZN/M20-M22 remain own groups"
],
"documentary_resume_conditions": [
"Published 2026 regulatory amendment: exact articles and effective date for affected obligation/calendar",
"Prior-year PEC: exact last eligible exercise, transition and documented usage",
"Specific positive credit: own legal limit, order, period, evidence and convention if relevant"
],
"private_pilots": "Songo/Gurue unchanged and private; no publication",
"proactive_team_use": "await actual team feedback; implement concrete observed corrections only",
"artifacts": [
{
"file": "Decreto-9-2008-BR16.pdf-6.png",
"sha256": "109f862c8b94e15f55270ec41f90a66ed9cb3b5cf1f772615a8808a9a6034964",
"bytes": 476800
},
{
"file": "Decreto-9-2008-BR16.pdf-7.png",
"sha256": "943f945fae0a5086fad53cc468f1105257c9b4d762220b823816874bd1878884",
"bytes": 504338
},
{
"file": "dossier-capped.json",
"sha256": "a93f9dc6b0b2c21526dfaff9a415bbc2b6a53124dbd860ea5d1809c8868dd2d3",
"bytes": 31771
},
{
"file": "dossier-missing.json",
"sha256": "563e015d9a9069b09dd16548efa21fa37399b24fc6634d136100080706aa6d9a",
"bytes": 32184
},
{
"file": "dossier-payable.json",
"sha256": "b4cde0e17a9306bf08b7f54103eb499d11e4fd14d70fd38e4858013074d08a3a",
"bytes": 32130
},
{
"file": "dossier-prior-use.json",
"sha256": "5b2f95e06711099051fc463509854b439a48f7134c6da45210ce0ca529f77622",
"bytes": 31776
},
{
"file": "dossier-recoverable.json",
"sha256": "27d954e4e6a48980cbbd391a9352ea83456b1e61b42663389f6ada47b55d7c77",
"bytes": 32142
},
{
"file": "existing-records-preservation.json",
"sha256": "b45b3306d3c9dee63fbbaf9a04bba31008019e65892bd16322460b5ef53eda7d",
"bytes": 822
},
{
"file": "Lei-34-2007-BR52.pdf-18.png",
"sha256": "25a5493d2d63d492ca849b5b798b87ad792fa4f6a95493ec96fa5c974c8c4c62",
"bytes": 467400
},
{
"file": "Lei-34-2007-BR52.pdf-19.png",
"sha256": "160f635ce804f400e73d878dff19dc0cae360a195a06952294766f00c74f78d0",
"bytes": 483003
},
{
"file": "PEC-excerpts.json",
"sha256": "3d8795a9bde96195a59dfef0387c1294a14bd6f671d3df76ac8f7e95ebd7a1ad",
"bytes": 19256
},
{
"file": "recovered-capped.json",
"sha256": "e9465e01490fc6f3d52ebdf74d12842d60d5bde155e863a14ec8224592dd5ab4",
"bytes": 349126
},
{
"file": "recovered-missing.json",
"sha256": "32b4183191ed48954f6d13b8b0a2c127a1edfd7a2308370396bf1cce26f7504b",
"bytes": 349856
},
{
"file": "recovered-payable.json",
"sha256": "8b039e9127e57a2b104f7b37dbedb60e857b82e271bee7c784cf9be06fef2731",
"bytes": 344415
},
{
"file": "recovered-prior-use.json",
"sha256": "ae5099bc2dd54755f232567a6cf7c87080ca8fc1dfde09db6ed4426d4189d800",
"bytes": 348899
},
{
"file": "recovered-recoverable.json",
"sha256": "cae038d1abe19bfc3101216d3e0b79a4cc3ef360f3ca4f8fa3e298a7c187d843",
"bytes": 349415
},
{
"file": "recovered-report-receipt.json",
"sha256": "e70e0777dd92cf8ef17d199238cef3fcef8223a4dfba3b56c420ba4aca42a6f7",
"bytes": 5362
},
{
"file": "report-capped.html",
"sha256": "ddf9e4fa8508daa86c2f5a337f57fe6d8c443018c8706d79f34c8151a6bd9465",
"bytes": 5214
},
{
"file": "report-missing.html",
"sha256": "7313eaa4f984ae2976d7a66b81242899bb5a9cc5c55e62f85a0d4813b7710c91",
"bytes": 5594
},
{
"file": "report-payable.html",
"sha256": "d654183e1d293f7fd025918ddaca6da0d30915e4fd6cc4b34e899b210ed6eb52",
"bytes": 5540
},
{
"file": "report-prior-use.html",
"sha256": "113bdc44ad910a8679ec99949726d637297180f078c2b6ba4760076e8dd0da85",
"bytes": 5219
},
{
"file": "report-recoverable.html",
"sha256": "c91511cd25706322ddfc9f081e1058325a8af617a97580c97388304f6481194a",
"bytes": 5552
},
{
"file": "source-preservation.json",
"sha256": "621864a86ef46931a949d039d3de854c339e205310955fa886d9f879404834e2",
"bytes": 4483
}
]
}
@@ -192,3 +192,30 @@ Reutilizados31originais sem alteração por hash. Lei34/2007PDF5/p768(59),15(1)a
## 25/10/2026 — L6:taxa geral para a colecta normal2026
Sem novos originais:31exemplares preservados por hash. Conferidos visualmenteCIRPC Lei34/2007PDF17/p768(71),61(1),taxa geral32%;Lei20/2022PDF1/p2731,61(1)mantido e61(2)temporário;Lei12/2025PDF18/p2180(18),lista de alterações,ePDF20/p2180(20),61-A/vigência. A alteração61(2)daLei4/2012 já aceite é reutilizada. Índice primárioINM confirmaLei20/2022,artigos61/62,p2731. Não se transportam medidas expiradas,casos autónomos ou taxas de retenção para a colecta normal. Enquadramento do caso/ano é expresso;nenhum aprovador ou revalidação genérica criado. Sem pesquisa das pendênciasL5. Retenções/pagamentos/créditos anuais permanecemL8.
## 27/10/2026 — L8: dedução PEC do próprio exercício
Sem novo original legal importado. Conferidos visualmente Lei34/2007PDF18/p768-(72),art66(1–2),eDecreto9/2008PDF6/p121,21(2/5),PDF7/p122,27/29;Lei34PDF19/art71 lido para delimitar obrigação separada. Lei4/2012,Lei19/2013 e acervo de alteraçõesLei12/2025 reutilizados;nenhuma alteração doart66 identificada nesses exemplares. Dedução corrente limitada à colecta,sem reembolso PEC;transporte/caducidade e obrigação separados.30PDFs presentes no arquivo source-archive iguais byte a byte a dc14f01e;recibo source-preservation.json.
Consulta primária dirigida identificou anúncio do Governo de alterações regulamentares2026: https://portaldogoverno.gov.mz/governo-introduz-alteracoes-nos-regulamentos-fiscais-para-reforcar-eficiencia-tributaria/ . O anúncio não fornece o articulado promulgado e contém referência editorial divergente à lei; não é tratado como nova regra. Retoma específica para obrigação/calendário: diploma publicado,artigos e vigência. Sem nova pesquisa genérica ou substituição das fontes aceites;art66 e cálculo simulado corrente permanecem no recorte explícito. Model39 oficialAT identificaPEC,mas não foi inferido transporte automáticoM20/M22: https://edeclaracao.at.gov.mz/formularios/irpc/view/formulario_irpc_m39.aspx .
### 27/10/2026 — Reutilização executável: crédito internacional corrente em QA
CIRPC65(1–2), Lei34/2007, exemplarBR52, PDF18/p768-(72), e ordem face aoPEC em66/RIRPC21 já aceites: usados no menor entre imposto estrangeiro efectivamente pago, fracção nacional documentada e limiteCDT aplicável, antes doPEC e até à colecta. Conferência da página existente para aplicação da fonte, sem nova exigência de autenticação. Original preservado, sem activação por importação/publicação. Afracção nacional eCDT do caso continuam documentadas pelo utilizador; aQA não estabelece correspondências oficiais de convenções.65(3), transportes, créditos económicos/CBF e obrigaçãoPEC continuam separados. Ver recibo `irpc-l8-international-credit-qa-20261027.json`; não instalado.
### 27/10/2026 — Crédito internacional entregue
A implementaçãoQA documentada acima foi instalada em`838ad941`,sem alterar fontes ou concederCDT automaticamente. CIRPC65(1–2)/66/RIRPC21 reutilizados no recorte demonstrado;65(3) e transportePEC continuam separados. Ver `irpc-l8-international-credit-delivery-20261027.json`.
## 28/10/2026 — aplicação de65(3)/66 aos saldos anteriores
Reutilizados os31ficheiros do acervo, todos iguais por bytes a `cf4e0638`. Lei34/2007,BR52,PDF18/p768-(72),SHA256`cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e`: página conferida visualmente;65(3)cinco exercícios seguintes,66(1–2)três paraPEC,sem reembolso. Referência à regra/apuramento aplicáveis na origem é correspondência de período, não nova validação de autenticidade da fonte. Leitura remota do URL arquivado falhou por timeout; usado o exemplar oficial exacto já aceite. Nenhum original alterado,scan declarado ou novo cálculo activado por publicação. Recorte:origens anuais ordinárias documentadas,mesmo sujeito,fecho2026/MZN;sem situações transitórias/especiais presumidas. Recibo `irpc-l8-carry-qa-20261028.json`.
## 28/10/2026 — crédito económico64 e distinção de40/65
Inventário anterior reutilizado:31ficheiros do acervo byte a byte iguais a6ededb59. Sem novo original. Lei34/2007BR52,SHA256`cdbef875ad7ccc1517b12faf5de0e893a70ed2ed81e33913cd6dc4a674474e6e`,PDF18/p768-(72),64(1–2),ePDF15/p768-(69),53(1)a,conferidos visualmente.40(1):Lei20/2009,exemplarAT19/2009,PDF4/p272-(16),redacção20%/dois anos e condições próprias,substitui a redacção original25%. Listas dasLeis4/2012 e19/2013 conferidas;cadeias20/2022 e12/2025 já aceites reutilizadas nos seus âmbitos. Decreto9/2008,RIRPC21(2/5),PDF6/p121:económico,internacional,benefícios,PEC,até à colecta,sem reembolso. Qualificação do caso,inclusão/acréscimo e quota proporcional documentados;sem automatizar a exclusão40 ou alterarL6por presunção. Sem nova exigência de autenticidade de fonte,scan ou publicação/importação. Pesquisa dirigida não substituiu os exemplares oficiais arquivados. Recibo:`irpc-l8-economic-qa-20261028.json`.
@@ -0,0 +1,131 @@
{
"date": "2026-10-28",
"status": "QA_corrected_and_verified_not_installed",
"installed_baseline": "6e8de43ae7fec29b0766d95e209a8cb8baf0d88c",
"user_case": "Agronegócio / Maputo Província",
"reproduction": {
"QA_public_agribusiness": 37,
"Maputo_corridor_public_opportunities": 5,
"province_results_before": 0,
"province_results_after": 5
},
"cause": "The provincial catalogue ignored the corridor context already approved by Tempo; no records were deleted.",
"reused_decision": [
"config/investment_corridors.php",
"docs/investmoz/unification/corridor-adaptive-context-20261023.json"
],
"correction": [
"Reuse approved corridor province context only at province level, with the accepted source hash and existing public publication decisions",
"Do not override an explicit primary/additional territory or infer district/post/coordinates",
"Display available province,district,administrative post,locality directly in results",
"Show both approved Maputo units as contextual coverage, not as two separate opportunities",
"Keep catalogue,API,corridor view and unlocated map list consistent",
"One action returns from district to whole province; no requirement to select every level"
],
"QA": {
"tests": 6,
"assertions": 617,
"failures": 0,
"database": "proactive_investment_20261027_test",
"port": 55441,
"transactions_rolled_back": true,
"types": "passed",
"build": "passed",
"PHP_syntax": "passed"
},
"preserved": [
"Installed menus and accepted supply proofs",
"Originals,source data,territory IDs,publication states,permissions,private lists and histories",
"L8 unchanged,partial"
],
"limitations": [
"No active installation in this report",
"Real authenticated visual conference remains pending;last connector error The browser access host is unavailable",
"This fixes the shared investment catalogue and corridor view;it is not proof that every menu in the portal has been audited",
"Provincial corridor coverage is not a documented district site;unknown levels stay unknown"
],
"existing_requirements": [
"V2-07",
"V2-10"
],
"restriction_origins": {
"territorial_behaviour": "Tempo current request",
"corridor_coverage": "Tempo express decision,23/10/2026",
"no_new_publication_or_roles": "existing approved scope",
"UI_summary_and_province_shortcut": "implementation choice"
},
"scope": "national;shared investment catalogue and similar location entry points",
"national_verification": {
"provincial_units": 11,
"approved_corridors": 6,
"sectors_for_descendant_fixtures": 2,
"province_and_legacy_location_entry_points": true,
"district_containment": true,
"unrelated_provinces_excluded": true,
"test_data": "synthetic fixtures rolled back;accepted published source reused"
},
"selector_delta": {
"Tempo_request": "Dropdown belongs to Pesquisar província;remove separate Seleccione control",
"scope": [
"ProvinceSelect",
"TerritoryLevel:province,district,administrative post,locality"
],
"behaviour": [
"One combobox input opens the list and searches the existing endpoint",
"Explicit choice commits the existing option;typing or Escape does not clear saved values",
"Arrow keys and Enter select;clear is explicit;dependent levels remain disabled without parent",
"Paging retained inside dropdown;loading cannot commit a stale option"
],
"QA": {
"event_state_contract_tests": 4,
"failures": 0,
"types": "passed",
"build": "passed",
"limit": "Controlled React component contract;not browser visual/session evidence"
},
"publication_data_permissions_and_territory_rules": "unchanged",
"national_province_evidence": "6 tests/617 assertions reused;unchanged PHP runtime",
"status": "QA_not_installed"
},
"catalogue_result_presentation": {
"Tempo_request": "Province+sector must show matching opportunities,not educational text and unfiltered national sector shortcuts",
"public_read_snapshot": {
"filtered": {
"total": 0,
"province": "Cabo Delgado",
"sector": "turismo",
"province_id": "059b02ca-7095-577a-8705-4d4c46896747"
},
"active_writes": 0,
"sector_only": {
"total": 16,
"declared_provinces": [
"Inhambane"
],
"sector": "turismo"
},
"method": "anonymous public API read; no authenticated session claimed",
"meaning": "public catalogue snapshot;not evidence of absence of market supply",
"checked_at": "2026-10-28T19:03:36.8285860Z",
"target": "https://teste-investidor.tempo.co.mz/"
},
"UI_changes": [
"Heading identifies applied sector and territorial path",
"Educational cards and their broad sector opportunity button removed from catalogue results",
"Guide titles remain available only inside closed optional support details",
"Removing location is explicitly labelled as searching other provinces",
"Empty state is limited to published records in the consulted catalogue;not absence of market supply"
],
"QA": {
"new_component_SSR_tests": 2,
"failures": 0,
"types": "passed",
"build": "passed",
"accepted_national_and_selector_proofs": "reused;backend and selector unchanged"
},
"status": "QA_not_installed",
"authenticated_visual_validation": "pending;public API read does not prove real session behaviour",
"active_writes": 0,
"new_publications": 0
}
}
@@ -0,0 +1,147 @@
{
"activity": "ACT-20261029-01",
"status": "partial_increment_installed_preservation_verified_visual_pending",
"baseline": "332c16ebb555e8d6b244fa519bc777d89c1a8b8f",
"branch": "codex/competitiveness-sequential-20261029",
"target": "https://teste-investidor.tempo.co.mz/",
"checks": {
"diff": "passed",
"types": "passed",
"diagnostics_C132": "passed_in_original_workspace",
"frontend_tests": 4,
"isolated_qa_build": "passed"
},
"active_database_writes": 0,
"schema_changes": false,
"permission_changes": false,
"coverage": [
"five qualitative forces in existing cluster management",
"sector and regional scope",
"evidence, source, period, rationale, limitations and investment opportunity",
"explicit uncertainty",
"JSON download and confirmed same-cluster recovery"
],
"remaining": [
"authenticated visual verification",
"server persistence and canonical territorial scope",
"factual sector and regional data",
"public consultation"
],
"source_sha256": {
"resources/js/lib/cluster-competitiveness.ts": "1ed496f51f020da9f0c02ab0aa324b58a9dd17fa34a10d8c1a90d9915800fecb",
"resources/js/pages/structures/competitiveness.tsx": "55338c144cefae4f91cef765b8e5e8b28ceb6c76375d46943c3c3430aeddc68e",
"resources/js/pages/structures/editor.tsx": "080a90ab8607f05ec493e560ed8280a6f7eec743ed1954f0057a0ce6caa09208",
"tests/frontend/cluster-competitiveness.test.mjs": "f48a9ed872f49ad900424daab4689cb0eeeb31cc93ebf1c608408c0a8c2b435b"
},
"candidate": "23ecccfaad1053f55bf0591fd242cb5fa3406c38",
"backup": {
"stage": "/var/backups/investmoz-competitiveness-delivery-20261029/backup",
"created_at": "2026-10-29T11:04:46Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 176,
"files_verified": 369,
"dump_sha256": "7979fa2b3fe1f69e62aad9fadf60a60d7b068e198cdc291a8fc79d409d67c7ca",
"files_sha256": "8e0022b73cd0074e36f8efef0b7c803a386e24e6e4cf85f567757ff67e311369",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 176,
"container_network": "none",
"database": "competitiveness_delivery_20261029_test",
"port": 55441,
"source_dump_sha256": "7979fa2b3fe1f69e62aad9fadf60a60d7b068e198cdc291a8fc79d409d67c7ca",
"active_database_writes": 0
},
"preservation": {
"navigation_asset_and_shared_props_verified": true,
"at": "2026-10-29T11:10:44.303271+00:00",
"served_commit": "23ecccfaad1053f55bf0591fd242cb5fa3406c38",
"backup_dump_sha256": "7979fa2b3fe1f69e62aad9fadf60a60d7b068e198cdc291a8fc79d409d67c7ca",
"prior_public_tables_checked": 176,
"prior_domain_rows_preserved": true,
"new_migration_registry_rows": 0,
"operational_delta": {
"cache": {
"before": {
"rows": 119,
"checksum": "5f3c36637fbf1e9dc4700066d4c45530"
},
"after": {
"rows": 119,
"checksum": "b1c9949cfacc34906c406e27e95cbd9b"
}
},
"sessions": {
"before": {
"rows": 37,
"checksum": "b0e409c4c77c58b48252d9847c3c61ef"
},
"after": {
"rows": 38,
"checksum": "f4d94db55488bc0bcf6f727f222473c1"
}
}
},
"persistent_files_and_configuration_identical": 369,
"private_catalogue": {
"observations": 361464,
"distinct_administrative_observations": 214299,
"preserved_repetitions": 147165,
"unmapped_territory": 205608
},
"preservation_identity": "postgres, matching backup reader; no actor impersonation",
"anonymous_query_status": 401,
"public_revision_confirmed": true,
"actual_team_UI_journey": "pending authenticated browser conference;accepted QA is not repeated",
"unique_company_count": null,
"publication": false,
"national_coverage": "partial",
"investment_conclusion": "hypothesis,not proved demand or viability",
"L8": "unchanged,partial"
},
"installed_code": {
"candidate": "23ecccfaad1053f55bf0591fd242cb5fa3406c38",
"source_files_verified": 4,
"diagnostics_C132": {
"result": "passed",
"case": "C132",
"source_explicit_constant_OFF": true,
"effective_configuration_OFF": true,
"configuration_cached": false,
"database_connections_used": 0,
"active_writes": 0
},
"active_writes": 0
},
"pipeline": {
"unit_tests": 59,
"frontend_failures": 0,
"schema_assertions": 3106,
"checks": [
"\u001b[30;42mOK (1 test, 3106 assertions)\u001b[0m",
"✓ built in 34.50s",
"\u001b[30;42mOK (59 tests, 320 assertions)\u001b[0m",
"# tests 1180",
"# pass 1180",
"# fail 0"
],
"frontend_tests": 1180,
"result": {
"status": "installed",
"commit": "23ecccfaad1053f55bf0591fd242cb5fa3406c38",
"release": "/var/www/investmoz-homologacao/releases/23ecccfaad1053f55bf0591fd242cb5fa3406c38-0e0b8a65",
"previous_release": "/var/www/investmoz-homologacao/releases/332c16ebb555e8d6b244fa519bc777d89c1a8b8f-f0dfc218",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"23ecccfaad1053f55bf0591fd242cb5fa3406c38"
],
"finished_at": "2026-10-29T11:10:02.884033+00:00"
},
"unit_assertions": 320
}
}
@@ -0,0 +1,198 @@
{
"date": "2026-10-28",
"status": "not_demonstrated",
"audited_use": "companies,hotels and restaurants lists as private supply-comparison basis inside proactive journey",
"Tempo_decision": "know existing supply by location/sector/activity;compare ideas for competition,complementarity and possible partners;identify evidenced needs and prepare opportunities;no absence-of-offer inference from absent records;no automatic public directory",
"installed_runtime": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"scope": {
"destination": "teste-investidor.tempo.co.mz",
"database": "teste_investidor",
"catalogue_tables": 198,
"schemas": {
"public": 174,
"skills_edu": 24
},
"identity": "postgres owner,read-only transactions;technical metadata inventory,not an authenticated team UI proof",
"read_only": true,
"RLS_note": "No permissions changed or RLS bypassed for a team operation. Owner inventory is explicitly separated from application/user visibility. Differences from earlier investemoz/QA environments are not declared deletion/loss.",
"source_matching_limit": "plaintext metadata/reference matches only; absence does not establish missing encrypted or external records or absence of real market supply"
},
"source_inventory": {
"accessible_files_in_two_source_roots": 13,
"all_inventoried_before_selection": true,
"known_originals": [
{
"alias": "companies.xlsx",
"file_name": "EMPRESAS_LIST 2014-2022.xlsx",
"sha256": "1ba4c4114b16b407e7746712d00d4f681246bbbc1b42351e96a31f7129acad30",
"bytes": 26586267,
"unchanged": true,
"sheet_names": [
"EMPRESAS 2014-2022"
],
"prior_nonempty_XML_rows": 148557,
"row_count_is_not_unique_business_count": true,
"period": "2014–2022 stated in file name"
},
{
"alias": "licensed.xlsx",
"file_name": "Empresas Licenciadas.xlsx",
"sha256": "1b5087b464e39e88c42def39655c2391aaaf684b4c832d6a77ff274b98889f00",
"bytes": 34940776,
"unchanged": true,
"sheet_names": [
"EMPRESAS"
],
"prior_nonempty_XML_rows": 212632,
"row_count_is_not_unique_business_count": true,
"period": "varies by record;reference date not inferred from file modification time"
},
{
"alias": "tourism.xlsx",
"file_name": "CADASTRO DE EMPREENDIMENTOS TURISTICOS 3, 4 E 5 ESTRELAS 30.10.24 18,00h.xlsx",
"sha256": "f02e086ed4973ef17234aa6cc54b98fbb7a6952ffb16ec4dc4f7d0c72af6400c",
"bytes": 73955,
"unchanged": true,
"sheet_names": [
"1. Alojamento",
"Folha1"
],
"prior_nonempty_XML_rows": 460,
"row_count_is_not_unique_business_count": true,
"period": "30/10/2024 stated in file name;current operating status unconfirmed"
},
{
"alias": "cae.xlsx",
"file_name": "CAE eBAU.xlsx",
"sha256": "83b4f1200988e99834c2ae3915346fbf237d128308554b67b5a080d4956bf506",
"bytes": 75018,
"unchanged": true,
"sheet_names": [
"CAE"
],
"prior_nonempty_XML_rows": null,
"row_count_is_not_unique_business_count": true,
"period": "code labels supplied;version/application require source correspondence"
}
],
"duplicates_detected_by_bytes": [],
"private_fields_exported": false,
"tourism_scope": "workbook labelled accommodation;not treated as an exhaustive restaurant or hotel market census",
"restaurant_scope": "separate restaurant dataset not identified in these two source roots;restaurant activities may exist within company registers;not a finding of absence in the market"
},
"findings": {
"originals_available_and_unchanged": true,
"loading_into_portal": "not demonstrated in audited destination;no exact known source hash matches among368persistent files;no exact known source references in audited metadata",
"normalisation_and_classification": "source company workbooks have province/district/CAE and a supplied CAE code table;mapping of their entities to portal location/sector/activity not demonstrated",
"journey_linkage": "not demonstrated;installed ProactiveInvestment.options only returns document links/groups/project-cluster-corridor-park-chain references;no list-backed offer query or company/hotel/restaurant relation consumer in that method",
"manual_evidence_path": "already delivered;acceptance preserved. Manual source/locator/period/coverage/observed_supply fields do not establish imported source records or catalogue-backed comparison.",
"active_counts_context_only": {
"existing_businesses": 0,
"organizations": 1,
"documents": 60,
"economic_activities": 11,
"portal_resources": 59
},
"no_market_absence_inference": true,
"no_loss_claim": true
},
"demonstration_attempt": {
"kind": "read-only trace and canonical-location check,not a browser or team end-to-end proof",
"location": {
"name": "Gurué",
"id": "87a8ba3d-b152-560c-a566-7db4531ad536",
"type": "district"
},
"steps": [
{
"step": 1,
"action": "choose location",
"observed": "canonical Gurué district exists;previous location-selection path acceptance reused;no new manual UI proof claimed",
"status": "location_reference_available"
},
{
"step": 2,
"action": "consult existing supply from these lists",
"observed": "no wired list-backed offer consumer or demonstrated imported/classified enterprise records for this location",
"status": "not_demonstrated",
"blocks_remaining_demo": true
},
{
"step": 3,
"action": "compare with an idea for competitors/complements/partners",
"observed": "manual analysis fields exist;no reproducible offer-result set/source-row linkage demonstrated",
"status": "not_demonstrated"
},
{
"step": 4,
"action": "identify a need with dates and uncertainties",
"observed": "cannot infer unmet need from missing catalogue records;hypothesis and unknown coverage remain explicit",
"status": "not_demonstrated_for_this_list_backed_flow"
},
{
"step": 5,
"action": "prepare opportunity retaining sources/period/coverage/uncertainty",
"observed": "existing private preparation mechanism preserved;no new opportunity created to simulate completion of missing steps2–4",
"status": "not_demonstrated_for_this_list_backed_flow"
}
],
"end_to_end_criterion_passed": false
},
"preservation": {
"proactive_delivery_preserved": true,
"previous_manual_real_source_QA_pilots_preserved": true,
"Songo_Gurue": "existing private QA hypotheses unchanged;their manual spreadsheet reading does not establish list integration",
"L8_delivery_569a1cd7": "unchanged,remains partial",
"application_code_changes": 0,
"new_tests": 0,
"new_imports_or_normalisation": 0,
"new_opportunities": 0,
"new_publication": 0,
"active_writes": 0,
"new_roles_or_grants": 0,
"no_new_matrix_or_backlog": true
},
"next_concrete_work": "Establish traceable private source batches/rows and mappings using existing data/inventory mechanisms;expose authorised location-sector-activity supply query in existing proactive editor;link selected supply records and source coverage to comparison/need/opportunity,then demonstrate save/recover end-to-end in isolated QA. Do not publish a directory or treat unknown coverage as zero supply. Analytical supply records must not require a user organisation,a business-for-sale listing,a real promoter or a confirmed commercial commitment just to be consulted internally.",
"matrix_ids": [
"RF-CLU-003",
"MASTER-471012ab-0010",
"M2-d0c06a75-0147",
"M2-d0c06a75-0151",
"MASTER-1f0a4cde-0002"
],
"evidence": {
"active_source_code_verified": [
{
"file": "app/Services/ProactiveInvestment.php",
"sha256": "957dc455f0153d615577fe182b51969e6d253b33e24ac78547fcccd06215a51c",
"installed_matches_Git": true
},
{
"file": "app/Services/OpportunityManagement.php",
"sha256": "ebe5535d94ad3c7d607bd70f2ff5dce75d810ab26924ac55ac08f036fd5eee33",
"installed_matches_Git": true
},
{
"file": "resources/js/components/proactive-investment.tsx",
"sha256": "9c6acadef8d29732efcfcc4bcdfb28ce3be4f19127a626c1e85c6df98fd91ecf",
"installed_matches_Git": true
},
{
"file": "app/Services/InvestorContext.php",
"sha256": "54be88361214d896640c808d8fe29f93c552a69870d6bb3ecce4de458a51ed48",
"installed_matches_Git": true
},
{
"file": "routes/web.php",
"sha256": "95930c76977d446b74a422acc4b60869ff6bae5d4567c21cc644484c5f09cbda",
"installed_matches_Git": true
}
],
"local_artifacts": {
"accessible-source-inventory.json": "2815b778b0a4d1d601fd85c46c9b5c3a19bd7adcdb46cf86f0f28f45717b2afa",
"accepted-source-check.json": "06b814ee4e322fb78f081788b061936a324b3edcf6d56a80a82eeabdf2906ec6",
"active-audit.json": "06e3cfba8c180e93a86a9dc5db86403220e7c5406229ef166b4e604cc2d8e71c",
"consumer-trace.json": "df1fa6fa8dc3c18485b6e83a4f6a688f2d5a2124e9a8f5c75a944ec859e420f3"
}
}
}
@@ -0,0 +1,213 @@
{
"date": "2026-10-28",
"status": "installed_delta_verified_authenticated_visual_conference_pending",
"served_commit": "789fffd098fa222c85e1283de07f23ee6f42bd04",
"previous_runtime": "6e8de43ae7fec29b0766d95e209a8cb8baf0d88c",
"target": "https://teste-investidor.tempo.co.mz/",
"normal_Git_fast_forward": true,
"force_used": false,
"existing_pipeline_unchanged": true,
"scope": [
"National provincial catalogue/corridor coverage and territorial summaries",
"One searchable territory control at all four levels",
"Filtered catalogue results separate from optional educational support",
"Adaptive opportunity preparation groups and save-before-resource navigation",
"Readable promoter request with explicit searchable proof selection",
"Immediate scoped zone search,total counts and complete pagination",
"My investments next action and expandable stages/source details",
"Direct entries to existing fillable investment/Terra-DUAT preparation;support form separately labelled",
"Sector registration CTA uses effective account creation capability;no new permissions",
"Readable known document topic/category/language labels"
],
"backup": {
"stage": "/var/backups/investmoz-catalogue-territory-delivery-20261028/backup",
"created_at": "2026-10-28T19:25:43Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 176,
"files_verified": 369,
"dump_sha256": "597f73cda14dd47be440136f2e2242d8d7a4e4f3d5d69cabcd44f8fde58c136d",
"files_sha256": "7fb639d8351e34ce220c5424c722c223512d139c82b7ff0a1a447136c62041ef",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 176,
"container_network": "none",
"database": "catalogue_territory_delivery_20261028_test",
"port": 55441,
"source_dump_sha256": "597f73cda14dd47be440136f2e2242d8d7a4e4f3d5d69cabcd44f8fde58c136d",
"active_database_writes": 0
},
"failed_candidate_preserved": {
"commit": "502e3ec4",
"reason": "Corridor explorer Unit mock missing the new public location presentation;unnecessary non-source relation read",
"active_runtime_preserved": true,
"resolution": "Short-circuit irrelevant source before relation access;represent new dependency and retain old assertions;Unit1/13 passed"
},
"pipeline": {
"reports": [
{
"status": "already_installed",
"commit": "789fffd098fa222c85e1283de07f23ee6f42bd04",
"requested_commits": [
"789fffd098fa222c85e1283de07f23ee6f42bd04"
],
"finished_at": "2026-10-28T19:39:46.948539+00:00"
},
{
"status": "installed",
"commit": "789fffd098fa222c85e1283de07f23ee6f42bd04",
"release": "/var/www/investmoz-homologacao/releases/789fffd098fa222c85e1283de07f23ee6f42bd04-29ab1f0d",
"previous_release": "/var/www/investmoz-homologacao/releases/6e8de43ae7fec29b0766d95e209a8cb8baf0d88c-877dabd3",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"789fffd098fa222c85e1283de07f23ee6f42bd04"
],
"finished_at": "2026-10-28T19:39:45.796038+00:00"
}
],
"build_logs": [
{
"file": "/var/lib/investmoz-deploy/logs/1793216167091522421.log",
"sha256": "af1c3db072b2b354cfef13538a8cb69d07a37ec4b1ddef63d8d68e77ab5d7196",
"summaries": [
"\u001b[30;42mOK (1 test, 3106 assertions)\u001b[0m",
"✓ built in 32.16s",
"\u001b[30;42mOK (59 tests, 320 assertions)\u001b[0m",
"# tests 1171",
"# pass 1171",
"# fail 0"
]
}
]
},
"installed_preservation_delta": {
"navigation_asset_and_shared_props_verified": true,
"at": "2026-10-28T19:40:32.494557+00:00",
"served_commit": "789fffd098fa222c85e1283de07f23ee6f42bd04",
"backup_dump_sha256": "597f73cda14dd47be440136f2e2242d8d7a4e4f3d5d69cabcd44f8fde58c136d",
"prior_public_tables_checked": 176,
"prior_domain_rows_preserved": true,
"new_migration_registry_rows": 0,
"operational_delta": {
"cache": {
"before": {
"rows": 111,
"checksum": "1912b955cff09094395336c2137d5ce5"
},
"after": {
"rows": 111,
"checksum": "c158d3e941f896ca3997dfe02850d427"
}
},
"sessions": {
"before": {
"rows": 9,
"checksum": "870b1c20d207a9db376633fc5514a3ed"
},
"after": {
"rows": 8,
"checksum": "f7737eac7d85ed501fb339d7faabbd8e"
}
}
},
"persistent_files_and_configuration_identical": 369,
"private_catalogue": {
"observations": 361464,
"distinct_administrative_observations": 214299,
"preserved_repetitions": 147165,
"unmapped_territory": 205608
},
"RLS_without_actor_rows": 0,
"anonymous_query_status": 401,
"public_revision_confirmed": true,
"actual_team_UI_journey": "pending authenticated browser conference;accepted QA is not repeated",
"unique_company_count": null,
"publication": false,
"national_coverage": "partial",
"investment_conclusion": "hypothesis,not proved demand or viability",
"L8": "unchanged,partial"
},
"public_installed_delta": {
"served_commit": "789fffd098fa222c85e1283de07f23ee6f42bd04",
"public_Maputo_agribusiness_total": 5,
"public_Tourism_Cabo_Delgado_total": 0,
"Cabo_Delgado_zones_total": 2,
"all_zones_total": 8,
"all_zones_pages": 1,
"filtered_scope_and_sector_confirmed": true,
"installed_UI_assets_verified": [
"Preencher formulários e preparar documentos",
"Pesquisar nos meus ficheiros",
"O meu acesso e administração",
"Consultar situação, documentos e fundamentos"
],
"public_Tourism_HTTP": 200,
"guest_Tourism_registration_action": "/perfil/promotor",
"guest_Tourism_registration_label": "Pedir acesso para cadastrar oportunidades",
"real_authenticated_Tourism_case": "pending;anonymous200 is not the real session",
"pipeline_reports": [
{
"status": "already_installed",
"commit": "789fffd098fa222c85e1283de07f23ee6f42bd04",
"requested_commits": [
"789fffd098fa222c85e1283de07f23ee6f42bd04"
],
"finished_at": "2026-10-28T19:39:46.948539+00:00"
},
{
"status": "installed",
"commit": "789fffd098fa222c85e1283de07f23ee6f42bd04",
"release": "/var/www/investmoz-homologacao/releases/789fffd098fa222c85e1283de07f23ee6f42bd04-29ab1f0d",
"previous_release": "/var/www/investmoz-homologacao/releases/6e8de43ae7fec29b0766d95e209a8cb8baf0d88c-877dabd3",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"789fffd098fa222c85e1283de07f23ee6f42bd04"
],
"finished_at": "2026-10-28T19:39:45.796038+00:00"
}
],
"no_schema_or_publication_changes": true,
"source_files_preserved": true
},
"accepted_QA_reused": {
"national_tests": 6,
"national_assertions": 617,
"selector_tests": 4,
"guide_tests": 2,
"usability_frontend_tests": 9,
"usability_feature_tests": 3,
"usability_feature_assertions": 14,
"unit_regression_tests": 1,
"unit_regression_assertions": 13,
"types_build_PHP": "passed"
},
"remaining": [
"Actual authenticated visual conference of responsive menus,free filling navigation,saved resource round-trip and Gurué same-dossier journey",
"Tempo clarified Tourism denial followed a button;exact original button unavailable. Concrete creation CTA mismatch corrected and tested;real session still needs confirmation",
"Clarify the particular official fiscal form sought;investment preparation adaptations are not a complete implementation of all IVA/IRPC official forms"
],
"preserved": {
"old_release": "retained for existing rollback mechanism",
"domain_data_permissions_publications": "unchanged",
"persistent_files_and_configuration": 369,
"private_supply_observations": 361464,
"Gurue_observations": 435,
"counts_are_not_unique_companies": true,
"lists": "internal",
"national_coverage": "partial",
"investment_comparison": "hypothesis,not demand or viability proof",
"L8": "partial,unchanged"
},
"proof_limits": "HTTP/API/asset checks do not prove the authenticated UI;prior QA/manual reports remain historical candidate evidence,not installation state",
"source_QA_reports": [
"catalogue-province-coverage-qa-20261028.json",
"investor-usability-qa-20261028.json"
],
"authorisation": "Tempo requested corrections,authorised normal delivery,and authenticated the existing SSH mechanism;no repeated organisational approval required"
}
@@ -0,0 +1,73 @@
{
"date": "2026-10-28",
"status": "QA_implemented_and_delta_verified_not_installed",
"runtime_baseline": "6e8de43ae7fec29b0766d95e209a8cb8baf0d88c",
"prepared_catalogue_parent": "54d1b2a5",
"Tempo_requests": [
"Readable investor work menu and adaptive filling flow",
"ZEE/ZFI/park results must match explicit territory selection;all means the available set",
"Promoter request must use readable representation/modality labels and usable evidence selection",
"Investigate authenticated denial of public Tourism sector",
"Simplify My investments and present useful next actions",
"Expose fillable forms rather than a guide or legislative catalogue"
],
"implemented": {
"work_menu": "Investor actions remain primary;existing access/audit/profile setup destinations move into optional administration details;no permission change",
"filling": "Schema fields grouped adaptively by task;free navigation,all fields stay mounted,unknown future keys retained;server missing paths and errors point to groups;not mandatory sequential forms",
"preservation": "Deliberate values retained between groups;save uses existing endpoints and ETags;resource navigation saves first and returns to the same opportunity/group;only unique promoter context is auto-selected",
"profile_request": "Portuguese visible representation/modality labels;owned clean-file criteria unchanged;file search and explicit selected proofs replace the unbounded list;availability does not prove evidentiary suitability",
"zones": "Territory and other filter changes apply search;old records hidden while loading/error;all and filtered totals plus pagination explicit;existing public visibility preserved;validated legal coverage includes its child area,while influence is not treated as a site",
"my_investments": "Next action remains prominent;other phases/stages expandable;source/code history and internal follow-up remain consultable rather than filling the main page",
"forms": "Direct entries to existing private investment preparation fields and Terra/DUAT;support request separately labelled;originals/guides optional;no law is converted into a form or executable calculation",
"document_taxonomy": "Known topic/category/language codes have Portuguese display labels;original query values preserved"
},
"QA": {
"frontend_contract_and_SSR_tests": 9,
"frontend_failures": 0,
"isolated_feature_tests": 3,
"feature_assertions": 14,
"feature_failures": 0,
"database": "proactive_investment_20261027_test",
"port": 55441,
"transactions_rolled_back": true,
"types": "passed",
"build": "passed",
"PHP_syntax": "passed",
"accepted_national_selector_and_catalogue_proofs": "reused",
"unit_regression_tests": 1,
"unit_regression_assertions": 13
},
"Tourism_incident": {
"reported_by_Tempo": "authenticated session saw access denial at /sectores/turismo",
"anonymous_live_HTTP": 200,
"isolated_guest_and_no_promoter_account_HTTP": 200,
"exact_real_session_cause": "not demonstrated;do not infer missing role or claim correction",
"private_permissions_changed": false,
"next": "Confer the actual authenticated session and related logs;public read is not real-session proof",
"reported_action": "Tempo clarified denial followed a button click;exact label could not be recalled",
"bounded_code_finding": "Sector registration action depended on module availability rather than effective account creation capability",
"QA_correction": "Reuse ContentManagement effective create destination;otherwise explicitly link to existing promoter request with a readable label;public consultation and idea preparation remain separate",
"real_session_reconference": "pending;the exact original button is not demonstrated"
},
"limits": [
"Not installed in this QA report",
"SSR and controlled event tests are not browser keyboard/touch/layout evidence",
"Existing form adaptations are exposed;this does not implement every official form in the document collection",
"No new roles,publications,source edits,schema changes or fiscal activation",
"L8 remains partial"
],
"restriction_origins": {
"UX_and_selected_scope": "Tempo current express instructions",
"data_and_permissions_preservation": "permanent project instructions",
"grouping_and_collapsed_details": "implementation choice,not new organisational requirement",
"document_ownership_scan_and_existing_workflows": "prior contracts preserved"
},
"delivery_gate": {
"candidate": "502e3ec4",
"result": "failed before runtime switch;6e8de43a preserved",
"reason": "Unit mock did not represent new public location presentation;unnecessary relation query on non-source records",
"correction": "Short-circuit source applicability before reading relations;mock the new presentation dependency and retain prior identity/count assertions",
"unit_regression": "1 test/13 assertions passed",
"pipeline_guardrails": "unchanged;no schema migration or test-gate weakening"
}
}
@@ -0,0 +1,161 @@
{
"date": "2026-10-28",
"status": "installed_technical_navigation_delta_verified_authenticated_visual_conference_pending",
"served_commit": "6e8de43ae7fec29b0766d95e209a8cb8baf0d88c",
"previous_runtime": "6d1476936920dc5715d4493b1f8b22a3d51935f4",
"target": "https://teste-investidor.tempo.co.mz/",
"authorisation": "Tempo approved the QA menu proposal and authenticated the existing SSH delivery mechanism",
"normal_git_fast_forward": true,
"force_used": false,
"backup": {
"stage": "/var/backups/investmoz-navigation-delivery-20261028/backup",
"created_at": "2026-10-28T18:18:14Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 176,
"files_verified": 369,
"dump_sha256": "748539aa92cf4a0e22698a3b7651faa7a4452db2517ddb811a924b761ea9dce5",
"files_sha256": "946dd8d33903332557639103b8f5ad5bca955fd3ec79f112e3649128fea8c499",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 176,
"container_network": "none",
"database": "navigation_delivery_20261028_test",
"port": 55441,
"source_dump_sha256": "748539aa92cf4a0e22698a3b7651faa7a4452db2517ddb811a924b761ea9dce5",
"active_database_writes": 0
},
"guard": {
"ready_for_normal_git_delivery": true,
"restore_verified": true,
"tables_verified": 176,
"pipeline_and_schema_contract_unchanged": true,
"candidate": "6e8de43ae7fec29b0766d95e209a8cb8baf0d88c"
},
"installed_delta": {
"navigation_asset_and_shared_props_verified": true,
"at": "2026-10-28T18:23:39.508498+00:00",
"served_commit": "6e8de43ae7fec29b0766d95e209a8cb8baf0d88c",
"backup_dump_sha256": "748539aa92cf4a0e22698a3b7651faa7a4452db2517ddb811a924b761ea9dce5",
"prior_public_tables_checked": 176,
"prior_domain_rows_preserved": true,
"new_migration_registry_rows": 0,
"operational_delta": {
"cache": {
"before": {
"rows": 111,
"checksum": "650ce50f1aa1af7e7025bcbaa7bcd6ba"
},
"after": {
"rows": 111,
"checksum": "ea8070b2c9a513485bfb27462e379703"
}
},
"sessions": {
"before": {
"rows": 4,
"checksum": "f0d8b267cdf55c86ba8223d9e1ff3c6a"
},
"after": {
"rows": 5,
"checksum": "99071034149a154c7e17acc47e058dae"
}
}
},
"persistent_files_and_configuration_identical": 369,
"private_catalogue": {
"observations": 361464,
"distinct_administrative_observations": 214299,
"preserved_repetitions": 147165,
"unmapped_territory": 205608
},
"RLS_without_actor_rows": 0,
"anonymous_query_status": 401,
"public_revision_confirmed": true,
"actual_team_UI_journey": "pending authenticated browser conference;accepted QA is not repeated",
"unique_company_count": null,
"publication": false,
"national_coverage": "partial",
"investment_conclusion": "hypothesis,not proved demand or viability",
"L8": "unchanged,partial"
},
"existing_pipeline_receipt": {
"reports": [
{
"status": "already_installed",
"commit": "6e8de43ae7fec29b0766d95e209a8cb8baf0d88c",
"requested_commits": [
"6e8de43ae7fec29b0766d95e209a8cb8baf0d88c"
],
"finished_at": "2026-10-28T18:23:07.685587+00:00"
},
{
"status": "installed",
"commit": "6e8de43ae7fec29b0766d95e209a8cb8baf0d88c",
"release": "/var/www/investmoz-homologacao/releases/6e8de43ae7fec29b0766d95e209a8cb8baf0d88c-877dabd3",
"previous_release": "/var/www/investmoz-homologacao/releases/6d1476936920dc5715d4493b1f8b22a3d51935f4-c9ebfad4",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"6e8de43ae7fec29b0766d95e209a8cb8baf0d88c"
],
"finished_at": "2026-10-28T18:23:06.355940+00:00"
}
],
"build_log": "/var/lib/investmoz-deploy/logs/1793211570315386207.log",
"build_log_sha256": "7b1d78a066ed829cbdabc67549baf4835ab8f911b8c4b178be09539ed434ddde",
"summaries": [
"\u001b[30;42mOK (1 test, 3106 assertions)\u001b[0m",
"✓ built in 31.30s",
"\u001b[30;42mOK (59 tests, 317 assertions)\u001b[0m",
"# tests 1156",
"# pass 1156",
"# fail 0"
],
"last_lines": [
"ext-pcre 8.4.27 success ",
"ext-session 8.4.27 success ",
"ext-tokenizer 8.4.27 success ",
"php 8.4.27 success ",
"6e8de43ae7fec29b0766d95e209a8cb8baf0d88c",
"",
" INFO Broadcasting queue restart signal. ",
""
]
},
"accepted_QA_reused": {
"directed_tests": 16,
"types": "passed",
"build": "passed",
"PHP_syntax": "passed"
},
"UI_delta": [
"Área de trabalho visible in principal navigation; operational entries follow existing effective capabilities",
"Sidebar preserves every nested destination and territorial context instead of exposing only the first link",
"Existing opportunity analysis form can be opened directly without replacing saved analysis",
"Existing account, content, investment and follow-up destinations retained; no new roles or grants"
],
"remaining": [
"Authenticated visual conference on the actual account, including responsive layout and keyboard/touch",
"Confirm Gurué → offer consultation → idea comparison → save → recover in the same dossier; technical/QA proofs remain accepted"
],
"connector_last_known_error": "The browser access host is unavailable",
"limitations": {
"technical_delivery_is_not_visual_session_evidence": true,
"435_Gurue_observations_are_not_435_unique_companies": true,
"lists_remain_internal": true,
"national_coverage": "partial",
"absence_of_records": "insufficient information",
"comparison": "investment hypothesis; does not establish demand or viability",
"L8": "unchanged,partial"
},
"restriction_origins": {
"delivery": "explicit Tempo authorisation",
"preservation_and_restore": "permanent project instructions",
"grouping_and_presentation": "implementation choice within the approved QA proposal; no new business authority"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,230 @@
{
"date": "2026-10-28",
"status": "internal_supply_integration_demonstrated_in_isolated_QA_not_installed",
"baseline": "150bef4b897de8d0711c1e2bbeedbcaf5ee241d2b",
"baseline_runtime": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"branch": "codex/proactive-supply-qa-20261028",
"active_runtime_unchanged": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"accepted_inventory_reused": "existing-supply-lists-audit-20261028.json;13 accessible originals/variants inventoried before source selection;prior proactive acceptance and fiscal delivery preserved",
"sources": [
{
"alias": "companies.xlsx",
"name": "EMPRESAS_LIST 2014-2022.xlsx",
"sha256": "1ba4c4114b16b407e7746712d00d4f681246bbbc1b42351e96a31f7129acad30",
"bytes": 26586267,
"period": "2014–2022; data por registo quando disponível"
},
{
"alias": "licensed.xlsx",
"name": "Empresas Licenciadas.xlsx",
"sha256": "1b5087b464e39e88c42def39655c2391aaaf684b4c832d6a77ff274b98889f00",
"bytes": 34940776,
"period": "Data por registo; cobertura temporal global não determinada"
},
{
"alias": "tourism.xlsx",
"name": "CADASTRO DE EMPREENDIMENTOS TURISTICOS 3, 4 E 5 ESTRELAS 30.10.24 18,00h.xlsx",
"sha256": "f02e086ed4973ef17234aa6cc54b98fbb7a6952ffb16ec4dc4f7d0c72af6400c",
"bytes": 73955,
"period": "30/10/2024 (nome do exemplar); situação actual não confirmada"
},
{
"alias": "cae.xlsx",
"name": "CAE eBAU.xlsx",
"sha256": "83b4f1200988e99834c2ae3915346fbf237d128308554b67b5a080d4956bf506",
"bytes": 75018,
"period": "Versão não indicada"
}
],
"source_rows": {
"companies.xlsx": 148556,
"licensed.xlsx": 212631,
"tourism.xlsx": 277
},
"catalog": {
"records": 361464,
"repeated_projection": 147165,
"identity_conflicts": 113880,
"activity_unclassified": 82864,
"territory_unmapped": 205608,
"province_only": 336,
"unnamed_observations": 18423
},
"duplicate_meaning": "same projected administrative fields including entity identifier, licence/process,date,place,activity,name;all source sightings retained,not a unique-company count or byte-identical-file claim",
"classification": {
"activity_and_sector": "supplied CAE labels and SELF_ID hierarchy;no invented correspondence to twelve portal navigation sectors",
"territory": "unique normalized province+district,otherwise exact unique canonical subordinate name within province;Maputo explicitly distinct from Maputo Cidade;no fuzzy matching;raw source labels retained",
"identity": "valid-shaped NUIT only hashed as a possible entity key;different names flagged,not silently merged;unidentified rows remain distinct",
"dates": "original date strings and Excel serials retained verbatim;file modification time not a reference date",
"tourism": "277 establishment observations across two differently structured sheets;explicit province section preserved;missing district remains unknown;not an exhaustive hotels/restaurants census"
},
"private_import": {
"preview": true,
"original_hashes_checked": true,
"malware": "Microsoft Defender custom scan on same-hash private copies,exit0,no threats detected,2026-10-28",
"idempotency": {
"before": 343041,
"after": 343041,
"sha256": "6a9c820c73a8c535ed3cdfc03db0311edf0300f1f97ade75f0fce3d3c84a02e1",
"publication": false,
"database": "proactive_investment_20261027_test",
"port": 55441
},
"tables": [
"proactive_supply_sources",
"proactive_supply_observations"
],
"RLS": "forced on both;non-owner QA policy proof:0 rows without actor/read context;authorized context recovers row",
"contacts_identity_documents_nuit_not_returned_by_query": true,
"no_automatic_directory_publication": true,
"no_promoters_or_user_organizations_created": true,
"extension_first": {
"before": 343041,
"after": 361464,
"sha256": "dec9db62a52a8bac5f1e2675aecbeb4239f2b1f4fa521db01693c32bdfeef01e",
"extension": true,
"previous_snapshot": "6a9c820c73a8c535ed3cdfc03db0311edf0300f1f97ade75f0fce3d3c84a02e1",
"publication": false,
"database": "proactive_investment_20261027_test",
"port": 55441
},
"extension_replay": {
"before": 361464,
"after": 361464,
"sha256": "dec9db62a52a8bac5f1e2675aecbeb4239f2b1f4fa521db01693c32bdfeef01e",
"extension": true,
"previous_snapshot": "6a9c820c73a8c535ed3cdfc03db0311edf0300f1f97ade75f0fce3d3c84a02e1",
"publication": false,
"database": "proactive_investment_20261027_test",
"port": 55441
}
},
"proactive_delta": "private authenticated territory query,CAE sector/activity filters,pagination,source/row/date/hash;select existing observations,compare competition/complementarity/possible partner/uncertain with rationale and limitations;server resolves source lineage,keeps list-derived evidence internal;save/reload and private dossier preserve references",
"gurue": {
"date": "2026-10-28",
"QA_only": true,
"operator": 1021,
"record_id": 402,
"dossier_id": "883c8ec3-59a3-4074-b91c-b7d4a5d88ff0",
"prior_version": 1,
"offer_query_total": 410,
"selected_source_records": 2,
"comparison_relationships": [
"competition",
"complementarity"
],
"existing_five_evidences_preserved": true,
"total_evidence": 7,
"idea_preserved": true,
"need": "hypothesis",
"empty_results": "insufficient_information",
"save_reload_recovered": true,
"existing_dossier_preview_confirm_replay": true,
"anonymous_internal_query_denied": true,
"no_publication": true,
"no_external_contacts": true,
"errors": [],
"source_version": 2,
"context_revision": 2,
"deliberate_dossier_title_and_fields_preserved": true,
"prior_source_v1_history_retained": true,
"songo_401_unchanged": true,
"refreshed_offer_query_total": 435,
"initial_browser_proof_retained": true,
"dossier_comparisons_visible": {
"existing_dossier_comparison_1_visible": true,
"existing_dossier_comparison_2_visible": true,
"read_only_after_commit": true,
"errors": []
}
},
"verification": {
"delta_tests": 7,
"assertions": 62,
"types": "passed",
"QA_build": "passed",
"accepted_prior_proofs": "reused;no fiscal suites repeated",
"browser": "authenticated synthetic operator1021,real supplied source rows,save/reload,existing dossier preview-confirm-replay;not team acceptance",
"preservation": {
"opportunities": {
"baseline_rows": 55,
"new_rows": 0,
"expected_changes": [
"402"
]
},
"desk_cases": {
"baseline_rows": 20,
"new_rows": 0,
"expected_changes": [
"883c8ec3-59a3-4074-b91c-b7d4a5d88ff0"
]
},
"projects": {
"baseline_rows": 19,
"new_rows": 0,
"expected_changes": []
},
"geo_locations": {
"baseline_rows": 1921,
"new_rows": 0,
"expected_changes": []
},
"sectors": {
"baseline_rows": 12,
"new_rows": 0,
"expected_changes": []
},
"documents": {
"baseline_rows": 64,
"new_rows": 0,
"expected_changes": []
},
"value_chains": {
"baseline_rows": 0,
"new_rows": 0,
"expected_changes": []
}
}
},
"remaining": [
"No installation or import in active portal;there the list-backed use remains not demonstrated until delivery.",
"205608 observations lack a unique canonical territorial match,including19 ambiguous names;336 have province only. Raw source territory remains available in private originals.",
"82864 observations lack an exact supplied CAE activity label;do not impute sector/activity.",
"113880 observations have differing names for a shared valid-shaped identifier;identity needs reconciliation,not automatic merger.",
"Historical administrative records do not establish current operating status,capacity,prices,demand,contracts or market vacancy.",
"National mapping/classification completeness and actual team use remain partial;Gurué proof does not close all market-study/cluster requirements.",
"Active delivery requires capability/compatibility review,fresh backup+restore,authenticated operation and installed delta check through the existing Git procedure."
],
"restriction_origins": {
"internal_analysis_no_auto_publication_no_absence_inference": "explicit Tempo task",
"preservation_QA_active_separation_backup_restore": "permanent AGENTS instructions",
"canonical_unique_matching_hashed_keys_query_limits_RLS": "implementation choices,not new organizational approval requirements"
},
"proof_files": [
"outputs/proactive-supply-20261028/gurue-ui-proof.json",
"outputs/proactive-supply-20261028/preservation-proof.json",
"outputs/proactive-supply-20261028/tests-receipt.json",
"outputs/proactive-supply-20261028/dossier-visual-proof.json",
"outputs/proactive-supply-20261028/supply-extension-preservation.json",
"outputs/proactive-supply-20261028/refreshed-gurue-query.json"
],
"L8": "unchanged,partial;this increment has no fiscal calculation change",
"supplement": {
"previous_snapshot_records": 343041,
"added_unnamed_source_rows": 18423,
"placeholder": "Denominação não indicada;never the personal applicant name",
"all_previous_observations_unchanged": {
"old_observations_unchanged": 343041,
"new_observations": 18423
},
"preview_both_hashes_bound": {
"previous_observations_unchanged": 343041,
"new_observations": 18423,
"no_replacement": true,
"previous_sha256": "6a9c820c73a8c535ed3cdfc03db0311edf0300f1f97ade75f0fce3d3c84a02e1",
"sha256": "dec9db62a52a8bac5f1e2675aecbeb4239f2b1f4fa521db01693c32bdfeef01e"
},
"original_source_rows_accounted_for": "148556 companies+212631 licensed nonempty data rows,excluding headers;277 tourism establishment sightings from two structures"
}
}
@@ -0,0 +1,169 @@
{
"date": "2026-10-27",
"status": "prospecting_handoff_ready_and_Gurue_private_hypothesis_in_QA_not_installed",
"branch": "codex/proactive-handoff-gurue-qa-20261027",
"baseline": "a78abf06d0ca075b18156ae3fd99649b69202481",
"technical_candidate_unchanged": "1afab4a2a71f182f260e4d2555d79242261a4d2a",
"runtime_unchanged": "3439f35038f15c93224e6cf876bf559135824d13",
"songo": {
"case_id": "CB-METROLOGIA-20261027",
"record_id": 401,
"source_version": 3,
"context_revision": 3,
"unchanged": true,
"state": "private_pending_external_commercial_responses",
"external_messages_sent": 0,
"commercial_responses_received": 0,
"partner_quotes_received": 0,
"resume_when": "Inventories/programmes/interest and partner quotations for comparable scope received;identify independent buying centres before aggregating demand"
},
"prospecting_form": {
"path": "docs/investmoz/unification/prospeccao-apoio-metrologico-20261027.pdf",
"pages": 2,
"interactive_fields": 42,
"canonical_fields_and_widgets_agree": true,
"unique_names": true,
"all_fields_in_page": true,
"saved_values_recovered": true,
"appearance_streams_present": true,
"real_form_not_prefilled_with_test_values": true,
"delivered_format": "fillable_PDF",
"docx_not_delivered": true,
"sha256": "abed1dc12a8f635bf4c3aa39ba5823114d2155aaca9b675a8ca1b9fb6248e989",
"visual_review": "Both final pages inspected;sample retained values checked separately"
},
"gurue": {
"case_id": "GUR-CHA-20261027",
"record_id": 402,
"dossier_id": "883c8ec3-59a3-4074-b91c-b7d4a5d88ff0",
"source_version": 1,
"context_revision": 1,
"evidence_count": 5,
"need_state": "hypothesis",
"private_draft_not_published": true,
"created_saved_recovered_through_existing_services": true,
"preview_and_confirmation": true,
"deliberate_title_preserved": true,
"existing_geo_and_sector_reused": true,
"no_new_grants_or_business_promoter": true,
"QA_operator_1021_only": true,
"Songo_record_401_version_3_unchanged": true,
"Songo_context_revision_3_unchanged": true,
"no_application_code_or_fiscal_changes": true,
"accepted_proofs_reused": true,
"no_contact_or_server_operations": true,
"QA_database": "proactive_investment_20261027_test",
"row_preservation": {
"opportunities": {
"old_rows_unchanged": 53,
"new_rows": 1
},
"desk_cases": {
"old_rows_unchanged": 18,
"new_rows": 1
},
"projects": {
"old_rows_unchanged": 19,
"new_rows": 0
},
"geo_locations": {
"old_rows_unchanged": 1921,
"new_rows": 0
},
"sectors": {
"old_rows_unchanged": 12,
"new_rows": 0
},
"documents": {
"old_rows_unchanged": 63,
"new_rows": 0
},
"value_chains": {
"old_rows_unchanged": 0,
"new_rows": 0
},
"audit_events": {
"old_rows_unchanged": 394,
"new_rows": 5
},
"organizations": {
"old_rows_unchanged": 3,
"new_rows": 0
},
"users": {
"old_rows_unchanged": 40,
"new_rows": 0
},
"investor_journeys": {
"old_rows_unchanged": 15,
"new_rows": 1
},
"journey_steps": {
"old_rows_unchanged": 285,
"new_rows": 19
}
}
},
"report": {
"record_id": 402,
"evidence_rows": 5,
"source_version": 1,
"context_revision": 1,
"source_recovered_without_loss": true,
"hypothesis_and_historic_period_visible": true,
"commercial_inputs_unknown": true,
"existing_report_helper": true,
"accepted_suites_not_repeated": true
},
"source_register": [
{
"file": "ine-gurue-2020-2024.pdf",
"url": "https://ine.gov.mz/documents/20119/337384/2_Gurue-%20Final_Junho2025.pdf/602d05a3-be99-47a4-be68-5277c4ca4a2f?download=true&t=1751024727586&version=1.0",
"bytes": 3038756,
"sha256": "9f0d3b868cfd3401f8d4f2fcceae0e5be164ba6dab927d1210e247b1711093d4",
"accessed": "2026-10-27",
"use": "Private read-only source copy;not imported or published"
},
{
"file": "magoma-primary.html",
"url": "https://www.asianteagroup.com/foot-gurue.html",
"bytes": 5590,
"sha256": "5881a5ec9a4b223932508fd48896c8a467a01387fdc7923eda4c4cb192adad9d",
"accessed": "2026-10-27",
"use": "Private read-only source copy;not imported or published"
},
{
"file": "igc-enterprise-map-2014.pdf",
"url": "https://www.theigc.org/wp-content/uploads/2014/06/An-Enterprise-Map-of-Mozambique-English.pdf",
"bytes": 1746681,
"sha256": "2d02a47c9e806490ba8d0cc016ef23d34bf8818f1b1c2dde5a0806818fa35c67",
"accessed": "2026-10-27",
"use": "Private read-only source copy;not imported or published"
}
],
"provided_private_workbook": {
"sha256": "1b5087b464e39e88c42def39655c2391aaaf684b4c832d6a77ff274b98889f00",
"historical_reference_dates": [
"2021-09-30",
"2023-11-09",
"2022-03-17"
],
"no_personal_data_or_contacts_exported": true,
"not_imported_or_published": true
},
"pilot_limits": [
"Activity documented;current unmet need and commercial interest unconfirmed",
"2014 source is historical;no current volumes/prices/capacity inferred",
"No assumed external green-leaf buyer,new factory,land access or certification",
"Beneficiaries are not automatically buyers or payers"
],
"preserved": {
"L8": "14360748194f3658d91a7d7ae5615efd0fcbfbb7",
"SGF_TEMPO": "untouched",
"accepted_proofs": "reused_without_repeating_suites",
"main_last_read": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5"
},
"installation": "No remote or deployment operation;capacity remains a precondition to next installation",
"private_outputs": "outputs/proactive-handoff-gurue-20261027/",
"new_application_code": false
}
@@ -0,0 +1,246 @@
{
"status": "QA_complete_candidate_not_installed",
"date": "2026-10-27",
"runtime_commit": "3439f35038f15c93224e6cf876bf559135824d13",
"baseline_main": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"branch": "codex/proactive-investment-first-qa-20261027",
"QA_directory": "C:\\laragon\\www\\portal-investidor-proactive-qa-20261027",
"root_checkout": "C:/laragon/www/portal-investidor",
"unavailable_local_scope_commit": "fa02c70",
"unavailable_commit_is_not_dependency": true,
"L8_candidate_preserved": "14360748194f3658d91a7d7ae5615efd0fcbfbb7",
"L8_not_integrated_or_modified": true,
"server_or_SGF_operations": false,
"scope": "territory/sector,evidence,need,structuredidea,existingencryptedDossier;manualeditorialpreparation beforeAI",
"existing_models_reused": [
"geo_locations",
"sectors",
"value_chains",
"projects",
"economic_clusters",
"development_corridors",
"investment_zones",
"Opportunity.management_draft",
"audit_events",
"portal_resources",
"documents",
"opportunity_documents",
"desk_cases",
"InvestorContext",
"InvestmentConsumerScope",
"InvestorPath"
],
"new_tables_or_migrations": false,
"new_organisational_approvers_or_roles": false,
"auth_delta": "Existing internal assignment may prepare/edit proactive drafts with real promoter unknown;all other role and operational checks retained and tested",
"checks": {
"API_tests": 14,
"API_assertions": 139,
"frontend_report_tests": 7,
"database": "proactive_investment_20261027_test",
"clone_source": "simulator_fiscal_delta_20261021_test",
"host": "127.0.0.1",
"port": 55441,
"guarded": true,
"API_transaction_rollback": true,
"UI_persistent_synthetic_data_only_in_clone": true,
"normal_password_and_MFA_UI": true,
"UI": {
"actualLaravelHTTP": true,
"normalPasswordAndMFA": true,
"createSaveRecoverEdit": true,
"hypothesisAndConfirmedHistory": true,
"onlyApplicableGroupsShown": true,
"selectedRelationshipsAndAssumptionsTransported": true,
"privateRelationshipReferenceNotExposed": true,
"noBudgetPromoterCoordinatesRequired": true,
"existingTerritoryAndSector": true,
"explicitPromotionPreviewConfirm": true,
"anonymousOnlyAuthorisedPublicContent": true,
"authReturnPreservesSource": true,
"existingDossier": true,
"deliberateTitlePreserved": true,
"reloadAndResumeSession": true,
"publicUrl": "http://127.0.0.1:18760/oportunidades/inv-mz-gen-5137141825128895?perspective=ideas&sector=energia-especifica",
"record_id": 383,
"dossier_id": "139e5faf-4979-4e2c-9a92-3e1465431642",
"errors": []
},
"Wayfinder_with_form": "passed",
"TypeScript": "passed",
"isolated_QA_build": "passed",
"build_advisories": [
"Existing chunk-size and plugin-timing diagnostics;no buildfailure"
],
"unaffected_accepted_suites_not_repeated": true
},
"preservation": {
"baseline": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"tracked_files_before": 2830,
"changed_existing_files": [
"app/Http/Controllers/OpportunityManagementController.php",
"app/Models/Opportunity.php",
"app/Services/InvestmentCatalogue.php",
"app/Services/InvestorContext.php",
"app/Services/OpportunityManagement.php",
"app/Services/OpportunityPromotion.php",
"app/Services/PortalProfileAccess.php",
"docs/investmoz/consolidated-review-matrix-2026-10-03.md",
"docs/investmoz/unification/traceability-and-manual.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
"resources/js/components/opportunity-search-filters.tsx",
"resources/js/lib/project-dossier.ts",
"resources/js/pages/investment/catalogue.tsx",
"resources/js/pages/investment/detail.tsx",
"resources/js/pages/investment/shared.tsx",
"resources/js/pages/investor-path/show.tsx",
"resources/js/pages/management/opportunity-draft.tsx",
"resources/js/pages/management/opportunity-promotion.tsx"
],
"unchanged_existing_files": 2812,
"fiscal_engines_unchanged": 89,
"fiscal_originals_unchanged": 31,
"Rwanda_originals_unchanged": true,
"L8_candidate_14360748_unchanged": true,
"auth_delta": "Existing internal assignment may prepare/edit proactive drafts with real promoter unknown;all other role and operational checks retained and tested",
"source_Database_and_active_environment_not_written": true,
"QA_database": "proactive_investment_20261027_test",
"clone_source": "simulator_fiscal_delta_20261021_test",
"port": 55441,
"root_runtime_not_changed": true,
"SGF_TEMPO_untouched": true,
"accepted_unaffected_suites_not_repeated": true,
"no_migrations_config_or_active_grant_changes": true,
"QA_synthetic_grants_only_in_isolated_clone": true,
"includes_documentation_delta": true
},
"Rwanda_methodology": {
"status": "user_provided_sources_located_and_relevant_passages_read",
"date": "2026-10-27",
"purpose": "Internal methodology for QA editorial preparation;not local economic evidence",
"originals_unchanged": true,
"no_source_publication_or_import": true,
"no_foreign_tax_or_institutional_rules_imported": true,
"sources": [
{
"path": "c:\\Mac\\Home\\Documents\\Docs pessoais\\Backup\\Documentos – MacBook Pro de Macbook\\Docs\\Rwanda\\20070627_Rwanda_5d0cc43d-c990-4cf1-8ee9-ada71094918f.pdf",
"sha256": "18b07a9379a1ad0baa33697d57d6237f15a6fec346db44bfee7506bf1fa27dee",
"bytes": 335937,
"title": "Creating a Competitive Rwanda",
"author": "Professor Michael E. Porter, Harvard Business School",
"edition": "Kigali,June2007 (cover)",
"pages": 31,
"visual_pages_inspected": [
1,
14,
27
],
"passages": [
{
"page": 14,
"heading": "Improving the Business Environment: The Diamond",
"application_pt": "Inventariar factores de produção, condições de procura e fornecedores/actividades de apoio;cada afirmação local depende de fonte e cobertura próprias."
},
{
"page": 27,
"heading": "Role of the Private Sector in Economic Development",
"application_pt": "Identificar fornecedores, infra-estruturas e competências como relações a investigar;proximidade não cria compromisso ou acesso."
}
],
"extraction": "pypdf;selectedpages rendered withPyMuPDF and visually inspected"
},
{
"path": "c:\\Mac\\Home\\Documents\\Docs pessoais\\Backup\\Documentos – MacBook Pro de Macbook\\Docs\\Rwanda\\Rwanda Competitiveness Briefing_Prof Porter_OTF.ppt",
"sha256": "4a9325ad64278cb0ef3c60367a05ee2ed9262e2cd49a48d579061349914aa830",
"bytes": 1755648,
"title": "How Rwanda Competes Today — Rwanda National Innovation and Competitiveness Program",
"edition": "July20,2008;Executive Briefing for Prof.MichaelPorter,slide1",
"slides": 50,
"native_PowerPoint_read_only": true,
"visual_slides_inspected": [
17
],
"passages": [
{
"slide": 17,
"heading": "Tourism Cluster—What the market is telling us",
"application_pt": "Conservar origem,período,cobertura e amostra das observações de procura;interesse declarado de um inquirido não equivale a contrato ou encomenda em Moçambique.",
"source_note": "OTF Tourism Channel Partner Survey,January2007,n=90,scale1–7 visible in slide;figures not transferred to pilotcases."
},
{
"slide": 20,
"heading": "Tea Cluster—Persistent constraints",
"application_pt": "Estruturar a análise por etapas de produção,recolha,transformação,transporte e comercialização;as limitações do Ruanda não são lacunas comprovadas do Gurué.",
"inspection": "Text extracted in native slide order;not yet visually inspected."
},
{
"slide": 24,
"heading": "Mining Cluster – Situation analysis",
"application_pt": "Perguntar por competências,informação,fornecedores e serviços relacionados;nenhuma necessidade de Montepuez é inferida desta lista estrangeira.",
"inspection": "Native text extracted;not visualproof."
}
],
"extraction": "Legacy OLE exploratoryextraction followed bynativePowerPointreadonly extraction;native50slideorder is authoritative. OldOLE91historicaltextgroups not used as slide count."
}
],
"implementation_mapping": [
"evidence.category+purpose+source+locator+period+scope+coverage+verified_on",
"methodology evidence cannot by itself confirm localneed",
"need.type quantity/quality/logistics/processing/coordination/support",
"idea.chain_id+stage+documentedresources+relations",
"hypothesis vs confirmedneed vs preparation vs actualavailability separated"
],
"limitations": [
"No actualpilot demand,supply,market_size,profitability or investmentcosts validated",
"No direct or indirect disclosure of privatecompanylists or originaldecks",
"Copyright/proprietary notices preserved;excerpts and renders remain ignored QA evidence,not public app assets"
]
},
"public_projection_rules": [
"No automatic private-to-public field copy",
"Only selected public evidence and publictarget relationships",
"Private relationship reference omitted",
"Internal document classification,rights,scan and ownership link retained",
"Literal private evidence reuse blocked;indirect disclosure is explicitly reviewed by existing editor",
"Analytical state and publication state separate",
"No automatic contract,availability,land,power,viability or taxbenefit"
],
"pilots": [
{
"context": "Cahora Bassa",
"sector": "Energia",
"territory": "bcc9e3cb-2359-524c-af4e-0ebc6f141d3d",
"status": "synthetic_QA_only"
},
{
"context": "Montepuez",
"sector": "Mineração",
"territory": "d4fb92cc-d278-5f69-9490-a98e6dfef18d",
"status": "synthetic_QA_only"
},
{
"context": "Gurué",
"sector": "Agronegócio/cadeia do chá",
"territory": "87a8ba3d-b152-560c-a566-7db4531ad536",
"status": "synthetic_QA_only"
}
],
"remaining": {
"implemented_demonstrated": "Editorial technical workflow and scoped continuity listed in manual",
"partial": "Real local economic analysis and availability of actual participations,not claimed",
"documentary_dependencies": "Local evidence,period,coverage,source and specific contract/access/availability claims;onlydependentcase blocked",
"resolved_dependency": "Both Rwanda exemplars available and passages inspected",
"future": "Automaticintelligence/prioritisation/indicators/AI and economic quantification when data exist;not required for firsteditorial increment",
"active_installation": "Out of authorised scope;futurefreshcompatibility/capacity/backuprestore required"
},
"matrix_ids_updated": [
"RF-CLU-003",
"MASTER-471012ab-0010",
"MASTER-9dee08d0-0067",
"MASTER-471012ab-0067"
],
"documentation_append_only": true,
"evidence_directory": "outputs/proactive-investment-20261027/",
"no_economic_validation": true,
"no_actual_publication_or_homologation_installation": true
}
@@ -0,0 +1,161 @@
{
"status": "private_opportunity_hypothesis_updated_dossier_v2_technical_delivery_independent",
"date": "2026-10-27",
"user_direction": "A ideia não é gerir concursos mas sim as oportunidades que geram.",
"case_id": "CB-METROLOGIA-20261027",
"baseline": "4f9450a71dcc03f17abe953c956956249798d4c0",
"technical_candidate_preserved": "1afab4a2a71f182f260e4d2555d79242261a4d2a",
"runtime_unchanged": "3439f35038f15c93224e6cf876bf559135824d13",
"branch": "codex/proactive-opportunity-model-qa-20261027",
"proof": {
"case_id": "CB-METROLOGIA-20261027",
"record_id": 401,
"dossier_id": "894343c7-c33d-452e-a6a5-b6675f77ee23",
"previous_source_version": 1,
"new_source_version": 2,
"before_context_revision": 1,
"after_context_revision": 2,
"direction": "Investment opportunity generated by demand;not tender management",
"need_state": "hypothesis",
"evidence_count": 7,
"private_draft_not_published": true,
"dossier_source_refreshed_through_preview_and_confirmation": true,
"deliberate_dossier_fields_unchanged": true,
"previous_audit_rows_unchanged": true,
"no_new_entities_or_grants": true,
"no_new_application_code": true,
"accepted_technical_proofs_reused": true,
"no_contact_or_server_operations": true,
"QA_database": "proactive_investment_20261027_test",
"row_preservation": {
"opportunities": {
"old_rows_unchanged": 52,
"updated_case_rows_only": [
"401"
],
"new_rows": 0
},
"desk_cases": {
"old_rows_unchanged": 17,
"updated_case_rows_only": [
"894343c7-c33d-452e-a6a5-b6675f77ee23"
],
"new_rows": 0
},
"projects": {
"old_rows_unchanged": 19,
"updated_case_rows_only": [],
"new_rows": 0
},
"geo_locations": {
"old_rows_unchanged": 1921,
"updated_case_rows_only": [],
"new_rows": 0
},
"sectors": {
"old_rows_unchanged": 12,
"updated_case_rows_only": [],
"new_rows": 0
},
"documents": {
"old_rows_unchanged": 63,
"updated_case_rows_only": [],
"new_rows": 0
},
"value_chains": {
"old_rows_unchanged": 0,
"updated_case_rows_only": [],
"new_rows": 0
},
"audit_events": {
"old_rows_unchanged": 388,
"updated_case_rows_only": [],
"new_rows": 3
}
}
},
"focus": "Recurring complementary service generated by documented demand;customer problem,value,partners and resources",
"new_sources": [
{
"title": "Anúncio HCB17/08/2026,051/2026",
"url": "https://www.diarioeconomico.co.mz/wp-content/uploads/2026/08/concurso-hcb-tender-document-docu-mo-ambique-2026-1.pdf",
"sha256": "bb4c33064e5d49504d8a85ac88ad1b847cfa6c69e1016e3ab588ff785b205c1f",
"pages": 2,
"visually_read": [
1,
2
],
"role": "Demand evidence and scope;not a new tender workflow"
},
{
"title": "IPAC M0100 INNOQ–LM",
"url": "https://www.ipac.pt/pesquisa/ficha_lac.asp?ID=M0100",
"consulted": "2026-10-27",
"technical_annex": "2026-02-17",
"binary_snapshot": null,
"binary_download_error": "Connection reset;web reading available",
"role": "Potential national laboratory capability by scope;no partnership or full HCB eligibility granted"
}
],
"commercial_questions": [
"Que problema operacional recorrente existe no ciclo dos instrumentos e como é resolvido actualmente?",
"Quais as famílias/modelos/gamas,quantidades,pontos e periodicidades?Que critérios de aceitação e prazo de devolução?",
"O ciclo actual já está coberto?Que necessidade futura permanece e quando?",
"Aceitaria serviço local associado?Que parte pode ser prestada fora do laboratório e com que responsabilidades?",
"Qual o custo e tempo totais da solução actual e que melhoria justificaria pagar por apoio local?"
],
"partner_questions": [
"Que instrumentos,gamas,pontos,incertezas,locais e prazos consegue cobrir hoje?",
"Qual o âmbito acreditado/competência aplicável e que serviços ficam fora dele?",
"Tem equipa,meios,disponibilidade e interesse em associação para apoio no Songo?",
"Quais as responsabilidades,preços,transporte/embalagem/seguro e condições de custódia e rastreabilidade?"
],
"decision_paths": [
{
"condition": "Customer confirms recurring need,actual problem and willingness to consider service",
"action": "Match partners and equivalent quotes;quantify business model before qualifying opportunity"
},
{
"condition": "Past purchase satisfied current cycle;documented future need remains",
"action": "Prepare future service horizon with actual timing,volume and conditions;do not reopen past tender"
},
{
"condition": "Customer confirms current need fulfilled and no future/recurring need for proposed service",
"action": "Archive hypothesis with dated buyer evidence and retain dossier history;do not treat missing information as no demand"
},
{
"condition": "Data insufficient",
"action": "Keep private hypothesis;affects only this business case,not technical delivery"
}
],
"economic_comparison": {
"basis": "Same instruments,quantity,frequency,quality,place and period;current solution vs proposed associated service",
"current_solution_total": null,
"proposed_service_total": null,
"quantity": null,
"period": null,
"net_advantage": null,
"missing_is_not_zero": true,
"inputs": [
"Laboratory service quotes",
"Total transport/packing/insurance and return",
"Local support cost",
"Nonduplicated incremental fixed costs for same period",
"Instrument turnaround days and substantiated operational impact"
],
"decision": "No positive advantage assumed;compare cost and time separately until both are measured. No generic wage,distance,tax or downtime assumptions."
},
"public_search_scope_limit": "No identifiable award/execution or2027commitment located in consulted public sources;absence of result is not proof of no contract. Supplier portal timed out via web and local TLS issuer verification failed;not bypassed. No further repeated search planned without new document or buyer input.",
"not_a_tender_management_increment": true,
"technical_release_independent_of_commercial_case": true,
"no_installation_publication_or_external_messages": true,
"L8_preserved": "14360748194f3658d91a7d7ae5615efd0fcbfbb7",
"SGF_untouched": true,
"evidence_directory": "outputs/proactive-commercial-followup-20261027",
"matrix_ids": [
"RF-CLU-003",
"MASTER-471012ab-0010",
"MASTER-9dee08d0-0067",
"MASTER-471012ab-0067"
]
}
@@ -0,0 +1,196 @@
{
"status": "real_source_preliminary_case_demonstrated_private_QA_not_published",
"date": "2026-10-27",
"case_id": "CB-METROLOGIA-20261027",
"baseline_candidate": "1afab4a2a71f182f260e4d2555d79242261a4d2a",
"runtime_unchanged": "3439f35038f15c93224e6cf876bf559135824d13",
"branch": "codex/proactive-real-pilot-qa-20261027",
"new_application_code": false,
"QA_database": "proactive_investment_20261027_test",
"proof": {
"case_id": "CB-METROLOGIA-20261027",
"record_id": 401,
"dossier_id": "894343c7-c33d-452e-a6a5-b6675f77ee23",
"QA_only": true,
"real_primary_sources": true,
"synthetic_operator_only": true,
"created_saved_recovered_via_existing_UI": true,
"existing_private_dossier": true,
"need_state": "hypothesis",
"past_procurement_dates_explicit": true,
"client_potential_not_committed": true,
"all_five_evidence_entries_retained": true,
"internal_workbook_reference_retained_privately": true,
"territory_preserved": true,
"no_economic_numbers_invented": true,
"no_publication_action": true,
"no_external_messages": true,
"anonymous_dossier_denied": true,
"accepted_technical_suites_not_repeated": true,
"errors": []
},
"private_record": {
"record_id": 401,
"status": "draft",
"not_published": true,
"unknown_amount_preserved": true,
"unknown_real_promoter_preserved": true,
"QA_database": "proactive_investment_20261027_test"
},
"selection": {
"selected": "Cahora Bassa",
"reason": "Acervo empresarial interno com referências locais + relatório primário HCB2024 + plano primário compras2026 com serviço delimitado. É a combinação de fontes mais directamente utilizável nesta leitura dirigida.",
"alternatives": [
{
"pilot": "Montepuez",
"available": "Registos empresariais internos e documentação pública mineira; não se seleccionou um procedimento primário e necessidade tão delimitados nesta ronda.",
"limitation": "Não equivale a falta de actividade ou inexistência de necessidades. Sem ranking económico."
},
{
"pilot": "Gurué",
"available": "Registos internos com actividades ligadas ao chá e referências públicas territoriais; as fontes de constrangimentos localizadas são antigas ou não delimitam uma procura actual específica.",
"limitation": "O piloto continua válido para estudo posterior; não se presume que os constrangimentos antigos persistem."
}
]
},
"idea": "Associação de apoio local no Songo com laboratório qualificado para apoio metrológico à HCB; hipótese comercial.",
"known_vs_unknown": {
"known": "Actividade HCB e necessidade planeada de calibração2026; referências empresariais históricas internas.",
"unknown": "Estado/recorrência da contratação,procura por satisfazer,volume,requisitos,oferta e parceiros actuais,preços,meios e viabilidade.",
"not_inferred": "Concurso aberto,adjudicação,ausência de oferta,disponibilidade comercial,contrato,acesso,terra,energia ou benefício fiscal."
},
"source_manifest": [
{
"alias": "companies.xlsx",
"original": "C:\\Mac\\Home\\Documents\\TEMPO\\Portal Tempo\\Dados de empresas\\EMPRESAS_LIST 2014-2022.xlsx",
"bytes": 26586267,
"sha256": "1ba4c4114b16b407e7746712d00d4f681246bbbc1b42351e96a31f7129acad30",
"use": "private analytical read-only working copy; original unchanged"
},
{
"alias": "licensed.xlsx",
"original": "C:\\Mac\\Home\\Documents\\TEMPO\\Portal Tempo\\Servicos Tempo\\Relatorios\\novos\\docs\\Empresas Licenciadas.xlsx",
"bytes": 34940776,
"sha256": "1b5087b464e39e88c42def39655c2391aaaf684b4c832d6a77ff274b98889f00",
"use": "private analytical read-only working copy; original unchanged"
},
{
"alias": "tourism.xlsx",
"original": "C:\\Mac\\Home\\Documents\\TEMPO\\Portal Tempo\\Servicos Tempo\\Relatorios\\novos\\docs\\CADASTRO DE EMPREENDIMENTOS TURISTICOS 3, 4 E 5 ESTRELAS 30.10.24 18,00h.xlsx",
"bytes": 73955,
"sha256": "f02e086ed4973ef17234aa6cc54b98fbb7a6952ffb16ec4dc4f7d0c72af6400c",
"use": "private analytical read-only working copy; original unchanged"
},
{
"alias": "hcb-concession.pdf",
"original": "C:\\Mac\\Home\\Documents\\TEMPO\\Portal Tempo\\Legislacao\\MIREME\\HCB-TERMOS-DO-CONTRATO-DE-CONCESSAO.pdf",
"bytes": 142063,
"sha256": "f4afc62f140d197cae3bf395674adce2eba37f0436261d52d7eb554f6230a073",
"use": "private analytical read-only working copy; original unchanged"
},
{
"alias": "hcb-plan-2026.pdf",
"url": "https://igepe.org.mz/wp-content/uploads/2026/06/HCB-Plano-Anual-de-Aquisicoes-2026.pdf",
"bytes": 319956,
"sha256": "cbc93102fea61a712c193d1c1815e7ec19e7d570ee2703c1b1390d4c05e5bd8e",
"accessed": "2026-10-27",
"use": "read-only primary source; no portal publication/import"
},
{
"alias": "hcb-report-2024.pdf",
"url": "https://hcbadm.mzbusiness.com/wp-content/uploads/2025/08/Relatorio-e-Contas-2024-Bilingue-VF-1.pdf",
"bytes": 8215895,
"sha256": "d0fed6af0e40fffd6f7f385152fdbfff2a10cae0b66c9d7a59a0a99658758080",
"accessed": "2026-10-27",
"use": "read-only primary source; no portal publication/import"
},
{
"alias": "hcb-hidroelectricidade.html",
"url": "https://www.hcb.co.mz/hidroelectricidade",
"bytes": 52772,
"sha256": "c5de0e6204909c6cdaea7b249c79897f1cc8539c4f58e4704e4d5844f9542a49",
"accessed": "2026-10-27",
"use": "read-only primary source; no portal publication/import"
},
{
"alias": "cae.xlsx",
"original": "C:/Mac/Home/Documents/TEMPO/Portal Tempo/Dados de empresas/CAE eBAU.xlsx",
"bytes": 75018,
"sha256": "83b4f1200988e99834c2ae3915346fbf237d128308554b67b5a080d4956bf506",
"use": "read-only supplied code labels B857/F857 and B859/F859; not current official-version inference"
}
],
"originals_unchanged": [
{
"alias": "companies.xlsx",
"original_unchanged": true,
"sha256": "1ba4c4114b16b407e7746712d00d4f681246bbbc1b42351e96a31f7129acad30"
},
{
"alias": "licensed.xlsx",
"original_unchanged": true,
"sha256": "1b5087b464e39e88c42def39655c2391aaaf684b4c832d6a77ff274b98889f00"
},
{
"alias": "tourism.xlsx",
"original_unchanged": true,
"sha256": "f02e086ed4973ef17234aa6cc54b98fbb7a6952ffb16ec4dc4f7d0c72af6400c"
},
{
"alias": "hcb-concession.pdf",
"original_unchanged": true,
"sha256": "f4afc62f140d197cae3bf395674adce2eba37f0436261d52d7eb554f6230a073"
},
{
"alias": "cae.xlsx",
"original_unchanged": true,
"sha256": "83b4f1200988e99834c2ae3915346fbf237d128308554b67b5a080d4956bf506"
}
],
"old_QA_rows_unchanged": {
"opportunities": {
"old_rows_unchanged": 52,
"new_rows": 1
},
"desk_cases": {
"old_rows_unchanged": 17,
"new_rows": 1
},
"projects": {
"old_rows_unchanged": 19,
"new_rows": 0
},
"geo_locations": {
"old_rows_unchanged": 1921,
"new_rows": 0
},
"sectors": {
"old_rows_unchanged": 12,
"new_rows": 0
},
"documents": {
"old_rows_unchanged": 63,
"new_rows": 0
},
"value_chains": {
"old_rows_unchanged": 0,
"new_rows": 0
}
},
"technical_accepted_tests_not_repeated": true,
"economic_payload_and_recovered_context_private_only": true,
"new_publication": false,
"external_contact": false,
"server_operations": false,
"SGF_changes": false,
"L8_preserved": "14360748194f3658d91a7d7ae5615efd0fcbfbb7",
"matrix_ids": [
"RF-CLU-003",
"MASTER-471012ab-0010",
"MASTER-9dee08d0-0067",
"MASTER-471012ab-0067"
],
"local_proof_directory": "outputs/proactive-real-pilot-20261027",
"private_report": "outputs/proactive-real-pilot-20261027/real-case-private-report.html",
"next_action": "Preparar reunião exploratória com as perguntas de estado/recorrência,âmbito técnico,oferta,associação e vantagem;nenhuma mensagem enviada."
}
@@ -0,0 +1,243 @@
{
"status": "private_regional_opportunity_hypothesis_v3_sustainability_not_demonstrated",
"date": "2026-10-27",
"baseline": "52f54655d2827e97da2f15d14033e9a2713dddf1",
"branch": "codex/proactive-regional-clients-qa-20261027",
"runtime_unchanged": "3439f35038f15c93224e6cf876bf559135824d13",
"case_id": "CB-METROLOGIA-20261027",
"proof": {
"case_id": "CB-METROLOGIA-20261027",
"record_id": 401,
"dossier_id": "894343c7-c33d-452e-a6a5-b6675f77ee23",
"previous_source_version": 2,
"new_source_version": 3,
"before_context_revision": 2,
"after_context_revision": 3,
"direction": "Regional complementary investment opportunity;three additional prospects,commercial data missing",
"need_state": "hypothesis",
"evidence_count": 11,
"private_draft_not_published": true,
"dossier_source_refreshed_through_preview_and_confirmation": true,
"deliberate_dossier_fields_unchanged": true,
"previous_audit_rows_unchanged": true,
"no_new_entities_or_grants": true,
"no_new_application_code": true,
"accepted_technical_proofs_reused": true,
"no_contact_or_server_operations": true,
"QA_database": "proactive_investment_20261027_test",
"row_preservation": {
"opportunities": {
"old_rows_unchanged": 52,
"updated_case_rows_only": [
"401"
],
"new_rows": 0
},
"desk_cases": {
"old_rows_unchanged": 17,
"updated_case_rows_only": [
"894343c7-c33d-452e-a6a5-b6675f77ee23"
],
"new_rows": 0
},
"projects": {
"old_rows_unchanged": 19,
"updated_case_rows_only": [],
"new_rows": 0
},
"geo_locations": {
"old_rows_unchanged": 1921,
"updated_case_rows_only": [],
"new_rows": 0
},
"sectors": {
"old_rows_unchanged": 12,
"updated_case_rows_only": [],
"new_rows": 0
},
"documents": {
"old_rows_unchanged": 63,
"updated_case_rows_only": [],
"new_rows": 0
},
"value_chains": {
"old_rows_unchanged": 0,
"updated_case_rows_only": [],
"new_rows": 0
},
"audit_events": {
"old_rows_unchanged": 391,
"updated_case_rows_only": [],
"new_rows": 3
}
}
},
"commercial_data_statement": {
"source": "User reply",
"date": "2026-10-27",
"text": "Ainda não há dados comerciais"
},
"assessment": "Compatibilidade técnica regional justifica prospecção adicional;procura recorrente,custos,capacidade disponível e sustentabilidade ainda não demonstrados.",
"prospects": [
{
"entity": "HCB",
"area": "Songo/Cahora Bassa",
"known": "Necessidade metrológica documentada em2026",
"status": "Cliente potencial inicial;procura actual/recorrente por confirmar",
"quantity": null,
"frequency": null,
"price": null,
"confirmed_order": null,
"source": "Fundamento anterior preservado"
},
{
"entity": "Vulcan Mozambique",
"area": "Moatize",
"known": "Mina,processamento e equipamentos de produção descritos pela própria empresa",
"hypothesis": "Instrumentação de processo/manutenção pode beneficiar de apoio metrológico",
"status": "Prospecto,não cliente confirmado",
"quantity": null,
"frequency": null,
"price": null,
"confirmed_order": null,
"related_entity": "Nacala Logistics",
"independent_purchase_confirmed": null,
"source": "https://www.vulcaninternational.com/products-services/"
},
{
"entity": "EDM",
"area": "Tete/Moatize;unidade compradora por identificar",
"known": "Plano2025,p68:calibração/teste a nível empresarial;activos deTete/Moatize referenciados",
"hypothesis": "Verificar inventário regional e interesse em apoio associado",
"status": "Prospecto;sem volume regional atribuído",
"quantity": null,
"frequency": null,
"price": null,
"confirmed_order": null,
"source": "https://cdn.edm.co.mz/website/imprensa/Plano_Actividades_Orcamento_2025.pdf"
},
{
"entity": "Nacala Logistics",
"legal_buyer": null,
"area": "Segmento Moatize",
"known": "Operação ferroviária/manutenção;concessionárias indicam Vulcan como accionista",
"hypothesis": "Verificar instrumentos de manutenção,localização e decisão de compra",
"status": "Prospecto ligado àVulcan;diversificação independente não demonstrada",
"quantity": null,
"frequency": null,
"price": null,
"confirmed_order": null,
"related_entity": "Vulcan Mozambique",
"independent_purchase_confirmed": null,
"source": "https://www.nacalalogistics.com/quem-somos/"
}
],
"future_excluded_from_base": [
{
"entity": "Mphanda Nkuwa/GMNK",
"status": "Projecto em desenvolvimento",
"reason": "Necessidade e datas de operação futuras não demonstradas;sem receitas ou volume na base",
"source": "https://www.gmnk.co.mz/en/about-us/project-description/"
}
],
"buyer_data_needed": [
"Entidade e centro de decisão/compra;relação com outros prospectos",
"Inventário por família/modelo/gama/pontos/critério de aceitação",
"Quantidade por janela e periodicidade efectiva de cada instrumento;sem anualizar por defeito",
"Solução actual,prestador,prazo fora de serviço,custo total e necessidade ainda não satisfeita",
"Interesse e condições de compra para lote/missão ou avença;horizonte de procura"
],
"partner_capacity_needed": [
"Âmbito técnico e local permitido de execução por instrumento,com rastreabilidade",
"Capacidade efectivamente disponível e prazo para cada janela;equipa e meios",
"Preços por âmbito/lote,embalagem,transporte/seguro,custódia e responsabilidades",
"Comprovar capacidade actual dos prestadores locais históricos;licença/CAE não é acreditação de calibração"
],
"frequency": {
"confirmed_programs": null,
"confirmed_annual_events": null,
"rule": "Usar inventário e programa do proprietário;frequência por família/risco/uso e condições do serviço,não prazo do anúncio nem regra anual presumida."
},
"economics": {
"analysis_unit": "Missão/lote comparável,com famílias e quantidades explícitas;período de análise comum",
"mission_contribution": "Receita acordada da missão menos serviço laboratorial,apoio directo,transporte de ida/retorno,embalagem/seguro e outros custos incrementais da mesma missão.",
"period_operating_balance": "Soma das contribuições de missões confirmadas menos custos fixos incrementais do mesmo período.",
"double_count_prevention": "Transporte partilhado contado uma vez por missão;custos fixos não entram também na contribuição se subtraídos no período. Não somar volumes nacionais à carteira regional ou activos comuns duas vezes.",
"sustainability_condition": "Cobertura operacional não basta:avaliar investimento,reposição,fundo de maneio e prazos de recebimento;testar concentração e perda de cliente antes de declarar serviço sustentável.",
"numeric_inputs": {
"missions": null,
"instruments": null,
"period": null,
"prices": null,
"laboratory_cost": null,
"local_support_cost": null,
"route_cost": null,
"fixed_cost": null,
"investment": null,
"working_capital": null,
"net_advantage": null,
"break_even": null
},
"missing_is_not_zero": true,
"scenarios_to_compare": [
"Atendimento individual no Songo",
"Missões agrupadas Songo–Tete/Moatize,apenas com janelas compatíveis",
"Organização de apoio em Tete/Moatize com deslocação ao Songo;sem mudança canónica presumida"
],
"not_used_as_price": "Orçamento2025daEDM,capacidade de produção da mina,tarifas ferroviárias ou preços fictícios."
},
"source_register": [
{
"file": "vulcan.html",
"url": "https://www.vulcaninternational.com/products-services/",
"sha256": "44c92a7a405e7b84f51a6602a487ee4cbcb5e9d3ed42d6c9b2a47f55ba01800e",
"bytes": 64512,
"accessed": "2026-10-27",
"use": "Private source copy;no automatic portal import/publication"
},
{
"file": "nacala-company.html",
"url": "https://www.nacalalogistics.com/quem-somos/",
"sha256": "4c8c2f98a94f013ab463937c1ac343e26af2ea5fe82226764168b766dfea2c55",
"bytes": 246823,
"accessed": "2026-10-27",
"use": "Private source copy;no automatic portal import/publication"
},
{
"file": "nacala-operations.html",
"url": "https://www.nacalalogistics.com/faq/",
"sha256": "21f70dbbb8a9ea99f0ca3af728aa3b6a888e361994d78dae5292813437acdd9f",
"bytes": 214596,
"accessed": "2026-10-27",
"use": "Private source copy;no automatic portal import/publication"
},
{
"file": "edm-plan-2025.pdf",
"url": "https://cdn.edm.co.mz/website/imprensa/Plano_Actividades_Orcamento_2025.pdf",
"sha256": "8e25e3070062e6cad4a39449cb6d494263671506ff7bc71ce100787ae1bd80f1",
"bytes": 25468134,
"accessed": "2026-10-27",
"use": "Private source copy;no automatic portal import/publication"
},
{
"file": "gmnk-project.html",
"url": "https://www.gmnk.co.mz/en/about-us/project-description/",
"sha256": "705afaaba50074812aaf0884cd8757cfaba1e32dd83f90726d8755869b72d5f8",
"bytes": 188060,
"accessed": "2026-10-27",
"use": "Private source copy;no automatic portal import/publication"
}
],
"technical_delivery_independent": true,
"no_publication_installation_or_external_messages": true,
"accepted_proofs_reused": true,
"L8_preserved": "14360748194f3658d91a7d7ae5615efd0fcbfbb7",
"SGF_untouched": true,
"evidence_directory": "outputs/proactive-regional-clients-20261027",
"matrix_ids": [
"RF-CLU-003",
"MASTER-471012ab-0010",
"MASTER-9dee08d0-0067",
"MASTER-471012ab-0067"
]
}
@@ -0,0 +1,28 @@
# Entrega controlada da base comparativa interna
A entrega inclui o candidato QA `a022ed98`. As sete provas dirigidas/62 asserções, tipos, compilação e percurso de Gurué continuam aceites. O delta de entrega acrescenta o carregador técnico e impede que a API grave uma repetição preservada como outra comparação; este último delta tem uma prova dirigida própria, sem repetir a suite anterior.
361.464 é o número de observações administrativas, incluindo 147.165 repetições preservadas. As 214.299 projecções distintas também **não** são empresas únicas. A consulta exclui `duplicate_of` das contagens e dos resultados; a gravação recusa repetições como comparações adicionais. A cobertura nacional é parcial. Ausência de resultados significa informação insuficiente. A comparação fundamenta uma hipótese e não confirma procura, capacidade actual, contrato ou viabilidade.
## Sequência da entrega
1. Conferir `main`, a revisão servida, ausência de deriva do código e capacidade. A base da entrega é `569a1cd7`; não usar force-push nem substituir alterações posteriores.
2. Criar backup novo de base e ficheiros/configuração. Preservar os backups anteriores. Restaurar numa instância isolada, sem rede e na porta55441, e comparar as174 tabelas públicas do inventário.
3. Ensaiar o SQL da migração exacta, o carregamento e a sua repetição. Conferir que as174 tabelas anteriores não mudam. Verificar a conta real da aplicação: sem contexto de actor não lê a base; com o contexto autorizado recupera435 observações distintas em Gurué e conserva237 repetições fora dessa contagem. Não criar utilizadores, organizações ou dossiers fictícios no activo.
4. Conferir também backup/restauro das duas novas tabelas, incluindo RLS forçada. Registar espaço efectivamente ocupado pelo ensaio e voltar a conferir capacidade antes da instalação.
5. Na sessão SSH autenticada do processo existente, aplicar a migração delimitada e registar uma linha de migração. Conceder apenas leitura nas duas tabelas à conta de aplicação já existente. Carregar o pacote privado em transacção, com hashes e contagens fixos, recusa de conflitos e sem sobrescrever observações. Não publicar listas nem criar anúncios, clientes confirmados ou promotores.
6. Acrescentar apenas o hash dessa migração ao contrato de schema do instalador. Conservar os90 hashes anteriores e o próprio programa do instalador. Este passo é necessário porque o processo Git não executa migrações ou importações de conteúdo automaticamente.
7. Fazer a entrega normal por Git/`main`, mantendo a construção isolada e as guardas habituais do instalador. As provas funcionais aceites são reutilizadas; a CI habitual do instalador permanece.
8. Conferir revisão pública, hashes do código, schema e permissões esperados, ficheiros/configuração e linhas anteriores, separando a nova linha de migração e o delta operacional de cache/sessões. Conferir negação de acesso anónimo e consulta autorizada de Gurué. A conferência visual autenticada no portal é distinta do inventário técnico por SSH.
## Carregador
`tools/load-proactive-supply.py` usa pré-visualização por omissão. Exige o pacote privado com `import-manifest.json`, `preview.json`, `scan.json`, `schema.sql` e `observations.jsonl.gz`. O JSONL aceite tem SHA256 `dec9db62a52a8bac5f1e2675aecbeb4239f2b1f4fa521db01693c32bdfeef01e`. Os quatro originais e as datas são os aceites em QA; não se pede nova validação genérica da sua origem.
O modo `rehearsal` exige container sem rede/portas publicadas e a identidade efectiva `proactive_supply_delivery_20261028_test:55441`. O modo `apply` exige a sessão técnica SSH, a identidade `teste_investidor:5432`, revisão esperada e backup/restauro verificado. A preparação e os recibos ficam privados em `/var/backups/investmoz-proactive-supply-delivery-20261028`, fora da área servida. O carregador não cria schema no activo, não publica dados e não apaga ou substitui registos. A tabela temporária é indexada antes de conferir a linhagem de duplicações.
## Preservação e recuo
Se uma conferência divergir, preservar os exemplares e delimitar a diferença antes de agir. Recuar código não autoriza apagar a base privada ou o seu histórico. A migração recusa `down` enquanto existirem fontes carregadas. Um restauro integral nunca deve sobrescrever intervenções posteriores sem reconciliação; os originais e o pacote privado permitem recuperar o catálogo separadamente. As duas novas tabelas e o único registo de migração são o delta de schema/dados previsto; não alterar papéis de funcionários ou permissões anteriores.
As restrições de análise interna, preservação, não duplicação, não publicação e separação QA/activo vêm das decisões expressas da Tempo e do `AGENTS.md`. Identidades exactas, hashes, limites técnicos, indexação temporária e contratos são escolhas de implementação, não novas exigências organizacionais. O incremento não fecha os requisitos nacionais amplos e não altera L8, que permanece parcial.
@@ -0,0 +1,412 @@
{
"date": "2026-10-28",
"status": "installed_technical_delta_verified_authenticated_visual_conference_pending",
"served_commit": "6d1476936920dc5715d4493b1f8b22a3d51935f4",
"accepted_QA_candidate": "a022ed9848b41ba342b4209414c2bbf2ebd0a7a3",
"previous_runtime": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"normal_Git_fast_forward": true,
"force_used": false,
"original_QA_and_history_preserved": true,
"scope": "private comparative supply base integrated into existing proactive journey;not automatic public directory",
"counts": {
"administrative_observations": 361464,
"repetitions_preserved": 147165,
"distinct_administrative_projections": 214299,
"unique_companies": null,
"Gurué_distinct_observations": 435,
"Gurué_repetitions_excluded": 237,
"comparison_API_rejects_preserved_duplicate_as_another_comparison": true
},
"limits": {
"national_coverage": "partial",
"missing_records": "insufficient information;never proof of absent supply",
"investment_conclusion": "hypothesis only;no automatic proof of demand,capacity,contracts or viability",
"unmapped_territory": 205608,
"province_only": 336,
"activity_unclassified": 82864,
"shared_identifier_name_conflicts": 113880,
"unnamed_observations_preserved": 18423
},
"backup": {
"stage": "/var/backups/investmoz-proactive-supply-delivery-20261028/backup-install",
"created_at": "2026-10-28T17:10:23Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "1a0bc3767062633ba35afe1308c7f29ef441a01dba35551534ed1eef9e8e8509",
"files_sha256": "e622cdd04a252740ad1d0c626a9de32aaf1e71f3c986591cdbd94bafd314a1d7",
"restore_verified": false
},
"backup_restore_rehearsal": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "proactive_supply_delivery_20261028_test",
"port": 55441,
"source_dump_sha256": "1a0bc3767062633ba35afe1308c7f29ef441a01dba35551534ed1eef9e8e8509",
"active_database_writes": 0,
"private_import_first": {
"candidate": "a022ed9848b41ba342b4209414c2bbf2ebd0a7a3",
"records": 361464,
"source_counts": {
"1ba4c4114b16b407e7746712d00d4f681246bbbc1b42351e96a31f7129acad30": 148556,
"1b5087b464e39e88c42def39655c2391aaaf684b4c832d6a77ff274b98889f00": 212631,
"f02e086ed4973ef17234aa6cc54b98fbb7a6952ffb16ec4dc4f7d0c72af6400c": 277,
"83b4f1200988e99834c2ae3915346fbf237d128308554b67b5a080d4956bf506": 0
},
"raw_sha256": "dec9db62a52a8bac5f1e2675aecbeb4239f2b1f4fa521db01693c32bdfeef01e",
"sql_bytes": 201634556,
"mode": "rehearsal",
"unique_company_count": null,
"duplicate_suppression": "WHERE duplicate_of IS NULL;retained administrative sightings do not count as separate offers",
"national_coverage": "partial",
"investment_conclusion": "hypothesis only;does not prove demand or viability",
"database": "proactive_supply_delivery_20261028_test|55441",
"before": 0,
"after": {
"records": 361464,
"distinct_observations": 214299,
"repeated_projections": 147165,
"not_unique_companies": true,
"published": false
},
"idempotent_no_overwrite": true,
"active_existing_business_data_touched": false
},
"private_import_replay": {
"candidate": "a022ed9848b41ba342b4209414c2bbf2ebd0a7a3",
"records": 361464,
"source_counts": {
"1ba4c4114b16b407e7746712d00d4f681246bbbc1b42351e96a31f7129acad30": 148556,
"1b5087b464e39e88c42def39655c2391aaaf684b4c832d6a77ff274b98889f00": 212631,
"f02e086ed4973ef17234aa6cc54b98fbb7a6952ffb16ec4dc4f7d0c72af6400c": 277,
"83b4f1200988e99834c2ae3915346fbf237d128308554b67b5a080d4956bf506": 0
},
"raw_sha256": "dec9db62a52a8bac5f1e2675aecbeb4239f2b1f4fa521db01693c32bdfeef01e",
"sql_bytes": 201634556,
"mode": "rehearsal",
"unique_company_count": null,
"duplicate_suppression": "WHERE duplicate_of IS NULL;retained administrative sightings do not count as separate offers",
"national_coverage": "partial",
"investment_conclusion": "hypothesis only;does not prove demand or viability",
"database": "proactive_supply_delivery_20261028_test|55441",
"before": 361464,
"after": {
"records": 361464,
"distinct_observations": 214299,
"repeated_projections": 147165,
"not_unique_companies": true,
"published": false
},
"idempotent_no_overwrite": true,
"active_existing_business_data_touched": false
},
"baseline_public_tables_unchanged_after_import": 174,
"actual_application_role": "teste_investidor_app",
"RLS_without_actor_rows": 0,
"Gurue": {
"observations": 435,
"retained_repetitions": 237,
"not_unique_companies": true
},
"storage": {
"private_relations_bytes": 344399872,
"database_bytes": 409070739
},
"catalogue_backup_restore": {
"verified": true,
"sha256": "7ebb8791d5871bb4752a3e6e964a398c0f8fc094a10aab0e33aaee202dfc62d3",
"rows": 361464,
"forced_RLS_tables": 2,
"row_checksum": "9f9773492aa45f498201ff791726004a"
},
"import_and_replay_seconds": 67.3371156482026,
"no_application_users_or_dossiers_created": true,
"no_publication": true,
"active_data_writes": 0
},
"private_base_load": {
"at": "2026-10-28T17:14:46.618843+00:00",
"baseline": "569a1cd750f3d2a0b87f130e992e73e070bbd1ab",
"private_schema_created": 2,
"new_migration_registry_rows": 1,
"new_grants": "SELECT only on the two new private tables to the existing application role;no employee assignment or public grant",
"import": {
"candidate": "a022ed9848b41ba342b4209414c2bbf2ebd0a7a3",
"records": 361464,
"source_counts": {
"1ba4c4114b16b407e7746712d00d4f681246bbbc1b42351e96a31f7129acad30": 148556,
"1b5087b464e39e88c42def39655c2391aaaf684b4c832d6a77ff274b98889f00": 212631,
"f02e086ed4973ef17234aa6cc54b98fbb7a6952ffb16ec4dc4f7d0c72af6400c": 277,
"83b4f1200988e99834c2ae3915346fbf237d128308554b67b5a080d4956bf506": 0
},
"raw_sha256": "dec9db62a52a8bac5f1e2675aecbeb4239f2b1f4fa521db01693c32bdfeef01e",
"sql_bytes": 201634556,
"mode": "apply",
"unique_company_count": null,
"duplicate_suppression": "WHERE duplicate_of IS NULL;retained administrative sightings do not count as separate offers",
"national_coverage": "partial",
"investment_conclusion": "hypothesis only;does not prove demand or viability",
"database": "teste_investidor|5432",
"before": 0,
"after": {
"records": 361464,
"distinct_observations": 214299,
"repeated_projections": 147165,
"not_unique_companies": true,
"published": false
},
"idempotent_no_overwrite": true,
"active_existing_business_data_touched": false
},
"schema_contract_delta": "one reviewed migration appended;all90 previous entries unchanged",
"pipeline_script_unchanged": true,
"publication": false,
"code_installation_pending": true,
"backup_dump_sha256": "1a0bc3767062633ba35afe1308c7f29ef441a01dba35551534ed1eef9e8e8509"
},
"capacity": {
"at": "2026-10-28T17:13:59.594789+00:00",
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"free_bytes": 86519189504,
"free_inodes": 23490190
},
{
"path": "/var/lib/investmoz-deploy",
"free_bytes": 86519189504,
"free_inodes": 23490190
},
{
"path": "/var/backups",
"free_bytes": 86519189504,
"free_inodes": 23490190
},
{
"path": "/tmp",
"free_bytes": 86519189504,
"free_inodes": 23490190
},
{
"path": "/var/lib/docker",
"free_bytes": 86519189504,
"free_inodes": 23490190
}
],
"required_budget_bytes": 6259143420,
"budget_basis": "existing5GiB build guard+twice measured private relations+measured SQL staging;already-created backups/stages included in actual free space",
"backup_sha256": "1a0bc3767062633ba35afe1308c7f29ef441a01dba35551534ed1eef9e8e8509",
"backup_restore_verified": true,
"active_writes": 0
},
"installed_delta": {
"at": "2026-10-28T17:22:03.023596+00:00",
"served_commit": "6d1476936920dc5715d4493b1f8b22a3d51935f4",
"backup_dump_sha256": "1a0bc3767062633ba35afe1308c7f29ef441a01dba35551534ed1eef9e8e8509",
"prior_public_tables_checked": 174,
"prior_domain_rows_preserved": true,
"new_migration_registry_rows": 1,
"operational_delta": {
"cache": {
"before": {
"rows": 111,
"checksum": "a9dc6868205af2190cee2d2787ee8b66"
},
"after": {
"rows": 111,
"checksum": "08c098b3fde0052afa05aae647d18c5f"
}
},
"sessions": {
"before": {
"rows": 7,
"checksum": "ef549836d7a2e0549b1a32f1627c83f4"
},
"after": {
"rows": 8,
"checksum": "4a8b547e0552be4da65bcb97d3851a49"
}
}
},
"persistent_files_and_configuration_identical": 369,
"private_catalogue": {
"observations": 361464,
"distinct_administrative_observations": 214299,
"preserved_repetitions": 147165,
"unmapped_territory": 205608
},
"Gurue": {
"observations": 435,
"repetitions": 237
},
"RLS_without_actor_rows": 0,
"anonymous_query_status": 401,
"public_revision_confirmed": true,
"actual_team_UI_journey": "pending authenticated browser conference;accepted QA is not repeated",
"unique_company_count": null,
"publication": false,
"national_coverage": "partial",
"investment_conclusion": "hypothesis,not proved demand or viability",
"L8": "unchanged,partial"
},
"application_consumer": {
"installed_application_service_read": true,
"existing_actor_passes_existing_profile_authorization": true,
"application_database_identity": {
"database": "teste_investidor",
"role": "teste_investidor_app",
"port": 5432
},
"observations": 435,
"preserved_repetitions_excluded": 237,
"empty_results": "Informação insuficiente nesta base e nestes filtros.",
"source_metadata_present": true,
"no_new_actor_grant_or_record": true,
"read_only": true,
"proof_kind": "technical CLI consumer,not authenticated team browser acceptance"
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 111,
"after_rows": 111,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 7,
"after_rows": 9,
"changes": [
{
"key_sha256": "5cb21cc6c5f36834d39f2aa929d2272b65358654155858bae027abe4ccdf5c4e",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "6fa8f1e07be4cea4d35b9ee67f1e480f35baac9228f33c5161f24e2aac5e33f2",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"installer_and_catalogue_backup": {
"at": "2026-10-28T17:24:41.602671+00:00",
"installed_commit": "6d1476936920dc5715d4493b1f8b22a3d51935f4",
"previous_release_preserved": "/var/www/investmoz-homologacao/releases/569a1cd750f3d2a0b87f130e992e73e070bbd1ab-53a57d6f",
"installer_CI": [
"\u001b[30;42mOK (1 test, 3106 assertions)\u001b[0m",
"✓ built in 31.30s",
"\u001b[30;42mOK (59 tests, 317 assertions)\u001b[0m",
"# tests 1146",
"# pass 1146",
"# fail 0"
],
"accepted_QA_reused": {
"tests": 7,
"assertions": 62,
"Gurue_browser_proof": "accepted earlier;not repeated as a prerequisite"
},
"delivery_delta_test": {
"tests": 1,
"assertions": 2,
"scope": "repeated source sightings cannot inflate saved comparisons"
},
"installed_private_catalogue_backup": {
"path": "/var/backups/investmoz-proactive-supply-delivery-20261028/catalogue-installed.dump",
"bytes": 63461920,
"sha256": "18f71d0ad72aae9645a6101c6388c4d7f481e56ef2d41dc64241245314e85d55",
"read_grants_and_RLS_in_dump": true
},
"existing_pipeline_script_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604",
"code_branch": "main",
"forced_push": false,
"automatic_publication": false
},
"schema_and_access": "two new private tables,forced RLS,one migration registry row;SELECT only to existing application database role;no employee-role assignments changed;ninety earlier migration hashes preserved and one appended to the existing installer contract;installer program unchanged",
"accepted_proofs_reused": {
"QA_tests": 7,
"QA_assertions": 62,
"Gurue_saved_reload_dossier_chain": "accepted earlier in isolated QA;not falsely presented as new team acceptance"
},
"delivery_delta_test": {
"tests": 1,
"assertions": 2,
"reason": "explicit non-inflation requirement;reject a preserved repeated observation as another saved comparison"
},
"visual_conference": {
"status": "pending",
"known_blocker": "The browser access host is unavailable",
"technical_consumer_is_not_team_UI_acceptance": true,
"manual_remaining": "Gurué → consultar oferta → comparar ideia → guardar → recuperar no mesmo dossier,com fontes,datas e incertezas;435 observações,não empresas únicas;listas internas,cobertura parcial e hipótese preservadas.",
"blocker_history": [
"Windows Computer Use could not determine the current browser URL with enough confidence to enforce policy"
],
"mechanism": "Browser access connector host unavailable;opening a tab alone does not restore the connector. No documented host-restart operation is exposed in the available browser control API.",
"next_action": "Restabelecer o conector por mecanismo suportado ou receber conferência autenticada da equipa;nenhuma reinstalação ou repetição das provas técnicas aceites."
},
"preservation": "prior domain rows unchanged;369 persistent files/configuration identical;only intended migration row and new private base added;queue restart and2anonymous delivery sessions reconciled separately;no QA user,organisation,opportunity or dossier copied to active",
"publication": false,
"L8": "unchanged,partial;no fiscal code or calculation delta",
"remote_receipts_root": "/var/backups/investmoz-proactive-supply-delivery-20261028",
"local_proofs": "C:\\laragon\\www\\portal-investidor\\outputs\\proactive-supply-delivery-20261028",
"restriction_origins": {
"private_analysis_no_auto_publication_no_false_market_vacancy_no_duplicate_inflation": "explicit Tempo decisions",
"backup_restore_QA_isolation_preservation": "AGENTS.md",
"exact_hashes_temporary_index_database_identity_contract": "technical implementation choices;not new organisational approvals"
},
"documentation_correction": {
"date": "2026-10-28",
"origin": "explicit Tempo correction",
"installed_revision_unchanged": "6d147693",
"previous_remote_receipt_preserved_sha256": "2e306482a2dc4aea79acd77239309a3307950eddbbd9ea77db9c7f28c47d2110",
"scope": "documentation only;no active write,no reinstall,no repeated technical tests"
}
}
@@ -0,0 +1,115 @@
{
"date": "2026-10-27",
"status": "team_UI_delta_demonstrated_consolidated_candidate_not_installed",
"branch": "codex/proactive-team-autonomy-qa-20261027",
"runtime_commit": "51d536b7ba0d525323200418155459620ec07e41",
"previous_candidate": "403c444a3e14e0ed83276ca318ad95083195708f",
"accepted_technical_candidate": "1afab4a2a71f182f260e4d2555d79242261a4d2a",
"main_checked": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"main_ancestor": true,
"delta": "InvestmentComplements:authorised private preparation returns no public offers;public complements and access checks preserved",
"new_tests": {
"count": 2,
"assertions": 18,
"result": "passed",
"scope": "private complement lookup,mixed public/private sources,unauthorised access",
"transaction_rollback": true
},
"proof": {
"record_id": 403,
"dossier_id": "5bc28554-a2d1-4e60-9181-93ba0ecede59",
"source_version": 4,
"previous_context_revision": 1,
"context_revision": 2,
"same_dossier_continued": true,
"private_source": true,
"need_state": "hypothesis",
"document_id": "19abe9ce-4c3f-4d53-b960-7ce0fc00435e",
"resource_id": "d2c76068-3856-420c-8d2d-272684e92b70",
"response_sha256": "b6cb6a7b7230a75bf5f4d56a7a2c1ac0dec7bb0fae0b85381eda56e53f0977c5",
"scan": "clean",
"scan_engine": "ClamAV",
"download_matches_original": true,
"response_reference_recovered_in_analysis_and_dossier": true,
"deliberate_title_preserved": true,
"old_source_snapshot_preserved": true,
"new_UI_workflow": "normal login/MFA;create private draft;upload/recover original;associate response;revise idea;private dossier preview/confirm;edit again;continue same dossier;preview/confirm/reload",
"no_service_or_SQL_writes_for_demonstration": true,
"read_only_verification": true,
"no_actual_team_training_session_claimed": true,
"row_preservation": {
"opportunities": {
"old_rows_unchanged": 54,
"new_rows": 1
},
"desk_cases": {
"old_rows_unchanged": 19,
"new_rows": 1
},
"documents": {
"old_rows_unchanged": 63,
"new_rows": 1
},
"opportunity_documents": {
"old_rows_unchanged": 0,
"new_rows": 1
},
"projects": {
"old_rows_unchanged": 19,
"new_rows": 0
},
"geo_locations": {
"old_rows_unchanged": 1921,
"new_rows": 0
},
"sectors": {
"old_rows_unchanged": 12,
"new_rows": 0
},
"value_chains": {
"old_rows_unchanged": 0,
"new_rows": 0
},
"organizations": {
"old_rows_unchanged": 3,
"new_rows": 0
},
"audit_events": {
"old_rows_unchanged": 399,
"new_rows": 10
}
},
"Songo401_and_Gurue402_unchanged": true,
"new_masters_or_grants": false,
"publication_or_contact_external": false,
"accepted_unaffected_suites_reused": true
},
"accepted_proofs_reused": [
"14 API/139 assertions",
"7 frontend report tests",
"normal login/MFA and create/edit/history",
"explicit publication/anonymous access controls",
"Wayfinder --with-form",
"TypeScript",
"isolated QA frontend build"
],
"frontend_changed": false,
"schema_or_configuration_changed": false,
"no_new_roles_or_grants": true,
"pilots_not_published_or_modified": [
401,
402
],
"commercial_outreach": false,
"human_team_training_claimed": false,
"L8_preserved": "14360748194f3658d91a7d7ae5615efd0fcbfbb7",
"server_operations": false,
"installation_conditions": [
"fresh capacity/inodes measurement against build and backup requirements",
"recheck current main",
"fresh backup/restore",
"keep active release until new ready",
"verify served revision and installed delta only"
],
"private_outputs": "outputs/proactive-team-autonomy-20261027/"
}
@@ -0,0 +1,40 @@
{
"date": "2026-10-27",
"status": "exercise_prepared_awaiting_real_team_use",
"installed_reference_from_accepted_receipt": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"installation_receipt": "docs/investmoz/unification/sequential-delivery-installed-20261027.json",
"guide": "docs/investmoz/unification/traceability-and-manual.md#27102026--avaliação-de-utilização-pela-equipa-sem-codex",
"evaluation_scope": [
"prepare a private work analysis using an existing authorised source",
"record evidence with source,period,coverage and distinction between fact and hypothesis",
"structure a complementary idea with clients/payer,conditions and unknowns",
"save and recover through the interface",
"preview/confirm and recover in the same dossier",
"revise a pending point and recover the new version without duplication"
],
"existing_guide_reused": true,
"technical_proofs_reused": true,
"new_technical_tests": 0,
"new_installations": 0,
"active_application_writes": 0,
"private_pilots_modified": false,
"team_messages_sent": 0,
"team_execution_observed": false,
"participants": [],
"observed_results": [],
"Codex_executes_team_exercise": false,
"existing_authorised_accounts_only": true,
"new_permissions_or_roles": false,
"not_a_new_approval_gate": true,
"results_to_return": [
"date and operational profile",
"internal analysis/dossier references in authorised channel",
"steps achieved and guide/human help used",
"step/field and concrete difficulty",
"exact message or behaviour and expected result"
],
"resume_when": "Real team observations arrive;address only reported usability/access/save-recovery obstacles",
"commercial_validation_separate": true,
"Songo_and_Gurue": "private;external commercial evidence pending",
"L8": "partial;PEC and own credits separate"
}
@@ -0,0 +1,759 @@
{
"date": "2026-10-27",
"status": "installed_and_verified",
"served_commit": "669cb8979b0c372659fc2ad3876aebc919d5df19",
"previous_commit": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"remote_backup": "/var/backups/investmoz-sector-navigation-20261027/backup",
"remote_receipt": "/var/backups/investmoz-sector-navigation-20261027/installed-receipt.json",
"runtime_delta": [
{
"file": "app/Http/Controllers/PortalServicesController.php",
"before_sha256": "512cc1e2a45a62f4164076a77c5b005a507c6f2150c4fbf7f834193b6357e6f8",
"after_sha256": "9bf672f584e5012ec5d8b71828c83ea40d6c116619a41f985396d4531d733cdf"
},
{
"file": "resources/js/pages/portal/services.tsx",
"before_sha256": "434790ec829e8f6cb012f88da3871746593051eb7fd6034b6e7977eb2bef4e73",
"after_sha256": "9621eaec71bbb87157dbe41841ba1c098e2b5603a72bbaa80adf3bceaa14b61c"
}
],
"source_files_verified": 1000,
"qa": {
"tests": 3,
"assertions": 319,
"database": "proactive_investment_20261027_test",
"port": 55441,
"rollback": true,
"routes_types_build": "passed",
"browser": "10 unique cards;Agronegocio/Turismo isolated;sector filter,back,reload,guest dossier entry preserved",
"screenshot": "unavailable (zero width);AX proof retained"
},
"installer": {
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
"installed": {
"status": "installed",
"commit": "669cb8979b0c372659fc2ad3876aebc919d5df19",
"release": "/var/www/investmoz-homologacao/releases/669cb8979b0c372659fc2ad3876aebc919d5df19-6a2f00c6",
"previous_release": "/var/www/investmoz-homologacao/releases/9fda6d6e12832a3cf25e7314f1f895dd430238c5-88fc859c",
"database_migrations": 0,
"content_imports": 0
},
"latest_report": {
"status": "installed",
"commit": "669cb8979b0c372659fc2ad3876aebc919d5df19",
"release": "/var/www/investmoz-homologacao/releases/669cb8979b0c372659fc2ad3876aebc919d5df19-6a2f00c6",
"previous_release": "/var/www/investmoz-homologacao/releases/9fda6d6e12832a3cf25e7314f1f895dd430238c5-88fc859c",
"database_migrations": 0,
"content_imports": 0,
"requested_commits": [
"669cb8979b0c372659fc2ad3876aebc919d5df19"
],
"finished_at": "2026-10-27T11:53:24.879567+00:00"
},
"log_file": "1793101792543556387.log",
"summaries": [
"OK (1 test, 3106 assertions)",
"built in 31.42s",
"OK (59 tests, 317 assertions)",
"# tests 1080",
"# pass 1080",
"# fail 0"
],
"log_bytes": 306104
},
"backup": {
"stage": "/var/backups/investmoz-sector-navigation-20261027/backup",
"created_at": "2026-10-27T11:44:59Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "9b2437017495fe449cfe0c869da62870bd0fc4bddde596660a37392b8dbdaaba",
"files_sha256": "bf268753549312be793605de294105ac6836ff96a16ab740b1a2c929a15a523a",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "sector_navigation_restore_20261027",
"port": 55441,
"source_dump_sha256": "9b2437017495fe449cfe0c869da62870bd0fc4bddde596660a37392b8dbdaaba",
"active_database_writes": 0
},
"capacity_after_backup": {
"at": "2026-10-27T11:48:33.493720+00:00",
"baseline": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"capacity_after_backup_satisfied": true,
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"free_bytes": 94615425024,
"free_inodes": 23762622
},
{
"path": "/var/lib/investmoz-deploy",
"free_bytes": 94615425024,
"free_inodes": 23762622
},
{
"path": "/var/backups",
"free_bytes": 94615425024,
"free_inodes": 23762622
},
{
"path": "/tmp",
"free_bytes": 94615425024,
"free_inodes": 23762622
},
{
"path": "/var/lib/docker",
"free_bytes": 94615425024,
"free_inodes": 23762622
}
],
"backup_age_seconds": 214.493685,
"backup_dump_sha256": "9b2437017495fe449cfe0c869da62870bd0fc4bddde596660a37392b8dbdaaba",
"restore_verified": true,
"tables_verified": 174,
"files_verified": 369,
"backup_paths": {
"dump": "/var/backups/investmoz-sector-navigation-20261027/backup/database.dump",
"files": "/var/backups/investmoz-sector-navigation-20261027/backup/files-before.tar.gz"
},
"active_writes": 0
},
"schema_permissions": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"preservation": {
"checked_at": "2026-10-27T11:55:17.440349+00:00",
"installed": "669cb8979b0c372659fc2ad3876aebc919d5df19",
"business_tables_unchanged": 172,
"total_tables": 174,
"operational_tables_to_reconcile": {
"cache": {
"before": {
"rows": 108,
"checksum": "0d9184e9b1f30ace1b1da4990b284ed9"
},
"after": {
"rows": 108,
"checksum": "6cf70f4b3bfc3a57f18b68080f939a19"
}
},
"sessions": {
"before": {
"rows": 21,
"checksum": "a5144e0ab915427ad1a8dddb70d8beee"
},
"after": {
"rows": 41,
"checksum": "261778bcf00473e4d1792749cc5ec6d0"
}
}
},
"persistent_files_unchanged": 369,
"original_configuration_preserved": true,
"synthetic_QA_storage_not_served": true,
"QA_storage_saved_outside_active": "/var/lib/investmoz-deploy/qa-runtime/669cb8979b0c372659fc2ad3876aebc919d5df19-6a2f00c6",
"fixture_or_content_imports": 0,
"migrations": 0,
"comparison_identity": "postgres;UTC;consistent before snapshot and after read-only transaction",
"active_database_writes": 0
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 108,
"after_rows": 108,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 21,
"after_rows": 41,
"changes": [
{
"key_sha256": "2ad1cb241771733ecdcd4d01332669674850e8c69e092604b4deb80014596094",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "17b9f88494ab475782d0a1a069bd6c3c6154489201d1335fbae9af15530a7231",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "fba4cdd75dd31dbc9d9b38ae207cc10c91cf889ecdbe8e7996059f7d5c94a0ae",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "c2ac41f80cf479eb3c8f024b6140d7c65bb75407f8d92a89102b2424e9c78b81",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "438d48be29b8f94cadc4c0731034c86c65cbf457a422949e3ff8a3af82694313",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "64b01593f650d8ab56f143f5e7dd32647277e9be7ace1a77dba9578c6b5b7501",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": false,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "3bb40945f442a7f0f13c7471b2ede4fad92bb615c5716e5f8cbae29b8cb690f4",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "cad0a1de3861c0491bd01e7f133074335041313d64a0aa4692cf70fa607ba81c",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "a88c70aba8ba526065925b98c73e3a05cab4051d9b298e565bd562080eb19bf1",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "d0c392ca36450e9123f8d5472757d86954f41168448fb512ad1fdda6d7c6dd8b",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "96464d3abc3cbd84145b5d265e1d647b762c4e89afdc8cbccd5f3778940ca7d1",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "cfbc6ad7b813e14d9fb2b805daece5ab8c1ea2bfb42c548be709972b692eee3d",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "3caf5a87cdae5355a8066aa5a2773c3252608403c0b8dc66bbbc657c8029bae8",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "294f5cb374a33087114fbb2e71d8815b366ff4e52057ca8ec381d3998786d4fc",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "2f342bbe74c8109df6d30a2c1d293b36572c4953b80d9ccb18d7c8924642f4d7",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "1e430e81b8fc7238b6cc37d5ef16c8482f1475c15b490fc2a8512a7ec15d1136",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "8c7e4a6a4af2a4e0106a24dc4d6e434baefdb8d0bca551bc8377c34cee667ba5",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "9c23bed34e3ee88810369ce7daef74863f692d5ab0360a4f3ae46cd7f60fac2d",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "810ed909001d96275b1c7f2d3f5fd1843afdc2054c134a7d0e8474a9261d6f85",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "7e025b942486695c1749702b5ca355089121e35d744dcd03220aa7b1f5b4cb08",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"public_delta": {
"cards": 10,
"index_details_before": true,
"index_details_after": false,
"sector_pages_unchanged": [
"agronegocio",
"turismo",
"mercado-financeiro/fintech"
],
"guide_count_per_selected_sector": {
"agronegocio": 1,
"turismo": 1,
"mercado-financeiro/fintech": 1
},
"filter": "agronegocio",
"manifest_sha256": "e8f9e3d19077576db83e80adf3f34a93ca676553ac1f6c69c3f4e715a4bde76a",
"manifest_verified": true,
"private_writes": 0
},
"main_delivery": "normal fast-forward Git push;existing webhook/installer;old release preserved until ready",
"private_pilots": "No Songo/Gurue publication;no QA data import",
"pec": "7fdb6b42 remains separate QA branch, not installed in this delivery",
"external_commit": "88b39b5 intent reproduced locally by explicit user instruction;no binary-equivalence claim",
"artifacts": [
{
"file": "after.json",
"bytes": 235088,
"sha256": "2cbdd93fa921c8d2b1d05e5b7c9cdb896f7ebbda8839abe9d52f4f3728d1826e"
},
{
"file": "backup.py",
"bytes": 5452,
"sha256": "3d4d549387b3b811f51c47e8da79f75e33d9814fd8ee93a116c7254c62d426ae"
},
{
"file": "backup.txt",
"bytes": 822,
"sha256": "504f147468d9ffdd9cb773fa7eb7c0e1963f0b14047fbdd208659a78332f29d6"
},
{
"file": "before.json",
"bytes": 235089,
"sha256": "ae5dd2e81c21bb71d01435e397ddf6d831a7527c5e8e7699ef86ef6f5200056a"
},
{
"file": "capacity-after.py",
"bytes": 1610,
"sha256": "5fc773a1f74a3f6028c2d190c452c8d58f8b4a2f56afc508c61002d4eb892371"
},
{
"file": "capacity-after.txt",
"bytes": 1994,
"sha256": "dffb2f7bc0f8a4d46dd76022d3952513b4f029545524b7e2d81e97cebebd9f09"
},
{
"file": "index-served.txt",
"bytes": 6663,
"sha256": "bea4d0bbb39366a90a6b2c2fd16d14d0bd31bed93595145f1afe2740d59b99a0"
},
{
"file": "inspect.txt",
"bytes": 61498,
"sha256": "6e66ce6aaeeb67723daa65d3659660aadb14760d365db21dc3a36a8b3cef2d3f"
},
{
"file": "integrated.json",
"bytes": 251,
"sha256": "5f58ca5aad02394c5d0f8932ce9c3d09c915c16d2299ec76ddd06445f9c3b5e2"
},
{
"file": "matrix-preservation.json",
"bytes": 142,
"sha256": "3f9eba3a66126091ade7bde897f6ed5be1428ddcb62b610a537ec638007ba2fe"
},
{
"file": "operational-delta.txt",
"bytes": 7899,
"sha256": "56d9ac3eb9be3069164303d615fc484dedc3c1912a4e422bd340529419cb9c82"
},
{
"file": "pipeline-current.py",
"bytes": 21198,
"sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604"
},
{
"file": "preflight.py",
"bytes": 2337,
"sha256": "73484c8e8e811f68799200b87c7f2b58b91b09502afbd64b8f9b3116ab59bbf2"
},
{
"file": "preflight.txt",
"bytes": 4446,
"sha256": "16d116ab7c673aa836fb5afae74369077b0103028d7972e1cb34bbb0bf9f8afd"
},
{
"file": "preparation.json",
"bytes": 245104,
"sha256": "bbad8749a58c20e89f40064eee47b53969f85c4e478bcfd65eb73e0666684773"
},
{
"file": "preservation.txt",
"bytes": 945,
"sha256": "95ed7c2338244ca751fb01e2a92ca5a4e408e23947bc394322970c2bf5eab860"
},
{
"file": "preserve-data.py",
"bytes": 2288,
"sha256": "9f0c3097467fe171508e741fa1e360df7747aab15f2feb1465adaf38520e69c3"
},
{
"file": "public-after.json",
"bytes": 42854,
"sha256": "cee7364e130234ca27fea14ad271c0b13d9de68fbecf0910ac4014fec07c498c"
},
{
"file": "public-before.json",
"bytes": 42784,
"sha256": "cfe084efbf1bf43b3624e4a1b4834857c6673dc32f614fe6a8e57f47882c8b11"
},
{
"file": "public-details-after-diagnostic.json",
"bytes": 34496,
"sha256": "173fc6ceb4429e4c53a481606efedb3c6738f224d761f43a75dc18cae4b6a1e8"
},
{
"file": "reconcile-operational-delta.py",
"bytes": 5338,
"sha256": "295501048b897c8506ced3943013058f8bd2c904e8a48b083ecd173759c41cf3"
},
{
"file": "restore.py",
"bytes": 2819,
"sha256": "4bd143dd278701e08d1878d4011b096d1fb22ecadd995b5b433349d9e4cd36cc"
},
{
"file": "restore.txt",
"bytes": 554,
"sha256": "2b31f1844444604094dfbaed3e17a62a6e3c8dcac178052632b62780efd063c6"
},
{
"file": "schema-after.txt",
"bytes": 526,
"sha256": "d5855a7a0a16c1762cce140750c3b8c984e9ea61817bdf02e684cc9ae1c01592"
},
{
"file": "schema-before.txt",
"bytes": 1016,
"sha256": "0ab7c964792acdd8917bce256c472e55e034b103500a58b49f020b5084823ed7"
},
{
"file": "schema-permissions-after.py",
"bytes": 1864,
"sha256": "52ddfc9d1a235518e95dedc653eb303866477d52a8b712da75d331cea7ab714f"
},
{
"file": "schema-permissions-before.py",
"bytes": 1707,
"sha256": "2723b6a4e099f3af2efd333f3f9d8c6937e6cf2255b8448f5f27bc74455af319"
},
{
"file": "source-after.txt",
"bytes": 160,
"sha256": "e88624cd7f7e72c2dad88fabac95c2dfe6ca9c140d40aecfed238fd46e2a0997"
},
{
"file": "source-before.txt",
"bytes": 324,
"sha256": "d0211ba30920fd270b5bc3873455067b20cb0078f35991410f26356b70350e2b"
},
{
"file": "source-check.py",
"bytes": 669,
"sha256": "2ea95b35eb8c2eb950216ab77e2a3127b2400372e5034179953edae058b0eb84"
},
{
"file": "ssh-session.py",
"bytes": 3050,
"sha256": "51c402acdfb594d8146610a224f03b17369b6641511235a616c84c7e5d688f18"
},
{
"file": "status-a1.txt",
"bytes": 1994,
"sha256": "1d78e2bf83b402b2108dff42b029fe95753399dfcd3e880263d0cdb2c77f4b85"
},
{
"file": "status-a2.txt",
"bytes": 2058,
"sha256": "0307b19f4fd764350cac2c839968011516c7c7aa7bb5d80317816a70bc5cd16f"
},
{
"file": "status-a3.txt",
"bytes": 2162,
"sha256": "ebdec6a635347bcec45d45b3ab182b7a10a22d816cef57709b156e4d2a1e4da7"
},
{
"file": "status-a4.txt",
"bytes": 2162,
"sha256": "ebdec6a635347bcec45d45b3ab182b7a10a22d816cef57709b156e4d2a1e4da7"
},
{
"file": "status-a5.txt",
"bytes": 2244,
"sha256": "f6f22631054fa0920a3c897db7bc6e3a00bce5420e4893f08125bd103dc5fb8f"
},
{
"file": "verify-public.py",
"bytes": 2470,
"sha256": "733a94aa83698de4a5f1f1a79c9d3dbdce8d80c69787b549864f7916810777b4"
}
],
"remote_receipt_sha256": "cd95142b7f85e40a0f86e0f7d3dca513e7bc208c89aa91b8e3ad213191d8465f"
}
@@ -0,0 +1,88 @@
{
"date": "2026-10-27",
"status": "QA passed; not yet installed",
"source_intention": "88b39b527859bd420f2e223a7afea89bea38de54",
"reproduced_locally": true,
"byte_equivalence_to_external_commit": false,
"baseline": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"branch": "codex/sector-navigation-fix-local-20261027",
"runtime_delta": [
"app/Http/Controllers/PortalServicesController.php",
"resources/js/pages/portal/services.tsx"
],
"tests": {
"feature_tests": 3,
"assertions": 319,
"database": "proactive_investment_20261027_test",
"port": 55441,
"rollback": true,
"routes": "passed",
"typescript": "passed",
"build": "passed"
},
"browser": {
"index_cards": 10,
"separate_sectors": [
"agronegocio",
"turismo"
],
"opportunities_isolated": true,
"filter": "agronegocio",
"back": true,
"reload": true,
"fintech_url_preserved": true,
"dossier_entry": "sector:3; existing guest authentication, no new dossier created",
"screenshots": "capture unavailable: zero width; AX proof retained",
"editorial_guides": "not loaded in QA sample; consumers unchanged, destination to check"
},
"protected_files": [
{
"file": "resources/js/components/sector-content.tsx",
"sha256_LF": "4ee55554f8a88ba7db1ac0dc74259d4e66603979c3873f9ec897437830b8e0ae",
"unchanged": true
},
{
"file": "resources/js/components/sector-entry.tsx",
"sha256_LF": "96672c709b70f840d105c664a92d49a17acb66cd852d43dadaa8f3fef8b3e845",
"unchanged": true
},
{
"file": "resources/js/components/public-sector-cards.tsx",
"sha256_LF": "858ba6235ef8b46461d416b3264436e4df2c9555b8e6d8c3644dbd8c55463484",
"unchanged": true
},
{
"file": "app/Services/SectorInvestment.php",
"sha256_LF": "0b8fbc6e3d03ede627e95332703e4749a53d86708bdc0f9579e958caf30e4d17",
"unchanged": true
},
{
"file": "app/Services/SectorOrganization.php",
"sha256_LF": "f0e54fe6acfe746c6758387f43610232cb51371b0404bcefaf466d8b704f3ae3",
"unchanged": true
},
{
"file": "app/Http/Controllers/PublicPortalController.php",
"sha256_LF": "cb6abd75533660a52e18148cc5f1ab706d2e08f9c94334510541e6b0e003b461",
"unchanged": true
},
{
"file": "resources/js/lib/project-dossier.ts",
"sha256_LF": "d59f3fa4dcb3fade1f967564c972e30932aa095a4e5dd4ba0be8b4e07492ef0a",
"unchanged": true
},
{
"file": "resources/js/lib/irpc-annual-settlement.ts",
"sha256_LF": "8cca5316259e3ebabfa75be9f64143a8664a447ac30b23b882318edfd70a68f1",
"unchanged": true
},
{
"file": "routes/web.php",
"sha256_LF": "95930c76977d446b74a422acc4b60869ff6bae5d4567c21cc644484c5f09cbda",
"unchanged": true
}
],
"pec_branch_not_integrated": "7fdb6b42",
"active_writes": 0,
"private_pilots_published": false
}
@@ -0,0 +1,719 @@
{
"date": "2026-10-27T10:51:18.002627+00:00",
"status": "both_deliveries_installed_in_requested_order",
"order": [
"l8",
"proactive"
],
"stages": {
"l8": {
"candidate": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"previous": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"installed": {
"status": "installed",
"commit": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"release": "/var/www/investmoz-homologacao/releases/c85e772d2fd2be5182eb4d768ddd34d43962bf59-ae7401aa",
"previous_release": "/var/www/investmoz-homologacao/releases/f8d57bddf96b4610604a013fcc5bdd703c7dc6d5-7a31e8ac",
"database_migrations": 0,
"content_imports": 0
},
"served": {
"commit": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"branch": "main",
"built_at": "2026-10-27T10:32:26.854949+00:00",
"manifest_sha256": "f27852b26d53b46f6927ee46c13370db17a4bec1623655552fd8fdca3589005a"
},
"backup": {
"stage": "/var/backups/investmoz-sequential-20261027/l8/backup",
"created_at": "2026-10-27T10:25:59Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "11bc7c8f25edc861b18785a9714845384cf29a5da92f58f55ff53f6913e69d42",
"files_sha256": "52ffe40bcf943ce580047b55c34b60d3ba876d81dd4bc3ff4fbe1ec97a9c6f56",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_l8_first_restore_20261027",
"port": 55441,
"source_dump_sha256": "11bc7c8f25edc861b18785a9714845384cf29a5da92f58f55ff53f6913e69d42",
"active_database_writes": 0
},
"capacity_after_backup": {
"at": "2026-10-27T10:28:35.403687+00:00",
"baseline": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"capacity_after_backup_satisfied": true,
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"free_bytes": 98153496576,
"free_inodes": 23860325
},
{
"path": "/var/lib/investmoz-deploy",
"free_bytes": 98153496576,
"free_inodes": 23860325
},
{
"path": "/var/backups",
"free_bytes": 98153496576,
"free_inodes": 23860325
},
{
"path": "/tmp",
"free_bytes": 98153496576,
"free_inodes": 23860325
},
{
"path": "/var/lib/docker",
"free_bytes": 98153496576,
"free_inodes": 23860325
}
],
"backup_age_seconds": 156.403651,
"backup_dump_sha256": "11bc7c8f25edc861b18785a9714845384cf29a5da92f58f55ff53f6913e69d42",
"restore_verified": true,
"tables_verified": 174,
"files_verified": 369,
"backup_paths": {
"dump": "/var/backups/investmoz-sequential-20261027/l8/backup/database.dump",
"files": "/var/backups/investmoz-sequential-20261027/l8/backup/files-before.tar.gz"
},
"active_writes": 0
},
"source": {
"phase": "after",
"installed": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"files_verified": 996,
"source_matches_Git": true,
"active_writes": 0
},
"schema_permissions": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"preservation": {
"checked_at": "2026-10-27T10:34:53.148104+00:00",
"installed": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"business_tables_unchanged": 172,
"total_tables": 174,
"operational_tables_to_reconcile": {
"cache": {
"before": {
"rows": 106,
"checksum": "6c05e12d73079effd52f3add83104de2"
},
"after": {
"rows": 106,
"checksum": "a9c2d7df6ecc8cabba35d5c6f1d019c5"
}
},
"sessions": {
"before": {
"rows": 11,
"checksum": "b83d84b3894b8fc6ef42b0b8fd937304"
},
"after": {
"rows": 12,
"checksum": "fea9aecf735aa394f40e9a4b6a55e27f"
}
}
},
"persistent_files_unchanged": 369,
"original_configuration_preserved": true,
"synthetic_QA_storage_not_served": true,
"QA_storage_saved_outside_active": "/var/lib/investmoz-deploy/qa-runtime/c85e772d2fd2be5182eb4d768ddd34d43962bf59-ae7401aa",
"fixture_or_content_imports": 0,
"migrations": 0,
"comparison_identity": "postgres;UTC;consistent before snapshot and after read-only transaction",
"active_database_writes": 0
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 106,
"after_rows": 106,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 11,
"after_rows": 15,
"changes": [
{
"key_sha256": "7a0b0d7c40ef99d4c033c9df695a5cd69d6433f068463fdf9f8baff6835453f6",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "9f06bc9fb6ef8d45fe1c1093b4e54b59ee080463861b8051271597b0ec5e45a4",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "e66f917f9d71192fe17cf2c7c26046afa6bff0db292d0c232a5b59629be030a3",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "a84b009ac5f5358a0452f4a40968a4826e34ced257930b6ecf08a0289aa6684f",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"public_delta": {
"stage": "l8",
"served_revision": {
"commit": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"branch": "main",
"built_at": "2026-10-27T10:32:26.854949+00:00",
"manifest_sha256": "f27852b26d53b46f6927ee46c13370db17a4bec1623655552fd8fdca3589005a"
},
"manifest_hash_matches": true,
"compiled_delta_markers": {
"IRPC-annual-settlement/1": [
"assets/project-dossier-BNt4O6Rz.js"
],
"Preparar saldo anual L8": [
"assets/services-BvFvahdE.js"
],
"Calcular e guardar saldo anual L8": [
"assets/services-BvFvahdE.js"
],
"Saldo anual simulado": [
"assets/project-dossier-BNt4O6Rz.js"
],
"PEC e créditos separados": [
"assets/project-dossier-BNt4O6Rz.js"
]
},
"assets": [
{
"file": "assets/simulation-form-zFZ4YNrB.js",
"status": 200,
"sha256": "338068b86cce1c3215ee71b1328a6cb2f754b903ed78ff1886f8554df506d2d6"
},
{
"file": "assets/services-BvFvahdE.js",
"status": 200,
"sha256": "97615f0d113746ee5ac1550a1e59c567dd152ef5ddac68f133bd2cee9e9c16d1"
},
{
"file": "assets/project-dossier-BNt4O6Rz.js",
"status": 200,
"sha256": "8cf6a6678c5c9aed0d7b996147bc2fde35d20f86c73ec7bd894df2ae11aae75c"
},
{
"file": "assets/project-dossier-document-Cj4QX7oF.js",
"status": 200,
"sha256": "302ec6831893f2ef4c09a90273b458c49a6ff281adb01c4594a166a90efe53e2"
}
],
"simulator_status": 200,
"served_component": "portal/services",
"private_operations": 0,
"QA_fixture_imports": 0,
"accepted_QA_proofs_reused": true,
"method": "Read-only served revision/manifest/compiled delta;no synthetic active records or publication"
},
"backup_restore_verified": true
},
"proactive": {
"candidate": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"previous": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"installed": {
"status": "installed",
"commit": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"release": "/var/www/investmoz-homologacao/releases/9fda6d6e12832a3cf25e7314f1f895dd430238c5-88fc859c",
"previous_release": "/var/www/investmoz-homologacao/releases/c85e772d2fd2be5182eb4d768ddd34d43962bf59-ae7401aa",
"database_migrations": 0,
"content_imports": 0
},
"served": {
"commit": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"branch": "main",
"built_at": "2026-10-27T10:50:00.471464+00:00",
"manifest_sha256": "40de38cbf74b475f73de825bfd16af6fabe339faad4817e2857fd9ae36ec7cc0"
},
"backup": {
"stage": "/var/backups/investmoz-sequential-20261027/proactive/backup",
"created_at": "2026-10-27T10:36:28Z",
"target": {
"database": "teste_investidor",
"port": 5432
},
"tables": 174,
"files_verified": 369,
"dump_sha256": "45107e48e18ab2b9a78af08374fe3bfa0af216f34433c10fc81f264400e331ce",
"files_sha256": "f7196314f915e75975a9e580a69ddc4dffae64597ae05e9ae59cfbcbb0b47731",
"restore_verified": false
},
"restore": {
"restore_verified": true,
"tables_verified": 174,
"container_network": "none",
"database": "irpc_l8_first_restore_20261027",
"port": 55441,
"source_dump_sha256": "45107e48e18ab2b9a78af08374fe3bfa0af216f34433c10fc81f264400e331ce",
"active_database_writes": 0
},
"capacity_after_backup": {
"at": "2026-10-27T10:46:06.120042+00:00",
"baseline": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"capacity_after_backup_satisfied": true,
"volumes": [
{
"path": "/var/www/investmoz-homologacao/releases",
"free_bytes": 95851429888,
"free_inodes": 23794207
},
{
"path": "/var/lib/investmoz-deploy",
"free_bytes": 95851429888,
"free_inodes": 23794207
},
{
"path": "/var/backups",
"free_bytes": 95851429888,
"free_inodes": 23794207
},
{
"path": "/tmp",
"free_bytes": 95851429888,
"free_inodes": 23794207
},
{
"path": "/var/lib/docker",
"free_bytes": 95851429888,
"free_inodes": 23794207
}
],
"backup_age_seconds": 578.120001,
"backup_dump_sha256": "45107e48e18ab2b9a78af08374fe3bfa0af216f34433c10fc81f264400e331ce",
"restore_verified": true,
"tables_verified": 174,
"files_verified": 369,
"backup_paths": {
"dump": "/var/backups/investmoz-sequential-20261027/proactive/backup/database.dump",
"files": "/var/backups/investmoz-sequential-20261027/proactive/backup/files-before.tar.gz"
},
"active_writes": 0
},
"source": {
"phase": "after",
"installed": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"files_verified": 1000,
"source_matches_Git": true,
"active_writes": 0
},
"schema_permissions": {
"schema_sha256": "5045b3e51d2185377aa3d9ac7fa07a44fad3ec620cdfa83ffe31c8884ee1601d",
"roles_grants_sha256": "1530c33cb016e67bfdc64891ddfce7f185b13b56b2cd87c012871a685e118109",
"filesystem_permissions": {
".env": {
"mode": 416,
"uid": 1001,
"gid": 33
},
"storage": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"storage/app": {
"mode": 1533,
"uid": 1001,
"gid": 33
},
"bootstrap/cache": {
"mode": 1528,
"uid": 1001,
"gid": 33
}
},
"comparison_identity": "postgres;catalogue read only;no passwords collected",
"unchanged": true
},
"preservation": {
"checked_at": "2026-10-27T10:50:49.400700+00:00",
"installed": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"business_tables_unchanged": 172,
"total_tables": 174,
"operational_tables_to_reconcile": {
"cache": {
"before": {
"rows": 106,
"checksum": "a9c2d7df6ecc8cabba35d5c6f1d019c5"
},
"after": {
"rows": 106,
"checksum": "db78f82003db53db664667b8e6f46088"
}
},
"sessions": {
"before": {
"rows": 15,
"checksum": "4df23659bf65acacc88e1d84d095a243"
},
"after": {
"rows": 20,
"checksum": "64d48443c5027a2fc08615f7528126b5"
}
}
},
"persistent_files_unchanged": 369,
"original_configuration_preserved": true,
"synthetic_QA_storage_not_served": true,
"QA_storage_saved_outside_active": "/var/lib/investmoz-deploy/qa-runtime/9fda6d6e12832a3cf25e7314f1f895dd430238c5-88fc859c",
"fixture_or_content_imports": 0,
"migrations": 0,
"comparison_identity": "postgres;UTC;consistent before snapshot and after read-only transaction",
"active_database_writes": 0
},
"operational_delta": {
"status": "operational_delta_reconciled",
"comparison_identity": "postgres before/after;isolated restored baseline;no RLS visibility inference",
"cache": "queue:restart;requestthrottle;identical home-sector cached value with refreshed expiry(HomeController remember10min);no deletedcache",
"sessions": "anonymous sessions from delivery user-agent or exactUA/time correlated with nginx public request;deleted sessions individually expired beyond configured lifetime,normal database session garbage collection(config/session lottery2/100)",
"delta": {
"cache": {
"before_rows": 106,
"after_rows": 106,
"changes": [
{
"key_sha256": "7f7dd83f47f5bf404d55e6e9f1367948721579970b195680645e356031a070ff",
"kind": "updated",
"fields": [
"value",
"expiration"
],
"key_pattern": "investemoz-cache-illuminate:queue:restart",
"is_queue_restart_key": true,
"expiration_unchanged": false,
"throttle_timer_pair": false,
"same_value_home_cache_expiry_refresh": false
}
]
},
"sessions": {
"before_rows": 15,
"after_rows": 20,
"changes": [
{
"key_sha256": "f78ee9e6f589e1bbda4730d4e71a90c9ad082cc25776c415b6cc815ce4b4d491",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "7eb58435f5d60610be81945c0da4331a1dbfda680f7da3f107dbbeb6b60c39df",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "1d5026f13ace3894011db54d801f72cd76f9b138d54fe2f7b89f579743282db6",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "56820cc8560f13a2c0962a973bd05624712648c2beffd2058dfbae6c9103c7fa",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
},
{
"key_sha256": "a91337e37e71b520dd6d621b0ef7bbf68a9a20d099198ecd8edfdc365a9f52f1",
"kind": "added",
"fields": [
"id",
"ip_address",
"user_agent",
"payload",
"last_activity"
],
"anonymous_user": true,
"delivery_user_agent": true,
"expired_before_comparison": false,
"session_lifetime_minutes": 120,
"anonymous_public_request_logged": true
}
]
}
},
"business_tables_to_confirm_separately": 172,
"active_data_writes_by_comparison": 0,
"restore_network": "none"
},
"public_delta": {
"stage": "proactive",
"served_revision": {
"commit": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"branch": "main",
"built_at": "2026-10-27T10:50:00.471464+00:00",
"manifest_sha256": "40de38cbf74b475f73de825bfd16af6fabe339faad4817e2857fd9ae36ec7cc0"
},
"manifest_hash_matches": true,
"compiled_delta_markers": {
"IRPC-annual-settlement/1": [
"assets/project-dossier-DFH3NDYe.js"
],
"Preparar saldo anual L8": [
"assets/services-CV6TWKfT.js"
],
"Calcular e guardar saldo anual L8": [
"assets/services-CV6TWKfT.js"
],
"Saldo anual simulado": [
"assets/project-dossier-DFH3NDYe.js"
],
"PEC e créditos separados": [
"assets/project-dossier-DFH3NDYe.js"
],
"Território e sector": [
"assets/proactive-investment-CPkgrUFY.js"
],
"Preparar análise e ideia": [
"assets/proactive-investment-CPkgrUFY.js"
],
"Hipótese analítica": [
"assets/project-dossier-DFH3NDYe.js",
"assets/proactive-investment-CPkgrUFY.js"
],
"Documento existente associado": [
"assets/proactive-investment-CPkgrUFY.js"
],
"Origem privada autorizada deste dossier": [
"assets/proactive-investment-CPkgrUFY.js"
]
},
"assets": [
{
"file": "assets/project-dossier-DFH3NDYe.js",
"status": 200,
"sha256": "62f4e47f6efbb7916663604450ee427401080fad6f9332be2cd0dc017866b85a"
},
{
"file": "assets/project-dossier-document-CgBtS4qw.js",
"status": 200,
"sha256": "fb9aa7e305891719ae49cf8bbcee05b3114c05c8ee1df20238964fddb56721dd"
},
{
"file": "assets/catalogue-DRXXB4Y7.js",
"status": 200,
"sha256": "66a2ae7c819f1ac36ffd37e8456c3cfd2537c820845b20eddb4dd7bfaf4a32a2"
},
{
"file": "assets/services-CV6TWKfT.js",
"status": 200,
"sha256": "656da0adacd9141fcd9b1e82ab9959a62ea381a3815e183c5535801c95d92dff"
},
{
"file": "assets/simulation-form-zFZ4YNrB.js",
"status": 200,
"sha256": "338068b86cce1c3215ee71b1328a6cb2f754b903ed78ff1886f8554df506d2d6"
},
{
"file": "assets/proactive-investment-CPkgrUFY.js",
"status": 200,
"sha256": "288cd1005a05c82241a1ddd8c5bb446e297ead7b7605060cec80d268726522ac"
},
{
"file": "assets/opportunity-draft-Da2FBHoN.js",
"status": 200,
"sha256": "ba50f61a39693ebebbe30ba1937d45c92b80f81ab9a98418ef75662f893cdfb2"
},
{
"file": "assets/detail-BfSgTC5d.js",
"status": 200,
"sha256": "234657a2e5ebad7985d78ea49c5536c31e4aac9a143a02e7682d898e47cee530"
},
{
"file": "assets/show-CJYhqIE4.js",
"status": 200,
"sha256": "6579df14a154c98235330f550e13bee20e74f19517cc1d166ae26322f56c74f9"
}
],
"simulator_status": 200,
"served_component": "portal/services",
"public_catalogue_delta": {
"ideas": {
"status": 200,
"component": "investment/catalogue"
},
"needs": {
"status": 200,
"component": "investment/catalogue"
},
"exists": {
"status": 200,
"component": "investment/catalogue"
}
},
"private_operations": 0,
"QA_fixture_imports": 0,
"accepted_QA_proofs_reused": true,
"method": "Read-only served revision/manifest/compiled delta;no synthetic active records or publication"
},
"backup_restore_verified": true
}
},
"main": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"final_served_revision": "9fda6d6e12832a3cf25e7314f1f895dd430238c5",
"private_pilots_preserved_no_publication": true,
"fixtures_not_imported_into_active_database": true,
"QA_runtime_storage_outside_active_release": true,
"active_schema_migrations": 0,
"new_grants": false,
"SGF_TEMPO": "untouched",
"accepted_business_proofs": "reused;post-install checks limited to deltas;existing installer automated checks retained",
"prior_capacity_GiB": 91.60694122314453,
"second_delivery_retry": {
"initial_candidate": "56c0c6a7caa65a4cac54e17f9d455739f8eb6198",
"initial_candidate_activated": false,
"active_L8_preserved": true,
"reason": "One frontend test depended on ignored local outputs/proactive-investment-20261027/recovered-context.json",
"correction": "9fda6d6e12832a3cf25e7314f1f895dd430238c5 changes only the test and a minimal synthetic public API projection;no profile,pilot,credentials or live records",
"application_runtime_identical_to_56c0c6a7": true,
"directed_portability_test": "passed;one test;no skipped test",
"existing_installer_guards_retained": true
}
}
@@ -0,0 +1,79 @@
{
"date": "2026-10-27",
"status": "authorised_prepared_not_installed_SSH_session_unavailable",
"authorization": "User explicitly authorised both deliveries,first L8 then proactive,no new authorisation required",
"stage1": {
"candidate": "c85e772d2fd2be5182eb4d768ddd34d43962bf59",
"includes": "14360748194f3658d91a7d7ae5615efd0fcbfbb7",
"runtime": "11a6cee981f0a425b0fceefb6ed85485bb298245",
"capacity_notes_reconciled": "c85e772d changes documentation only;historical suspension superseded by current explicit authorisation;capacity must be freshly measured",
"runtime_delta_files": [
"resources/js/components/simulation-form.tsx",
"resources/js/components/simulation-irpc-annual.tsx",
"resources/js/lib/irpc-annual-settlement.ts",
"resources/js/lib/project-dossier-report.ts",
"resources/js/lib/project-dossier.ts"
]
},
"stage2": {
"runtime_merge_commit": "74f7f93a750cfb88f9816512ee7add6473a3e34f",
"branch": "codex/sequential-delivery-20261027",
"includes_proactive_candidate": "0ff402a11dbf8d41c499dccd39184fdc20c833f4",
"L8_is_ancestor": true,
"shared_report_conflict": "Both imports and both row providers retained",
"L8_other_runtime_files_byte_identical": [
"resources/js/components/simulation-form.tsx",
"resources/js/components/simulation-irpc-annual.tsx",
"resources/js/lib/irpc-annual-settlement.ts",
"resources/js/lib/project-dossier-report.ts"
],
"proactive_other_runtime_files_byte_identical": true
},
"local_verification": {
"TypeScript": "passed",
"isolated_build": "passed",
"shared_report_delta": {
"scope": "Only shared dossier report merge integration;accepted business-rule suites reused",
"annual_rows": 6,
"proactive_rows": 10,
"annual_report_preserved": true,
"private_idea_report_preserved": true,
"inputs_unchanged": true,
"no_cross_inference": true,
"no_QA_data_written_or_published": true
},
"accepted_suites": "reused,not repeated",
"no_database_or_fixture_operations": true
},
"server": {
"SSH_bridge_state": "closed",
"key_authentication": "denied with registered host key verified",
"fresh_capacity": "not measured in this passage",
"fresh_backup": false,
"fresh_restore": false,
"installation": false,
"public_served_revision_read": {
"checked_at_UTC": "2026-10-27T10:14:16.489135+00:00",
"http_status": 200,
"revision": {
"commit": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"branch": "main",
"built_at": "2026-10-26T14:26:51.629481+00:00",
"manifest_sha256": "367be71b25b56a83571d610e211ea11beae2af87989d62ef6cc7b9c54eabf580"
},
"method": "Public revision read only;no SSH,backup or installation executed"
}
},
"main_at_preparation": "f8d57bddf96b4610604a013fcc5bdd703c7dc6d5",
"main_push_executed": false,
"required_execution_controls": [
"Use existing authenticated local SSH session;do not request authorisation again",
"Fresh capacity/inodes,backup and restore per existing procedure;keep active release until candidate ready",
"Refresh preparation candidate/base/hashes per stage;do not reuse old dated receipts",
"Stage1 only,L8;verify actual served revision and onlyL8 delta",
"Only after stage1 confirmed,stage2;fresh guards and verify proactive delta and L8 preservation",
"Exclude QA fixtures/outputs/test data from deployment inputs;no seed/import;preserve private pilots",
"Return actual installed/served hashes and fresh receipt paths;do not label this local preparation as installation"
],
"actual_remote_changes": 0
}
File diff suppressed because it is too large Load Diff
@@ -3006,3 +3006,20 @@ AUD-SIM-INT01 through AUD-SIM-INT08 are recorded in the same matrix and manual.
Actualização QA de 20/10/2026: os mesmos oito itens foram reconciliados no manual e nas duas tabelas existentes. Data com mensagem junto ao campo; inventário dos parâmetros efectivos (zero regras fiscais QA); controlos matemáticos independentes; aviso de recálculo; quatro relatórios reais do exportador com 6/6/6/5 páginas; consulta fiscal com erro/nova tentativa e traduções comuns verificados. O formulário personalizado já não exige contexto fiscal que não envia ao cálculo. Restam continuidade autenticada entre dois dossiers/nova sessão e histórico, mudança de parâmetros, controlos delimitados de cash-flow/plano, impressão nativa Edge/comparação pela interface e mensagens dinâmicas/falhas dirigidas de gravação/exportação. Estimativa restante **6–10 h**, distinta das 18–30 h iniciais. Sem main, servidor remoto, importação ou activação fiscal. Exemplos PDF são renderizações do DOCX; não certificam impressão do Edge. Ver o saldo detalhado AUD-SIM-INT01–08 no mesmo manual.
Continuação delimitada: dois dossiers e nova entrada conferidos no navegador; histórico agora visível no percurso de pequeno negócio, hashes preservados; Abrir cálculo encaminha para a etapa financeira; repetição de gravação após 503 corrigida e conferida; controlos independentes de tesouraria/plano passaram. CSV e Word descarregados pela interface coincidem nos valores comuns e apresentam a receita completa do crédito. Seis páginas do DOCX conferidas; PDF nativo ainda aguarda gravação pelo utilizador. QA tem zero regras com visibilidade completa, mas existem três originais fiscais versionados e análises/referências reutilizáveis; não se concluiu ausência na homologação sem autenticação SSH. Versões sintéticas testadas apenas em memória, sem cadastro/activação. Encontrada e corrigida perda dos pressupostos da tesouraria: snapshot no JSON existente, recuperação por dossier e relatório, sem migration; testes HTTP/frontend passaram, falta conferência visual deste novo delta. Saldo **2–4 h** após acessos/ficheiro, detalhado no mesmo manual; integração do motor fiscal permanece separada e não foi implementada. Sem main ou intervenção remota.
## 29/10/2026 — ACT-20261029-01, inventário antes da verificação do incremento
Continuação sequencial solicitada pela Tempo. Correspondência: ACT-20261029-01 reutiliza D-02 §8, clusters/cadeias e a orientação metodológica documentada em 23/10. Concluído previamente e preservado: gestão de clusters, etapas, ligações, lacunas e relações auditadas; disponibilidade instalada de carteira/âncoras e formulários fiscais conforme recibos de 28/10. Nenhuma perda nova confirmada nesta inspecção de código; não foi feita nova comparação de dados ou alegada prova do servidor. A pasta principal está em fde644af, enquanto o último recibo identifica 332c16eb instalado; reconciliar o delta sobre essa origem antes de instalar, sem substituir o destino pela pasta principal.
Incremento em preparação: diagnóstico qualitativo das cinco forças na edição do cluster, sector/região editáveis, fonte/período/evidência/justificação/limites/oportunidade por força; indeterminação explícita, ficheiro privado transferível e recuperação com confirmação. Sem alteração de schema, dados, permissões, publicações ou motores fiscais. Persistência no servidor, ligação territorial canónica, dados sectoriais fundamentados e consulta pública permanecem por implementar; ACT-01 não está concluída. Verificação dirigida e instalação ainda pendentes neste registo inicial. Restantes ACT-02 a 16 mantêm o estado anterior e a sequência, sem trabalho SGF nesta passagem.
### ACT-20261029-01 — candidato sequencial preparado, 29/10/2026
Primeiro incremento implementado, **parcial e ainda não instalado**: gestão → clusters → editar → Competitividade. As cinco forças conservam fonte, período, evidência, apreciação, limites e oportunidade; sector e região explícitos, sem inferências automáticas. Transferência de rascunhos JSON e recuperação restrita ao mesmo cluster, com confirmação antes de substituir. Quatro testes frontend dirigidos, TypeScript e compilação QA passaram tanto na pasta de trabalho como no candidato baseado em 332c16eb. Guarda C132 local passou; não foram efectuados testes nem escritas na base activa. A edição existente recebe apenas a inclusão do componente; contratos e permissões existentes preservados.
Origem reconciliada: main remoto e revisão pública conferidos em 332c16eb em 29/10. Candidato em C:/laragon/www/portal-investidor-competitiveness-qa-20261029, ramo codex/competitiveness-sequential-20261029. Consulta do estado remoto não equivale a inventário novo da base. Sessão SSH anterior encerrada; autenticação por chave recusada. Instalação requer autenticação SSH, backup fresco, restauro isolado, guarda de versão, pipeline existente e conferência posterior. Não instalar a pasta principal sobre o destino. A sequência solicitada mantém ACT-02 a 16 por iniciar após a instalação e o saldo de ACT-01; persistência no servidor, cobertura factual e consulta pública continuam pendentes. Sem declaração de conferência visual autenticada.
### 29/10/2026 — ACT-20261029-01, primeiro incremento instalado: 23ecccfa
Estado corrente de ACT-01: **parcial — primeiro incremento instalado**, substituindo apenas o estado planeado/preparado deste recorte; ACT-02 a 16 não foram implementadas nesta entrega. Instalado por avanço normal de main e pipeline existente em https://teste-investidor.tempo.co.mz/. Entrada: Gestão → Clusters → Editar → Competitividade — cinco forças de Porter. Preparação qualitativa por sector/região, evidências/fontes/períodos/limites e oportunidades, transferência JSON e recuperação confirmada do mesmo cluster. Sem gravação no servidor nem publicação da análise. Persistência, cobertura factual, território canónico e consulta pública continuam pendentes; esta instalação não encerra o critério amplo ACT-01.
Provas: backup fresco, restauro isolado sem rede das 176 tabelas; pipeline com lifecycle de schema (3.106 asserções), 59 testes Unit/320 asserções e 1.180 testes frontend sem falhas, tipos e compilação; quatro ficheiros do incremento conferidos por SHA-256 no instalado; C132 no destino passou. Comparação após instalação: todas as 176 tabelas de domínio preservadas, diferenças operacionais apenas em cache/sessões; 369 ficheiros/configuração idênticos. Acesso anónimo ao catálogo privado recusado HTTP401. Zero migrações/importações, nenhuma nova divulgação nem mudança de permissões; versão anterior 332c16eb preservada. Conferência visual autenticada permanece pendente. Recibo: `docs/investmoz/unification/competitiveness-sequential-qa-20261029.json`, em docs/investmoz/unification. As provas aceites anteriores foram reutilizadas; não foram reabertas por esta entrega.
File diff suppressed because one or more lines are too long
+2
View File
@@ -236,6 +236,7 @@
}
@media (min-width: 1280px) {
.tempo-header-inner {
grid-template-rows: minmax(71px, auto);
grid-template-columns: auto minmax(0, 1fr) auto auto auto;
column-gap: 0.25rem;
padding-inline: 1.25rem;
@@ -256,6 +257,7 @@
}
.tempo-primary-navigation > ul {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0;
}
+17 -35
View File
@@ -1,10 +1,8 @@
import { profileLinks } from '@/components/profile-navigation';
import {PortalSidebarNavigation} from '@/components/portal-sidebar-navigation';
import type { ProfileAccess } from '@/types/profile-access';
import { Link, usePage } from '@inertiajs/react';
import { LayoutGrid } from 'lucide-react';
import { portalNavigation } from '@/lib/portal-navigation';
import { portalNavigation,canShowLegacyManagement } from '@/lib/portal-navigation';
import AppLogo from '@/components/app-logo';
import { NavMain } from '@/components/nav-main';
import { NavUser } from '@/components/nav-user';
import {
Sidebar,
@@ -20,6 +18,7 @@ import type { Auth } from '@/types';
import type { OpportunityManagementAccess } from '@/types/opportunity-management';
export function AppSidebar() {
const currentPage=usePage();
const {
auth,
existingBusinessEnabled,
@@ -27,7 +26,9 @@ export function AppSidebar() {
aiEnabled,
opportunityManagement,
contentManagementHref,
contentManagementAccess,
profileAccess,
scopedAdministration,
} = usePage<{
auth: Auth;
existingBusinessEnabled?: boolean;
@@ -36,45 +37,26 @@ export function AppSidebar() {
profileAccess?: ProfileAccess | null;
opportunityManagement?: OpportunityManagementAccess | null;
contentManagementHref?: string | null;
scopedAdministration?: {label:string;href:string}[];
contentManagementAccess?: {opportunities?:{index:string;create?:string|null}};
}>().props;
const groups = portalNavigation({
authenticated: !!auth.user,
manager: auth.canManagePortal,
manager: canShowLegacyManagement(auth),
businesses: existingBusinessEnabled,
education: educationEnabled,
ai: aiEnabled,
opportunityManagement,
profileAccess,
contentManagementHref,
contentManagementAccess,
scopedAdministration,
legacyContent: currentPage.props.legacyContentEnabled as boolean|undefined,
procurement: currentPage.props.procurementEnabled as boolean|undefined,
businessReviewUrl: currentPage.props.businessReviewUrl as string|null|undefined,
});
const items = groups.map((group) => ({
title: group.label,
href: group.children?.find((item) => item.href)?.href ?? '/',
icon: LayoutGrid,
}));
if (contentManagementHref) {
items.unshift({ title: 'Gestão de conteúdos e oportunidades', href: contentManagementHref, icon: LayoutGrid });
}
if (auth.canManagePortal && opportunityManagement) {
items.push({
title: opportunityManagement.manage.label,
href: opportunityManagement.manage.href,
icon: LayoutGrid,
});
if (opportunityManagement.installed) {
items.push({
title: opportunityManagement.create.label,
href: opportunityManagement.create.href,
icon: LayoutGrid,
});
}
}
items.push(
...profileLinks(profileAccess).map((link) => ({
...link,
icon: LayoutGrid,
})),
);
return (
<Sidebar collapsible="icon" variant="inset">
<Sidebar collapsible="offcanvas" variant="inset">
<SidebarHeader>
<SidebarMenu>
<SidebarMenuItem>
@@ -88,7 +70,7 @@ export function AppSidebar() {
</SidebarHeader>
<SidebarContent>
<NavMain items={items} />
<PortalSidebarNavigation groups={groups} url={currentPage.url}/>
</SidebarContent>
<SidebarFooter>
@@ -0,0 +1,15 @@
import { Link } from '@inertiajs/react';
import type { EducationalArticle } from './educational-article-card';
/** Guides remain available on request; they are not matching investment results. */
export default function CatalogueGuideLinks({ articles }: { articles: EducationalArticle[] }) {
if (!articles.length) return null;
return <details className="rounded border p-3">
<summary className="cursor-pointer font-medium">Guias do sector — apoio opcional</summary>
<ul className="mt-3 space-y-2">
{articles.map((article) => <li key={article.href}>
<Link className="underline" href={article.href}>Ler guia: {article.title}</Link>
</li>)}
</ul>
</details>;
}
@@ -2,5 +2,5 @@ import { Link, usePage } from '@inertiajs/react';
export default function ContentManagementEntry() {
const { contentManagementHref } = usePage<{ contentManagementHref?: string | null }>().props;
return contentManagementHref ? <Link className="inline-block rounded-lg border px-4 py-3 font-semibold underline" href={contentManagementHref}>Gestão de conteúdos e oportunidades</Link> : null;
return contentManagementHref ? <Link className="inline-block rounded-lg border px-4 py-3 font-semibold underline" href={contentManagementHref}>Área de trabalho</Link> : null;
}
@@ -13,9 +13,12 @@ export type EducationalArticle = {
export default function EducationalArticleCard({
article,
headingLevel = 3,
}: {
article: EducationalArticle;
headingLevel?: 3 | 4;
}) {
const Heading = headingLevel === 3 ? 'h3' : 'h4';
const focus =
'focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-emerald-800';
return (
@@ -34,11 +37,11 @@ export default function EducationalArticleCard({
<p className="text-sm font-medium text-emerald-800">
Guia sectorial
</p>
<h3 className="text-2xl leading-tight font-bold">
<Heading className="text-2xl leading-tight font-bold">
<Link href={article.href} className={focus}>
{article.title}
</Link>
</h3>
</Heading>
{article.summary && (
<p className="text-base leading-relaxed text-slate-700">
{article.summary}
@@ -0,0 +1,10 @@
import type {FiscalProofParcel} from '@/lib/fiscal-proof-parcel';
export function FiscalProofParcelFields({value, change, label}: {value: FiscalProofParcel; change: (value: FiscalProofParcel) => void; label: string}) {
return <details className="rounded border p-2" open={!!value.parcel || !!value.parcelReference}>
<summary>Identificar parcela quando o documento suporta várias parcelas — {label}</summary>
<p>Sem identificação específica, o comprovativo existente abrange o documento inteiro. Para distinguir impostos ou parcelas, indique a linha/identificador exacto e o suporte dessa separação. Os montantes comprovado e seleccionado devem corresponder à parcela identificada. A mudança do identificador não comprova uma parcela diferente.</p>
<label className="block">Identificador da parcela<input aria-label={label + ' — Parcela documental'} value={value.parcel ?? ''} onChange={e => change({parcel: e.target.value})}/></label>
<label className="block">Suporte da separação das parcelas<input aria-label={label + ' — Suporte da parcela'} value={value.parcelReference ?? ''} onChange={e => change({parcelReference: e.target.value})}/></label>
</details>;
}
@@ -3,6 +3,7 @@ import { useEffect, useId, useState } from 'react';
import { api } from '@/pages/investment/shared';
import { replaceTerritoryPath } from '@/lib/territory-path.js';
import TerritoryGeometryPreview from './territory-geometry-preview';
import TerritorySearchSelect from './territory-search-select';
export type TerritoryOption = {
id: string;
@@ -135,37 +136,11 @@ export function ProvinceSelect({
total={options.length}
retry={() => setRetry((value) => value + 1)}
/>
<input
className={className}
aria-label={`Pesquisar ${label}`}
maxLength={100}
placeholder="Pesquisar nome ou código"
value={search}
onChange={(event) => setSearch(event.target.value)}
/>
<select
id={id}
aria-label={label}
className={className}
required={required}
value={value}
disabled={loading || Boolean(error)}
onChange={(event) => onChange(event.target.value)}
>
<option value="">
{loading ? 'A carregar províncias…' : placeholder}
</option>
{value && !options.some((option) => option.name === value) && (
<option value={value}>
{value} (seleção guardada; conferir cadastro)
</option>
)}
{options.map((option) => (
<option key={option.id} value={option.name}>
{option.name}
</option>
))}
</select>
<TerritorySearchSelect id={id} label={label} className={className} required={required}
placeholder={placeholder === 'Seleccione uma província' ? 'Pesquisar província' : placeholder}
search={search} onSearch={setSearch} options={options} loading={loading} error={error}
selected={value ? options.find((option) => option.name === value) ?? { id: value, name: value } : undefined}
onChange={(option) => onChange(option?.name ?? '')} />
{geometryFeedback && <p role="status">{geometryFeedback}</p>}
<TerritoryGeometryPreview
territoryId={
@@ -334,65 +309,15 @@ export function TerritoryLevel({
<label htmlFor={id} className="font-medium">
{labels[index]}
</label>
<input
className={control}
aria-label={`Pesquisar ${labels[index]}`}
disabled={!enabled}
maxLength={100}
value={search}
onChange={(event) => {
setSearch(event.target.value);
setPage(1);
}}
placeholder={`Pesquisar ${labels[index].toLowerCase()}`}
/>
<select
id={id}
aria-invalid={Boolean(fieldError)}
aria-describedby={fieldError ? `${id}-error` : undefined}
className={control}
disabled={!enabled || loading || !!error}
value={selected?.id ?? ''}
onChange={(e) =>
onChange(options.find((o) => o.id === e.target.value))
}
>
<option value="">
{enabled ? 'Seleccione' : 'Seleccione o nível anterior'}
</option>
{selected && !options.some((o) => o.id === selected.id) && (
<option value={selected.id}>
{selected.name}
{selected.deleted_at
? ' (arquivada)'
: ' (selecção actual)'}
</option>
)}
{options.map((o) => (
<option key={o.id} value={o.id}>
{o.name}
{o.source_code ? ` (${o.source_code})` : ''}
</option>
))}
</select>
<TerritorySearchSelect id={id} label={labels[index]} className={control}
disabled={!enabled} search={search} onSearch={(query) => { setSearch(query); setPage(1); }}
options={options} selected={selected} onChange={onChange} loading={loading} error={fieldError || error}>
<div className="flex gap-3 p-2 text-sm">
{page > 1 && <button type="button" onClick={() => setPage(page - 1)}>Anterior</button>}
{more && <button type="button" onClick={() => setPage(page + 1)}>Mais opções</button>}
</div>
</TerritorySearchSelect>
{loading && <p role="status">A carregar…</p>}
{fieldError && (
<p id={`${id}-error`} role="alert">
{fieldError}
</p>
)}
<div className="flex gap-3 text-sm">
{page > 1 && (
<button type="button" onClick={() => setPage(page - 1)}>
Anterior
</button>
)}
{more && (
<button type="button" onClick={() => setPage(page + 1)}>
Mais opções
</button>
)}
</div>
</div>
);
}
@@ -1,4 +1,4 @@
import { Link } from '@inertiajs/react';
import { Link, usePage } from '@inertiajs/react';
import { useState } from 'react';
import { fiscalPreparationGuide } from '@/lib/fiscal-preparation-guide';
@@ -8,6 +8,8 @@ export function JourneyDocumentResources({
stages?: string[];
}) {
const [stage, setStage] = useState('');
const context=new URL(usePage().url,'https://portal.invalid').searchParams.get('context');
const preparationHref=context&&/^[a-f0-9-]{36}$/i.test(context)?`/investimentos/${context}/contexto/editar#preparation-questions`:'/investimentos';
function destination(path: string, type?: string) {
const query = new URLSearchParams();
if (stage) query.set('stage[0]', stage);
@@ -20,8 +22,24 @@ export function JourneyDocumentResources({
className="space-y-3 rounded-xl border border-emerald-200 bg-emerald-50 p-4"
>
<h2 className="font-semibold text-emerald-950">
Fontes e guias para a jornada
Preencher formulários e preparar documentos
</h2>
<div className="grid gap-3 sm:grid-cols-3">
<div className="rounded border bg-white p-3"><h3 className="font-semibold">Pedido de investimento</h3>
<p>Preencha a preparação digital no dossier existente, reutilizando os dados já guardados.</p>
<Link className="underline" href={preparationHref}>Abrir o formulário no meu dossier</Link>
</div>
<div className="rounded border bg-white p-3"><h3 className="font-semibold">Terra e DUAT</h3>
<p>Prepare os dados do pedido com os campos do formulário existente.</p>
<Link className="underline" href="/terra-duat">Preencher ou continuar pedido de terra</Link>
</div>
<div className="rounded border bg-white p-3"><h3 className="font-semibold">Pedido de apoio do investidor</h3>
<p>Identifique-se e preencha o pedido de apoio. Este formulário não é um pedido de autorização de investimento.</p>
<Link className="underline" href="/formularios/investidor">Preencher pedido de apoio</Link>
</div>
</div>
<p>Preparação digital e exemplar oficial são apresentados separadamente. Um guia ou diploma não é um formulário preenchível.</p>
<details><summary className="cursor-pointer font-medium">Consultar exemplares, fontes e guias</summary>
<p>
Prepare as etapas em paralelo. A disponibilidade para consulta,
a situação jurídica e a utilização numa regra ou cálculo são
@@ -143,6 +161,7 @@ export function JourneyDocumentResources({
<Link className="underline" href="/documentos">
Explorar todo o acervo autorizado
</Link>
</details>
</section>
);
}
@@ -7,6 +7,9 @@ import { valueText } from '@/lib/value-text';
import OpportunityParcelGeometry from './opportunity-parcel-geometry';
import TerritoryGeometryPreview from './territory-geometry-preview';
import { control } from '@/pages/management/shared';
import OpportunityFillFlow from './opportunity-fill-flow';
import { opportunityFillGroups } from '@/lib/opportunity-fill-flow';
import { modalityLabels } from './opportunity-search-filters';
type Data = Record<string, unknown>;
type Schema = {
@@ -241,6 +244,11 @@ const labels: Record<string, string> = {
assessment_status: 'Estado da avaliação',
environmental_category: 'Categoria ambiental',
direct_jobs: 'Empregos diretos',
indirect_jobs: 'Empregos indirectos',
female_percentage: 'Participação de mulheres (%)',
youth_percentage: 'Participação de jovens (%)',
social_risks: 'Riscos sociais',
mitigation_plan: 'Plano de mitigação',
employment_type: 'Tipo de emprego',
geometry: 'Geometria da parcela',
start_date: 'Data de início',
@@ -621,6 +629,8 @@ export default function OpportunityCanonicalFields({
sectors,
disabled = false,
errors = {},
onOpenResources,
missingPaths,
}: {
value: Data;
onChange: (v: Data) => void;
@@ -631,6 +641,8 @@ export default function OpportunityCanonicalFields({
sectors: { id: number; name: string }[];
disabled?: boolean;
errors?: Record<string, string>;
onOpenResources?: (group: string) => void;
missingPaths?: string[];
}) {
const initiative = (value.initiative ?? {}) as Data;
const isInitiative = category === 'investment_project' && ['program', 'portfolio'].includes(valueText(initiative.kind ?? ''));
@@ -815,7 +827,7 @@ export default function OpportunityCanonicalFields({
: ['classified_other'];
return (
<fieldset disabled={disabled} className="space-y-4 rounded border p-4">
<legend>Contrato da oportunidade — {category}</legend>
<legend>Preparar oportunidade — {modalityLabels[category] ?? 'Modalidade por escolher'}</legend>
<p>
O rascunho pode ficar incompleto. A submissão verifica os campos
aplicáveis e os recursos guardados. Validação interna não
@@ -870,7 +882,7 @@ export default function OpportunityCanonicalFields({
</>}
</section>
)}
{[...new Set([...common, ...specialized])].map((key) => {
<OpportunityFillFlow groups={opportunityFillGroups([...new Set([...common, ...specialized])].filter((key) => !ignoredFields.includes(key)))} errors={errors} missingPaths={missingPaths} onOpenResources={onOpenResources} renderField={(key) => {
if (ignoredFields.includes(key)) return null;
if (key === 'relations' && options.classification) {
@@ -1167,7 +1179,7 @@ export default function OpportunityCanonicalFields({
onChange={(v) => set(key, v)}
/>
) : null;
})}
}} />
</fieldset>
);
}
@@ -2,7 +2,7 @@ import { Link } from '@inertiajs/react';
import { useState } from 'react';
import { button, card, input } from '@/pages/investment/shared';
type Item = {id:number;title:string;slug:string;summary:string|null;province:string|null;district:string|null;chains:string[];stages:string[];maturity_label:string|null};
type Item = {id:number;title:string;slug:string;summary:string|null;province:string|null;district:string|null;provinces?:string[];territorial_summary?:string;chains:string[];stages:string[];maturity_label:string|null};
export type CorridorGroup = {id:string;name:string;count:number;locations:string[];opportunities:Item[]};
type Props = {groups:CorridorGroup[];selected:number[];onSelect:(id:number,checked:boolean)=>void;onCompare:(ids:number[])=>void;onClear:()=>void};
@@ -10,10 +10,11 @@ function Group({group,selected,onSelect}: {group:CorridorGroup} & Pick<Props,'se
const [province,setProvince]=useState('');
const [district,setDistrict]=useState('');
const [chain,setChain]=useState('');
const provinces=[...new Set(group.opportunities.map(r=>r.province).filter((s):s is string=>!!s))].sort();
const districts=[...new Set(group.opportunities.filter(r=>!province||r.province===province).map(r=>r.district).filter((s):s is string=>!!s))].sort();
const provinceNames=(r:Item)=>r.provinces??(r.province?[r.province]:[]);
const provinces=[...new Set(group.opportunities.flatMap(provinceNames))].sort();
const districts=[...new Set(group.opportunities.filter(r=>!province||provinceNames(r).includes(province)).map(r=>r.district).filter((s):s is string=>!!s))].sort();
const chains=[...new Set(group.opportunities.flatMap(r=>r.chains))].sort();
const rows=group.opportunities.filter(r=>(!province||r.province===province)&&(!district||r.district===district)&&(!chain||r.chains.includes(chain)));
const rows=group.opportunities.filter(r=>(!province||provinceNames(r).includes(province))&&(!district||r.district===district)&&(!chain||r.chains.includes(chain)));
return <section className={card+' space-y-4'} aria-label={group.name}>
<header><h2 className="text-2xl font-bold">{group.name}</h2><p>{group.count} oportunidades publicadas</p>
<p>{group.locations.length ? 'Localizações identificadas: '+group.locations.join(' · ') : 'Abrangência territorial por indicar.'}</p></header>
@@ -25,7 +26,7 @@ function Group({group,selected,onSelect}: {group:CorridorGroup} & Pick<Props,'se
<p role="status">{rows.length} oportunidades com estes filtros</p>
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-3">{rows.map(r=><article key={r.id} className="space-y-3 rounded-lg border p-4">
<h3 className="text-lg font-semibold"><Link href={'/oportunidades/'+r.slug}>{r.title}</Link></h3>
<p>{[r.province,r.district].filter(Boolean).join(' / ')||'Localização por escolher'}</p>
<p>{r.territorial_summary||[r.province,r.district].filter(Boolean).join(' / ')||'Localização por escolher'}</p>
<p>Cadeia de valor: {r.chains.join(' · ')||'Por indicar'}</p>
{r.summary && !r.stages.includes(r.summary) && <p>{r.summary}</p>}
<p>Etapas e actividades: {r.stages.join(' · ')||'Por indicar'}</p><p>{r.maturity_label}</p>
@@ -0,0 +1,51 @@
import { useEffect, useRef, useState, type ReactNode } from 'react';
import { opportunityErrorGroup, opportunityMissingGroups, type FillGroup } from '@/lib/opportunity-fill-flow';
export default function OpportunityFillFlow({groups,errors,renderField,onOpenResources,missingPaths=[]}:{
groups:FillGroup[];errors:Record<string,string>;renderField:(field:string)=>ReactNode;onOpenResources?:(group:string)=>void;
missingPaths?:string[];
}) {
const [active,setActive]=useState(groups[0]?.id??'');
const groupIds=groups.map(group=>group.id).join(',');
useEffect(()=>{
const saved=window.location.hash.replace('#fill-','');
if(groupIds.split(',').includes(saved))setActive(saved);
},[groupIds]);
const heading=useRef<HTMLHeadingElement|null>(null);
const errorGroup=opportunityErrorGroup(groups,errors);
const missing=opportunityMissingGroups(groups,missingPaths);
const errorKey=JSON.stringify(errors);
useEffect(()=>{if(errorGroup)setActive(errorGroup);},[errorGroup,errorKey]);
const index=Math.max(0,groups.findIndex(group=>group.id===active));
const current=groups[index];
if(!current)return null;
const go=(id:string)=>{
setActive(id);
window.history.replaceState(window.history.state,'',`#fill-${id}`);
requestAnimationFrame(()=>heading.current?.focus());
};
return <div className="space-y-4">
<p>Pode escolher qualquer grupo, guardar incompleto e retomar. As informações já preenchidas mantêm-se ao avançar e regressar.</p>
<nav aria-label="Preencher a oportunidade" className="flex flex-wrap gap-2">
{groups.map(group=><a key={group.id} href={`#fill-${group.id}`} aria-current={current.id===group.id?'step':undefined}
className={`rounded border px-3 py-2 text-left ${current.id===group.id?'bg-primary text-primary-foreground':'bg-background'}`}
onClick={event=>{event.preventDefault();go(group.id);}}>{group.title}{opportunityErrorGroup([group],errors)?' — verificar':missing.some(item=>item.id===group.id)?' — dados em falta':''}</a>)}
</nav>
{missing.length>0&&<p>Pendências da última gravação: {missing.map(group=>group.title).join(' · ')}. Guarde para actualizar esta indicação.</p>}
<h2 ref={heading} tabIndex={-1} className="text-xl font-semibold">{current.title}</h2>
<p>{current.hint}</p>
{groups.map(group=><section key={group.id} id={`fill-${group.id}`} hidden={current.id!==group.id}
aria-label={group.title} className="space-y-4">
{group.fields.map(field=><div key={field}>{renderField(field)}</div>)}
{onOpenResources&&group.fields.some(field=>['locations','documents','images'].includes(field))&&
<button type="button" className="rounded border px-4 py-2 font-medium" onClick={()=>onOpenResources(group.id)}>Guardar e abrir documentos, imagens e localizações</button>}
</section>)}
<div className="flex flex-wrap items-center justify-between gap-3 border-t pt-3">
<span className="text-sm">Grupo {index+1} de {groups.length} · navegação livre</span>
<div className="flex gap-3">
{index>0&&<a href={`#fill-${groups[index-1].id}`} className="rounded border px-4 py-2" onClick={event=>{event.preventDefault();go(groups[index-1].id);}}>Anterior</a>}
{index<groups.length-1&&<a href={`#fill-${groups[index+1].id}`} className="rounded border px-4 py-2" onClick={event=>{event.preventDefault();go(groups[index+1].id);}}>Continuar: {groups[index+1].title}</a>}
</div>
</div>
</div>;
}
@@ -17,6 +17,7 @@ export const modalityLabels: Record<string, string> = {
type Values = Record<string, string | boolean | number[]>;
const labels: Record<string, string> = {
q: 'O que procura',
perspective: 'Consultar por',
sector: 'Sector',
category: 'Modalidade da oportunidade',
preparation: 'Estado de preparação',
@@ -215,11 +216,17 @@ export default function OpportunitySearchFilters({
onChange={(e) => change({ q: e.target.value })}
/>
</Field>
{select('perspective', [{value:'exists',label:'O que existe'},{value:'needs',label:'Necessidades identificadas'},{value:'ideas',label:'Ideias de investimento'},{value:'opportunities',label:'Oportunidades cadastradas — disponibilidade na ficha'}])}
{select('sector', choicesFor('sector'))}
{select('category', choicesFor('category'))}
</div>
<fieldset className="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
<legend className="mb-2 font-semibold">Localização</legend>
<p className="text-sm sm:col-span-2 lg:col-span-4">
A província inclui as oportunidades dos seus distritos, postos administrativos e localidades.
Não é necessário escolher todos os níveis. O contexto provincial de um corredor é identificado nos resultados; não confirma uma implantação distrital.
{path.length > 1 && <button type="button" className="ml-2 underline" onClick={() => territory(path.slice(0, 1))}>Ver toda a província de {path[0].name}</button>}
</p>
{(
[
'province_id',
+10 -12
View File
@@ -31,6 +31,7 @@ import {
} from '@/components/ui/dropdown-menu';
import {
portalNavigation,
canShowLegacyManagement,
currentNavigationGroup,
currentNavigationItem,
} from '@/lib/portal-navigation';
@@ -44,6 +45,7 @@ export function PortalGroupedMenu() {
auth: {
user: { name?: string; email?: string } | null;
canManagePortal: boolean;
legacyManagementAccess?:boolean;
};
existingBusinessEnabled?: boolean;
businessReviewUrl?: string | null;
@@ -54,6 +56,8 @@ export function PortalGroupedMenu() {
profileAccess?: ProfileAccess | null;
opportunityManagement?: OpportunityManagementAccess | null;
scopedAdministration?: { label: string; href: string }[];
contentManagementHref?: string | null;
contentManagementAccess?: {opportunities?:{index:string;create?:string|null}};
}>();
const { t, language, requestCount } = useTempoUi();
const mobile = useIsMobile();
@@ -63,7 +67,7 @@ export function PortalGroupedMenu() {
? { id: navigation.active, ...navigation.view.tools }
: undefined,
authenticated: !!props.auth?.user,
manager: !!props.auth?.canManagePortal,
manager: canShowLegacyManagement(props.auth),
businesses: props.existingBusinessEnabled,
businessReviewUrl: props.businessReviewUrl,
education: props.educationEnabled,
@@ -72,17 +76,10 @@ export function PortalGroupedMenu() {
legacyContent: props.legacyContentEnabled,
opportunityManagement: props.opportunityManagement,
profileAccess: props.profileAccess,
contentManagementHref: props.contentManagementHref,
contentManagementAccess: props.contentManagementAccess,
scopedAdministration: props.scopedAdministration,
});
if (props.scopedAdministration?.length)
groups.push({
id: 'scoped-administration',
label: 'Administração',
children: props.scopedAdministration.map((item, index) => ({
id: `scoped-${index}`,
label: item.label,
href: item.href,
})),
});
const current = currentNavigationGroup(groups, url);
const currentItem = currentNavigationItem(groups, url);
const [loggingOut, setLoggingOut] = useState(false);
@@ -134,7 +131,7 @@ export function PortalGroupedMenu() {
);
const accountGroups = groups.filter(
(group) =>
!['home', 'discovery', 'realization', 'support'].includes(group.id),
!['home', 'discovery', 'realization', 'support','work'].includes(group.id),
);
const panelLabel = `${t('O meu painel')} — ${requestCount} ${t(requestCount === 1 ? 'pedido recebido' : 'pedidos recebidos')}`;
const institutionalCurrent = url.split('?')[0] === '/contacto';
@@ -200,6 +197,7 @@ export function PortalGroupedMenu() {
'discovery',
'realization',
'support',
'work',
].includes(group.id),
)
.map((group) => (
+28 -11
View File
@@ -1,3 +1,4 @@
import { Link } from '@inertiajs/react';
import { ArrowRight, Search } from 'lucide-react';
import { useEffect, useState } from 'react';
import type { FormEvent } from 'react';
@@ -127,7 +128,6 @@ type PortalHeroProps = {
query: string;
setQuery: (value: string) => void;
onSearch: (event: FormEvent<HTMLFormElement>) => void;
onNavigate: (view: 'opportunities') => void;
stats?: HomeResponse['data']['stats'];
};
@@ -136,7 +136,6 @@ export default function PortalHero({
query,
setQuery,
onSearch,
onNavigate,
stats,
}: PortalHeroProps) {
const [currentSlide, setCurrentSlide] = useState(0);
@@ -261,20 +260,38 @@ export default function PortalHero({
</div>
</form>
<div className="mt-6 flex flex-wrap items-center justify-center gap-3">
<button
onClick={() => onNavigate('opportunities')}
className="inline-flex min-h-11 items-center gap-2 rounded-xl bg-white px-5 py-3 text-sm font-semibold text-[#101820] transition-colors hover:bg-slate-100 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white"
<div className="mt-4 flex flex-wrap items-center justify-center gap-2">
<Link
href="/porque-investir"
className="inline-flex min-h-11 items-center rounded-lg border border-white/50 bg-black/15 px-3 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white sm:min-h-9"
>
Consultar oportunidades{' '}
Porquê investir em Moçambique?
</Link>
<Link
href="/investimentos/iniciar"
className="inline-flex min-h-11 items-center rounded-lg border border-white/50 bg-black/15 px-3 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white sm:min-h-9"
>
Partir de uma ideia
</Link>
<Link
href="/oportunidades"
className="inline-flex min-h-11 items-center gap-1.5 rounded-lg bg-white px-3 py-1.5 text-sm font-semibold text-[#101820] transition-colors hover:bg-slate-100 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white sm:min-h-9"
>
Consultar oportunidades
<ArrowRight size={16} aria-hidden="true" />
</button>
<a
</Link>
<Link
href="/simulador-fiscal"
className="inline-flex min-h-11 items-center rounded-xl border border-white/50 bg-black/15 px-5 py-3 text-sm font-semibold text-white transition-colors hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white"
className="inline-flex min-h-11 items-center rounded-lg border border-white/50 bg-black/15 px-3 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white sm:min-h-9"
>
Simulador Fiscal
</a>
</Link>
<Link
href="/sectores"
className="inline-flex min-h-11 items-center rounded-lg border border-white/50 bg-black/15 px-3 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white sm:min-h-9"
>
Sectores de investimento
</Link>
</div>
<dl
@@ -0,0 +1,17 @@
import {Link} from '@inertiajs/react';
import {LayoutGrid} from 'lucide-react';
import type {ReactNode} from 'react';
import type {PortalNavItem} from '@/lib/portal-navigation';
import {currentNavigationItem} from '@/lib/portal-navigation';
import {searchTerritoryHref} from '@/lib/search-territory';
import {SidebarGroup,SidebarGroupLabel,SidebarMenu,SidebarMenuButton,SidebarMenuItem} from '@/components/ui/sidebar';
/** Render every authorised destination; a group is never reduced to its first link. */
export function PortalSidebarNavigation({groups,url}:{groups:PortalNavItem[];url:string}){
const active=currentNavigationItem(groups,url);
const ordered=[...groups.filter(group=>group.id==='work'),...groups.filter(group=>group.id!=='work')];
const links=(items:PortalNavItem[],depth=0):ReactNode=>items.map(item=>item.children?
<li key={item.id} className="list-none"><p className="px-2 pt-3 pb-1 text-xs font-medium text-muted-foreground">{item.label}</p><ul className="ml-2 border-l pl-2">{links(item.children,depth+1)}</ul></li>:
item.href?<SidebarMenuItem key={item.id}><SidebarMenuButton asChild isActive={item.id===active} className="h-auto min-h-8 whitespace-normal py-2"><Link href={searchTerritoryHref(item.href,url)} aria-current={item.id===active?'page':undefined}>{depth===0&&<LayoutGrid aria-hidden="true"/>}<span className="min-w-0 flex-1" style={{whiteSpace:'normal',overflow:'visible',textOverflow:'clip',overflowWrap:'anywhere'}}>{item.label}</span></Link></SidebarMenuButton></SidebarMenuItem>:null);
return <nav aria-label="Navegação completa do portal">{ordered.map(group=><SidebarGroup key={group.id}><SidebarGroupLabel>{group.label}</SidebarGroupLabel><SidebarMenu>{links(group.children??[])}</SidebarMenu></SidebarGroup>)}</nav>;
}
@@ -73,6 +73,8 @@ export function PreparationSummary({
<h2 className="text-xl font-bold">
Preparar o pedido de investimento privado
</h2>
{caseId&&<p><Link className="inline-block rounded border px-4 py-2 font-semibold" href={`/investimentos/${caseId}/contexto/editar#preparation-questions`}>Preencher ou continuar o formulário</Link></p>}
<details><summary className="cursor-pointer font-medium">Consultar situação, documentos e fundamentos</summary>
{!data.enabled ? (
<p>
Use os dados deste dossier para identificar o pedido e os
@@ -219,10 +221,11 @@ export function PreparationSummary({
className="underline"
href={`/investimentos/${caseId}/contexto/editar#preparation-questions`}
>
Completar apenas os dados em falta ou editar declarações
Editar os dados do formulário
</Link>
</p>
)}
</details>
</section>
);
}
@@ -0,0 +1,94 @@
import { createOperationKey } from '@/lib/operation-key';
import { Field, control, button } from '@/pages/management/shared';
import {ProactiveSupplyBrowser} from './proactive-supply';
export type ProactiveEvidence = {id:string;observation_id?:string;category:string;purpose:'local'|'methodology';statement:string;interpretation:string;source:string;locator:string;period:string;scope:string;coverage:string;verified_on:string;access:'internal'|'public';document_id:string};
export type ProactiveAnalysis = {
version:1;kind:'exists'|'needs'|'ideas';evidence:ProactiveEvidence[];
need:{state:'hypothesis'|'confirmed';problem:string;observed_supply:string;observed_demand:string;type:string;clients:string;evidence_ids:string[];limitations:string;missing:string;confirmation:string};
idea:{solution:string;activity:string;chain_id:string;stage:string;coverage:string;mode:string;resources:string;assumptions:string;conditions:string;pending:string;next_action:string};
relations:{id:string;kind:string;target_id:string;relation:string;reference:string;evidence_ids:string[]}[];
supply_comparisons?:{observation_id:string;relationship:'competition'|'complementarity'|'partner'|'uncertain';rationale:string;limitations:string}[];
};
export type ProactiveOptions = {documents?:{id:string;title:string}[];groups:Record<string,string>;references:Record<string,{id:string;name:string}[]>};
export type ProactivePublic = {version?:number;group:string;state:string;need:string;proposal:string;basis:string;limitations:string;next_action:string;evidence_ids:string[];chain_id?:string|null;stage?:string|null;notice?:string;resources?:string;assumptions?:string;conditions?:string;relation_ids?:string[];relations?:{kind:string;target_id:string;label:string;relationship:string;basis:string}[];evidence?:Partial<ProactiveEvidence>[];internal_comparisons?:{relationship:string;rationale:string;limitations:string;statement?:string;source?:string;locator?:string;period?:string}[]};
export const proactiveNotice = 'Ausência de registo não comprova ausência de oferta. Proximidade não comprova contrato, participação, energia acessível, terra disponível ou benefício fiscal. Necessidade confirmada não comprova viabilidade comercial; hipótese de fornecimento não é encomenda.';
export const newProactive = ():ProactiveAnalysis => ({version:1,kind:'ideas',evidence:[],need:{state:'hypothesis',problem:'',observed_supply:'',observed_demand:'',type:'',clients:'',evidence_ids:[],limitations:'',missing:'',confirmation:''},idea:{solution:'',activity:'',chain_id:'',stage:'',coverage:'',mode:'',resources:'',assumptions:'',conditions:'',pending:'',next_action:''},relations:[]});
export const newPublicProactive = ():ProactivePublic => ({group:'ideas',state:'hypothesis',need:'',proposal:'',basis:'',limitations:'',next_action:'',evidence_ids:[],chain_id:'',stage:'',resources:'',assumptions:'',conditions:'',relation_ids:[]});
export function ProactiveInvestmentEditor({value,onChange,options,history=[],territoryId,recordId}:{value?:ProactiveAnalysis;onChange:(value:ProactiveAnalysis)=>void;options?:ProactiveOptions;history?:{version:number;at:string;state:string;problem:string;confirmation:string}[];territoryId?:string;recordId?:number}){
if(!value)return <section className="rounded border p-4"><h2 className="font-semibold">Análise territorial e preparação de ideias</h2><p>Comece pelo território e sector existentes, mesmo sem oportunidade publicada, promotor, montante ou coordenadas. O rascunho e a publicação são independentes.</p><button type="button" className={button} onClick={()=>onChange(newProactive())}>Preparar análise e ideia</button></section>;
const patch=(p:Partial<ProactiveAnalysis>)=>onChange({...value,...p});
const removeEvidence=(id:string)=>{const proof=value.evidence.find(e=>e.id===id);patch({evidence:value.evidence.filter(e=>e.id!==id),need:{...value.need,evidence_ids:value.need.evidence_ids.filter(x=>x!==id)},relations:value.relations.map(r=>({...r,evidence_ids:r.evidence_ids.filter(x=>x!==id)})),...(proof?.observation_id?{supply_comparisons:(value.supply_comparisons??[]).filter(c=>c.observation_id!==proof.observation_id)}:{})});};
const text=(label:string,v:string,change:(v:string)=>void)=><Field label={label}><textarea className={control} aria-label={label} value={v??''} onChange={e=>change(e.target.value)}/></Field>;
const select=(label:string,v:string,choices:Record<string,string>,change:(v:string)=>void)=><Field label={label}><select className={control} aria-label={label} value={v??''} onChange={e=>change(e.target.value)}><option value="">Por determinar</option>{Object.entries(choices).map(([key,label])=><option key={key} value={key}>{label}</option>)}</select></Field>;
const evidenceChoice=(selected:string[],change:(v:string[])=>void)=><fieldset><legend>Evidências que fundamentam esta entrada</legend>{value.evidence.map((e,i)=><label key={e.id} className="block"><input type="checkbox" checked={selected.includes(e.id)} onChange={event=>change(event.target.checked?[...selected,e.id]:selected.filter(id=>id!==e.id))}/> Evidência {i+1}: {e.statement||'Por descrever'} ({e.access==='public'?'Pública autorizada':'Interna'})</label>)}</fieldset>;
return <section className="space-y-4 rounded border p-4" aria-label="Análise territorial e ideia">
<h2 className="text-xl font-semibold">Território e sector → evidências → necessidade → ideia</h2><details><summary>Como fundamentar esta análise</summary><p>Inventarie actividades, recursos, infra-estruturas e serviços de apoio. Confronte oferta observada com procura documentada e identifique os clientes ou beneficiários. Registe o período, cobertura e limitações de cada observação. Use referências internacionais para orientar as perguntas; a confirmação do caso depende de evidência local.</p></details><p>Reutiliza o sector e a localização principal escolhidos nesta ficha. Guarde pelo botão de rascunho existente. Nenhum montante, promotor ou ponto exacto é exigido.</p><p>{proactiveNotice}</p>
{select('Tipo de conteúdo em preparação',value.kind,{exists:'O que existe',needs:'Necessidade identificada',ideas:'Ideia de investimento'},v=>patch({kind:v as ProactiveAnalysis['kind']}))}
<ProactiveSupplyBrowser value={value} onChange={onChange} territoryId={territoryId} recordId={recordId}/>
<fieldset className="space-y-3 rounded border p-3"><legend>Evidências e proveniência</legend><p>Registe factos e interpretações em campos separados. Listas de empresas, hotéis, restaurantes, contactos e documentos internos permanecem internos; não são copiados para a divulgação.</p>
{value.evidence.map((e,i)=>{const change=(p:Partial<ProactiveEvidence>)=>patch({evidence:value.evidence.map(x=>x.id===e.id?{...x,...p}:x)});if(e.observation_id)return <fieldset key={e.id} className="space-y-2 rounded border p-3"><legend>Evidência interna da oferta {i+1}</legend><p>{e.statement}</p><p>Fonte: {e.source} · {e.locator}</p><p>Período: {e.period} · Abrangência: {e.scope}</p><p>{e.coverage}</p><p>A proveniência é recuperada do original. A data indica consulta documental, sem confirmação de actividade actual.</p>{text(`Interpretação ou hipótese ${i+1}`,e.interpretation,v=>change({interpretation:v}))}<button type="button" onClick={()=>removeEvidence(e.id)}>Retirar evidência {i+1} e a sua comparação deste rascunho</button></fieldset>;return <fieldset key={e.id} className="space-y-2 rounded border p-3"><legend>Evidência {i+1}</legend>
{select(`Finalidade da evidência ${i+1}`,e.purpose??'',{local:'Evidência local do caso',methodology:'Referência metodológica — não prova procura local'},v=>change({purpose:v as 'local'|'methodology'}))}
{select(`Categoria da evidência ${i+1}`,e.category,{activity:'Actividade',resource:'Recurso',infrastructure:'Infra-estrutura',supply:'Oferta',demand:'Procura'},v=>change({category:v}))}
{([['statement','Facto documentado'],['interpretation','Interpretação ou hipótese'],['source','Fonte e exemplar'],['locator','Localizador ou trecho'],['period','Período da evidência'],['scope','Abrangência'],['coverage','Cobertura e limitações']]as const).map(([key,label])=><div key={key}>{text(`${label} ${i+1}`,e[key],v=>change({[key]:v}))}</div>)}
<Field label={`Verificação ${i+1}`}><input aria-label={`Verificação ${i+1}`} className={control} type="date" value={e.verified_on??''} onChange={event=>change({verified_on:event.target.value})}/></Field>
<Field label={`Documento existente associado ${i+1}`}><select aria-label={`Documento existente associado ${i+1}`} className={control} value={e.document_id??''} onChange={event=>change({document_id:event.target.value})}><option value="">Sem documento associado — indicar fonte e localizador</option>{options?.documents?.map(d=><option key={d.id} value={d.id}>{d.title}</option>)}</select></Field>
{select(`Divulgação da evidência ${i+1}`,e.access,{internal:'Interna — análise privada',public:'Pública — origem e divulgação autorizadas'},v=>change({access:v as ProactiveEvidence['access']}))}
<button type="button" className="underline" onClick={()=>patch({evidence:value.evidence.filter(x=>x.id!==e.id),need:{...value.need,evidence_ids:value.need.evidence_ids.filter(id=>id!==e.id)},relations:value.relations.map(r=>({...r,evidence_ids:r.evidence_ids.filter(id=>id!==e.id)}))})}>Retirar evidência {i+1} deste rascunho</button>
</fieldset>;})}
<button type="button" className={button} onClick={()=>patch({evidence:[...value.evidence,{id:createOperationKey(),category:'activity',purpose:'local',statement:'',interpretation:'',source:'',locator:'',period:'',scope:'',coverage:'',verified_on:'',access:'internal',document_id:''}]})}>Acrescentar evidência</button>
</fieldset>
{value.kind!=='exists'&&<fieldset className="space-y-3 rounded border p-3"><legend>Necessidade ou lacuna</legend>
{select('Estado da necessidade',value.need.state,{hypothesis:'Hipótese analítica',confirmed:'Necessidade confirmada — fundamento documentado'},v=>patch({need:{...value.need,state:v as 'hypothesis'|'confirmed'}}))}
{select('Tipo de lacuna',value.need.type,{quantity:'Quantidade',quality:'Qualidade',logistics:'Logística',processing:'Transformação',coordination:'Coordenação',support:'Serviços de apoio'},v=>patch({need:{...value.need,type:v}}))}
{([['problem','Problema identificado'],['observed_supply','Oferta observada'],['observed_demand','Procura observada'],['clients','Potenciais clientes ou beneficiários'],['limitations','Limitações da necessidade'],['missing','Informação por confirmar'],['confirmation','Fundamentação do estado da necessidade']]as const).map(([key,label])=><div key={key}>{text(label,value.need[key],v=>patch({need:{...value.need,[key]:v}}))}</div>)}
{evidenceChoice(value.need.evidence_ids,v=>patch({need:{...value.need,evidence_ids:v}}))}
</fieldset>}
{value.kind==='ideas'&&<fieldset className="space-y-3 rounded border p-3"><legend>Ideia em preparação</legend>
{([['solution','Solução proposta'],['activity','Actividade proposta'],['stage','Etapa da cadeia de valor'],['coverage','Localização ou abrangência da ideia'],['resources','Recursos documentados'],['assumptions','Pressupostos explícitos'],['conditions','Condições da ideia'],['pending','Pendências da ideia'],['next_action','Próxima acção']]as const).map(([key,label])=><div key={key}>{text(label,value.idea[key],v=>patch({idea:{...value.idea,[key]:v}}))}</div>)}
{select('Cadeia de valor existente',value.idea.chain_id,Object.fromEntries((options?.references.chain??[]).map(c=>[c.id,c.name])),v=>patch({idea:{...value.idea,chain_id:v}}))}
{select('Possibilidade de investimento',value.idea.mode,{create:'Criar actividade',expand:'Expandir actividade',associate:'Associar actividades existentes'},v=>patch({idea:{...value.idea,mode:v}}))}
</fieldset>}
{value.kind!=='ideas'&&<p>Os campos anteriores da ideia são conservados. Escolha “Ideia de investimento” quando pretender preparar uma solução.</p>}
<fieldset className="space-y-3 rounded border p-3"><legend>Relações com estruturas existentes</legend>
{value.relations.map((r,i)=>{const change=(p:Partial<typeof r>)=>patch({relations:value.relations.map(x=>x.id===r.id?{...x,...p}:x)});return <fieldset key={r.id} className="rounded border p-3"><legend>Relação {i+1}</legend>
{select(`Tipo de referência ${i+1}`,r.kind,{project:'Projecto âncora',cluster:'Cluster',corridor:'Corredor',park:'Parque',chain:'Cadeia de valor'},v=>change({kind:v,target_id:''}))}
{select(`Referência existente ${i+1}`,r.target_id,Object.fromEntries((options?.references[r.kind]??[]).map(c=>[c.id,c.name])),v=>change({target_id:v}))}
{select(`Fundamento da relação ${i+1}`,r.relation,{documented:'Documentada',hypothesis:'Hipótese de relação',proximity:'Proximidade, sem compromisso'},v=>change({relation:v}))}
{text(`Fonte da relação ${i+1}`,r.reference,v=>change({reference:v}))}{evidenceChoice(r.evidence_ids,v=>change({evidence_ids:v}))}
<button type="button" className="underline" onClick={()=>patch({relations:value.relations.filter(x=>x.id!==r.id)})}>Retirar relação {i+1}</button>
</fieldset>;})}
<button type="button" className={button} onClick={()=>patch({relations:[...value.relations,{id:createOperationKey(),kind:'project',target_id:'',relation:'hypothesis',reference:'',evidence_ids:[]}]})}>Relacionar referência existente</button>
</fieldset>
{!!history.length&&<details><summary>Histórico do fundamento da necessidade</summary>{history.map(h=><p key={h.version}>Versão {h.version} · {h.at} · {h.state==='confirmed'?'Necessidade confirmada':'Hipótese'}: {h.problem} — {h.confirmation||'Fundamentação por completar'}</p>)}</details>}
<p>Não calcula mercado, investimento ou rentabilidade. Informação em falta permanece por determinar. Uma nova edição não altera os históricos nem publica a análise.</p>
</section>;
}
export function ProactiveSummary({value}:{value?:ProactivePublic|null}){
if(!value)return null;
return <section className="space-y-2 rounded border p-4" aria-label="Origem proactiva do investimento"><h2 className="text-xl font-semibold">{value.group==='ideas'?'Ideia em preparação':value.group==='needs'?'Necessidade identificada':'O que existe'}</h2><p>{value.group==='exists'?'Registo documental; consultar abrangência, cobertura e limitações das fontes.':value.state==='confirmed'?'Necessidade confirmada no âmbito documentado':'Hipótese analítica; conclusão económica por confirmar'}</p>{([['need','Necessidade'],['proposal','Proposta'],['basis','Fundamento'],['limitations','Limitações'],['next_action','Próximo passo'],['stage','Etapa da cadeia'],['resources','Recursos'],['assumptions','Pressupostos'],['conditions','Condições']]as const).map(([key,label])=>value[key]?<p key={key}><strong>{label}:</strong> {value[key]}</p>:null)}{value.internal_comparisons?.map((c,i)=><div key={i} className="rounded border p-3"><strong>Comparação interna da oferta {i+1} · {({competition:'Possível concorrência',complementarity:'Possível complementaridade',partner:'Possível parceiro, sem compromisso',uncertain:'Relação por determinar'} as Record<string,string>)[c.relationship]}</strong><p>{c.statement}</p><p>Fonte: {c.source} · {c.locator} · {c.period}</p><p>{c.rationale}</p><p>Incertezas: {c.limitations}</p></div>)}{value.relations?.map(r=><p key={r.kind+r.target_id}>Relação seleccionada: {r.label} · {r.relationship==='documented'?'Documentada':r.relationship==='proximity'?'Proximidade, sem pertença':'Hipótese de relação'}. Fundamento: {r.basis}. Não confirma contrato, acesso ou participação.</p>)}{value.evidence?.map((e,i)=><p key={e.id??i}>Evidência pública: {e.statement}; fonte: {e.source}; localizador: {e.locator}; período: {e.period}; abrangência: {e.scope}; cobertura: {e.coverage}; verificação: {e.verified_on}.</p>)}<p>{value.notice??proactiveNotice}</p><p>Sem disponibilidade de participação, viabilidade comercial ou benefício fiscal presumidos.</p></section>;
}
export function ProactivePublicationFields({value,onChange,evidence,relations=[],options,reviewed,onReview}:{value:ProactivePublic;onChange:(v:ProactivePublic)=>void;evidence:ProactiveEvidence[];relations?:{id:string;label:string;relationship:string}[];options?:ProactiveOptions;reviewed:boolean;onReview:(v:boolean)=>void}){
const text=(key:'need'|'proposal'|'basis'|'limitations'|'next_action'|'stage'|'resources'|'assumptions'|'conditions',label:string)=><Field label={label}><textarea aria-label={label} className={control} value={value[key]??''} onChange={e=>{onChange({...value,[key]:e.target.value});onReview(false);}}/></Field>;
return <fieldset className="space-y-3 rounded border p-4"><legend>Síntese proactiva expressamente pública</legend><p>Redija uma síntese independente. Nenhum facto, interpretação, contacto ou fonte interna é copiado automaticamente. A síntese também não pode revelar informação privada indirectamente.</p>
<Field label="Grupo público"><select className={control} aria-label="Grupo público" value={value.group} onChange={e=>onChange({...value,group:e.target.value})}>{Object.entries(options?.groups??{exists:'O que existe',needs:'Necessidades identificadas',ideas:'Ideias de investimento'}).map(([k,v])=><option key={k} value={k}>{v}</option>)}</select></Field>
{value.group!=='exists'&&<Field label="Estado público da necessidade"><select className={control} aria-label="Estado público da necessidade" value={value.state} onChange={e=>onChange({...value,state:e.target.value})}><option value="hypothesis">Hipótese analítica</option><option value="confirmed">Necessidade confirmada com fundamento público</option></select></Field>}
{value.group!=='exists'&&text('need','Necessidade pública')}{value.group==='ideas'&&text('proposal','Proposta pública')}{text('basis','Fundamento público')}{text('limitations','Limitações públicas da ideia')}{text('next_action','Próximo passo público')}{text('stage','Etapa pública da cadeia')}{text('resources','Recursos públicos documentados')}{text('assumptions','Pressupostos públicos')}{text('conditions','Condições públicas')}
<Field label="Cadeia de valor pública"><select className={control} aria-label="Cadeia de valor pública" value={value.chain_id??''} onChange={e=>onChange({...value,chain_id:e.target.value})}><option value="">Por determinar</option>{options?.references.chain?.map(c=><option key={c.id} value={c.id}>{c.name}</option>)}</select></Field>
<fieldset><legend>Relações públicas seleccionadas</legend>{relations.map(r=><label key={r.id} className="block"><input type="checkbox" checked={(value.relation_ids??[]).includes(r.id)} onChange={event=>onChange({...value,relation_ids:event.target.checked?[...(value.relation_ids??[]),r.id]:(value.relation_ids??[]).filter(id=>id!==r.id)})}/> {r.label} · {r.relationship}</label>)}</fieldset><fieldset><legend>Evidências públicas a divulgar</legend>{evidence.map(e=><label key={e.id} className="block"><input type="checkbox" checked={value.evidence_ids.includes(e.id)} onChange={event=>onChange({...value,evidence_ids:event.target.checked?[...value.evidence_ids,e.id]:value.evidence_ids.filter(id=>id!==e.id)})}/> {e.statement||'Evidência pública por descrever'}</label>)}</fieldset>
<label className="block"><input type="checkbox" checked={reviewed} onChange={e=>onReview(e.target.checked)}/> Confirmei a divulgação deste texto e das evidências públicas seleccionadas, sem exposição directa ou indirecta de informação privada.</label>
</fieldset>;
}
export function proactiveView(raw:unknown):ProactivePublic|null{
if(!raw||typeof raw!=='object')return null;
const p=raw as Partial<ProactivePublic&ProactiveAnalysis>;
if(p.version!==1)return null;
if(typeof p.group==='string'&&typeof p.need==='string')return p as ProactivePublic;
const a=raw as ProactiveAnalysis;
if(!a.need||typeof a.need.problem!=='string'||!a.idea)return null;
return {version:1,group:a.kind,state:a.need.state,need:a.kind==='exists'?'':a.need.problem,proposal:a.kind==='ideas'?a.idea.solution:'',basis:a.need.confirmation||'Fundamento por completar',limitations:[a.need.limitations,a.need.missing,a.idea.assumptions,a.idea.conditions,a.idea.pending].filter(Boolean).join('; '),next_action:a.idea.next_action,evidence_ids:a.need.evidence_ids,chain_id:a.idea.chain_id,stage:a.kind==='ideas'?a.idea.stage:'',notice:'Origem privada autorizada deste dossier. '+proactiveNotice,internal_comparisons:(a.supply_comparisons??[]).map(c=>{const e=a.evidence.find(e=>e.observation_id===c.observation_id);return {...c,statement:e?.statement,source:e?.source,locator:e?.locator,period:e?.period};})};
}
@@ -0,0 +1,47 @@
import {useEffect,useState} from 'react';
import {button,control,Field} from '@/pages/management/shared';
import {createOperationKey} from '@/lib/operation-key';
import type {ProactiveAnalysis} from './proactive-investment';
type Observation={id:string;name:string;province:string;district:string;territory_id:string;cae:string;activity:string;sector:string;source_date:string;sheet:string;row_number:number;source_hash:string;source_name:string;source_period:string;identity_conflict:boolean};
type Result={installed:boolean;rows:Observation[];total:number|null;duplicate_sightings?:number;page?:number;per_page?:number;sectors?:string[];territory_coverage?:{unmapped:number;province_only:number};limitations:string;status:string};
export function ProactiveSupplyBrowser({value,onChange,territoryId,recordId}:{value:ProactiveAnalysis;onChange:(v:ProactiveAnalysis)=>void;territoryId?:string;recordId?:number}){
const [activity,setActivity]=useState('');const [sector,setSector]=useState('');
const [result,setResult]=useState<Result|null>(null);const [busy,setBusy]=useState(false);const [error,setError]=useState('');
const [query,setQuery]=useState<{territory:string;activity:string;sector:string;page:number}|null>(null);
useEffect(()=>{setResult(null);setQuery(null);setSector('');setError('');setBusy(false);},[territoryId]);
useEffect(()=>{
if(!query)return;const controller=new AbortController();setBusy(true);setError('');
const p=new URLSearchParams({territory_id:query.territory,activity:query.activity,sector:query.sector,page:String(query.page)});if(recordId)p.set('record_id',String(recordId));
fetch('/minhas-oportunidades/oferta-interna?'+p,{headers:{Accept:'application/json'},credentials:'same-origin',signal:controller.signal})
.then(async r=>{if(!r.ok)throw new Error(r.status===403?'Consulta interna fora do âmbito de acesso desta sessão.':'Não foi possível consultar a base interna. A oferta permanece por determinar.');return r.json() as Promise<Result>;})
.then(setResult).catch(e=>{if(e.name!=='AbortError'){setResult(null);setError(e.message);}}).finally(()=>{if(!controller.signal.aborted)setBusy(false);});
return ()=>controller.abort();
},[query,recordId]);
const selected=value.supply_comparisons??[];
const compare=(row:Observation)=>{
if(selected.some(c=>c.observation_id===row.id))return;
const proof=value.evidence.find(e=>e.observation_id===row.id);
onChange({...value,supply_comparisons:[...selected,{observation_id:row.id,relationship:'uncertain',rationale:'',limitations:'Actividade actual, capacidade, procura e disponibilidade para parceria por confirmar.'}],evidence:proof?value.evidence:[...value.evidence,{
id:createOperationKey(),observation_id:row.id,category:'supply',purpose:'local',access:'internal',document_id:'',
statement:`Registo administrativo: ${row.name}; CAE ${row.cae}; ${row.activity||'actividade por classificar'}; ${row.district}, ${row.province}. Não confirma actividade actual.`,
interpretation:'',source:`${row.source_name}; SHA256 ${row.source_hash}`,locator:`${row.sheet}!linha ${row.row_number}`,
period:`${row.source_date}; ${row.source_period}`,scope:`${row.district}, ${row.province}`,
coverage:result?.limitations??'Cobertura incompleta; situação actual por confirmar.',verified_on:new Date().toISOString().slice(0,10),
}]});
};
return <fieldset className="space-y-3 rounded border p-3"><legend>Consultar oferta existente — base interna</legend>
<p>Consulta a localização escolhida nesta ficha e os seus territórios subordinados. Os filtros por sector e actividade CAE não limitam a análise ao sector da ideia: podem existir concorrentes, complementos e parceiros noutros sectores. Nenhuma empresa é publicada.</p>
<Field label="Sector da oferta (classificação CAE)"><select className={control} aria-label="Sector da oferta (classificação CAE)" value={sector} onChange={e=>setSector(e.target.value)}><option value="">Todos os sectores registados</option>{result?.sectors?.map(s=><option key={s}>{s}</option>)}</select></Field>
<Field label="Actividade ou código CAE da oferta"><input className={control} aria-label="Actividade ou código CAE da oferta" value={activity} onChange={e=>setActivity(e.target.value)}/></Field>
<button type="button" className={button} disabled={!territoryId||busy} onClick={()=>setQuery({territory:territoryId!,activity,sector,page:1})}>{busy?'A consultar…':'Consultar oferta da localização'}</button>
{!territoryId&&<p>Escolha a localização para consultar. Sem localização, a oferta permanece por determinar.</p>}
{error&&<p role="alert">{error}</p>}
{result&&<><p role="status">{result.status}</p><p>{result.limitations}</p>{result.territory_coverage&&<p>Cobertura territorial da base nacional: {result.territory_coverage.unmapped} observações sem correspondência territorial única; {result.territory_coverage.province_only} apenas com província. Estas últimas não comprovam oferta num distrito específico.</p>}{result.total!==null&&<p>{result.total} observações distintas; {result.duplicate_sightings??0} repetições dos mesmos campos administrativos conservadas na origem. Não é uma contagem de empresas únicas.</p>}
{result.rows.map(row=><article key={row.id} className="rounded border p-3"><h3 className="font-semibold">{row.name}</h3><p>{row.district}, {row.province} · {row.sector||'Sector por classificar'} · CAE {row.cae||'não indicado'} · {row.activity||'Actividade por classificar'}</p><p>Fonte: {row.source_name} · {row.sheet}, linha {row.row_number} · {row.source_date} · {row.source_period}</p><details><summary>Rastreabilidade do exemplar</summary><p>SHA256: {row.source_hash}</p><p>Observação: {row.id}</p></details>{row.identity_conflict&&<p>Identificador partilhado por denominações divergentes; identidade por conferir. Os registos não foram fundidos.</p>}<button type="button" className={button} disabled={busy||selected.some(c=>c.observation_id===row.id)||selected.length>=40||value.evidence.length>=60} onClick={()=>compare(row)}>Comparar com a ideia</button></article>)}
{query&&<div className="flex gap-3"><button type="button" disabled={busy||query.page<=1} onClick={()=>setQuery({...query,page:query.page-1})}>Página anterior</button><span>Página {result.page??1}</span><button type="button" disabled={busy||query.page*25>=(result.total??0)} onClick={()=>setQuery({...query,page:query.page+1})}>Página seguinte</button></div>}
</>}
{selected.map((c,i)=>{const proof=value.evidence.find(e=>e.observation_id===c.observation_id);const patch=(p:Partial<typeof c>)=>onChange({...value,supply_comparisons:selected.map(x=>x.observation_id===c.observation_id?{...x,...p}:x)});return <fieldset className="space-y-2 rounded border p-3" key={c.observation_id}><legend>Comparação {i+1}</legend><p>{proof?.statement??'Evidência retirada: volte a associar a observação antes de guardar.'}</p><p>{proof?.source} · {proof?.locator}</p><p>Ideia em preparação: {value.idea.solution||'Descreva a ideia no campo existente abaixo.'}</p><Field label={`Relação com a ideia ${i+1}`}><select className={control} value={c.relationship} onChange={e=>patch({relationship:e.target.value as typeof c.relationship})}><option value="uncertain">Relação por determinar</option><option value="competition">Possível concorrência</option><option value="complementarity">Possível complementaridade</option><option value="partner">Possível parceiro — sem compromisso</option></select></Field><Field label={`Fundamento da comparação ${i+1}`}><textarea className={control} value={c.rationale} onChange={e=>patch({rationale:e.target.value})}/></Field><Field label={`Incertezas da comparação ${i+1}`}><textarea className={control} value={c.limitations} onChange={e=>patch({limitations:e.target.value})}/></Field><button type="button" onClick={()=>onChange({...value,supply_comparisons:selected.filter(x=>x.observation_id!==c.observation_id)})}>Retirar comparação {i+1}</button></fieldset>;})}
{!!selected.length&&<p>Use estas comparações para fundamentar a necessidade abaixo e seleccione as evidências correspondentes. A fonte administrativa não confirma procura nem insuficiência de oferta. Guarde no rascunho existente; a continuidade para o dossier conserva o percurso já entregue.</p>}
</fieldset>;
}
+12 -2
View File
@@ -28,7 +28,7 @@ export function profileLinks(access: ProfileAccess | null | undefined) {
...(access.administration
? [
{
title: 'Instalação dos perfis 040000',
title: 'Configuração dos perfis',
href: '/management/profile-install',
},
]
@@ -41,16 +41,26 @@ export default function ProfileNavigation() {
profileAccess?: ProfileAccess | null;
}>().props;
if (!profileAccess) return null;
const links = profileLinks(profileAccess);
const workHrefs = [profileAccess.mine, profileAccess.create, profileAccess.review].filter(Boolean);
const work = links.filter((link) => workHrefs.includes(link.href));
const access = links.filter((link) => !workHrefs.includes(link.href));
return (
<nav
aria-label="Perfil e oportunidades"
className="flex flex-wrap gap-4 rounded border p-4"
>
{profileLinks(profileAccess).map((link) => (
{work.map((link) => (
<Link key={link.href} href={link.href} className="underline">
{link.title}
</Link>
))}
{access.length > 0 && <details className="basis-full">
<summary className="cursor-pointer font-medium">O meu acesso e administração</summary>
<div className="mt-3 flex flex-wrap gap-4">{access.map((link) =>
<Link key={link.href} href={link.href} className="underline">{link.title}</Link>
)}</div>
</details>}
</nav>
);
}
@@ -0,0 +1,33 @@
import { useState } from 'react';
export default function ProfileProofPicker({documents,value,onChange,disabled=false}:{
documents:{id:string;file_name:string}[];value:string[];onChange:(ids:string[])=>void;disabled?:boolean;
}) {
const [query,setQuery]=useState('');
const [showAll,setShowAll]=useState(false);
const [limit,setLimit]=useState(10);
const normalize=(text:string)=>text.normalize('NFD').replace(/\p{Diacritic}/gu,'').toLocaleLowerCase();
const matches=documents.filter(document=>normalize(document.file_name).includes(normalize(query)));
const toggle=(id:string)=>onChange(value.includes(id)?value.filter(item=>item!==id):[...value,id]);
return <fieldset disabled={disabled} className="space-y-3 rounded border p-4">
<legend>Escolher comprovativos</legend>
<p className="text-sm">Escolha os seus documentos que sustentam este pedido. A lista contém ficheiros próprios com análise antimalware concluída; não confirma a sua adequação como comprovativo.</p>
<p role="status">{value.length} comprovativos escolhidos</p>
{value.map(id=><div key={id} className="flex items-start justify-between gap-3 rounded border p-2">
<span className="min-w-0 break-words">{documents.find(document=>document.id===id)?.file_name??'Ficheiro seleccionado indisponível nesta consulta'}</span>
<button type="button" className="underline" onClick={()=>toggle(id)}>Retirar</button>
</div>)}
<label className="block">Pesquisar nos meus ficheiros
<input type="search" className="mt-1 w-full rounded border p-2" value={query} onChange={event=>{setQuery(event.target.value);setLimit(10);}} />
</label>
<button type="button" className="underline" onClick={()=>setShowAll(!showAll)}>{showAll?'Fechar lista':'Ver ficheiros disponíveis'}</button>
{(query||showAll)&&<div className="space-y-2">
<p role="status">{matches.length} ficheiros encontrados · a mostrar até {Math.min(limit,matches.length)}</p>
{matches.slice(0,limit).map(document=><label key={document.id} className="flex gap-2 rounded border p-2">
<input type="checkbox" checked={value.includes(document.id)} onChange={()=>toggle(document.id)} />
<span className="min-w-0 break-words">{document.file_name}</span>
</label>)}
{matches.length>limit&&<button type="button" className="underline" onClick={()=>setLimit(limit+10)}>Mostrar mais ficheiros</button>}
</div>}
</fieldset>;
}
+1 -1
View File
@@ -50,7 +50,7 @@ function count(props: Record<string, unknown>): number | null {
}
export default function SearchFeedback() {
const page = usePage();
const handledLocally = page.component === 'investment/catalogue';
const handledLocally = ['investment/catalogue', 'investment/zones'].includes(page.component);
const [state, setState] = useState<'idle' | 'loading' | 'error'>('idle');
const latest = useRef<{
url: string;
+112
View File
@@ -0,0 +1,112 @@
import { Link } from '@inertiajs/react';
import SectorEntry, { type SectorEntryData } from '@/components/sector-entry';
export type SectorDetailData = {
sector: {
id: number;
name: string;
slug: string;
description: string | null;
short_description: string | null;
};
sectorEntry?: SectorEntryData | null;
opportunities?: {
title: string;
slug: string;
province: string | null;
summary: string | null;
}[];
};
const button =
'inline-block rounded-lg bg-emerald-800 px-5 py-3 font-semibold text-white disabled:opacity-50';
export default function SectorContent({
sector,
sectorEntry,
opportunities,
headingLevel = 2,
}: SectorDetailData & { headingLevel?: 2 | 3 }) {
const Heading = headingLevel === 2 ? 'h2' : 'h3';
return (
<div className="space-y-5">
<p className="whitespace-pre-line">
{sector.description ||
sector.short_description ||
'Descrição sectorial em preparação.'}
</p>
{!sectorEntry && (
<Link
className={button}
href={'/investimentos/iniciar?source=sector:' + sector.id}
>
Iniciar ou continuar uma ideia neste sector
</Link>
)}
{sectorEntry && (
<SectorEntry
headingLevel={headingLevel}
data={{
...sectorEntry,
start_href: sectorEntry.start_href
? '/investimentos/iniciar?source=sector:' +
sector.id
: null,
}}
/>
)}
<Heading className="text-xl font-bold">
Oportunidades no sector
</Heading>
{opportunities?.map((o) => (
<article key={o.slug} className="rounded border bg-white p-5">
<Link
className="text-lg font-bold underline"
href={`/oportunidades/${o.slug}`}
>
{o.title}
</Link>
<p>{o.province}</p>
<p>{o.summary}</p>
<ul aria-label="Localizações associadas">
{sectorEntry?.locations
.filter(
(l) => l.href === `/oportunidades/${o.slug}`,
)
.filter(
(l, i, rows) =>
rows.findIndex(
(other) =>
JSON.stringify(other.location) ===
JSON.stringify(l.location),
) === i,
)
.map((l, i) => (
<li key={i}>
{typeof l.location.name === 'string'
? l.location.name
: 'Consultar localização e fonte na oportunidade'}
</li>
))}
</ul>
</article>
))}
{!opportunities?.length && (
<p>Sem oportunidades publicadas neste sector.</p>
)}
<Link
className={button}
href={`/oportunidades?sector=${sector.slug}`}
>
Pesquisar todas as oportunidades do sector
</Link>
<p>
<Link href="/como-investir" className="underline">
Preparar o investimento
</Link>{' '}
·{' '}
<Link href="/apoio" className="underline">
Pedir apoio sectorial
</Link>
</p>
</div>
);
}
+20 -6
View File
@@ -19,12 +19,20 @@ export type SectorEntryData = {
}[];
start_href: string | null;
register_href: string | null;
register_label?: string;
start_notice: string | null;
register_notice: string | null;
specialization_href: string | null;
content_notice: string | null;
};
export default function SectorEntry({ data }: { data: SectorEntryData }) {
export default function SectorEntry({
data,
headingLevel = 2,
}: {
data: SectorEntryData;
headingLevel?: 2 | 3;
}) {
const Heading = headingLevel === 2 ? 'h2' : 'h3';
return (
<section
className="space-y-5"
@@ -51,7 +59,7 @@ export default function SectorEntry({ data }: { data: SectorEntryData }) {
className="rounded border px-4 py-3"
href={data.register_href}
>
Cadastrar oportunidade — escolher modalidade
{data.register_label ?? 'Cadastrar oportunidade — escolher modalidade'}
</Link>
) : (
<p role="status">{data.register_notice}</p>
@@ -64,7 +72,9 @@ export default function SectorEntry({ data }: { data: SectorEntryData }) {
perfil e a modalidade já autorizados; se ainda não tem perfil,
pode preparar a ideia e pedir o perfil de promotor.
</p>
<h2 className="text-xl font-bold">Descubra onde investir</h2>
<Heading className="text-xl font-bold">
Descubra onde investir
</Heading>
{data.content_notice && <p>{data.content_notice}</p>}
{!data.articles.length && (
<p>
@@ -74,7 +84,11 @@ export default function SectorEntry({ data }: { data: SectorEntryData }) {
)}
<div className="grid gap-4 md:grid-cols-2">
{data.articles.map((a) => (
<EducationalArticleCard key={a.href} article={a} />
<EducationalArticleCard
key={a.href}
article={a}
headingLevel={headingLevel === 2 ? 3 : 4}
/>
))}
</div>
{data.specialization_href && (
@@ -87,9 +101,9 @@ export default function SectorEntry({ data }: { data: SectorEntryData }) {
dependências.
</p>
)}
<h2 className="text-xl font-bold">
<Heading className="text-xl font-bold">
Projetos âncora, clusters e território
</h2>
</Heading>
{data.relations.length ? (
<ul>
{data.relations.map((r) => (
@@ -1,3 +1,4 @@
import {SimulationIrpcAnnual} from '@/components/simulation-irpc-annual';
import {SimulationIrpcNormal} from '@/components/simulation-irpc-normal';
import {SimulationIrpcWithholdings} from '@/components/simulation-irpc-withholdings';
import {SimulationIspcResiduals} from '@/components/simulation-ispc-residuals';
@@ -3513,6 +3514,7 @@ export function SimulationForm() {
{(current.id === 'financial' || current.id === 'tax') && <SimulationIspcResiduals draft={draft} onChange={change} />}
{(current.id === 'financial' || current.id === 'tax') && <SimulationIrpcWithholdings draft={draft} onChange={change} />}
{(current.id === 'financial' || current.id === 'tax') && <SimulationIrpcNormal draft={draft} onChange={change} />}
{(current.id === 'financial' || current.id === 'tax') && <SimulationIrpcAnnual draft={draft} onChange={change} />}
{(current.id === 'financial' || current.id === 'tax') && <SimulationMonthlyIva draft={draft} busy={isCalculating} onCalculate={runSimulation} onChange={change} />}
{current.id === 'financial' &&
(draft.detail_level === 'advanced' ||
@@ -0,0 +1,30 @@
import {SimulationIrpcEconomic} from './simulation-irpc-economic';
import {FiscalProofParcelFields} from './fiscal-proof-parcel';
import {SimulationIrpcCarry} from './simulation-irpc-carry';
import {SimulationIrpcInternational} from './simulation-irpc-international';
import {SimulationIrpcPec} from './simulation-irpc-pec';
import {useState} from 'react';
import {annualBook,newAnnualBook,saveAnnualBook,reuseAnnualAssessment,annualAssessment,annualWithholdingOptions,reuseAnnualWithholding,newAnnualPpc,recordAnnual,annualReportRows,annualHtml,annualSource,type AnnualBook,type AnnualPpc} from '@/lib/irpc-annual-settlement';
type Props={draft:Record<string,unknown>;onChange:(field:string,value:string)=>void};
export function SimulationIrpcAnnual({draft,onChange}:Props){
const[error,setError]=useState('');if(draft.fiscal_component!=='irpc')return null;
try{
const b=annualBook(draft),save=(next:AnnualBook)=>{try{onChange('modelo_a_snapshot',saveAnnualBook(draft,next));setError('');}catch(e){setError(String(e));}};
if(!b)return<section aria-label="IRPC — L8 fecho anual" className="rounded border p-4"><h4>L8 — da colecta ao saldo anual simulado</h4><p>Reutiliza a colecta válida, retenções efectivamente sofridas por conta e PPC comprovados do próprio sujeito/exercício. PEC comprovado pode ser detalhado no próprio exercício; créditos com regras próprias permanecem separados.</p><button type="button" onClick={()=>{try{save(reuseAnnualAssessment(draft,newAnnualBook()));}catch(e){setError(String(e));}}}>Preparar saldo anual L8</button>{error&&<p role="alert">{error}</p>}</section>;
const patch=(p:Partial<AnnualBook>)=>save({...b,...p}),a=annualAssessment(draft),options=annualWithholdingOptions(draft);
const field=(key:'subjectNuit'|'year'|'reference'|'assessmentReference',label:string)=><label className="block">{label}<input aria-label={label} value={b[key]} onChange={e=>patch({[key]:e.target.value})}/></label>;
const group=(key:'withholdings'|'ppc',label:string)=><><label className="block">Estado — {label}<select aria-label={'Estado L8 — '+label} value={b[key].state} onChange={e=>patch({[key]:{...b[key],state:e.target.value as ''|'known'|'absent'}})}><option value="">Informação em falta</option><option value="known">Valores conhecidos — seleccionar comprovativos</option><option value="absent">Ausência declarada com suporte</option></select></label><label className="block">Suporte — {label}<input aria-label={'Suporte L8 — '+label} value={b[key].reference} onChange={e=>patch({[key]:{...b[key],reference:e.target.value}})}/></label></>;
return<section aria-label="IRPC — L8 fecho anual" className="space-y-3 rounded border p-4"><h4>L8 — colecta, abatimentos e saldo anual simulado</h4><p>A colecta acima é anterior aos abatimentos. Este saldo tem cálculo e histórico próprios; retenção entregue pela empresa por pagamento a terceiros não é retenção sofrida. O resultado continua simulado, sem submissão, pagamento ou reembolso automático.</p><p>{annualSource(b)}</p>{error&&<p role="alert">{error}</p>}
{field('subjectNuit','NUIT do sujeito do fecho L8')}{field('year','Exercício do fecho L8')}{field('reference','Suporte do fecho da entidade e exercício L8')}
<p>Colecta disponível:{a.colecta?a.colecta.numerator+'/'+a.colecta.denominator+' MZN':'Indeterminada'};origem:{a.kind==='special'?'L7 qualificado':'L6 normal'};NUIT:{a.subjectNuit||'Por identificar'};exercício:{a.year||'Por identificar'}.</p><button type="button" onClick={()=>{try{save(reuseAnnualAssessment(draft,b));}catch(e){setError(String(e));}}}>Reutilizar colecta corrente L6/L7</button>{field('assessmentReference','Suporte da colecta reutilizada L8')}
<fieldset className="space-y-2 rounded border p-3"><legend>Retenções efectivamente sofridas por conta</legend>{group('withholdings','Retenções sofridas')}
{options.length===0?<p>Não há afectações de comprovativosL5 neste contexto. Reutilize e reconcilie a retenção recebida emL5 ou declare ausência com suporte.</p>:options.map(o=><div key={o.rowId+'|'+o.paymentId} className="rounded border p-2"><p>{o.document||'Prova por identificar'};emitente:{o.issuer};data:{o.date};parcelaL5:{o.amount}MZN;{o.reason||'Retenção recebida/efectiva por conta reconciliada emL5.'}</p><button type="button" disabled={!o.ready||b.withholdings.rows.some(r=>r.rowId===o.rowId&&r.paymentId===o.paymentId)} onClick={()=>{try{save(reuseAnnualWithholding(draft,b,o.rowId,o.paymentId,crypto.randomUUID()));}catch(e){setError(String(e));}}}>Seleccionar prova L5 {o.document||o.paymentId}</button></div>)}
{b.withholdings.rows.map((r,index)=>{const change=(p:Partial<typeof r>)=>patch({withholdings:{...b.withholdings,rows:b.withholdings.rows.map(x=>x.id===r.id?{...x,...p}:x)}});return<fieldset key={r.id} className="rounded border p-2"><legend>Retenção seleccionada {index+1}</legend><p>Rendimento:{r.rowId};prova:{r.paymentId};NUIT:{r.subjectNuit};exercício:{r.year}. Fonte conservada. Se mudou, retire esta selecção e seleccione a prova actual. O histórico mantém-se.</p><label className="block">Parcela a abater<input aria-label={'Parcela da retenção L8 '+(index+1)} value={r.amount} onChange={e=>change({amount:e.target.value})}/></label><label className="block">O próprio sujeito é beneficiário e o rendimento está incluído na base deste exercício<select aria-label={'Rendimento incluído L8 '+(index+1)} value={r.incomeIncluded} onChange={e=>change({incomeIncluded:e.target.value as ''|'yes'|'no'})}><option value="">Informação em falta</option><option value="yes">Sim — documentado</option><option value="no">Não — crédito não aplicável neste fecho</option></select></label><label className="block">Suporte da titularidade e inclusão<input aria-label={'Suporte da retenção L8 '+(index+1)} value={r.reference} onChange={e=>change({reference:e.target.value})}/></label><FiscalProofParcelFields value={r} change={change} label={"Retenção L8 "+(index+1)}/><button type="button" onClick={()=>patch({withholdings:{...b.withholdings,rows:b.withholdings.rows.filter(x=>x.id!==r.id)}})}>Retirar selecção L8 da retenção {index+1}</button></fieldset>;})}</fieldset>
<fieldset className="space-y-2 rounded border p-3"><legend>PPC efectivamente pagos</legend>{group('ppc','PPC efectuados')}<p>Regista comprovativos de pagamentos por conta; não calcula automaticamente a obrigação PPC nem usa pagamentos previstos no plano.</p><button type="button" onClick={()=>patch({ppc:{...b.ppc,rows:[...b.ppc.rows,{...newAnnualPpc(crypto.randomUUID()),subjectNuit:b.subjectNuit,year:b.year}]}})}>Registar comprovativo PPC</button>
{b.ppc.rows.map((r,index)=>{const change=(p:Partial<AnnualPpc>)=>patch({ppc:{...b.ppc,rows:b.ppc.rows.map(x=>x.id===r.id?{...x,...p}:x)}});return<fieldset key={r.id} className="rounded border p-2"><legend>PPC {index+1}</legend>{([['document','Comprovativo'],['issuer','Emitente'],['date','Data (AAAA-MM-DD)'],['subjectNuit','NUIT beneficiário'],['year','Exercício do comprovativo'],['currency','Moeda do comprovativo'],['proofAmount','Montante comprovado'],['amount','Parcela a abater'],['reference','Suporte do pagamento e afectação']]as const).map(([key,label])=><label key={key} className="block">{label}<input aria-label={'PPC L8 '+(index+1)+' — '+label} value={r[key]} onChange={e=>change({[key]:e.target.value})}/></label>)}<label className="block">Pagamento efectivamente comprovado<select aria-label={'PPC L8 '+(index+1)+' — Efectivo'} value={r.effective} onChange={e=>change({effective:e.target.value as ''|'yes'|'no'})}><option value="">Informação em falta</option><option value="yes">Sim — comprovativo reconciliado</option><option value="no">Não — apenas previsão/outro estado</option></select></label><FiscalProofParcelFields value={r} change={change} label={"PPC L8 "+(index+1)}/><button type="button" onClick={()=>patch({ppc:{...b.ppc,rows:b.ppc.rows.filter(x=>x.id!==r.id)}})}>Retirar PPC {index+1}</button></fieldset>;})}</fieldset>
<SimulationIrpcEconomic book={b} save={save} residentConfirmed={a.current&&a.book.scope==='resident_general'&&b.subjectNuit===a.subjectNuit&&b.year===a.year&&b.assessmentKey===a.key}/><SimulationIrpcInternational book={b} save={save}/><SimulationIrpcPec book={b} save={save}/><SimulationIrpcCarry book={b} save={save}/>{([...(b.pecPayments?[]:[['pec','PEC']as const]),...(b.internationalCredits?[]:[['credits','Créditos com regras próprias']as const])]).map(([key,label])=><fieldset key={key} className="rounded border p-3"><legend>{label} — tratamento separado</legend><label className="block">Estado — {label}<select aria-label={'Estado L8 — '+label} value={b[key].state} onChange={e=>patch({[key]:{...b[key],state:e.target.value as ''|'known'|'absent'}})}><option value="">Informação em falta</option><option value="absent">Ausência declarada com suporte</option><option value="known">Valor conhecido — positivo exige regra própria</option></select></label>{(b[key].state==='known'||b[key].amount)&&<label className="block">Montante declarado<input aria-label={'Montante L8 — '+label} value={b[key].amount} onChange={e=>patch({[key]:{...b[key],amount:e.target.value}})}/></label>}<label className="block">Suporte<input aria-label={'Suporte L8 — '+label} value={b[key].reference} onChange={e=>patch({[key]:{...b[key],reference:e.target.value}})}/></label></fieldset>)}
<button type="button" onClick={()=>{try{save(recordAnnual(draft,b));}catch(e){setError(String(e));}}}>Calcular e guardar saldo anual L8</button><button type="button" onClick={()=>{try{const html=annualHtml(draft),url=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'})),link=document.createElement('a');link.href=url;link.download='IRPC-L8-saldo-simulado.html';link.click();URL.revokeObjectURL(url);setError('');}catch(e){setError(String(e));}}}>Exportar saldo anual L8</button>
{annualReportRows(draft).map((r,n)=><p key={n}>{r[1]} — {r[2]} — {r[3]}</p>)}</section>;
}catch(e){return<p role="alert">PreparaçãoL8 não recuperável:{String(e)}. Originais e históricos conservados.</p>;}
}
@@ -0,0 +1,53 @@
import {prepareCreditCarry, type AnnualBook} from '@/lib/irpc-annual-settlement';
import {carrySource, newCarryLot, newCarryUse, type CarryLot, type CreditCarry} from '@/lib/irpc-credit-carry';
import CountrySelect, {type Country} from '@/components/country-select';
import {countryIsoCodes} from '@/lib/country-iso-codes';
const pt = new Intl.DisplayNames(['pt'], {type: 'region'});
const en = new Intl.DisplayNames(['en'], {type: 'region'});
const countries: Country[] = countryIsoCodes.filter(code => code !== 'MZ').map(code => ({code, name: pt.of(code) ?? code, name_en: en.of(code) ?? code})).sort((a, b) => a.name.localeCompare(b.name, 'pt'));
export function SimulationIrpcCarry({book, save}: {book: AnnualBook; save: (book: AnnualBook) => void}) {
const c = book.creditCarry;
if (!c) return <fieldset className="rounded border p-3"><legend>Saldos de exercícios anteriores</legend><p>Se dispõe de remanescentes documentados de crédito internacional ou PEC, prepare a origem e as utilizações efectivas. Os resultados anteriores ficam conservados.</p><button type="button" onClick={() => save(prepareCreditCarry(book))}>Preparar saldos anteriores</button></fieldset>;
const update = (value: CreditCarry) => save({...book, creditCarry: value});
const lotChange = (r: CarryLot) => update({...c, lots: c.lots.map(x => x.id === r.id ? r : x)});
return <fieldset className="space-y-3 rounded border p-3"><legend>Crédito internacional e PEC — exercícios anteriores</legend>
<p>{carrySource}</p>
<label className="block">Inventário de saldos anteriores<select aria-label="Estado dos saldos anteriores L8" value={c.state} onChange={e => update({...c, state: e.target.value as CreditCarry['state']})}><option value="">Informação em falta</option><option value="known">Saldos conhecidos</option><option value="absent">Ausência documentada</option></select></label>
<label className="block">Suporte do inventário<input aria-label="Suporte dos saldos anteriores L8" value={c.reference} onChange={e => update({...c, reference: e.target.value})}/></label>
{(c.state === 'known' || c.lots.length > 0) && <>
<p>Consolide uma origem por natureza, país e exercício. Transcreva o montante elegível apurado e o deduzido na origem, com o suporte da regra desse exercício. Imposto estrangeiro acima dos limites de elegibilidade não é remanescente por insuficiência de colecta. Só se aplica aqui o prazo ordinário a exercícios anuais; situações transitórias ou especiais exigem correspondência própria.</p>
<button type="button" onClick={() => update({...c, lots: [...c.lots, {...newCarryLot(crypto.randomUUID()), subjectNuit: book.subjectNuit}]})}>Registar origem de saldo anterior</button>
</>}
{c.lots.map((r, i) => {
const patch = (v: Partial<CarryLot>) => lotChange({...r, ...v});
const prefix = 'Saldo anterior ' + (i + 1) + ' — ';
return <fieldset key={r.id} className="space-y-2 rounded border p-3"><legend>Origem {i + 1}</legend>
<label className="block">Natureza<select aria-label={prefix + 'Natureza'} value={r.kind} onChange={e => patch({kind: e.target.value as CarryLot['kind']})}><option value="">Por identificar</option><option value="international">Crédito por dupla tributação internacional</option><option value="pec">PEC efectivamente pago</option></select></label>
{(r.kind === 'international' || r.country) && <CountrySelect countries={countries} label={prefix + 'País estrangeiro'} value={r.country} onChange={country => patch({country})} allowLegacyValue/>}
{r.kind === 'pec' && <p>O PEC não tem país estrangeiro. A escolha da natureza conserva os valores introduzidos; reconcilie qualquer país anterior.</p>}
{([['subjectNuit', 'NUIT titular'], ['year', 'Exercício de origem'], ['currency', 'Moeda comprovada'], ['originDocument', 'Declaração/apuramento de origem'], ['originReference', 'Suporte da origem e insuficiência de colecta'], ['ruleReference', 'Regra e período aplicáveis na origem'], ['eligible', 'Montante elegível na origem — MZN'], ['originDeducted', 'Deduzido na origem — MZN'], ['selected', 'Parcela escolhida para este fecho — MZN']] as const).map(([key, label]) => <label key={key} className="block">{label}<input aria-label={prefix + label} value={r[key]} onChange={e => patch({[key]: e.target.value})}/></label>)}
<label className="block">Exercício de origem anual ordinário<select aria-label={prefix + 'Período ordinário'} value={r.ordinary} onChange={e => patch({ordinary: e.target.value as CarryLot['ordinary']})}><option value="">Informação em falta</option><option value="yes">Sim — documentado</option><option value="no">Não — regra específica por corresponder</option></select></label>
<label className="block">Remanescente por insuficiência de colecta<select aria-label={prefix + 'Insuficiência de colecta'} value={r.insufficient} onChange={e => patch({insufficient: e.target.value as CarryLot['insufficient']})}><option value="">Informação em falta</option><option value="yes">Sim — documentado</option><option value="no">Não — não é saldo elegível neste percurso</option></select></label>
<label className="block">Utilizações efectivas posteriores à origem<select aria-label={prefix + 'Estado dos usos'} value={r.usesState} onChange={e => patch({usesState: e.target.value as CarryLot['usesState']})}><option value="">Informação em falta</option><option value="known">Utilizações conhecidas</option><option value="absent">Ausência documentada</option></select></label>
<label className="block">Suporte do inventário de utilizações<input aria-label={prefix + 'Suporte dos usos'} value={r.usesReference} onChange={e => patch({usesReference: e.target.value})}/></label>
<p>Inclua utilizações efectivas já ocorridas neste exercício antes desta parcela. Não registe simulações históricas como utilizações fiscais. Crédito internacional admite fracção exacta n/d; não é aplicado arredondamento fiscal.</p>
{r.usesState === 'known' && <button type="button" onClick={() => patch({uses: [...r.uses, newCarryUse(crypto.randomUUID())]})}>Registar utilização efectiva da origem {i + 1}</button>}
{r.uses.map((u, j) => <fieldset key={u.id} className="rounded border p-2"><legend>Utilização {i + 1}.{j + 1}</legend>
{([['year', 'Exercício'], ['amount', 'Montante MZN'], ['document', 'Documento de utilização'], ['reference', 'Suporte']] as const).map(([key, label]) => <label key={key} className="block">{label}<input aria-label={prefix + 'Uso ' + (j + 1) + ' — ' + label} value={u[key]} onChange={e => patch({uses: r.uses.map(x => x.id === u.id ? {...x, [key]: e.target.value} : x)})}/></label>)}
<button type="button" onClick={() => patch({uses: r.uses.filter(x => x.id !== u.id)})}>Retirar utilização {i + 1}.{j + 1}</button>
</fieldset>)}
<button type="button" onClick={() => update({...c, lots: c.lots.filter(x => x.id !== r.id)})}>Retirar origem {i + 1}</button>
</fieldset>;
})}
{(c.state === 'known' || c.currentInternational || c.currentPec || c.allocationReference) && <fieldset className="space-y-2 rounded border p-3"><legend>Escolha das parcelas entre exercícios</legend>
<p>Escolha quanto deduzir dos créditos correntes e de cada origem anterior. Os créditos internacionais precedem o PEC; a soma fica limitada à colecta. Não se presume prioridade entre exercícios e nenhuma parcela é reduzida automaticamente. Valores não escolhidos ficam identificados, sem criação de transporte oficial.</p>
<label className="block">Crédito internacional corrente a deduzir — MZN<input aria-label="Parcela corrente internacional L8" value={c.currentInternational} onChange={e => update({...c, currentInternational: e.target.value})}/></label>
<label className="block">PEC corrente a deduzir — MZN<input aria-label="Parcela corrente PEC L8" value={c.currentPec} onChange={e => update({...c, currentPec: e.target.value})}/></label>
<label className="block">Suporte da escolha e seus impactos<input aria-label="Suporte da afectação entre exercícios L8" value={c.allocationReference} onChange={e => update({...c, allocationReference: e.target.value})}/></label>
<button type="button" onClick={() => update({...c, assessmentKey: book.assessmentKey})}>Confirmar afectação à colecta seleccionada</button>
<p>{c.assessmentKey && c.assessmentKey === book.assessmentKey ? 'Escolha vinculada à colecta seleccionada; o cálculo verifica disponibilidade e limites.' : 'Falta confirmar a escolha na colecta seleccionada. Valores conservados.'}</p>
</fieldset>}
</fieldset>;
}
@@ -0,0 +1,41 @@
import {prepareEconomicBook, type AnnualBook} from '@/lib/irpc-annual-settlement';
import {economicSource, newEconomicPosition, type EconomicPosition} from '@/lib/irpc-economic-credit';
export function SimulationIrpcEconomic({book, save, residentConfirmed}: {book: AnnualBook; save: (book: AnnualBook) => void; residentConfirmed: boolean}) {
const c = book.economicCredits;
if (!c) return <fieldset className="rounded border p-3"><legend>Crédito por dupla tributação económica</legend><p>Para lucros distribuídos por entidade moçambicana sujeita e não isenta de IRPC, distinga o imposto correspondente aos lucros da retenção sofrida e do imposto estrangeiro. Reutiliza a colecta e conserva o resumo de créditos anterior.</p><button type="button" onClick={() => save(prepareEconomicBook(book))}>Preparar crédito económico</button></fieldset>;
const update = (next: typeof c) => save({...book, economicCredits: next});
const rowChange = (r: EconomicPosition) => update({...c, rows: c.rows.map(x => x.id === r.id ? r : x)});
return <fieldset className="space-y-3 rounded border p-3"><legend>Crédito económico — lucros distribuídos</legend>
<p>{economicSource}</p>
<p>O detalhe substitui nesta execução o resumo económico anterior, que permanece conservado: {book.internationalCredits?.economic.state || 'informação em falta'}; montante {book.internationalCredits?.economic.amount || 'não preenchido'}. Os benefícios e o crédito internacional mantêm os seus estados próprios.</p>
<label className="block">Estado do crédito económico<select aria-label="Estado do crédito económico L8" value={c.state} onChange={e => update({...c, state: e.target.value as typeof c.state})}><option value="">Informação em falta</option><option value="known">Lucros e IRPC conhecidos</option><option value="absent">Ausência documentada</option></select></label>
<label className="block">Suporte do inventário económico<input aria-label="Suporte económico L8" value={c.reference} onChange={e => update({...c, reference: e.target.value})}/></label>
{(c.state === 'known' || c.rows.length > 0) && <button type="button" onClick={() => update({...c, state: 'known', rows: [...c.rows, {...newEconomicPosition(crypto.randomUUID()), subjectNuit: book.subjectNuit, year: book.year, recipientResident: residentConfirmed ? 'yes' : ''}]})}>Registar lucros distribuídos</button>}
{c.rows.map((r, i) => {
const patch = (v: Partial<EconomicPosition>) => rowChange({...r, ...v});
const prefix = 'Crédito económico ' + (i + 1) + ' — ';
const field = (key: Exclude<keyof EconomicPosition, 'previousUse'>, label: string) => <label key={key} className="block">{label}<input aria-label={prefix + label} value={r[key]} onChange={e => patch({[key]: e.target.value})}/></label>;
const choice = (key: 'recipientResident' | 'payerResident' | 'payerIrpc' | 'payerExempt' | 'article40' | 'incomeIncluded', label: string) => <label key={key} className="block">{label}<select aria-label={prefix + label} value={r[key]} onChange={e => patch({[key]: e.target.value})}><option value="">Informação em falta</option><option value="yes">Sim — documentado</option><option value="no">Não — documentado</option></select></label>;
const outside = !!r.kind && r.kind !== 'ordinary_profit' || r.article40 === 'yes';
const detail = <>
{([['distributionDocument', 'Documento da distribuição'], ['distributionParcel', 'Parcela dos lucros no documento'], ['distributionDate', 'Data da distribuição (AAAA-MM-DD)'], ['income', 'Lucros incluídos antes do crédito — MZN, ilíquidos de retenção'], ['incomeReference', 'Suporte da inclusão e do valor ilíquido na base corrente'], ['taxIssuer', 'Emitente do comprovativo de IRPC correspondente'], ['taxDocument', 'Documento do IRPC correspondente aos lucros'], ['taxParcel', 'Parcela desse IRPC no documento'], ['parcelReference', 'Suporte da identificação da parcela de imposto'], ['currency', 'Moeda comprovada'], ['proofAmount', 'IRPC comprovado nesta parcela — MZN'], ['taxAmount', 'IRPC correspondente aos lucros seleccionados — MZN'], ['attributionReference', 'Suporte da correspondência entre imposto e lucros'], ['previouslyAttributed', 'IRPC desta parcela já atribuído a outros lucros — MZN'], ['priorAttributionReference', 'Suporte das atribuições anteriores, incluindo zero conhecido'], ['grossUpIncluded', 'Crédito nominal já acrescido à base (art.53) — MZN'], ['grossUpReference', 'Suporte do acréscimo art.53 já incluído em L6'], ['nationalLimit', 'Quota proporcional da colecta após acréscimo — MZN'], ['nationalLimitReference', 'Suporte da quota proporcional da colecta']] as const).map(([key, label]) => field(key, label))}
{choice('incomeIncluded', 'Lucros ilíquidos e acréscimo incluídos na base corrente')}
<p>O cálculo confere 60% do IRPC correspondente com o acréscimo já incluído em L6 e a quota proporcional documentada. Se a base estiver incompleta, reconcilie-a no percurso existente. Esta acção conserva os valores e não altera a colecta automaticamente.</p>
<button type="button" onClick={() => patch({assessmentKey: book.assessmentKey})}>Confirmar inclusão e quota na colecta seleccionada</button>
<label className="block">Utilização anterior efectiva do crédito<select aria-label={prefix + 'Estado do uso anterior'} value={r.previousUse.state} onChange={e => patch({previousUse: {...r.previousUse, state: e.target.value as EconomicPosition['previousUse']['state']}})}><option value="">Informação em falta</option><option value="known">Montante conhecido</option><option value="absent">Ausência documentada</option></select></label>
{(r.previousUse.state === 'known' || r.previousUse.amount) && <label className="block">Crédito já utilizado — MZN<input aria-label={prefix + 'Uso anterior MZN'} value={r.previousUse.amount} onChange={e => patch({previousUse: {...r.previousUse, amount: e.target.value}})}/></label>}
<label className="block">Suporte do uso anterior ou da sua ausência<input aria-label={prefix + 'Suporte do uso anterior'} value={r.previousUse.reference} onChange={e => patch({previousUse: {...r.previousUse, reference: e.target.value}})}/></label>
</>;
return <fieldset key={r.id} className="space-y-2 rounded border p-3"><legend>Lucros {i + 1}</legend>
{field('subjectNuit', 'NUIT beneficiário')}{field('payerNuit', 'NUIT distribuidor')}{field('year', 'Exercício')}
<label className="block">Natureza<select aria-label={prefix + 'Natureza'} value={r.kind} onChange={e => patch({kind: e.target.value as EconomicPosition['kind']})}><option value="">Por identificar</option><option value="ordinary_profit">Lucros ordinários — art.64(1–2)</option><option value="liquidation">Partilha em liquidação — art.64(3)</option><option value="association">Associação — art.64(4)</option></select></label>
{residentConfirmed && r.recipientResident === 'yes' ? <p>Residência do beneficiário reutilizada da colecta corrente no regime geral. NUIT e exercício conservados.</p> : choice('recipientResident', 'Beneficiário com sede/direcção efectiva em Moçambique')}{choice('payerResident', 'Distribuidor com sede/direcção efectiva em Moçambique')}{choice('payerIrpc', 'Distribuidor sujeito a IRPC')}{choice('payerExempt', 'Distribuidor isento de IRPC')}{field('qualificationReference', 'Suporte da qualificação das entidades e dos lucros')}
{choice('article40', 'Esta parcela está abrangida pela exclusão do art.40(1)')}{field('article40Reference', 'Suporte da correspondência do art.40(1) e seu período')}
<p>O art.40(1), na redacção de 2009, contempla as entidades e condições próprias, incluindo participação directa de pelo menos20% e prazo de dois anos, nos termos da fonte. Uma parcela excluída da base não recebe também o crédito64. A simples percentagem de participação não decide todas as condições.</p>
{outside ? <><p>Esta parcela exige o tratamento específico identificado. O crédito ordinário não é aplicado; os valores introduzidos ficam conservados.</p><details><summary>Consultar ou reconciliar dados conservados</summary>{detail}</details></> : detail}
<button type="button" onClick={() => update({...c, rows: c.rows.filter(x => x.id !== r.id)})}>Retirar lucros {i + 1}</button>
</fieldset>;
})}
</fieldset>;
}
@@ -0,0 +1,58 @@
import {FiscalProofParcelFields} from './fiscal-proof-parcel';
import CountrySelect, {type Country} from '@/components/country-select';
import {countryIsoCodes} from '@/lib/country-iso-codes';
import {newInternationalProof, prepareInternationalBook, type AnnualBook} from '@/lib/irpc-annual-settlement';
import {newInternationalPosition, internationalCreditSource, type CreditEvidence, type InternationalCredits, type InternationalPosition, type InternationalTaxProof} from '@/lib/irpc-international-credit';
const pt = new Intl.DisplayNames(['pt'], {type: 'region'}), en = new Intl.DisplayNames(['en'], {type: 'region'});
const countries: Country[] = countryIsoCodes.filter(code => code !== 'MZ').map(code => ({code, name: pt.of(code) ?? code, name_en: en.of(code) ?? code})).sort((a, b) => a.name.localeCompare(b.name, 'pt'));
function Evidence({value, label, change}: {value: CreditEvidence; label: string; change: (value: CreditEvidence) => void}) {
return <fieldset className="rounded border p-2"><legend>{label}</legend>
<label className="block">Estado<select aria-label={label + ' — Estado'} value={value.state} onChange={e => change({...value, state: e.target.value as CreditEvidence['state']})}><option value="">Informação em falta</option><option value="known">Valor conhecido</option><option value="absent">Ausência declarada</option></select></label>
{(value.state === 'known' || value.amount) && <label className="block">Montante MZN<input aria-label={label + ' — Montante'} value={value.amount} onChange={e => change({...value, amount: e.target.value})}/></label>}
<label className="block">Suporte<input aria-label={label + ' — Suporte'} value={value.reference} onChange={e => change({...value, reference: e.target.value})}/></label>
</fieldset>;
}
export function SimulationIrpcInternational({book, save}: {book: AnnualBook; save: (book: AnnualBook) => void}) {
const c = book.internationalCredits;
if (!c) return <fieldset className="rounded border p-3"><legend>Crédito internacional — próprio exercício</legend><p>Prepare a inclusão do imposto estrangeiro comprovado e dos limites documentados, antes do PEC. O resumo anterior de créditos e os históricos ficam conservados. A escolha do país não confirma uma convenção ou benefício.</p><button type="button" onClick={() => save(prepareInternationalBook(book))}>Preparar crédito internacional</button></fieldset>;
const update = (next: InternationalCredits) => save({...book, internationalCredits: next});
const positionChange = (p: InternationalPosition) => update({...c, positions: c.positions.map(x => x.id === p.id ? p : x)});
return <fieldset className="space-y-3 rounded border p-3"><legend>Crédito por dupla tributação internacional</legend>
<p>{internationalCreditSource}</p>
<p>Reúna os comprovativos de cada país numa posição por exercício. Indique a fracção nacional e a convenção conforme o suporte do caso. Limites admitem decimal ou fracção exacta n/d; a apresentação não constitui arredondamento fiscal. Valores MZN exigem correspondência documental; uma previsão de câmbio ou de pagamento não comprova o crédito.</p>
<label className="block">Estado internacional<select aria-label="Estado do crédito internacional L8" value={c.state} onChange={e => update({...c, state: e.target.value as InternationalCredits['state']})}><option value="">Informação em falta</option><option value="known">Posições conhecidas</option><option value="absent">Ausência declarada</option></select></label>
<label className="block">Suporte do inventário<input aria-label="Suporte do crédito internacional L8" value={c.reference} onChange={e => update({...c, reference: e.target.value})}/></label>
{book.economicCredits ? <p>Resumo económico anterior conservado: {c.economic.state || "Informação em falta"}; {c.economic.amount || "Montante não preenchido"}. Nesta execução é usado o detalhe económico acima.</p> : <Evidence label="Crédito económico — regra própria" value={c.economic} change={economic => update({...c, economic})}/>}
<Evidence label="Benefícios/créditos próprios — regra própria" value={c.benefits} change={benefits => update({...c, benefits})}/>
<p>{book.economicCredits ? "Benefícios positivos exigem regras próprias; o crédito económico tem o seu detalhe separado. Informação em falta mantém o saldo dependente indeterminado." : "Créditos económicos e benefícios positivos exigem regras próprias; informação em falta mantém o saldo dependente indeterminado."}</p>
<button type="button" onClick={() => update({...c, state: 'known', positions: [...c.positions, {...newInternationalPosition(crypto.randomUUID()), subjectNuit: book.subjectNuit, year: book.year, assessmentKey: book.assessmentKey}]})}>Registar posição internacional</button>
{c.positions.map((p, index) => {
const patch = (v: Partial<InternationalPosition>) => positionChange({...p, ...v});
const paymentChange = (r: InternationalTaxProof) => patch({payments: p.payments.map(x => x.id === r.id ? r : x)});
return <fieldset key={p.id} className="space-y-2 rounded border p-3"><legend>Posição internacional {index + 1}</legend>
<CountrySelect countries={countries} label={'País do imposto estrangeiro ' + (index + 1)} value={p.country} onChange={country => patch({country})} allowLegacyValue/>
{([['subjectNuit', 'NUIT titular'], ['year', 'Exercício'], ['incomeAmount', 'Rendimento incluído — MZN'], ['incomeReference', 'Suporte da inclusão na matéria colectável'], ['nationalLimit', 'Fracção nacional correspondente — MZN'], ['nationalLimitReference', 'Suporte da fracção nacional e exercício']] as const).map(([key, label]) => <label key={key} className="block">{label}<input aria-label={'Internacional ' + (index + 1) + ' — ' + label} value={p[key]} onChange={e => patch({[key]: e.target.value})}/></label>)}
<label className="block">Rendimento incluído na matéria colectável<select aria-label={'Internacional ' + (index + 1) + ' — Inclusão'} value={p.incomeIncluded} onChange={e => patch({incomeIncluded: e.target.value as InternationalPosition['incomeIncluded']})}><option value="">Informação em falta</option><option value="yes">Sim — documentado</option><option value="no">Não — crédito não aplicável nesta base</option></select></label>
<button type="button" onClick={() => patch({assessmentKey: book.assessmentKey, qualificationCountry: p.country})}>Vincular inclusão e limites ao país e à colecta seleccionados</button>
<label className="block">Convenção aplicável<select aria-label={'Internacional ' + (index + 1) + ' — Convenção'} value={p.treaty} onChange={e => patch({treaty: e.target.value as InternationalPosition['treaty']})}><option value="">Informação em falta</option><option value="yes">Sim — artigo, período e limite documentados</option><option value="no">Não — ausência de aplicação documentada</option></select></label>
{(p.treaty === 'yes' || p.treatyLimit) && <label className="block">Imposto pago elegível nos termos da convenção — limite MZN<input aria-label={'Internacional ' + (index + 1) + ' — Limite CDT'} value={p.treatyLimit} onChange={e => patch({treatyLimit: e.target.value})}/></label>}
<label className="block">Suporte da convenção ou da não aplicação<input aria-label={'Internacional ' + (index + 1) + ' — Suporte CDT'} value={p.treatyReference} onChange={e => patch({treatyReference: e.target.value})}/></label>
<Evidence label={'Utilização anterior do crédito — país ' + (index + 1)} value={p.previousUse} change={previousUse => patch({previousUse})}/>
<p>Utilização anterior é crédito já deduzido e documentado. Não é a soma de simulações históricas nem o imposto pago acima dos limites.</p>
<button type="button" onClick={() => patch({payments: [...p.payments, {...newInternationalProof(crypto.randomUUID()), subjectNuit: p.subjectNuit, year: p.year}]})}>Registar imposto estrangeiro na posição {index + 1}</button>
{p.payments.map((r, ri) => {
const change = (v: Partial<InternationalTaxProof>) => paymentChange({...r, ...v});
return <fieldset key={r.id} className="rounded border p-2"><legend>Imposto estrangeiro {index + 1}.{ri + 1}</legend>
{([['document', 'Comprovativo'], ['issuer', 'Emitente'], ['date', 'Data (AAAA-MM-DD)'], ['subjectNuit', 'NUIT titular'], ['year', 'Exercício do pagamento'], ['currency', 'Moeda'], ['proofAmount', 'Total comprovado — MZN'], ['amount', 'Parcela de imposto seleccionado — MZN'], ['reference', 'Suporte do pagamento e afectação'], ['taxReference', 'Suporte da natureza de imposto sobre o rendimento']] as const).map(([key, label]) => <label key={key} className="block">{label}<input aria-label={'Imposto estrangeiro ' + (index + 1) + '.' + (ri + 1) + ' — ' + label} value={r[key]} onChange={e => change({[key]: e.target.value})}/></label>)}
{(r.exerciseReference || r.date && !r.date.startsWith(p.year + '-')) && <label className="block">Suporte da correspondência da data ao exercício<input aria-label={'Imposto estrangeiro ' + (index + 1) + '.' + (ri + 1) + ' — Correspondência temporal'} value={r.exerciseReference} onChange={e => change({exerciseReference: e.target.value})}/></label>}
<label className="block">Pagamento efectivo<select aria-label={'Imposto estrangeiro ' + (index + 1) + '.' + (ri + 1) + ' — Efectivo'} value={r.effective} onChange={e => change({effective: e.target.value as InternationalTaxProof['effective']})}><option value="">Informação em falta</option><option value="yes">Sim — comprovado</option><option value="no">Não — previsão/outra situação</option></select></label>
<label className="block">Imposto sobre o rendimento elegível<select aria-label={'Imposto estrangeiro ' + (index + 1) + '.' + (ri + 1) + ' — Natureza'} value={r.incomeTax} onChange={e => change({incomeTax: e.target.value as InternationalTaxProof['incomeTax']})}><option value="">Informação em falta</option><option value="yes">Sim — natureza documentada</option><option value="no">Não — outra natureza, sem crédito presumido</option></select></label>
<FiscalProofParcelFields value={r} change={change} label={"Imposto estrangeiro " + (index + 1) + "." + (ri + 1)}/><button type="button" onClick={() => patch({payments: p.payments.filter(x => x.id !== r.id)})}>Retirar imposto estrangeiro {index + 1}.{ri + 1}</button>
</fieldset>;
})}
<button type="button" onClick={() => update({...c, positions: c.positions.filter(x => x.id !== p.id)})}>Retirar posição internacional {index + 1}</button>
</fieldset>;
})}
</fieldset>;
}
@@ -1,3 +1,4 @@
import {SimulationIrpcSpecial} from '@/components/simulation-irpc-special';
import {SimulationIrpcFormPreparation} from '@/components/simulation-irpc-form-preparation';
import {SimulationIrpcPeriodFx} from '@/components/simulation-irpc-period-fx';
import {SimulationIrpcDepreciation} from '@/components/simulation-irpc-depreciation';
@@ -39,8 +40,9 @@ export function SimulationIrpcNormal({draft,onChange}:{draft:Record<string,unkno
<SimulationIrpcCosts draft={draft} book={b} save={save}/>
<SimulationIrpcTaxableBase draft={draft} book={b} save={save}/>
<SimulationIrpcAssessment book={b} save={save}/>
<SimulationIrpcSpecial draft={draft} book={b} save={save}/>
<SimulationIrpcFormPreparation draft={draft} book={b} save={save}/>
<button type="button" onClick={()=>{try{save(recordNormal(draft,b));}catch(e){setError(String(e));}}}>Calcular e guardar ajustamentos L6</button>
<button type="button" onClick={()=>{try{save(recordNormal(draft,b));}catch(e){setError(String(e));}}}>Calcular e guardar L6 e tratamentos L7 preparados</button>
<button type="button" onClick={()=>{try{const html=normalHtml(draft),url=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'})),a=document.createElement('a');a.href=url;a.download='IRPC-normal-ajustamentos.html';a.click();URL.revokeObjectURL(url);setError('');}catch(e){setError(String(e));}}}>Exportar mapa parcial L6</button>
{normalReportRows(draft).map((r,n)=><p key={n}>{r[1]} — {r[2]} — {r[3]}</p>)}
</section>;
@@ -0,0 +1,24 @@
import {FiscalProofParcelFields} from './fiscal-proof-parcel';
import {newPecPayment, pecSource, type PecPayment} from '@/lib/irpc-pec';
import type {AnnualBook} from '@/lib/irpc-annual-settlement';
export function SimulationIrpcPec({book, save}: {book: AnnualBook; save: (book: AnnualBook) => void}) {
const detail = book.pecPayments;
if (!detail) return <fieldset className="rounded border p-3"><legend>PEC — comprovativos do próprio exercício</legend><p>O resumo anterior fica conservado. Preparar o detalhe permite reconciliar os pagamentos efectivos e deduzi-los até à colecta disponível, sem reembolso do excedente PEC.</p><button type="button" onClick={() => save({...book, pecPayments: {version: 1, state: book.pec.state, reference: book.pec.reference, rows: []}})}>Preparar detalhe PEC</button></fieldset>;
const update = (next: typeof detail) => save({...book, pecPayments: next});
return <fieldset className="space-y-2 rounded border p-3"><legend>PEC — pagamentos efectivamente comprovados</legend>
<p>{pecSource}</p><p>Identifique a natureza PEC no comprovativo. As utilizações anteriores exigem valor e suporte; zero conhecido é diferente de informação em falta. A parcela seleccionada não pode exceder o comprovado menos o já utilizado. Saldos de anos anteriores, cálculo da obrigação e créditos próprios permanecem separados.</p>
<label className="block">Estado dos PEC<select aria-label="Estado dos PEC comprovados L8" value={detail.state} onChange={e => update({...detail, state: e.target.value as typeof detail.state})}><option value="">Informação em falta</option><option value="known">Pagamentos conhecidos</option><option value="absent">Ausência declarada com suporte</option></select></label>
<label className="block">Suporte do inventário PEC<input aria-label="Suporte do inventário PEC L8" value={detail.reference} onChange={e => update({...detail, reference: e.target.value})}/></label>
<button type="button" onClick={() => update({...detail, state: 'known', rows: [...detail.rows, {...newPecPayment(crypto.randomUUID()), subjectNuit: book.subjectNuit, year: book.year}]})}>Registar comprovativo PEC</button>
{detail.rows.map((r, index) => {
const change = (p: Partial<PecPayment>) => update({...detail, rows: detail.rows.map(x => x.id === r.id ? {...x, ...p} : x)});
return <fieldset key={r.id} className="rounded border p-2"><legend>PEC {index + 1}</legend>
{([['document', 'Comprovativo PEC'], ['issuer', 'Emitente'], ['date', 'Data (AAAA-MM-DD)'], ['subjectNuit', 'NUIT beneficiário'], ['year', 'Exercício de origem'], ['currency', 'Moeda'], ['proofAmount', 'Montante comprovado'], ['previouslyUsed', 'Já utilizado fora destas parcelas'], ['priorUseReference', 'Suporte das utilizações anteriores ou do zero conhecido'], ['amount', 'Parcela disponível seleccionada'], ['reference', 'Suporte do pagamento PEC e afectação']] as const).map(([key, label]) => <label key={key} className="block">{label}<input aria-label={'PEC L8 ' + (index + 1) + ' — ' + label} value={r[key]} onChange={e => change({[key]: e.target.value})}/></label>)}
<label className="block">Pagamento PEC efectivamente comprovado<select aria-label={'PEC L8 ' + (index + 1) + ' — Efectivo'} value={r.effective} onChange={e => change({effective: e.target.value as PecPayment['effective']})}><option value="">Informação em falta</option><option value="yes">Sim — natureza PEC e pagamento reconciliados</option><option value="no">Não — previsão ou outra natureza</option></select></label>
<FiscalProofParcelFields value={r} change={change} label={"PEC L8 " + (index + 1)}/><button type="button" onClick={() => update({...detail, rows: detail.rows.filter(x => x.id !== r.id)})}>Retirar selecção PEC {index + 1}</button>
</fieldset>;
})}
<p>O detalhe substitui o resumo PEC apenas nesta execução. Os comprovativos e resultados de execuções anteriores permanecem no histórico; não há consumo automático de saldos oficiais.</p>
</fieldset>;
}
File diff suppressed because one or more lines are too long
+22 -4
View File
@@ -58,10 +58,28 @@ const menuTranslations = [
'solicitudes recibidas',
],
[
'Porquê investir em Moçambique',
'Why invest in Mozambique',
'Pourquoi investir au Mozambique',
'Por qué invertir en Mozambique',
'Porquê investir em Moçambique?',
'Why invest in Mozambique?',
'Pourquoi investir au Mozambique ?',
'Por qué invertir en Mozambique?',
],
[
'Partir de uma ideia',
'Start with an idea',
'Partir d’une idée',
'Partir de una idea',
],
[
'Consultar oportunidades',
'Browse opportunities',
'Consulter les opportunités',
'Consultar oportunidades',
],
[
'Simulador Fiscal',
'Tax simulator',
'Simulateur fiscal',
'Simulador fiscal',
],
[
'Oportunidades de investimento',
@@ -0,0 +1,66 @@
import { useEffect, useRef, useState, type ReactNode } from 'react';
type Choice = { id: string; name: string; source_code?: string | null };
/** One search field owns the list and commits only an explicitly chosen option. */
export default function TerritorySearchSelect<T extends Choice>({
id, label, search, onSearch, options, selected, onChange, disabled = false,
loading = false, error, required = false, className, placeholder, children,
}: {
id: string; label: string; search: string; onSearch: (query: string) => void;
options: T[]; selected?: T; onChange: (option?: T) => void;
disabled?: boolean; loading?: boolean; error?: string; required?: boolean;
className?: string; placeholder?: string; children?: ReactNode;
}) {
const [open, setOpen] = useState(false);
const [active, setActive] = useState(-1);
const activeRef = useRef<HTMLButtonElement | null>(null);
const expanded = open && !disabled;
const listId = `${id}-options`;
useEffect(() => { if (expanded) activeRef.current?.scrollIntoView({ block: 'nearest' }); }, [active, expanded]);
const close = () => { setOpen(false); setActive(-1); onSearch(''); };
const choose = (option?: T) => { onChange(option); close(); };
return <div className="relative" onBlur={(event) => {
if (!event.currentTarget.contains(event.relatedTarget as Node | null)) close();
}}>
<input id={id} className={className} role="combobox" aria-label={`Pesquisar ${label}`}
aria-autocomplete="list" aria-expanded={expanded} aria-controls={expanded ? listId : undefined}
aria-activedescendant={expanded && !loading && options[active] ? `${listId}-${active}` : undefined}
aria-invalid={Boolean(error)} aria-describedby={error ? `${id}-error` : undefined}
aria-required={required || undefined} required={required} autoComplete="off" maxLength={100}
disabled={disabled} value={expanded ? search : selected?.name ?? ''}
placeholder={disabled ? 'Seleccione o nível anterior' : placeholder ?? `Pesquisar ${label.toLowerCase()}`}
onFocus={() => { setOpen(true); setActive(-1); onSearch(''); }}
onClick={() => setOpen(true)}
onChange={(event) => { setOpen(true); setActive(-1); onSearch(event.target.value); }}
onKeyDown={(event) => {
if (event.key === 'Escape') { event.preventDefault(); close(); }
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
event.preventDefault(); setOpen(true);
setActive((current) => !options.length ? -1 : event.key === 'ArrowDown'
? Math.min(current + 1, options.length - 1) : current < 0 ? options.length - 1 : Math.max(0, current - 1));
}
if (event.key === 'Enter' && expanded) {
event.preventDefault();
if (!loading && options[active < 0 ? 0 : active]) choose(options[active < 0 ? 0 : active]);
}
}} />
{selected && !disabled && <button type="button" className="mt-1 text-sm underline"
aria-label={`Limpar ${label}`} onClick={() => choose()}>Limpar</button>}
{error && <p id={`${id}-error`} role="alert">{error}</p>}
{expanded && <div className="absolute z-50 mt-1 max-h-72 w-full overflow-y-auto rounded border bg-background p-1 text-foreground shadow-lg">
<div id={listId} role="listbox" aria-label={label} aria-busy={loading}>
{loading && <p role="status" className="p-2">A carregar…</p>}
{!loading && options.length === 0 && <p className="p-2">{error ? 'Não foi possível carregar as opções.' : 'Sem resultados para esta pesquisa.'}</p>}
{options.map((option, index) => <button key={option.id} id={`${listId}-${index}`} type="button"
ref={index === active ? activeRef : undefined} role="option" tabIndex={-1}
aria-selected={option.id === selected?.id} disabled={loading}
className={`block w-full rounded p-2 text-left hover:bg-accent ${index === active ? 'bg-accent' : ''}`}
onMouseDown={(event) => event.preventDefault()} onClick={() => choose(option)}>
{option.name}{option.source_code ? ` (${option.source_code})` : ''}
</button>)}
</div>
{children}
</div>}
</div>;
}

Some files were not shown because too many files have changed in this diff Show More