{ "increment": "COMMON-LEDGER-DIRECT-COST-CORRECTION-SIM-v1", "consolidated_at_utc": "2026-11-03T05:18:18.685Z", "authorization": { "answer": "Autorizar a correcção sintética proposta", "scope_archive_matches_presented_proposal": true, "approved_scope_sha256": "7b71bab9654cc0b4f5c4fa33a6728208c9450b6bccca887a86d157f1263396c4" }, "functional_code": true, "synthetic_only": true, "status": "implemented_and_tested_with_explicit_limits", "tests": { "actual_source_setup": { "passed": true, "original_journal_id": 1, "original_journal_sha256": "db5c9af341f544b0c6cb0b0fad4b4e2c8d79f7dea7078576b4d10b3d052008c3", "original_calculation_sha256": "7917c0951c5737ad86037b9742751f5582abb93e678c4cd2e6993eee44639980", "replacement_rate_id": 3, "replacement_calculation_id": 2, "original_minor": 27500, "replacement_minor": 29500, "difference_minor": 2000, "source_fingerprint": "fe005fcf3bbac3631f00b6bfe460cbb7a54ba0a141e1f2f7f713be2e87bd4730", "no_correction_groups_yet": true }, "actual_complete_workflow": { "passed": true, "journals": 3, "lines": 6, "correction_groups_applied": 1, "gross_debit_minor": 84500, "gross_credit_minor": 84500, "cost_balance_minor": 29500, "net_difference_minor": 2000, "original_cost_calculation_source_outbox_rights_unchanged": true, "same_and_other_key_single_pair": true, "period_closed": true, "reports_reconciled": true }, "defaults": { "passed": true, "default_without_environment": false, "explicit_new_qa_runtime": true, "real_environment_unchanged": true }, "regression": { "passed": true, "cases": [ { "name": "explicit-asymmetric-impact-and-indivisible-application", "checks": 7, "passed": true }, { "name": "faults-at-pair-boundaries-rollback-and-recovery", "checks": 7, "passed": true }, { "name": "database-rejects-orphan-cost-reversal", "checks": 1, "passed": true }, { "name": "changed-source-version-requires-new-conference", "checks": 4, "passed": true }, { "name": "rights-person-and-replay-authority", "checks": 2, "passed": true }, { "name": "readers-foreign-original-disabled-capability-and-closed-period", "checks": 5, "passed": true }, { "name": "new-change-after-correction-blocks-close-no-implicit-chain", "checks": 3, "passed": true } ], "checks": 30, "rollback_only": true, "source_originals_outbox_rights_unchanged": true, "asymmetric_pair_and_orphan_sql_enforced": true }, "security": { "passed": true, "checks": 8, "eligible_foreign_tenant_company_unit_refused": true, "four_live_rights_revalidated": true, "rollback_only": true, "source_outbox_rights_unchanged": true }, "actual_http": { "passed": true, "checks": 58, "actual_http": true, "csrf_and_context": true, "indivisible_four_line_impact": true, "isolated_public_parts_refused": true, "original_minor": 27500, "replacement_minor": 29500, "delta_minor": 2000, "journals": 3, "lines": 6, "applied_groups": 1, "gross_minor": 84500, "balance_minor": 29500, "source_snapshot_unchanged": true, "one_reviewed_close": true, "read_only_workspace": true, "writer_locks": 0, "visual_review": false }, "http_final": { "passed": true, "original_journal_calculation_source_outbox_rights_unchanged": true, "journals": 3, "lines": 6, "results": 1, "closures": 1, "closed_ui_no_commands": true }, "concurrency": { "passed": true, "workers": 6, "stale_group_after_committed_version": { "waiting": { "a": { "chain_reaches_parent": true, "wait_event": "transactionid" } }, "read_before_release": { "status": 200, "amount_minor": 29500, "journals": 1, "results": 0 }, "results": { "a": { "status": 409, "message": "Fonte, regra ou período mudaram; prepare nova conferência." } }, "changed_effect_id": 3 }, "fresh_pair": { "waiting": { "a": { "chain_reaches_parent": true, "wait_event": "transactionid" }, "b": { "chain_reaches_parent": true, "wait_event": "tuple" } }, "read_before_release": null, "results": { "a": { "status": 200, "result": { "state": "corrected", "correction_id": 2, "result_id": 1, "reverse_journal_id": 2, "replacement_journal_id": 3, "replayed": false } }, "b": { "status": 200, "result": { "state": "corrected", "correction_id": 2, "result_id": 1, "reverse_journal_id": 2, "replacement_journal_id": 3, "replayed": false } } }, "changed_effect_id": null }, "fresh_close": { "waiting": { "a": { "chain_reaches_parent": true, "wait_event": "transactionid" }, "b": { "chain_reaches_parent": true, "wait_event": "tuple" } }, "read_before_release": null, "results": { "a": { "status": 200, "result": { "state": "closed", "closure_id": 1, "period_version": 2, "replayed": false } }, "b": { "status": 200, "result": { "state": "closed", "closure_id": 1, "period_version": 2, "replayed": false } } }, "changed_effect_id": null }, "reader_finished_before_release": true, "prepared_groups": 2, "applied_groups": 1, "journals": 3, "lines": 6, "closures": 1, "cost_balance_minor": 29500, "latest_cost_version": 3, "original_journal_calculations_outbox_unchanged": true }, "three_interface_postcheck": { "passed": true, "superseded_group_visible_without_action": true, "cost_generic_and_legacy_cycle_hide_isolated_part_application": true, "read_only": true }, "cost_supplier_corrections": { "passed": true, "coinciding_order_and_supplier_obligation_ids": true, "cost_typed_journals": 3, "cost_typed_events": 9, "supplier_typed_journals": 3, "supplier_typed_events": 9, "focused_cost_groups": 1, "both_sql_pair_domains_validated": true, "journals": 6, "lines": 12, "applied_groups": 2, "gross_minor": 102500, "current_cost_minor": 29500, "supplier_balance_minor": 6000, "source_original_outbox_preserved": true, "joint_qa_close": true, "controlled_supplier_receipt_not_live_import": true }, "native_supplier_cycle": { "passed": true, "checks": 23, "rollback_only": true, "principal_minor": 6000, "allocated_balance_minor": 4000, "final_balance_minor": 6000, "debit_minor": 22000, "credit_minor": 22000, "journals": 5, "lines": 10, "correction_pairs": 1, "period_closed": true, "obligation_id": 1, "recognition_journal_id": 1, "allocation_id": 1, "reversal_id": 1, "correction_id": 1, "period_check_id": 1 }, "old_cost_mode": { "passed": true, "old_cost_source_matches_original_posted_snapshot": true, "single_cost_period_provider_packet_preserved": true, "new_correction_flag_default_off": true, "new_correction_schema_absent": true, "uncomposed_correction_refused403": true, "old_ledger_grants_still9": true, "no_business_writes": true }, "old8054_preservation": { "passed": true, "old8054_source_outbox_rights_exact": true, "correction_flag_off": true, "correction_schema_absent": true, "journals_observed": 0, "no_business_writes": true }, "team_readiness_and_forms": { "passed": true, "checks": 23, "three_accounting_roles": true, "original_minor": 27500, "actual_successor_minor": 29500, "initial_journals": 1, "initial_groups": 0, "initial_closures": 0, "no_business_commands": true, "rendered_forms_mock_checks": 5, "actual_browser": false, "visual_review": false, "private_existing_build": true }, "team_preservation": { "passed": true, "original275_present": true, "actual_validated_successor295": true, "original_source_outbox_rights_exact": true, "initial_journals": 1, "initial_correction_groups": 0, "initial_closures": 0, "ledger_grants": 12, "distinct_ledger_rights": 10, "no_business_writes": true } }, "evidence": [ { "file": "private/ledger-e2ec7e0e3f38/cost-correction-fixture.json", "sha256": "c05b25101dcd5bccfd0b1b4fa5762d5e71460dd597c01ef50bbd5ae4bf8686c3" }, { "file": "private/ledger-e2ec7e0e3f38/cost-correction-workflow.json", "sha256": "70f071de9bf6d7dd19457675a1e515414ed2778badf1767a26b6ebc6ef8bec1c" }, { "file": "private/ledger-e2ec7e0e3f38/cost-correction-defaults.json", "sha256": "03982abebd43c75e7a50a3ad4985e3ba7789653a9f79bec85105159ce93ed679" }, { "file": "private/ledger-c4c506a3c295/cost-correction-cases.json", "sha256": "1c9f5ad3c2324309185f9215acba257cf7ac6296b5a983969fb2edb90fb01d6f" }, { "file": "private/ledger-c4c506a3c295/cost-correction-security.json", "sha256": "0750db59f3a205b884bfabec035c862ff8ca39511d421064c0e44f2b9ebe769e" }, { "file": "private/ledger-c4c506a3c295/cost-correction-http.json", "sha256": "fec1ab48d1d74f7332ca41c543307fa5d3e266a4f68473eb6224c849c43e0ba2" }, { "file": "private/ledger-c4c506a3c295/cost-correction-http-final.json", "sha256": "05315ebf59f8301fcbdab8da4b334bccc0e1c154e480818fa8d83cae94dc10f7" }, { "file": "private/ledger-eee1a330c1bb/cost-correction-race.json", "sha256": "974c304283d4505263d8ea6b2024326d18e9d8d52634f0bfc2324759fb5e931a" }, { "file": "private/ledger-eee1a330c1bb/cost-correction-ui-postcheck.json", "sha256": "90e28087316f2bb74d3a7d0160ab7e1d33843a2aa24f77839c1a6d90a0eb91b6" }, { "file": "private/ledger-ac404fba21fd/cost-correction-coexistence.json", "sha256": "557028c4221c6912a7790eb0a8bdeadbda4dee0013740096ece711cc800a0e4c" }, { "file": "private/ledger-native-0912930aea5b/native-cycle-cases.json", "sha256": "e79f0c9c4423abbe8fac86ee5fe38ced1a3ced3491fd8db4229aaf5e461a2344" }, { "file": "private/ledger-6d0ea9e319e0/cost-correction-legacy-mode.json", "sha256": "c904b02bf94068ff803fbc97acddea45bc330f46d3c156722ba9f9f4874f818f" }, { "file": "private/ledger-6a73790314ce/cost-demo-after-correction.json", "sha256": "4ee4263136ddbb8fbc662453141457de0d6063acf93235096990bf08ac32028b" }, { "file": "private/ledger-f3e0a05eb2ad/cost-correction-demo-http.json", "sha256": "091ae9db0065595568ea5e8c7f39b4783ca10586030fcbe94a18a9b72a902e6a" }, { "file": "private/ledger-f3e0a05eb2ad/cost-correction-demo-preservation.json", "sha256": "39aa598ac07239ce91141fe8e603212d493c56d42f3f598a9e90f6cbfe73cb93" }, { "file": "private/ledger-cost-correction-approved-scope.md", "sha256": "7b71bab9654cc0b4f5c4fa33a6728208c9450b6bccca887a86d157f1263396c4" } ], "previous_proofs": [ { "file": "docs/proofs/common-ledger-direct-cost-20261103.json", "sha256": "5354ac34eb27dd9c05564d8eb9694a90c3e8eceaf018e2873aa299aa54b6cf6e" }, { "file": "docs/proofs/common-ledger-reports-20261103.json", "sha256": "83b81a3401e4cfe8ea4c9d13339385f9241d0eefee5495da3e767812f0c863f1" }, { "file": "docs/proofs/common-ledger-sales-receivable-20261103.json", "sha256": "b5572466111fb85d89a604fbaa423976ed17c61afc5e2e45ba392fb23aa82e8c" }, { "file": "docs/proofs/common-finance-bundle-20261103.json", "sha256": "086c1556e7cefcf64a7064995a4aa6bd0e3aa9dd62cba66285b7801715f9f22c" }, { "file": "docs/proofs/common-ledger-complete-cycle-20261102.json", "sha256": "23657d594b84e6aeeb0d16d45790d54feca04b12e2260cfffa4f8e4a37eaa0ce" } ], "previous_private_artifacts_verified": 67, "frozen_native_packages": [ { "files": 25, "manifest_sha256": "6a507ea7d708a12a8e526e4c610696d8db84079d18aede470237b65505630e7e", "all_hashes_preserved": true, "not_replaced": true }, { "files": 30, "manifest_sha256": "cbc4ddbea15f5e396c92bc2e664b973138551928980f334bcf3eb0cf097cacb1", "all_hashes_preserved": true, "not_replaced": true } ], "sources": [ { "file": "AGENTS.md", "sha256": "eecf5e761d4b9b9b673359399fafcc845d6e0277490cf601cf0582ee2538478a" }, { "file": "config/cost_ledger.php", "sha256": "15cc9dfeb8877698e5b7553eeb3411a45ac3ad82ac4e23b4e38c4eb2f10cdf60" }, { "file": "app/Modules/Accounting/GeneralLedger.php", "sha256": "27791ca5599ab6059dd4c6f7c69a0bfb90165ad22249e3fb847bd8b6b9768958" }, { "file": "app/Modules/Accounting/CostLedgerSource.php", "sha256": "8cbf64e69a189439202920d6094f8720247aab519ec14be7d91b0ba5908cdf97" }, { "file": "app/Modules/Accounting/GeneralLedgerController.php", "sha256": "671d853f1d6784588e8a5f374c2b377d98de016a788bd81a38d3f8b12121eb70" }, { "file": "app/Modules/Accounting/CostLedgerController.php", "sha256": "5491d1eb03daaf278d18eeebc3867a6ab8a8c917fd91cfee5f3e611d28042b82" }, { "file": "app/Modules/Workshop/DirectCosts.php", "sha256": "51f70a18731ed6371442f8e6364c52b163f46bf9b58c86b407b73f39fffb164c" }, { "file": "app/Shared/Testing/TestingDatabaseGuard.php", "sha256": "963043d7a872422aab9e9e0b3746d0be841ae3aa1da795e50b6904121fc77dff" }, { "file": "packages/general-ledger/bootstrap.php", "sha256": "61d0b77bcac3459f059cd1a3ae1a55cbc4d12c7cb31144b4081c39e8b419adc8" }, { "file": "packages/general-ledger/README.md", "sha256": "c4d18ffb16de5e22ad83e528a9fb991bf8ee7de100149e086b3c13b6e3c3b22e" }, { "file": "packages/general-ledger/src/LedgerSchema.php", "sha256": "1fb2490fe8d4d206d2f8157803307cdd4e2f733150d0fec4993a7e229fce58cb" }, { "file": "packages/general-ledger/src/CycleSchema.php", "sha256": "25407f9ea4321ee3acb0c310b5d981b8fdaf89c5464d32878ecc57c29e60972d" }, { "file": "packages/general-ledger/src/CostSchema.php", "sha256": "da0919e6aeab83a572d1171b1f641b62593f1a0157a51ec988ecbdacda0a9942" }, { "file": "packages/general-ledger/src/CostCorrectionSchema.php", "sha256": "1c43f7a3812e2a8ea31d4a0c88e887ec7d4cef4e9dd70cbab14af38b7b3e6080" }, { "file": "packages/general-ledger/src/PayableJournal.php", "sha256": "ac3e843fa54cbff12401fe03b6dcb0ddd39fb999f231fcd920ca1d7dd498626a" }, { "file": "packages/general-ledger/src/LedgerCycle.php", "sha256": "4b129275a365ed482c89b4f3753402c956a17b2c9ea77f6ed6a9e643c680d116" }, { "file": "packages/general-ledger/src/LedgerReports.php", "sha256": "f0f271114229eab097808aa4ee0d50b47805524dc87c7d7c8d7f248e91705344" }, { "file": "packages/general-ledger/ui/cycle.php", "sha256": "a5f5fb6ce5e10d8db37ce10f29d6cb93d332e69010c69298cebc8eb2a869b771" }, { "file": "resources/views/accounting/general-ledger.blade.php", "sha256": "fef5645143028eee9c17b232f2fedd1ed5d1faedacd173a81d7d5bd2ecc89968" }, { "file": "resources/views/accounting/cost-ledger.blade.php", "sha256": "cf326bc06fc25ef99f3145cb960bd0de75aed8017db03339e0f0acb6c58c3b3d" }, { "file": "resources/views/accounting/cost-correction.blade.php", "sha256": "22e45f78e95b706d2b872a5a11497272550954eaf8ae37a6e0062a9e74c557e4" }, { "file": "resources/views/accounting/cost-correction-demo-entry.blade.php", "sha256": "e91948a22822bdd7177ce2fb3fe6652c7fb5124289cfc8889facf24c88a8352e" }, { "file": "routes/web.php", "sha256": "8851966d45cd947f80deba9bb7854002d07ab759c0a3a216151c19ca117a1105" }, { "file": "scripts/payable-history-sgf-proof.php", "sha256": "b783266cf8bdf7173bfc7976719d37a7ae6be358efc1c545d65082f07099ed97" }, { "file": "scripts/ledger-run.mjs", "sha256": "f85bb2ddefdabbce22e98a35a41765ec20f78444527690d648e6f423f01ed821" }, { "file": "scripts/ledger-cost-proof.php", "sha256": "2ce63e29dbc1fa67bbdd515e1cfe534fb620cf07a5446d8f535e0a9441116419" }, { "file": "scripts/ledger-cost-http-entry.php", "sha256": "757844f4cee11ba8cc7b68c0e64c4db6fff6deb8b786db5917196c8d4fda629e" }, { "file": "scripts/ledger-cost-http-router.php", "sha256": "1b659dd9fc57a9603a622d7556de8324a7e8291368a18e6fd6cb9ec0a3fe458a" }, { "file": "scripts/ledger-cost-demo.mjs", "sha256": "59e86f3d067c8002c5ddd9729fbb8c02bfb2bdcc3bef39b5caf1df19fd7c1afc" }, { "file": "scripts/ledger-cost-correction-cases.php", "sha256": "78aef54f74e5fa222ed619c452235937888c3c5912298ca00a20c81972fb635f" }, { "file": "scripts/ledger-cost-correction-coexistence.php", "sha256": "9e42a010ba5050e0c06e82c0d516e932f35f79e56710a86474a53b8cdd5ac6ef" }, { "file": "scripts/ledger-cost-correction-demo-check.mjs", "sha256": "9413c2906b4a7dfee51de607e2b087455b3fa98415fa6a150b94d606f10b832c" }, { "file": "scripts/ledger-cost-correction-http.mjs", "sha256": "4a73c046a7b24f916d3e127cd7ee371e9b030b5d6d590867fec878007dcb7d0c" }, { "file": "scripts/ledger-cost-correction-proof.php", "sha256": "ae44772b2e7221b8dce332bd7dc226d74cf95b0c97fcb10e05242279ad6c7e22" }, { "file": "scripts/ledger-cost-correction-race.php", "sha256": "73e0767b16bb2da23d9333e544e9e7c6b8d31fc4b538238a7e3647237a3c2626" }, { "file": "scripts/ledger-cost-correction-security.php", "sha256": "3fed38fe6ae8d721476f90cb235df8afbb9f4ed482fd8f8a9961da268600067e" }, { "file": "scripts/archive-ledger-cost-correction-scope.mjs", "sha256": "41db1ba54f9040aa3036dae232aa09deba9774707eaac93d38a7fc70a9b2f300" }, { "file": "scripts/summarize-ledger-cost-correction.mjs", "sha256": "1045a03e0eaaf5b97a43e87c46a518f60a79c5cb23723b7d07522600d6cb54cc" }, { "file": "docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_SCOPE.md", "sha256": "6a9dc267c063aaca738cd5cf2e82dbb017b1e21994c2e8447b3fbe3a18f553fe" }, { "file": "docs/GENERAL_LEDGER_DIRECT_COST_CORRECTION_DELIVERY.md", "sha256": "8b27281b95c5c030c2c41088469dc763b22545163c440daaaee5a8c291f986d2" }, { "file": "README.md", "sha256": "18861d53936846731aba0ecc97b388fe0c99a9a14711be4899043e98f173d0a4" }, { "file": "docs/PRODUCT_DEMO.md", "sha256": "91180f5bd37ee568c94b7776ac323a01503afe583370adf7ca17be868289ef99" }, { "file": "docs/SGF_MODULE_FLOW_PREPARATION.md", "sha256": "8965dabf3c8f691002233d71006aa679ae704a23364b14e233d7b540dd92947f" } ], "quality": { "syntax": { "php_files": 26, "javascript_files": 6 }, "git_diff_check_both": true, "sgf_phpstan_pint": "not_installed_not_run", "native_application_code_unchanged_prior_static_quality_not_repeated": true, "new_dependencies": false }, "result": { "original_minor": 27500, "replacement_minor": 29500, "delta_minor": 2000, "journals": 3, "lines": 6, "gross_each_side_minor": 84500, "current_cost_minor": 29500, "atomic_group": true, "isolated_parts_public_and_sql_refused": true, "same_and_other_key_single_result": true }, "rights": { "distinct_ledger_rights": 10, "ledger_grants_per_standard_new_fixture": 12, "existing_correction_rights_only": true, "real_or_public_grants": 0 }, "team_demo": { "tag": "f3e0a05eb2ad", "pid": 11120, "url": "http://127.0.0.1:8055/qa/cost-demo", "cookie": "sgf_cost_f3e0a05eb2ad", "loopback_only": true, "separate_team_database": true, "old_demos_not_reset": true }, "preservation": { "old8054_source_outbox_rights_exact": true, "old8054_correction_flag_off_and_schema_absent": true, "six_pending_records_untouched": true, "blocked_cache_not_cleared": true, "existing_demos_not_reset": true, "original_journal_calculations_decisions_outbox_preserved": true, "previous_valid_proofs_preserved": true, "unrelated_work_preserved": true, "destination_unchanged": true }, "limits": { "visual_review_pending": true, "actual_browser": false, "deployment_capacity_validated": false, "new_large_volume_benchmarks": false, "new_indexes": false, "all_six_modules_operational_composition": false, "additional_implicit_revaluation_chains": false, "closed_period_correction_or_reopening": false, "stock_valuation_or_posting": false, "payroll_or_industrial_cost_posting": false, "real_tax_chart_or_financial_operations": false, "destination_migrations_or_grants": false, "publishing": false, "purchasing_activation": false, "checkpoint": false, "acceptance_presumed": false } }