{ "date": "2026-11-02", "increment": "SGF-PAYABLE-PAGED-READ-SIM-v1", "status": "local_synthetic_implementation", "verification": { "sgf_existing_history_scenarios": 10, "sgf_existing_history_assertions": 56, "sgf_new_page_scenarios": 8, "sgf_new_page_assertions": 34, "native_distinct_compatibility_tests": 21, "native_assertions": 144, "actual_paging_http_checks": 24 }, "comparisons": [ { "volume": 1000, "page_size": 25, "before": { "time_ms": 22202.595, "queries": 25028, "php_heap_peak_bytes": 44040192, "php_heap_extra_peak_bytes": 18874368, "documents_returned": 1000 }, "after": { "time_ms": 69.703, "queries": 67, "php_heap_peak_bytes": 25165824, "php_heap_extra_peak_bytes": 0, "documents_returned": 25 }, "financial_position_fingerprint": "6ef1a9ed8a089b659b3d522144a54216a576c014be28597d5dc85f79c1227fa8", "source_hashes": { "legacy": "c4942438d00d3ad54c10747a5c3c0a91108872d98a2981f558f4b81a2d584c47", "current": "22522c83c53597ed6ee15acbdd808c571aa16b09e361970d6ec43a0ee08626ef" } }, { "volume": 1000, "page_size": 100, "before": { "time_ms": 22202.595, "queries": 25028, "php_heap_peak_bytes": 44040192, "php_heap_extra_peak_bytes": 18874368, "documents_returned": 1000 }, "after": { "time_ms": 123.932, "queries": 67, "php_heap_peak_bytes": 29360128, "php_heap_extra_peak_bytes": 4194304, "documents_returned": 100 }, "financial_position_fingerprint": "b774df859c22d78f09fb6d21c3258d192c7c1d9e4b3c032ded6c17d5646a97ec", "source_hashes": { "legacy": "c4942438d00d3ad54c10747a5c3c0a91108872d98a2981f558f4b81a2d584c47", "current": "e2327efdc27a17aadceffd65aa1dc5515c71fd05d60311cb1ac1d064b05995b7" } }, { "volume": 5000, "page_size": 25, "before": { "time_ms": 115270.184, "queries": 125028, "php_heap_peak_bytes": 92274688, "php_heap_extra_peak_bytes": 67108864, "documents_returned": 5000 }, "after": { "time_ms": 91.876, "queries": 67, "php_heap_peak_bytes": 25165824, "php_heap_extra_peak_bytes": 0, "documents_returned": 25 }, "financial_position_fingerprint": "0162d638b4507c8a390574a1e00661e06d0511838a27f00ee2c658be6c441089", "source_hashes": { "legacy": "cf6ed127faa805416c371ee988323a2b440a5099ff97934f4656e8e3532d1994", "current": "00ba79f4f3b88d399502d2dd9275aec2d3b4158a13236100bc722fd4bc4bd57a" } }, { "volume": 5000, "page_size": 100, "before": { "time_ms": 115270.184, "queries": 125028, "php_heap_peak_bytes": 92274688, "php_heap_extra_peak_bytes": 67108864, "documents_returned": 5000 }, "after": { "time_ms": 151.659, "queries": 67, "php_heap_peak_bytes": 29360128, "php_heap_extra_peak_bytes": 4194304, "documents_returned": 100 }, "financial_position_fingerprint": "b7879b6071a874b7df588dbd5cb203608a86d01196f1d6400f8afb77b962489b", "source_hashes": { "legacy": "cf6ed127faa805416c371ee988323a2b440a5099ff97934f4656e8e3532d1994", "current": "a990995c877559bd0729a46192da5fe87f6dfd8f6a7b03e2bee9df615f11a081" } }, { "volume": 10000, "page_size": 25, "before": { "time_ms": 338498.531, "queries": 250028, "php_heap_peak_bytes": 153092096, "php_heap_extra_peak_bytes": 127926272, "documents_returned": 10000 }, "after": { "time_ms": 139.625, "queries": 67, "php_heap_peak_bytes": 25165824, "php_heap_extra_peak_bytes": 0, "documents_returned": 25 }, "financial_position_fingerprint": "ddf692c62109fd5662cc98b89c9c14c80d151f279c7f0e9f3afcd0bf391e661d", "source_hashes": { "legacy": "5427b63fcb4286725a770da737c1f53910f3cd53e8d8b41cf9c6431985ad0405", "current": "83ba2607c8193dc8b5252d69032fa0a1b6792f4aaf80df62d971c1c2be185da4" } }, { "volume": 10000, "page_size": 100, "before": { "time_ms": 338498.531, "queries": 250028, "php_heap_peak_bytes": 153092096, "php_heap_extra_peak_bytes": 127926272, "documents_returned": 10000 }, "after": { "time_ms": 166.93, "queries": 67, "php_heap_peak_bytes": 29360128, "php_heap_extra_peak_bytes": 4194304, "documents_returned": 100 }, "financial_position_fingerprint": "e8cad59487196e0e140a9b633b36ea716b5ebc8aa22c9faf14ffe409f04153f8", "source_hashes": { "legacy": "5427b63fcb4286725a770da737c1f53910f3cd53e8d8b41cf9c6431985ad0405", "current": "f7a25e24c38b0f56d7a141aaccd513a4be37ac38c071b963a6653184064d8566" } } ], "measurement_conditions": { "php": "8.4.27", "memory_limit": "512M", "same_owned_database_per_volume": true, "independent_php_process_per_strategy": true, "warmup": "Same bounded source search in every worker; database seeded/warm; no cache flush. Legacy runs first, followed by page25/page100.", "samples_per_strategy": 1, "legacy_measurement_reused_for_both_page_sizes": true, "legacy_baseline": "Existing integral core listing plus original scoped source callbacks; includes all document/evidence rows. Does not include the old adapter post-listing permission flags. New measurement includes the full paged SGF adapter.", "memory": "PHP allocated heap peak in independent workers, including 24 MiB framework baseline. Extra zero means reuse of existing allocation, not zero memory use. Not OS RSS.", "index_experiments_performed": false, "indices_added_or_removed": false, "gain_attribution": "Combined bounded pagination, batch dependent reads and removal of writer locks from reads; not an isolated estimate for each technique. No index gain claimed.", "no_deployment_capacity_claim": true }, "functional_pages": { "kind": "financial_page_regression", "cases": [ { "name": "stable-source-window-and-independent-evidence-pages", "assertions": 8, "passed": true }, { "name": "filters-before-pagination-and-literal-search", "assertions": 7, "passed": true }, { "name": "full-position-parity-with-original-reader", "assertions": 3, "passed": true }, { "name": "batch-queries-do-not-grow-with-the-page", "assertions": 5, "passed": true }, { "name": "tenant-company-unit-isolation-and-access-revocation", "assertions": 3, "passed": true }, { "name": "receipt-changes-do-not-reuse-a-previous-page-snapshot", "assertions": 3, "passed": true }, { "name": "allocation-reversal-aggregation-is-equivalent", "assertions": 2, "passed": true }, { "name": "historical-decision-chain-is-validated-in-both-readers", "assertions": 2, "passed": true } ], "scenarios": 8, "assertions": 34, "read_transaction": { "isolation": "repeatable read", "read_only": "on" }, "last_read_queries": 67, "benchmark_fixture_documents": 51, "no_new_decision_capability": true, "decision_and_allocation_rows_rollback_only": true }, "existing_history_regression": { "kind": "sgf_historical_payable_adapter_synthetic", "cases": [ { "name": "default-disabled-and-old-path-preserved", "assertions": 4, "passed": true }, { "name": "principal-confirmed-only-and-idempotency", "assertions": 16, "passed": true }, { "name": "receipt-integrity-and-identity-refusals", "assertions": 6, "passed": true }, { "name": "complete-compatible-payment-facts-required", "assertions": 7, "passed": true }, { "name": "changed-history-requires-new-conference", "assertions": 3, "passed": true }, { "name": "permissions-person-and-context-revalidated", "assertions": 5, "passed": true }, { "name": "audit-and-import-failure-atomic-recovery", "assertions": 3, "passed": true }, { "name": "receipt-append-only-and-existing-controller", "assertions": 3, "passed": true }, { "name": "invalid-receipt-keeps-history-readable-and-balance-indeterminate", "assertions": 2, "passed": true }, { "name": "concurrent-confirmations-wait-and-replay-one-import", "assertions": 7, "passed": true } ], "tests": 10, "assertions": 56, "principal_minor": 6000, "confirmed_minor": 3000, "pending_minor": 1000, "rejected_minor": 500, "balance_minor": 3000, "shared_engine_unchanged": true, "native_source_preparation_only": true, "actual_http_kernel_tested": false, "browser_interactions_tested": false, "visual_review": false, "deployment_capacity_validated": false }, "http": { "kind": "financial_pagination_actual_http", "checks": 24, "passed": true, "volume": 10000, "default_page": 25, "larger_page": 100, "filter_before_count": true, "source_and_evidence_pages_disjoint": true, "context_and_rights_enforced": true, "unknown_parameters_refused": true, "html_escaping": true, "visual_review": false, "browser_interactions_tested": false }, "fresh_command": { "passed": true, "read_cache_not_used_by_command": true, "current_document_and_history_anchor_revalidated": true, "test_changes_rolled_back": true }, "concurrent_read": { "passed": true, "reader_completed_before_writer_release": true, "uncommitted_receipt_not_observed": true, "documents": 25, "balance_minor": 3000, "reader_time_ms": 230.176, "not_throughput_capacity": true }, "positive_recognition_and_unit_filter": { "passed": true, "positive_unrecognised_document_visible": true, "recognised_filter_excludes_it": true, "other_unit_same_company_excluded": true, "no_other_evidence_returned": true, "test_rows_rolled_back": true }, "postcheck": { "read_only": true, "original_workflow_receipt_unchanged": true, "counts": { "pa_imported_sources": 10000, "pa_sources": 10000, "pa_proposals": 10000, "pa_obligations": 10000, "pa_history_imports": 10000 }, "imported_payments": 30000, "temporary_decision_and_allocation_tables_absent": true, "scoped_business_fingerprint": "c9e93019653c35b8c1685a58ab2b68e8b279572044355895abc9360790707c68", "benchmark_clones": 9999, "native_workflow_sources": 1, "no_operational_installation": true }, "private_proof_sha256": { "regression.json": "3cb8d648249e22c00447602107c1939abc03650173a6d11ccb0f23df59e0fe44", "page-cases.json": "a6b8c5a43cf4787c2be70a2b65e87426b40f8e7d6d14916f0a50e1e806899630", "http-proof.json": "86783db1c62563f7e718297d1cbefa5d850dc00cd1f85db83491cee040f1b27a", "page-http.json": "817b74f2ab18d36d6c6c8f2757eb28f547a01cacebf14caca995ee6dd29a9937", "page-fresh-command.json": "349d10ff986fceedc847796cca0bb38293e403b37d7d4ea731819d1d8bc63eba", "page-concurrent-read.json": "9eb7b544c850747d842ac7a3b4cc512f45ac5e38c711cd2f23db565f97ce590c", "page-filter-positive.json": "8a67609459318c6028364ecdb968b9d5212f4b94eaf428d09d1dcd2d26ba0c0e", "page-post.json": "4165000a52cda0e94759e3d2ff92095d29e1d4d75e5cd8e63b5f8a84eb6e5432" }, "native_compatibility": { "proofs": [ { "file": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml", "sha256": "1381ea38c6e9c8b47c8ac619f225d2c4e6d49b851fd7e77652c526f98622c2b3", "passing_cases": 20, "excluded_cases": 1 }, { "file": "private/stock-receipt-efcf1053aa57/financial-read-affected-junit.xml", "sha256": "f57822ab2e0ea07ae6f49ae99f76f8cca4a554e0294ed33f0da18b9259e5a919", "passing_cases": 1, "excluded_cases": 0 } ], "selected_cases": [ { "name": "historical import keeps gross principal and subtracts confirmed payments exactly once", "assertions": 26, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "a decision between proposal and validation invalidates the captured history", "assertions": 4, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "pending-only and fully paid histories retain the correct balances with data set "('10.00', 'pending', 6000)"", "assertions": 2, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "pending-only and fully paid histories retain the correct balances with data set "('60.00', 'confirmed', 0)"", "assertions": 2, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "import does not enable new payments or confirmations of pending history", "assertions": 3, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "missing audit and unapproved endpoints cannot import history", "assertions": 3, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "failure during capture rolls back obligation and all imported facts", "assertions": 5, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "normalizer refuses duplicated omitted or incompatible payment facts", "assertions": 8, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "two installation identities cannot recognise two obligations for the same local invoice", "assertions": 4, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "the original 1160 example keeps 300 confirmed and 100 pending separate", "assertions": 3, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "imported pending decisions change the balance once and preserve the import with data set "('confirmed', 5000)"", "assertions": 10, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "imported pending decisions change the balance once and preserve the import with data set "('rejected', 6000)"", "assertions": 10, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "decision failure rolls back original payment audit and ledger together", "assertions": 6, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "activation and independent eligible reviewer remain mandatory", "assertions": 5, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "deciding historical pending does not allow new payments", "assertions": 2, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "unauthorised original changes invalidate balance and prevent decisions", "assertions": 3, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "decision facts cannot be updated or deleted", "assertions": 2, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "confirmation rechecks available balance and rejection does not deduct", "assertions": 5, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "a full confirmation leaves zero balance and prevents another confirmation", "assertions": 2, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "task inbox delegates imported payment authority without exposing or deciding the ledger", "assertions": 35, "proof": "private/stock-receipt-879a40eff72c/financial-read-affected-junit.xml" }, { "name": "imported ledger is append-only and disabling the history cannot silently restore the old balance", "assertions": 4, "proof": "private/stock-receipt-efcf1053aa57/financial-read-affected-junit.xml" } ], "selection": "20 valid cases reused from initial run; one test fixed to wrap expected PostgreSQL trigger violations in savepoints and rerun alone in a fresh QA database. Intermediate failed cases are retained but not counted. A reused RefreshDatabase fixture was refused by duplicate-function setup; launcher now requires a new owned database for this mode." }, "implementation": { "documents_page_sizes": [ 25, 100 ], "proposal_and_event_pages_independent": true, "filters_applied_before_pagination": [ "number_or_supplier_literal_search", "recognised_or_unrecognised" ], "stable_order": "Documents/proposals/events descending ID; obligation positions keep existing ID order.", "history_and_allocation_algorithms_reused": true, "write_paths_never_use_read_snapshots": true, "actual_read_transaction": "REPEATABLE READ READ ONLY", "no_company_writer_lock_on_read": true, "native_production_adapter_unchanged": true }, "source_sha256": { "packages/payables/src/Payables.php": "f8845ab702f9bc58fad2b39a89fbfa3cdc1582169812704f3f2f225be7854977", "packages/payables/src/HistoricalPayments.php": "c55d3e67a8bad469184d664f7739a97af7121d685315c6d55f90d08355c632f0", "packages/payables/src/PaymentDecisions.php": "3a54c7905783d14facf070fc59ac426264cf423daaedb47d24c018aa4d41fc39", "packages/payables/src/SupplierSettlements.php": "dc7932608144b105a4289812cb8d0bffd94a425a3d05753b482cec826ed4a68a", "packages/payables/ui/page.php": "36d3d6935eb3549bd9c8501c3171f5361839cffc036c228adc66cead1aaed66f", "app/Modules/Purchasing/SupplierPayables.php": "77d3af4ba3a60d9742aeebe439d43b556658f257b6da4d1fda6f48f9f2385813", "app/Modules/Purchasing/SupplierHistoryReceipts.php": "e91523254914ff80a363e360f1547c3b19757142955463826bbf7f535cd5c17c", "app/Modules/Purchasing/SupplierPayablesController.php": "6671292de4bd41b382b23fc63683b5b67b97227a6c8e61fcbc865d49493a384c", "config/supplier_payable_history.php": "5331b7987fdb5f8fdb9647e6cf74145f91aca333a7e4c21f98092827893b85ce", "../compras/tests/Feature/PayableHistoryImportTest.php": "e9151c0befa2d1de91f7bddef5b94287218c0aae28933fabcf82f1592489dc84", "scripts/payable-page-run.mjs": "a8fc8eda84426c3477950d5122f19e4110d98a0380ff17f95224aa8edf540181", "scripts/payable-page-fixture.php": "124515cdf3937ddf5ee5a4520ce93ce3f42968b604643a65d3be88c246e05deb", "scripts/payable-page-cases.php": "29a29d804f4fc34f095a51727c1e8bdd4bbba8967d03952be7db3425cd4b8a87", "scripts/payable-page-bench.php": "90aa0f130f901859636418018097db0865eeb7e2b39b50169fb0d3747ff09966", "scripts/payable-page-load.mjs": "9f1ab6e28cde655a112d5a85a999bb10171cdbd99ca48437ffa6d6860daa1446", "scripts/payable-page-http.mjs": "19a44634958a5f2c449ab1e68f2791d68ce1020c794f25ad6adda8fa0073eb7c", "scripts/payable-page-final.php": "8e48769422524380b2eb0ccef742a86b44915329f8ecd96d923f07f6b73bbcf4", "scripts/summarize-payable-page.mjs": "d8b74681f670ff29ee48d08bd79d2eeb69d313074a63cc5d1a114cd0165270e8", "scripts/payable-history-sgf-proof.php": "00a79c0abc369eb541e3ac67fb16d8f338eae1b387fdc521bb9b9dd0a9fb9507", "scripts/stock-receipt-composition.mjs": "dc9288a4f419e89db26fef3a06f0218c505882220e07cdffd24d5564cb5b4d74" }, "reused_proofs": { "docs/proofs/sgf-payable-history-receipt-20261102.json": "92538539020a037f8ab652c8b20da929014b6c50f2a315c35fbc5349d13e8e65", "docs/proofs/workshop-stock-closure-20261102.json": "261d5502f6905d53ef8046e0e900c9bee159c8c9d7e1bae4fddd8ec698313bf7", "docs/proofs/native-warehouse-return-20261102.json": "587795ab4d2b2e65d51feaf7ed5e368df715d69cb7a0480f5f2b1d802d019869" }, "preservation": { "new_owned_qa_databases_only": true, "one_actual_native_workflow_source_plus_explicit_benchmark_clones": true, "previous_native_and_sgf_history_fixtures_preserved": true, "six_pending_associations_untouched": true, "blocked_cache_untouched": true, "installed_and_demo_data_or_rights_unchanged": true, "no_new_operational_migration_or_indices": true, "publication": false, "purchasing_activation": false, "checkpoint": false }, "limits": [ "A page includes the complete dependency history needed to validate each selected obligation; an unusually large single history still needs separate assessment.", "Pagination snapshots are per request, not a fixed snapshot across human navigation or keyset cursor.", "The standalone native adapter retains its old listing; compatibility was tested against the canonical package in private QA, not deployed to native/demos.", "Read timings are local, warm, single samples; no concurrency throughput, production capacity or visual acceptance established.", "Historical receipts remain synthetic snapshots; no live provenance authentication or operational financial-responsibility cutover added." ], "visual_review_pending": true, "deployment_capacity_validated": false }