diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/CURRENT_STATUS.md b/docs/plans/original-completion-2026-10-02/execution/p04-01/CURRENT_STATUS.md index c14b714..125a8f2 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/CURRENT_STATUS.md +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/CURRENT_STATUS.md @@ -1,3 +1,5 @@ +RUN47 current harness status: see REPAIR47_STATUS.md, REPAIR47_PLAN.json and REPAIR47_VALIDATION.json. Original unit remains unaccepted; earlier status below is historical. + # P04-01 current status — repair31 **BLOCKED: partial implementation; do not start the once-only native/full run.** diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/EVIDENCE_COLLECTION.md b/docs/plans/original-completion-2026-10-02/execution/p04-01/EVIDENCE_COLLECTION.md index 147f76b..8744af8 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/EVIDENCE_COLLECTION.md +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/EVIDENCE_COLLECTION.md @@ -1,3 +1,16 @@ +## RUN47 harness repair; original unit remains unaccepted + +Q46 S4 failed before engine startup: `AssertionError: complete 316-script parse roster`. +Secondary guard: `AssertionError: exact source and planned UID set`. Captured S4 +PIDs: `[]`; phases: `[]`; passed: `false`. No game verification ran. This failure +is historical reference only, never adopted as a pass. Current S4 admission derives +exact roster/sets from real selection; check-only and native share it. Import-not- +attempted cleanup requires the original inventory without generated UIDs. +REPAIR47_PLAN.json and REPAIR47_STATUS.md supersede earlier current-run count and +reuse instructions. Immutable spec, REQUIRED/REACH_REFS, product, caps, denominator, +permissions and historical raw are unchanged. Option B: Root freezes new final Q, +then fresh all-series runs once; no receipt rewriting or reuse adopter. + # Evidence collection — historical repair29 description Repair30 supersedes current-use claims below: existing S1–S4/r22/full178 records diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/ORDER_AUDIT.md b/docs/plans/original-completion-2026-10-02/execution/p04-01/ORDER_AUDIT.md index d3a623e..a4d8601 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/ORDER_AUDIT.md +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/ORDER_AUDIT.md @@ -1,3 +1,16 @@ +## RUN47 harness repair; original unit remains unaccepted + +Q46 S4 failed before engine startup: `AssertionError: complete 316-script parse roster`. +Secondary guard: `AssertionError: exact source and planned UID set`. Captured S4 +PIDs: `[]`; phases: `[]`; passed: `false`. No game verification ran. This failure +is historical reference only, never adopted as a pass. Current S4 admission derives +exact roster/sets from real selection; check-only and native share it. Import-not- +attempted cleanup requires the original inventory without generated UIDs. +REPAIR47_PLAN.json and REPAIR47_STATUS.md supersede earlier current-run count and +reuse instructions. Immutable spec, REQUIRED/REACH_REFS, product, caps, denominator, +permissions and historical raw are unchanged. Option B: Root freezes new final Q, +then fresh all-series runs once; no receipt rewriting or reuse adopter. + # P04-01 order audit — repair31 Formal status is **16/88, P04 credit 0**. Policy approvals are recorded; implementation and exact-Q evidence remain incomplete. No original-unit completion is claimed. diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_PLAN.json b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_PLAN.json new file mode 100644 index 0000000..54462fc --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_PLAN.json @@ -0,0 +1,354 @@ +{ + "task_id": "P04-01", + "status": "submitted-preparation-only", + "accepted": false, + "option": "B-no-reuse-adopter", + "worker_scope": "engine-free bounded harness repair", + "retained_M": "build/owner-handoff/p04-after-p26-closure-r01/verified-m-engine-free-r45", + "affected_pure": [ + { + "name": "pure:series", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/checker_series_fixtures.py", + "sha256": "5779b05505d6c7118f40cff3b8c309211142603d04c69183c3e68e88efaee4a9", + "baseline_sha256": "5ec725ad77313287f4f86ab30332012e2092caccafde2d91594ddd2013d8f418", + "unchanged": false, + "prior_result": { + "name": "pure:series", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_series_fixtures.py", + "--build", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 9.860904957633466, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_series.log" + } + }, + { + "name": "pure:join", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/checker_join_fixtures.py", + "sha256": "c80cb694fe3b7498f294fb10d7cd08aff9c93623bee442018e120d6b475cc4dd", + "baseline_sha256": "c80cb694fe3b7498f294fb10d7cd08aff9c93623bee442018e120d6b475cc4dd", + "unchanged": true, + "prior_result": { + "name": "pure:join", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_join_fixtures.py", + "--build", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 19.733827583957464, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_join.log" + } + } + ], + "reused_pure": [ + { + "name": "pure:encoder", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/checker_encoder_fixtures.py", + "sha256": "aa286736657c025cc0c759102969a5fc1fcbae277c06ce4e418a8d4325dec6ac", + "baseline_sha256": "aa286736657c025cc0c759102969a5fc1fcbae277c06ce4e418a8d4325dec6ac", + "unchanged": true, + "prior_result": { + "name": "pure:encoder", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_encoder_fixtures.py" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 0.08287249971181154, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_encoder.log" + } + }, + { + "name": "pure:candidate", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/checker_candidate_fixtures.py", + "sha256": "957a01f3c4ec8d167a10e276d9eb76a56352281aafb4d0a678c6e7c843c71903", + "baseline_sha256": "957a01f3c4ec8d167a10e276d9eb76a56352281aafb4d0a678c6e7c843c71903", + "unchanged": true, + "prior_result": { + "name": "pure:candidate", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_candidate_fixtures.py", + "--pure-only" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 0.06956258416175842, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_candidate.log" + } + }, + { + "name": "pure:negative", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/checker_negative_fixtures.py", + "sha256": "1fbef5f248ca435c4983c4085023c74d9bf7811c3482dad3805e3bb8ba1846a9", + "baseline_sha256": "1fbef5f248ca435c4983c4085023c74d9bf7811c3482dad3805e3bb8ba1846a9", + "unchanged": true, + "prior_result": { + "name": "pure:negative", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_negative_fixtures.py" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 34.31273220805451, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_negative-with-build-environment.log", + "controlled_environment": { + "BUILD_OUTPUT_DIR": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build", + "PYTHONDONTWRITEBYTECODE": "1" + } + } + }, + { + "name": "pure:approval", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/checker_approval_fixtures.py", + "sha256": "b218ad8fb8aaa9c58ec91c3e917b97307829cb1a3c2f09a2e3e2c856e7fff634", + "baseline_sha256": "b218ad8fb8aaa9c58ec91c3e917b97307829cb1a3c2f09a2e3e2c856e7fff634", + "unchanged": true, + "prior_result": { + "name": "pure:approval", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_approval_fixtures.py" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 0.2860210002399981, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_approval.log" + } + }, + { + "name": "pure:applicability", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/checker_applicability_fixtures.py", + "sha256": "f993e0d8f5085f11799f7053de87cda7fc32225473a80a82c0d4d36663fc2235", + "baseline_sha256": "f993e0d8f5085f11799f7053de87cda7fc32225473a80a82c0d4d36663fc2235", + "unchanged": true, + "prior_result": { + "name": "pure:applicability", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_applicability_fixtures.py" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 21.79465250018984, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_applicability.log" + } + }, + { + "name": "pure:UID", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/s5/s5_uid_controls.py", + "sha256": "17069b87b98c385e1298152c9c5c2f23c8710b79eb19aef073c64ce215f6c902", + "baseline_sha256": "17069b87b98c385e1298152c9c5c2f23c8710b79eb19aef073c64ce215f6c902", + "unchanged": true, + "prior_result": { + "name": "pure:UID", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/s5/s5_uid_controls.py", + "--project-root", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711", + "--scratch", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/s5-uid-root-controls-r46" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 0.7516515422612429, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_UID.log" + } + }, + { + "name": "pure:power-adapter", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/s5/s5_power_adapter_controls.py", + "sha256": "32d71db80994052b905829e6a2da38448ae789825c44570a901e67fe2d07fd33", + "baseline_sha256": "32d71db80994052b905829e6a2da38448ae789825c44570a901e67fe2d07fd33", + "unchanged": true, + "prior_result": { + "name": "pure:power-adapter", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/s5/s5_power_adapter_controls.py", + "--fixture-dir", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/owner-handoff/p04-after-p26-closure-r01/q36-writer-contract", + "--scratch", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/s5-power-controls-r46" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 0.8173460410907865, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_power-adapter.log" + } + }, + { + "name": "pure:full-suite-negatives", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/full_suite_verifier.py", + "sha256": "df3768b7755d603fc079e899da8f06ae4ebb529ae531824a30add0f4d6773a6e", + "baseline_sha256": "df3768b7755d603fc079e899da8f06ae4ebb529ae531824a30add0f4d6773a6e", + "unchanged": true, + "prior_result": { + "name": "pure:full-suite-negatives", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/full_suite_verifier.py", + "--controls" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 0.03479995811358094, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_full-suite-negatives.log" + } + }, + { + "name": "pure:wrapper", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/s5/s5_wrapper_fixtures.py", + "sha256": "1a4daebf46051e975a9cc740660c4672371ea6a9e6cb04cbc1d458ece5f0151d", + "baseline_sha256": "1a4daebf46051e975a9cc740660c4672371ea6a9e6cb04cbc1d458ece5f0151d", + "unchanged": true, + "prior_result": { + "name": "pure:wrapper", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/s5/s5_wrapper_fixtures.py" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 0.045466875191777945, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_wrapper.log" + } + }, + { + "name": "pure:guard-mutations", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/s5/s5_order_adapter_controls.py", + "sha256": "f1f90b9847830c6505a176bf78442e619b1d297c818ec561c92c498a4db74b53", + "baseline_sha256": "f1f90b9847830c6505a176bf78442e619b1d297c818ec561c92c498a4db74b53", + "unchanged": true, + "prior_result": { + "name": "pure:guard-mutations", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/s5/s5_order_adapter_controls.py", + "--pure-only" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 1.5057093752548099, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_guard-mutations.log" + } + }, + { + "name": "pure:repair44-new-roster-paid-mutations", + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/s5/repair44_controls.py", + "sha256": "3eeaa1e17b7e27ba00c42be5fba3bbf907a8e82a75e834d7aec6bf62586c3781", + "baseline_sha256": "3eeaa1e17b7e27ba00c42be5fba3bbf907a8e82a75e834d7aec6bf62586c3781", + "unchanged": true, + "prior_result": { + "name": "pure:repair44-new-roster-paid-mutations", + "argv": [ + "/Users/korizatou114/Antigravity/環境構築/agent-control/.venv/bin/python", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-root-q-r46-e7f22711/docs/plans/original-completion-2026-10-02/execution/p04-01/s5/repair44_controls.py" + ], + "returncode": 0, + "passed": true, + "wall_seconds": 0.11979149980470538, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/coordinator-p04-repair30-current-main-r01/q46-pure-plans-logs/pure_repair44-new-roster-paid-mutations.log" + } + } + ], + "unchanged_series_top_level_functions": { + "require": "9775a8b3969599d5d1f620d9717824195d7ab69490eafb5e7b8d1bacbf14df85", + "digest": "b46c442db8153d4caa4e3d7ebb3560f6dc261f2c614ac20722d41b32fb1785fd", + "unique": "72abe6f619eb97c8d540b8f74ddf0939c11d0c1c786d540a3e23a36a4beded9b", + "function_bodies": "7b69fa546fdc7a22f1acc531be141ec9627fd0212509f328e910c2401b0e6128", + "source_body_pins": "c83b75bb2ba1f3728cbc7aa8cb89455cdb7921d6cc02220c15d687f825b52be3", + "loads": "e35a9b9819e7efaf7e83b0a0b694cb220624888b765856ceb3054c37ee66c612", + "ordinary": "8b39c612330ac0844e593cb6f806e3fa38adfa53c829641f72082a1aad97295f", + "checked": "9cf3869795a79d420fda3c15ff21fa6d322d3090135e3687704eb6b33a8652df", + "variant": "60d89a476b547aaa511bc74525d881f3b35f060d98341165700e37b6b51d7cd6", + "normalized": "e63426c2f2de5ef8b97c4e12b96273c1ef73ae2961361a75293c09f5654c28d7", + "persistence_pins": "7fd541bfa754547aed89a0dcb019ac418fd44c7fbbecb65211c2cbcf2072704d", + "getter_array_headers": "c6f9c21b685fa96ca2d092af294acb7a125a107817c62cd17cd1a0d5fa65a79b", + "persisted_day_projection": "7c4e84529b2a262a66e12a3833b6c1dec328518e330ebc1cdb96a1ec8378305d", + "runtime": "d249848c71d3b0cab1d37e4b6b8631f76dab0f4a8f4ae8c7dcf6b9c9bc25d1a0", + "service_reservations": "79a8d64dddb277fd965c1965b92524df4616843f04900b3f8ba413bce4515f09", + "sales": "bec5cc78ac364aaa1ac78fd3d5fe099cf22afed188d8ddbd7047a299eb850b9e", + "s1_pretravel": "f02ee9c5071ceef71aa3ab530f9d3e9b0628b4003782ac28c86721c28b971f01", + "s1_semantics": "7cc52a4fd173bddf1f0e3f47c1c5266de06202f526195ad2e97b520ff34bc755", + "settlement": "c2b1a2d54446bb583977ea8fecb9a6577f5de736882a0990deae62cc70e20d38", + "recall": "31961e7c264046b805be3c0473f9ec2412841fc17e5cce2729ca8b5f32078528", + "s2a_semantics": "f87f4312d7e4643415e6268a2683cbd4d5967d2c94dd5ff45381fed0db4e6ac5", + "s2b_semantics": "ccb4cffd5bdbc31e5f0ecfa28e1b98dd527f348a1c341805aa68664fe35bf65f", + "s3_semantics": "a93e0acd0b67844992ae9dee285230c928d2ca365a628171d1a99e4856832fd7", + "dependency_closure_diagnostic": "9e352050aa9f23daaaa8cac0d02ff380d5dfb2e4076398906eaa0c5c1fcc5d0f", + "power_stop": "07d9bcef32320e33c92f1afe7e5be35e1e37a4debe751ebceb1d6279b67868c5", + "verify_s4_engine": "8f0761a68c3adbbd69a47a3358952bc458d0a885a72ca9e64694ff5c5bc3dbd8", + "verify_s4_wrapper": "ed7b19fb2f50c9aa30ef34ad355ef7eea884688aaf61aee77583698fffe2b042", + "verify_s4": "efc8d32132db9e498d20eec6bc36e4cdf56a415439349339cbb20c592276d849", + "verify_s1": "13cccc10c8758fec02e9b655fd0d97a5139dfe92d65a40ba73f7a514886163ac", + "verify_s2a": "0a1e24648ccb1432156fd946fc2c797a519cc461af798a7d7395f4a6363b8f6c", + "paid_series": "47dcd6b17e7e5e80caff6517234ed529d5bc6221efb140ec1c9b78652c81c018", + "verify_s2b": "5234b429ac310818d2e9163dcb977770670305fa6b4b90b6f07fb282f8de2764", + "verify_s3": "22800abeda3292013f95241121657e1a5129e71c4731e45c592a642db2ad5794", + "fresh_bindings": "8021bd1d2d8ac820a574a86c7148bc699514f63dc88f79abca47fcb043641434", + "verify_fresh_s1": "b6841f48bae307744e434df5bcdd58827acc8d3346f4b81822d07e8ef5ffc4df", + "verify_fresh_s2a": "b7b7d96b2db9faf45cad377cfb2228247714885bd08d0afe24646e914e1565d4", + "verify_fresh_s2b": "b693e93f6f3a17223e6f4fde890ad20abb525a25a97bc3d45b80c328ac2d3851", + "verify_fresh_s3": "e7ab78bce70ba47a0506fda1cb4791a3d7d282c8a57dc674ce1d5b6c63c565bd", + "verify_fresh_s4": "1be49dd54ed4885e15c577c159f5a0565ef78966774dca9edc71f9f7054e80db", + "verify_fresh_s5": "f6f58e84346f5e8b674dd60f94712684825a1404832e70704ab9bac23fac7f6d", + "main": "5f67e808cb4fd765f6809fe8ad06b2518dfd6c13db0c96fa5813330a85891d74" + }, + "additional_controls": "s4/admission_controls.py", + "historical_controls": "s4/receipt_lifecycle_fixtures.py (explicit pinned r28 path)", + "six_check_only": [ + "s1", + "s2a", + "s2b", + "s3", + "s4", + "s5" + ], + "s4_check_only_admission": "same admission as native, before writing plan", + "root_sequence": [ + "Freeze final Q/Qt", + "Affected pure controls", + "Clean exact-Q S1-S5 six check-only plans", + "Capacity and PID-end checks", + "One heavy lease: fresh S1,S2a,S2b,S3,S4 and all ten S5", + "Reader/adapters on actual raw", + "Fresh all 15 EV/approved subclauses", + "Full 184 once", + "Index", + "verify-only", + "Registered p04-acceptance before independent whole-unit Opus review", + "prepare/exact C/integration/final/Root DB join/ledger/main push" + ], + "worker_prohibited": [ + "Git writes", + "engine/native/full runs", + "Runner actions", + "other agents" + ], + "old_artifacts": "Q46 historical only; no rewriting or adoption", + "native_pending": true +} diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_Q46_FAILURE_REFERENCE.json b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_Q46_FAILURE_REFERENCE.json new file mode 100644 index 0000000..d0047eb --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_Q46_FAILURE_REFERENCE.json @@ -0,0 +1,18 @@ +{ + "provenance": "build/owner-handoff/p04-after-p26-closure-r01/q46-s4-admission-gap/actual-native/s4/execution.json", + "sha256": "c44550114d47a5332cefead105a039d437802e3e5eae709b9e62d03631dab2d6", + "verbatim_failure_fields": { + "passed": false, + "error": "AssertionError: complete 316-script parse roster", + "guard_errors": [ + "AssertionError: exact source and planned UID set" + ], + "phases": [], + "actual_captured_PIDs": [], + "cleanup": [], + "cleanup_errors": [], + "whole_goal_accepted": false, + "unit_accepted": false + }, + "classification": "Q46 actual failure; not adopted; zero S4 native PIDs and no game verification" +} diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_STATIC_CHECKS.json b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_STATIC_CHECKS.json new file mode 100644 index 0000000..db71375 --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_STATIC_CHECKS.json @@ -0,0 +1,44 @@ +{ + "task_id": "P04-01", + "scope_ok": true, + "changed_paths": [ + "docs/plans/original-completion-2026-10-02/execution/p04-01/CURRENT_STATUS.md", + "docs/plans/original-completion-2026-10-02/execution/p04-01/EVIDENCE_COLLECTION.md", + "docs/plans/original-completion-2026-10-02/execution/p04-01/ORDER_AUDIT.md", + "docs/plans/original-completion-2026-10-02/execution/p04-01/checker_series_fixtures.py", + "docs/plans/original-completion-2026-10-02/execution/p04-01/p04_native_series.py", + "docs/plans/original-completion-2026-10-02/execution/p04-01/s2b/S2B_ROOT_RUN.md", + "docs/plans/original-completion-2026-10-02/execution/p04-01/s3/S3_ROOT_RUN.md", + "docs/plans/original-completion-2026-10-02/execution/p04-01/s4/S4_ROOT_RUN.md", + "docs/plans/original-completion-2026-10-02/execution/p04-01/s4/receipt_lifecycle_fixtures.py", + "docs/plans/original-completion-2026-10-02/execution/p04-01/s4/run_s4_native.py", + "docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_PLAN.json", + "docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_Q46_FAILURE_REFERENCE.json", + "docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_STATUS.md", + "docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_VALIDATION.json", + "docs/plans/original-completion-2026-10-02/execution/p04-01/s4/admission_controls.py" + ], + "immutable": [ + { + "path": "tools/check_p04_order_evidence.py", + "unchanged": true, + "sha256": "3bb0cde776bc295f6f18e74f1e23bf3d832d8e4f71aed260601c82d287c655fd" + }, + { + "path": "docs/spec/acceptance/P04-01.json", + "unchanged": true, + "sha256": "d28aadb044633f7d804de5a92c8d4c4a7438dfbf44c3243dca978951f4def25f" + }, + { + "path": "docs/plans/original-completion-2026-10-02/execution/p04-01/s4/historical/run_s4_native_r28.py.reference", + "unchanged": true, + "sha256": "2d3be39d2b310abac058e27336ac816c234043a0a1dd7b2c52d84994907dd31b" + } + ], + "compiled_sources_match_final_bytes": true, + "git_diff_check": true, + "engine_launches": 0, + "git_writes": 0, + "runner_actions": 0, + "whole_unit_accepted": false +} diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_STATUS.md b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_STATUS.md new file mode 100644 index 0000000..04c636a --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_STATUS.md @@ -0,0 +1,105 @@ +# RUN47 submission — bounded S4 admission repair + +P04-01 remains **unaccepted**. This is the same original 30/88 unit, formal credit +16, P04 credit 0. No completion, integration or native-success claim is made. +All edits are under the contracted execution directory. Product code, registered +spec, checker (including REQUIRED/REACH_REFS), denominator, caps and permissions +are unchanged. No Git writes, other agents, Runner actions or engine launches. + +## Changes and count/roster audit + +- `s4/run_s4_native.py`, former line 301: removed current 316-script admission. + `admission` compares the whole sorted source-derived `.gd` res:// list. It runs + before check-only writes its plan and again before native writes parse-paths. + Plans carry the exact list; missing/extra/duplicate/non-.gd/same-count changes fail. +- Former line 240: removed selected/product 1339/1338 assumptions. Cache admission + requires the exact current product map, with precisely the checker as its extra; + the real product/selection difference allows no other input. Existing hashes, + failed-cache rejection and no-adoption guards remain. Option B uses no cache. +- `p04_native_series.py`, former lines 73/187/1030: removed literal source counts; + retained whole source/manifest/input/source_after equalities and pin checks. + Result count comes from the actual manifest. FreshSeries S4 also calls the + admission function and compares plan and actual parse-paths. +- `s4/receipt_lifecycle_fixtures.py`, former lines 81/92: split historical-pinned + lifecycle from current-derived admission. It now explicitly loads the unchanged, + hash-pinned r28 wrapper, retaining historical 1338/316 synthetic fixtures. The + standard runner comes from the supplied retained M copy. Current cases live in + `s4/admission_controls.py`; another valid derived roster is accepted as well. +- Remaining 316 in current controls is only the deliberately stale negative and + the historical AST/receipt fixture. The current wrapper has none. The 329 pin + diagnoses this supplied M fixture only; production has no fixed roster size. +- Resolver's 1721 members/71488772 bytes are the immutable historical relocation + identity, already bound to the fixed manifest hash; retained. S4 phase-cut + 121/132, eleven kernel phases, three slots, four engine phases and case roster + are scenario/receipt invariants rather than source counts; retained unchanged. +- `S4_ROOT_RUN.md` now distinguishes the current derived rules from historical + relocation/count descriptions. Its parse-path receipt row describes the new + admission. Earlier 1338/316 observations remain historical. S2b/S3 normative + fixed-product instructions are explicitly superseded. S1/S2 source-count + observations describe earlier runs, not current admission. ORDER_AUDIT, + EVIDENCE_COLLECTION, CURRENT_STATUS and REPAIR47_PLAN are synchronized. +- `checker_series_fixtures.py` uses BUILD for disposable fixtures. No test was + removed or disabled. + +Before import is attempted (`phase is None`), cleanup requires the complete +original source inventory with no generated UID. After import is attempted, the +existing exact planned UID snapshot/seal still applies. Partial/unknown UID sets +and changed source fail in both branches. The original exception stays in `error`; +cleanup errors remain separate guards, and the pass predicate still requires a +sealed import, all four successful phases and owned PID cleanup. Engine identity, +fixed inputs, default-player protection, source checks and first-failure behavior +are preserved. + +## Q46 failure, preserved verbatim + +```json +{ + "passed": false, + "error": "AssertionError: complete 316-script parse roster", + "guard_errors": ["AssertionError: exact source and planned UID set"], + "phases": [], + "actual_captured_PIDs": [] +} +``` + +No S4 game verification ran. REPAIR47_Q46_FAILURE_REFERENCE.json records the raw +file hash and verbatim failure fields. The original raw and historical wrapper +were not modified. Q46 successes elsewhere are reference only, never adopted. + +## Engine-free verification + +REPAIR47_VALIDATION.json includes commands, exit codes, raw-log hashes and full +finite outputs. The final current admission program passed 34 controls: actual +329 scripts, another derived roster, checker-only selection extra, every required +roster rejection, actual check-only main admission and its six rejected mutations, +the real FreshSeries roster block, the real cache set guard, historical 316 via +pinned r28 AST, and pre-import/attempted-import UID/source rejection cases. +Its check-only unit explicitly stubs historical template and engine identity; +this is a synthetic control, not a fresh-Q provenance plan or native proof. + +Affected series (62 controls), join (29 controls), and historical lifecycle (six +cases) passed. Historical lifecycle was finally confirmed against retained M. +Five changed Python files passed AST and compile checks; bytecode and scratch are +in allocated BUILD. Initial control-development failures (two absent contract +paths in the product-only M copy and one synthetic UID owner outside the existing +plan's allowed selection) are recorded, not treated as passes. Their fixture +references/owners were corrected; the final finite runs passed. + +REPAIR47_PLAN.json records unchanged hashes against S46 for the eleven unaffected +pure programs, their prior Q46 results, and unchanged top-level series function +hashes. Those eleven programs were not rerun. This is reuse of unchanged pure +checks only, not adoption of native receipts. The affected series/join checks were +rerun. The checker file is byte-for-byte unchanged (SHA256 +`3bb0cde776bc295f6f18e74f1e23bf3d832d8e4f71aed260601c82d287c655fd`). +The historical wrapper remains +`2d3be39d2b310abac058e27336ac816c234043a0a1dd7b2c52d84994907dd31b`. +Spec raw bytes remain unchanged; the existing one-final-LF dispatch identity +protocol yields the contracted `9ec722e7…` hash (REPAIR43_PRECHECK records it). + +Formal six-series check-only plans were not run by this worker: they require +Root's clean final Q/provenance. No claim that W check-only passed, or failed only +because of dirtiness, is made. No native/full/registered acceptance test ran. +Root must follow the complete option-B sequence in REPAIR47_PLAN.json: freeze Q, +affected pure, six clean plans, capacity/PID checks, one fresh native batch, +readers/adapters, fresh all-15/EV/subclauses, full 184 once, index, verify-only, +registered p04-acceptance before independent Opus review, then normal integration. diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_VALIDATION.json b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_VALIDATION.json new file mode 100644 index 0000000..4bd7821 --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/REPAIR47_VALIDATION.json @@ -0,0 +1,984 @@ +{ + "results": [ + { + "name": "admission", + "argv": [ + "/Applications/Xcode.app/Contents/Developer/usr/bin/python3", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/admission_controls.py", + "--project-root", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/build/owner-handoff/p04-after-p26-closure-r01/verified-m-engine-free-r45", + "--scratch", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/repair47-finite-validation-r01/admission" + ], + "exit_code": 0, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/repair47-finite-validation-r01/admission.log", + "sha256": "93b3976b5a79fd3c046f07e0f8f0a336e046e77a5bc914e54a255a7461cba182", + "output": { + "passed": true, + "controls": [ + { + "case": "real-329", + "result": "pass" + }, + { + "case": "another-derived-roster", + "result": "pass" + }, + { + "case": "missing", + "result": "rejected" + }, + { + "case": "extra", + "result": "rejected" + }, + { + "case": "same-count-substitution", + "result": "rejected" + }, + { + "case": "duplicate", + "result": "rejected" + }, + { + "case": "non-gd", + "result": "rejected" + }, + { + "case": "stale-literal-count", + "result": "rejected" + }, + { + "case": "checker-as-product", + "result": "rejected" + }, + { + "case": "missing-product", + "result": "rejected" + }, + { + "case": "extra-selected-input", + "result": "rejected" + }, + { + "case": "real-check-only-shared-admission", + "result": "pass" + }, + { + "case": "check-only-missing", + "result": "rejected" + }, + { + "case": "check-only-extra", + "result": "rejected" + }, + { + "case": "check-only-same-count-substitution", + "result": "rejected" + }, + { + "case": "check-only-duplicate", + "result": "rejected" + }, + { + "case": "check-only-non-gd", + "result": "rejected" + }, + { + "case": "check-only-stale-literal-count", + "result": "rejected" + }, + { + "case": "historical-316-receipt", + "result": "pass" + }, + { + "case": "historical-rejects-current-roster", + "result": "rejected" + }, + { + "case": "pre-import-original-no-uid", + "result": "pass" + }, + { + "case": "pre-import-partial-import", + "result": "rejected" + }, + { + "case": "attempted-import-partial-import", + "result": "rejected" + }, + { + "case": "pre-import-unknown-uid", + "result": "rejected" + }, + { + "case": "attempted-import-unknown-uid", + "result": "rejected" + }, + { + "case": "pre-import-changed-source", + "result": "rejected" + }, + { + "case": "attempted-import-changed-source", + "result": "rejected" + } + ], + "source_files": 1368, + "product_files": 1368, + "scripts": 329, + "engine_launches": 0, + "formal_acceptance": false + } + }, + { + "name": "series", + "argv": [ + "/Applications/Xcode.app/Contents/Developer/usr/bin/python3", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_series_fixtures.py", + "--build", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build" + ], + "exit_code": 0, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/repair47-finite-validation-r01/series.log", + "sha256": "33d8711aa6481841088938f4c4b8fc492c71ead6e1419e9558419a329adcf73b", + "output": { + "formal_acceptance": false, + "results": [ + { + "class": "fresh_roster_and_entrypoints", + "result": "pass", + "series": "fresh" + }, + { + "class": "small_synthetic_positive", + "result": "pass", + "series": "shared" + }, + { + "class": "full_body_positive", + "result": "pass", + "series": "s1" + }, + { + "class": "wrong_source_pin", + "error": "SHA drift: native /native/body.gd", + "result": "rejected", + "series": "s1" + }, + { + "class": "signature_only_pin", + "error": "full-function-body pin mismatch", + "result": "rejected", + "series": "s1" + }, + { + "class": "symlink", + "error": "symlink: /Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/.series-fixtures-u1xfy7kc/symlink.gd", + "result": "rejected", + "series": "s1" + }, + { + "class": "traversal", + "error": "raw traversal", + "result": "rejected", + "series": "s1" + }, + { + "class": "unmapped_original_path", + "error": "unmapped original path: /native/unknown.gd", + "result": "rejected", + "series": "s1" + }, + { + "class": "relocated_manifest_native_mismatch", + "error": "byte length drift: native /native/body.gd", + "result": "rejected", + "series": "s1" + }, + { + "class": "relocated_byte_manifest_mismatch", + "error": "SHA drift: relocation /native/body.gd", + "result": "rejected", + "series": "s1" + }, + { + "class": "JSON_only_getter_substitute", + "error": "unsupported Variant flags 8827:25959 at 0", + "result": "rejected", + "series": "s1" + }, + { + "class": "forged_scalar", + "error": "SHA drift: p04-s1-native-r02/raw/writer.json", + "result": "rejected", + "series": "s1" + }, + { + "class": "changed_raw_byte", + "error": "SHA drift: p04-s1-native-r02/raw/writer.json", + "result": "rejected", + "series": "s1" + }, + { + "class": "formal_member_SHA_drift", + "error": "SHA drift: p04-s1-native-r02/execution.json", + "result": "rejected", + "series": "s1" + }, + { + "class": "unowned_missing_PID_end", + "error": "missing PID end", + "result": "rejected", + "series": "s1" + }, + { + "class": "altered_phase_pair", + "error": "SHA drift: p04-s1-native-r02/raw/reader-landing-held.var", + "result": "rejected", + "series": "s1" + }, + { + "class": "relabeled_interruption_reason", + "error": "SHA drift: p04-s1-native-r02/raw/writer-landing-depleted.json", + "result": "rejected", + "series": "s1" + }, + { + "class": "full_body_positive", + "result": "pass", + "series": "s2a" + }, + { + "class": "wrong_source_pin", + "error": "SHA drift: native /native/body.gd", + "result": "rejected", + "series": "s2a" + }, + { + "class": "signature_only_pin", + "error": "full-function-body pin mismatch", + "result": "rejected", + "series": "s2a" + }, + { + "class": "symlink", + "error": "symlink: /Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/.series-fixtures-u1xfy7kc/symlink.gd", + "result": "rejected", + "series": "s2a" + }, + { + "class": "traversal", + "error": "raw traversal", + "result": "rejected", + "series": "s2a" + }, + { + "class": "unmapped_original_path", + "error": "unmapped original path: /native/unknown.gd", + "result": "rejected", + "series": "s2a" + }, + { + "class": "relocated_manifest_native_mismatch", + "error": "byte length drift: native /native/body.gd", + "result": "rejected", + "series": "s2a" + }, + { + "class": "relocated_byte_manifest_mismatch", + "error": "SHA drift: relocation /native/body.gd", + "result": "rejected", + "series": "s2a" + }, + { + "class": "JSON_only_getter_substitute", + "error": "unsupported Variant flags 8827:25959 at 0", + "result": "rejected", + "series": "s2a" + }, + { + "class": "forged_scalar", + "error": "SHA drift: p04-s2a-native-r03/raw/writer.json", + "result": "rejected", + "series": "s2a" + }, + { + "class": "changed_raw_byte", + "error": "SHA drift: p04-s2a-native-r03/raw/writer.json", + "result": "rejected", + "series": "s2a" + }, + { + "class": "formal_member_SHA_drift", + "error": "SHA drift: p04-s2a-native-r03/execution.json", + "result": "rejected", + "series": "s2a" + }, + { + "class": "unowned_missing_PID_end", + "error": "missing PID end", + "result": "rejected", + "series": "s2a" + }, + { + "class": "altered_phase_pair", + "error": "SHA drift: p04-s2a-native-r03/raw/reader-C3-recall.var", + "result": "rejected", + "series": "s2a" + }, + { + "class": "relabeled_interruption_reason", + "error": "SHA drift: p04-s2a-native-r03/raw/writer-C1-midnight.json", + "result": "rejected", + "series": "s2a" + }, + { + "class": "full_body_positive", + "result": "pass", + "series": "s2b" + }, + { + "class": "wrong_source_pin", + "error": "SHA drift: native /native/body.gd", + "result": "rejected", + "series": "s2b" + }, + { + "class": "signature_only_pin", + "error": "full-function-body pin mismatch", + "result": "rejected", + "series": "s2b" + }, + { + "class": "symlink", + "error": "symlink: /Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/.series-fixtures-u1xfy7kc/symlink.gd", + "result": "rejected", + "series": "s2b" + }, + { + "class": "traversal", + "error": "raw traversal", + "result": "rejected", + "series": "s2b" + }, + { + "class": "unmapped_original_path", + "error": "unmapped original path: /native/unknown.gd", + "result": "rejected", + "series": "s2b" + }, + { + "class": "relocated_manifest_native_mismatch", + "error": "byte length drift: native /native/body.gd", + "result": "rejected", + "series": "s2b" + }, + { + "class": "relocated_byte_manifest_mismatch", + "error": "SHA drift: relocation /native/body.gd", + "result": "rejected", + "series": "s2b" + }, + { + "class": "JSON_only_getter_substitute", + "error": "unsupported Variant flags 8827:25959 at 0", + "result": "rejected", + "series": "s2b" + }, + { + "class": "forged_scalar", + "error": "SHA drift: p04-s2b-native-r02/raw/writer.json", + "result": "rejected", + "series": "s2b" + }, + { + "class": "changed_raw_byte", + "error": "SHA drift: p04-s2b-native-r02/raw/writer.json", + "result": "rejected", + "series": "s2b" + }, + { + "class": "formal_member_SHA_drift", + "error": "SHA drift: p04-s2b-native-r02/execution.json", + "result": "rejected", + "series": "s2b" + }, + { + "class": "unowned_missing_PID_end", + "error": "missing PID end", + "result": "rejected", + "series": "s2b" + }, + { + "class": "altered_phase_pair", + "error": "SHA drift: p04-s2b-native-r02/raw/reader-night_absent-1080-before-facility.var", + "result": "rejected", + "series": "s2b" + }, + { + "class": "relabeled_interruption_reason", + "error": "SHA drift: p04-s2b-native-r02/raw/writer-night_absent-1081.json", + "result": "rejected", + "series": "s2b" + }, + { + "class": "full_body_positive", + "result": "pass", + "series": "s3" + }, + { + "class": "wrong_source_pin", + "error": "SHA drift: native /native/body.gd", + "result": "rejected", + "series": "s3" + }, + { + "class": "signature_only_pin", + "error": "full-function-body pin mismatch", + "result": "rejected", + "series": "s3" + }, + { + "class": "symlink", + "error": "symlink: /Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/.series-fixtures-u1xfy7kc/symlink.gd", + "result": "rejected", + "series": "s3" + }, + { + "class": "traversal", + "error": "raw traversal", + "result": "rejected", + "series": "s3" + }, + { + "class": "unmapped_original_path", + "error": "unmapped original path: /native/unknown.gd", + "result": "rejected", + "series": "s3" + }, + { + "class": "relocated_manifest_native_mismatch", + "error": "byte length drift: native /native/body.gd", + "result": "rejected", + "series": "s3" + }, + { + "class": "relocated_byte_manifest_mismatch", + "error": "SHA drift: relocation /native/body.gd", + "result": "rejected", + "series": "s3" + }, + { + "class": "JSON_only_getter_substitute", + "error": "unsupported Variant flags 8827:25959 at 0", + "result": "rejected", + "series": "s3" + }, + { + "class": "forged_scalar", + "error": "SHA drift: p04-s3-native-r01/raw/writer.json", + "result": "rejected", + "series": "s3" + }, + { + "class": "changed_raw_byte", + "error": "SHA drift: p04-s3-native-r01/raw/writer.json", + "result": "rejected", + "series": "s3" + }, + { + "class": "formal_member_SHA_drift", + "error": "SHA drift: p04-s3-native-r01/execution.json", + "result": "rejected", + "series": "s3" + }, + { + "class": "unowned_missing_PID_end", + "error": "missing PID end", + "result": "rejected", + "series": "s3" + }, + { + "class": "altered_phase_pair", + "error": "SHA drift: p04-s3-native-r01/raw/reader-B1-phase-960-TIME_BOUNDARIES.var", + "result": "rejected", + "series": "s3" + }, + { + "class": "relabeled_interruption_reason", + "error": "SHA drift: p04-s3-native-r01/raw/writer-B1-after.json", + "result": "rejected", + "series": "s3" + } + ], + "scope": "file-only Stage R controls; immutable descriptor and primitive negatives" + } + }, + { + "name": "join", + "argv": [ + "/Applications/Xcode.app/Contents/Developer/usr/bin/python3", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_join_fixtures.py", + "--build", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build" + ], + "exit_code": 0, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/repair47-finite-validation-r01/join.log", + "sha256": "6cc0a89527b5e8192f11c0d3d503536aab1ea03db08d2af4f440dd0da9525dc8", + "output": { + "scope": "semantic controls only; no new native execution", + "results": [ + { + "case": "B1_cannot_supply_power_stop", + "result": "rejected", + "error": "power_stop requires S4; B1 is dependency/closure diagnostic only" + }, + { + "case": "B1_real_despawn_positive", + "result": "accepted" + }, + { + "case": "dependency_reason_relabelled_as_NO_POWER", + "result": "rejected", + "error": "B1 power Runtime facility/service join" + }, + { + "case": "B1_missing_at_closure", + "result": "rejected", + "error": "B1 real B before/at closure" + }, + { + "case": "B1_synthetic_later_guest", + "result": "rejected", + "error": "B1 normal despawn after departure" + }, + { + "case": "B1_wrong_release_minute", + "result": "rejected", + "error": "B1 immutable reservation join" + }, + { + "case": "B1_changed_wallet", + "result": "rejected", + "error": "B1 B wallet/no economy charge" + }, + { + "case": "B1_missing_departure_history", + "result": "rejected", + "error": "B1 persisted departure join" + }, + { + "case": "R2_real_first_1080_positive", + "result": "accepted" + }, + { + "case": "R2_paid_midnight_substitution", + "result": "rejected", + "error": "shift raw service join" + }, + { + "case": "R2_wrong_transaction", + "result": "rejected", + "error": "native receipt transaction" + }, + { + "case": "R2_missing_DAY2", + "result": "rejected", + "error": "shift DAY2 before/after handover" + }, + { + "case": "R2_after_staff_still_present", + "result": "rejected", + "error": "shift DAY2 before/after handover" + }, + { + "case": "R2_next_extra_receipt", + "result": "rejected", + "error": "native duplicate/empty receipt" + }, + { + "case": "R2_dynamic_PID_and_transaction_positive", + "result": "accepted" + }, + { + "case": "R2_wrong_PID_join", + "result": "rejected", + "error": "native PID chain" + }, + { + "case": "S1_pre_travel_mismatch", + "result": "rejected", + "error": "S1 pre-travel staff cell/task/raw reservation join" + }, + { + "case": "S1_no_actual_outage", + "result": "rejected", + "error": "S1 actual reserve exhaustion/tick" + }, + { + "case": "historical_receipt_checked_against_current_wrapper", + "result": "rejected", + "error": "S4 historical pin in fresh receipt" + }, + { + "case": "current_wrapper_used_as_historical_receipt", + "result": "rejected", + "error": "S4 historical receipt wrapper pin" + }, + { + "case": "fresh_receipt_carrying_historical_pin", + "result": "rejected", + "error": "S4 historical pin in fresh receipt" + }, + { + "case": "tampered_historical_pinned_copy", + "result": "rejected", + "error": "S4 tampered historical wrapper pin" + }, + { + "case": "S4_real_NO_POWER_positive", + "result": "accepted" + }, + { + "case": "S4_related_facility_operating_false", + "result": "rejected", + "error": "S4 related facility must remain operating/powered" + }, + { + "case": "S4_kitchen_unpowered", + "result": "rejected", + "error": "S4 related facility must remain operating/powered" + }, + { + "case": "S4_closure_confound", + "result": "rejected", + "error": "S4 closure/damage/shift confound" + }, + { + "case": "S4_no_actual_outage", + "result": "rejected", + "error": "S4 actual NO_POWER path, not relabelled dependency" + }, + { + "case": "S4_wrong_transaction_join", + "result": "rejected", + "error": "S4 transaction/service join" + }, + { + "case": "S4_dynamic_service_and_sale_positive", + "result": "accepted" + } + ] + } + }, + { + "name": "historical-lifecycle", + "argv": [ + "/Applications/Xcode.app/Contents/Developer/usr/bin/python3", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/receipt_lifecycle_fixtures.py" + ], + "exit_code": 0, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/repair47-finite-validation-r01/historical-lifecycle.log", + "sha256": "e2bc93824d2152de4aac320d5fbf0fd7497c09cb07d61c630abc299d15d785cb", + "output": { + "results": [ + { + "case": "success", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "parse", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "cleanup", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "setup", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "output", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "identity-write", + "passed": true, + "native_engine_launches": 0 + } + ], + "formal_acceptance": false + } + }, + { + "name": "final-admission", + "argv": [ + "/Applications/Xcode.app/Contents/Developer/usr/bin/python3", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/admission_controls.py", + "--project-root", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/build/owner-handoff/p04-after-p26-closure-r01/verified-m-engine-free-r45", + "--scratch", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/repair47-finite-validation-r02/admission" + ], + "exit_code": 0, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/repair47-finite-validation-r02/admission.log", + "sha256": "1644a127dd89fc318e348dddc43e347b10e88e36b202328a6292b8d76ea66865", + "output": { + "passed": true, + "controls": [ + { + "case": "real-329", + "result": "pass" + }, + { + "case": "selected-checker-only-extra", + "result": "pass" + }, + { + "case": "another-derived-roster", + "result": "pass" + }, + { + "case": "missing", + "result": "rejected" + }, + { + "case": "extra", + "result": "rejected" + }, + { + "case": "same-count-substitution", + "result": "rejected" + }, + { + "case": "duplicate", + "result": "rejected" + }, + { + "case": "non-gd", + "result": "rejected" + }, + { + "case": "stale-literal-count", + "result": "rejected" + }, + { + "case": "checker-as-product", + "result": "rejected" + }, + { + "case": "missing-product", + "result": "rejected" + }, + { + "case": "extra-selected-input", + "result": "rejected" + }, + { + "case": "real-check-only-shared-admission", + "result": "pass" + }, + { + "case": "check-only-missing", + "result": "rejected" + }, + { + "case": "check-only-extra", + "result": "rejected" + }, + { + "case": "check-only-same-count-substitution", + "result": "rejected" + }, + { + "case": "check-only-duplicate", + "result": "rejected" + }, + { + "case": "check-only-non-gd", + "result": "rejected" + }, + { + "case": "check-only-stale-literal-count", + "result": "rejected" + }, + { + "case": "FreshSeries-exact-roster", + "result": "pass" + }, + { + "case": "FreshSeries-actual-substitution", + "result": "rejected" + }, + { + "case": "FreshSeries-plan-substitution", + "result": "rejected" + }, + { + "case": "cache-exact-product-plus-checker", + "result": "pass" + }, + { + "case": "cache-missing-checker", + "result": "rejected" + }, + { + "case": "cache-same-count-substitution", + "result": "rejected" + }, + { + "case": "historical-316-receipt", + "result": "pass" + }, + { + "case": "historical-rejects-current-roster", + "result": "rejected" + }, + { + "case": "pre-import-original-no-uid", + "result": "pass" + }, + { + "case": "pre-import-partial-import", + "result": "rejected" + }, + { + "case": "attempted-import-partial-import", + "result": "rejected" + }, + { + "case": "pre-import-unknown-uid", + "result": "rejected" + }, + { + "case": "attempted-import-unknown-uid", + "result": "rejected" + }, + { + "case": "pre-import-changed-source", + "result": "rejected" + }, + { + "case": "attempted-import-changed-source", + "result": "rejected" + } + ], + "source_files": 1368, + "product_files": 1368, + "scripts": 329, + "engine_launches": 0, + "formal_acceptance": false + } + }, + { + "name": "final-historical-lifecycle-retained-M", + "argv": [ + "/Applications/Xcode.app/Contents/Developer/usr/bin/python3", + "-B", + "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/receipt_lifecycle_fixtures.py" + ], + "exit_code": 0, + "log": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/.runtime/P04-01/build/repair47-finite-validation-r03/historical-lifecycle.log", + "sha256": "e2bc93824d2152de4aac320d5fbf0fd7497c09cb07d61c630abc299d15d785cb", + "output": { + "results": [ + { + "case": "success", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "parse", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "cleanup", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "setup", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "output", + "passed": true, + "native_engine_launches": 0 + }, + { + "case": "identity-write", + "passed": true, + "native_engine_launches": 0 + } + ], + "formal_acceptance": false + } + } + ], + "compile": [ + { + "path": "p04_native_series.py", + "sha256": "4d8fd60f209a6827eadfa2bf036deee8bf88aa0dbaa89f366e71b8ae46adf594", + "ast": true, + "compile": true + }, + { + "path": "checker_series_fixtures.py", + "sha256": "5779b05505d6c7118f40cff3b8c309211142603d04c69183c3e68e88efaee4a9", + "ast": true, + "compile": true + }, + { + "path": "s4/run_s4_native.py", + "sha256": "628a7aa8108a6b41a2ddc9139cbca21bec8723f0ce9829df67b8bb52f6a38203", + "ast": true, + "compile": true + }, + { + "path": "s4/receipt_lifecycle_fixtures.py", + "sha256": "3c0331c190874ed602ef845eff62c2bf52a8178542067e5d104d3a7d8aa61b88", + "ast": true, + "compile": true + }, + { + "path": "s4/admission_controls.py", + "sha256": "96b3545d741c0495eb20b2a4786c9ce67ce5721229535dc2dae3214bf27b6b76", + "ast": true, + "compile": true + } + ], + "native_launches": 0, + "formal_acceptance": false, + "development_control_failures": [ + { + "scratch": "repair47-admission-controls-r01", + "error": "ValueError: missing exact input: retained M tools/completion_marker_contracts.json" + }, + { + "scratch": "repair47-admission-controls-r02", + "error": "ValueError: missing exact input: retained M docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json" + }, + { + "scratch": "repair47-admission-controls-r03", + "error": "AssertionError: len(plan) >= 2; synthetic owner paths outside existing UID-plan selection" + } + ], + "formal_six_check_only": "not run by worker: exact clean final Q and provenance are Root responsibility; synthetic S4 main control is explicitly stubbed, not a fresh-Q plan", + "retained_M": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p04-01/P04-01-implement/build/owner-handoff/p04-after-p26-closure-r01/verified-m-engine-free-r45", + "unchanged_proof_reuse": "REPAIR47_PLAN.json: 11 program hashes and unchanged top-level series function hashes; no native evidence adoption" +} diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_series_fixtures.py b/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_series_fixtures.py index e9747ce..f6e6fd0 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_series_fixtures.py +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/checker_series_fixtures.py @@ -31,14 +31,14 @@ def run(build): else: raise AssertionError('negative accepted: ' + series + '/' + name) - with tempfile.TemporaryDirectory(prefix='.series-fixtures-', dir=s.HERE) as tmp: + with tempfile.TemporaryDirectory(prefix='.series-fixtures-', dir=build) as tmp: base = Path(tmp) data = b'func boundary():\n\treturn 42\n# included trailing comment\n' path = base / 'body.gd' path.write_bytes(data) pin = {'sha256': s.digest(data), 'bytes': len(data)} # A deliberately small resolver fixture bypasses the production-only - # fixed 1721-file constructor, but exercises its exact read path. + # historical pinned relocation constructor, but exercises its exact read path. resolver = s.Resolver.__new__(s.Resolver) resolver.base, resolver.used = base, {} resolver.mapping = {'/native/body.gd': dict(pin, relocated=str(path))} diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/p04_native_series.py b/docs/plans/original-completion-2026-10-02/execution/p04-01/p04_native_series.py index 922ce1e..e80d52f 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/p04_native_series.py +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/p04_native_series.py @@ -70,7 +70,7 @@ class Series: ('runner-input.json', 'raw-inventory.json', 'execution.json'), NATIVE_PINS[name])] self.inputs, self.inventory, self.execution = inputs, inventory, execution source = loads(self.read('source_before.json', {'sha256': self.resolver.manifest['source_before_sha'][self.run]})) - require(source == inputs['source_before'] == self.resolver.manifest['product_source'] and len(source) == 1338, + require(source == inputs['source_before'] == self.resolver.manifest['product_source'], 'source_before product set mismatch') selected = {k: v['sha256'] for k, v in source.items()} require(inputs['QA_overrides'] == ['tests/s3/test_runtime_staff_assignment.gd'], 'QA override membership') @@ -184,7 +184,7 @@ class Series: def result(self, conditions, facts=None): return {'series': self.name, 'verified_conditions': sorted(conditions), 'facts': facts or {}, 'product_content': PRODUCT, 'relocation_manifest_sha256': MANIFEST_SHA256, - 'source_files': 1338, 'owned_pids': self.pids, 'phase_pairs': self.phase_pairs, + 'source_files': len(self.resolver.manifest['product_source']), 'owned_pids': self.pids, 'phase_pairs': self.phase_pairs, 'references': self.references, 'relocated_references': self.resolver.used, 'formal_acceptance': False} @@ -1027,7 +1027,7 @@ class S4Series(Series): inputs, execution = self.inputs, self.execution source = loads(self.read('source_before.json')) product = self.resolver.manifest['product_source'] - require(set(source) == set(product) and len(source) == 1338 and + require(set(source) == set(product) and source == inputs['source_before'] == loads(self.read('source_after.json')), 'S4 complete unchanged product set') for name, pin in source.items(): require(all(pin[k] == product[name][k] for k in ('bytes', 'sha256')), 'S4 product pin') @@ -1334,6 +1334,12 @@ class FreshSeries(Series): spec = importlib.util.spec_from_file_location('fresh_series_wrapper', wrapper_path) wrapper = importlib.util.module_from_spec(spec) spec.loader.exec_module(wrapper) + if self.name == 's4': + admission = wrapper.module('fresh_s4_admission', HERE / 's4/run_s4_native.py') + product = {n: p for n, p in selected.items() if n != admission.CHECKER} + paths = loads(self.read('parse-paths.json')) + admission.admission(selected, product, paths) + require(paths == self.inputs['parse_paths'], 'S4 plan/actual parse roster') root = Path(self.inputs['project_root']) runner = wrapper.module('fresh_series_runner', root / 'tools/run_all_tests.py') refs = dict(self.source) diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/s2b/S2B_ROOT_RUN.md b/docs/plans/original-completion-2026-10-02/execution/p04-01/s2b/S2B_ROOT_RUN.md index 7c3242c..a7fa657 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/s2b/S2B_ROOT_RUN.md +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/s2b/S2B_ROOT_RUN.md @@ -1,3 +1,5 @@ +RUN47 note: Earlier 1338-source native instructions below describe the historical relocation. Current fresh-Q selection uses exact source/manifest equality, never a literal file count. See ../REPAIR47_PLAN.json. + # P04-01 S2b code preparation 変更は本ディレクトリの `p04_s2b_shift_probe.gd`、`run_s2b_native.py`、本書の3ファイルのみ。 diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/s3/S3_ROOT_RUN.md b/docs/plans/original-completion-2026-10-02/execution/p04-01/s3/S3_ROOT_RUN.md index 33aad62..78ef4a0 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/s3/S3_ROOT_RUN.md +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/s3/S3_ROOT_RUN.md @@ -1,3 +1,5 @@ +RUN47 note: Earlier 1338-source native instructions below describe the historical relocation. Current fresh-Q selection uses exact source/manifest equality, never a literal file count. See ../REPAIR47_PLAN.json. + # P04-01 S3 code-ready preparation 変更は本ディレクトリのGD、Python wrapper、本書の3本のみ。製品修正0。 diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/S4_ROOT_RUN.md b/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/S4_ROOT_RUN.md index d200eae..78b068a 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/S4_ROOT_RUN.md +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/S4_ROOT_RUN.md @@ -1,3 +1,24 @@ +## RUN47 current admission (supersedes earlier execution instructions) + +Current S4 check-only and native call the same engine-free `admission` function. +The real selected source map determines the sorted unique res:// `.gd` roster; +the whole list must match, including membership and order. Product is exactly +selected minus `tools/check_p04_order_evidence.py`; no other extra is allowed. +There is no current fixed product/script count. The supplied M copy happens to +select 1368 product files and 329 scripts; fresh Q additionally selects the checker. +Plans now carry `parse_paths`, and FreshSeries checks plan/actual/source equality. +Before import is attempted, cleanup requires the complete original inventory and +no generated UID. After import starts, the existing exact planned UID seal applies. +Failure stays failure; no previous native receipt is adopted. + +The older relocation, counts, runs and receipts below are historical context only. +The historical r28 wrapper and data retain 1338/316. `receipt_lifecycle_fixtures.py` +now explicitly loads that pinned historical wrapper. Current-derived finite cases +are in `admission_controls.py`, using the retained verified-M copy and BUILD scratch. +Root must freeze final Q and run six clean check-only plans, then all fresh native +boundaries and ten S5 cases once in one heavy lease. See REPAIR47_PLAN.json and +REPAIR47_STATUS.md; worker does not execute that native sequence. + # S4 finite Root collection r28 — NOT RUN This adds only the existing `power_stop` evidence obligation. It adds no counted @@ -141,7 +162,7 @@ the descriptor it just appended and the index of that exact observation. | `write_bytes` to `bootstrap/` | 1 per pinned bootstrap key | The reviewed map names `profile_guard.gd` and `parse_full_dependencies.gd`; setup only | | `/bin/cp -c` to `stage/.godot/` | 1 per cache inventory key | Optional eligible-cache branch only; fresh mode never accesses cache | | `cache-reuse.json` | 0 or 1 | Only after all optional cache clones and guards | -| `parse-paths.json` | 1 | Setup after 316-script guard | +| `parse-paths.json` | 1 | Setup after source-derived roster admission (historical r28 used 316) | | `contracts.json` | 1 | Setup after unchanged suite-policy guard | | `runner-input.json` | 1 | Setup; no final read/rewrite; absent if earlier setup fails | | `engine-identity-before-.json` | 1 each for import, parse, writer, reader | Immediately after that phase's repin; failure stops loop, never resumes it | diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/admission_controls.py b/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/admission_controls.py new file mode 100644 index 0000000..5238031 --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/admission_controls.py @@ -0,0 +1,164 @@ +#!/usr/bin/env python3 +"""Finite engine-free admission controls. Synthetic plans are never evidence.""" +import argparse +import ast +from contextlib import redirect_stdout +import hashlib +import io +import json +from pathlib import Path +import sys +from types import SimpleNamespace +from unittest.mock import patch + +sys.dont_write_bytecode = True +import run_s4_native as s4 + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--project-root', required=True, type=Path) + parser.add_argument('--scratch', required=True, type=Path) + args = parser.parse_args() + root = args.project_root.resolve(strict=True) + expected_root = Path(__file__).resolve().parents[6] / 'build/owner-handoff/p04-after-p26-closure-r01/verified-m-engine-free-r45' + assert root == expected_root.resolve(strict=True), 'retained M only; never Root Q' + scratch = args.scratch.resolve() + assert scratch.is_relative_to(s4.BUILD.resolve()) and not scratch.exists() + scratch.mkdir(parents=True) + r = s4.module('admission_real_selection', root / 'tools/run_all_tests.py') + selected = r.source_refs(root) + product = {n: p for n, p in selected.items() if n != s4.CHECKER} + paths = ['res://' + n for n in sorted(product) if n.endswith('.gd')] + results = [] + + def check(label, action, reject=False): + try: + action() + except (ValueError, AssertionError): + assert reject, label + results.append(dict(case=label, result='rejected')) + else: + assert not reject, label + results.append(dict(case=label, result='pass')) + + assert len(paths) == 329, 'diagnostic pin for supplied M, not production admission' + check('real-329', lambda: s4.admission(selected, product, paths)) + check('selected-checker-only-extra', lambda: s4.admission( + dict(product, **{s4.CHECKER: {'sha256': 'synthetic-checker'}}), product, paths)) + other = dict(product, **{'scripts/another_valid.gd': {'sha256': 'synthetic'}}) + other_paths = sorted(paths + ['res://scripts/another_valid.gd']) + check('another-derived-roster', lambda: s4.admission(other, other, other_paths)) + mutations = { + 'missing': paths[:-1], + 'extra': sorted(paths + ['res://scripts/extra.gd']), + 'same-count-substitution': sorted(paths[:-1] + ['res://scripts/substitute.gd']), + 'duplicate': sorted(paths + [paths[0]]), + 'non-gd': sorted(paths + ['res://project.godot']), + 'stale-literal-count': paths[:316], + } + for label, roster in mutations.items(): + check(label, lambda roster=roster: s4.admission(selected, product, roster), True) + check('checker-as-product', lambda: s4.admission( + dict(selected, **{s4.CHECKER: {}}), dict(product, **{s4.CHECKER: {}}), paths), True) + check('missing-product', lambda: s4.admission(selected, dict(list(product.items())[1:]), paths), True) + check('extra-selected-input', lambda: s4.admission(dict(selected, unexpected={}), product, paths), True) + + # Execute the real check-only main with explicit historical template/engine + # stubs. Source selection and admission are real; no fresh-Q claim is made. + real_admission = s4.admission + calls = [] + def observed(a, b, c): + calls.append((a, b, c)) + return real_admission(a, b, c) + argv = ['run_s4_native.py', '--historical-r17', '--project-root', str(root), + '--output', str(scratch / 'never-native'), '--plan', str(scratch / 'synthetic-plan.json'), '--check-only'] + with patch.object(s4, 'engine_pin', return_value={'synthetic': True}), \ + patch.object(s4, 'template_guard'), patch.object(s4, 'MATERIALS', []), \ + patch.object(s4, 'CONTRACTS', s4.HERE.parent.parent / 'completion_marker_contracts.json'), \ + patch.object(s4, 'admission', side_effect=observed), \ + patch.object(sys, 'argv', argv), redirect_stdout(io.StringIO()): + assert s4.main() == 0 + assert len(calls) == 1 and calls[0][2] == paths + assert not (scratch / 'never-native').exists() + assert r.read(scratch / 'synthetic-plan.json')['parse_paths'] == paths + results.append(dict(case='real-check-only-shared-admission', result='pass')) + for label, roster in mutations.items(): + def mutated(a, b, c): + return real_admission(a, b, roster) + bad_plan = scratch / ('rejected-plan-' + label + '.json') + bad_argv = list(argv) + bad_argv[bad_argv.index('--plan') + 1] = str(bad_plan) + with patch.object(s4, 'engine_pin', return_value={'synthetic': True}), \ + patch.object(s4, 'template_guard'), patch.object(s4, 'admission', side_effect=mutated), \ + patch.object(sys, 'argv', bad_argv): + check('check-only-' + label, s4.main, True) + assert not bad_plan.exists(), 'admission must precede plan write' + + # Historical admission executes the original pinned r28 AST unchanged. + series = s4.module('admission_series', s4.HERE.parent / 'p04_native_series.py') + series_tree = ast.parse((s4.HERE.parent / 'p04_native_series.py').read_text()) + fresh = next(n for n in series_tree.body if isinstance(n, ast.ClassDef) and n.name == 'FreshSeries') + roster_block = next(n for n in ast.walk(fresh) if isinstance(n, ast.If) + and "'S4 plan/actual parse roster'" in ast.unparse(n)) + roster_code = compile(ast.Module(body=[roster_block], type_ignores=[]), '', 'exec') + wrapper = s4.module('admission_fresh_wrapper', s4.HERE.parent / 's5/run_s5_native.py') + def series_roster(actual, planned): + obj = SimpleNamespace(name='s4', read=lambda _: json.dumps(actual).encode(), inputs={'parse_paths': planned}) + exec(roster_code, dict(wrapper=wrapper, HERE=s4.HERE.parent, selected=selected, + self=obj, loads=series.loads, require=series.require)) + check('FreshSeries-exact-roster', lambda: series_roster(paths, paths)) + check('FreshSeries-actual-substitution', lambda: series_roster(mutations['same-count-substitution'], paths), True) + check('FreshSeries-plan-substitution', lambda: series_roster(paths, mutations['same-count-substitution']), True) + main_tree = ast.parse(Path(s4.__file__).read_text()) + cache_guard = next(n for n in ast.walk(main_tree) if isinstance(n, ast.Expr) + and 'cache selection is exact product plus checker' in ast.unparse(n)) + cache_code = compile(ast.Module(body=[cache_guard], type_ignores=[]), '', 'exec') + def cache_keys(old): + exec(cache_code, dict(r=r, old_map=old, current_map=product, CHECKER=s4.CHECKER)) + s4.admission(old, product, paths) + cache = dict(product, **{s4.CHECKER: {}}) + check('cache-exact-product-plus-checker', lambda: cache_keys(cache)) + check('cache-missing-checker', lambda: cache_keys(product), True) + check('cache-same-count-substitution', lambda: cache_keys(dict(list(cache.items())[1:], unexpected={})), True) + historical = s4.HERE / 'historical/run_s4_native_r28.py.reference' + series.verify_s4_wrapper(hashlib.sha256(historical.read_bytes()).hexdigest(), historical=True) + tree = ast.parse(historical.read_text()) + guard = next(n for n in ast.walk(tree) if isinstance(n, ast.Expr) + and 'complete 316-script parse roster' in ast.unparse(n)) + code = compile(ast.Module(body=[guard], type_ignores=[]), str(historical), 'exec') + # A finite synthetic historical receipt; not a replacement for native raw. + check('historical-316-receipt', lambda: exec(code, {'r': r, 'paths': paths[:316]})) + check('historical-rejects-current-roster', lambda: exec(code, {'r': r, 'paths': paths}), True) + + uid_plan, snapshot, _ = s4.module('admission_uid', s4.HERE.parent / 's5/run_s5_native.py').load_uid_helper(root, r, selected) + for label in ('original-no-uid', 'partial-import', 'unknown-uid', 'changed-source'): + stage = scratch / label + (stage / 'tests/special').mkdir(parents=True) + (stage / 'tests/special/a.gd').write_text('extends Node\n') + (stage / 'tests/special/b.gd').write_text('extends Node\n') + source = r.inventory(stage, stage=True) + refs = {n: dict(p, path=str(stage / n)) for n, p in source.items()} + plan = uid_plan(refs) + assert len(plan) >= 2 + if label == 'partial-import': + (stage / next(iter(plan))).write_text('uid://partial\n') + elif label == 'unknown-uid': + (stage / 'unknown.uid').write_text('uid://unknown\n') + elif label == 'changed-source': + (stage / 'tests/special/a.gd').write_text('changed\n') + state = dict(phase=None, accepted=None) + check('pre-import-' + label, lambda: s4.cleanup_uid_guard(r, snapshot, stage, source, plan, state), label != 'original-no-uid') + if label != 'original-no-uid': + state['phase'] = 'import' + check('attempted-import-' + label, lambda: s4.cleanup_uid_guard(r, snapshot, stage, source, plan, state), True) + + result = dict(passed=True, controls=results, source_files=len(selected), + product_files=len(product), scripts=len(paths), engine_launches=0, + formal_acceptance=False) + (scratch / 'results.json').write_text(json.dumps(result, indent=2) + '\n') + print(json.dumps(result, indent=2)) + + +if __name__ == '__main__': + main() diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/receipt_lifecycle_fixtures.py b/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/receipt_lifecycle_fixtures.py index d167300..d20d419 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/receipt_lifecycle_fixtures.py +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/receipt_lifecycle_fixtures.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Root-only synthetic receipt lifecycle fixtures. No engine/process is started. +"""Historical-pinned r28 synthetic lifecycle fixtures. No engine/process starts. Uses the real main, exclusive JSON writer, source_refs and inventories. The identity section is compiled directly from S4Series.__init__, not reimplemented. @@ -10,6 +10,7 @@ from collections import Counter from contextlib import ExitStack, redirect_stdout import copy import importlib.util +from importlib.machinery import SourceFileLoader import io import json from pathlib import Path @@ -21,17 +22,18 @@ from unittest.mock import patch sys.dont_write_bytecode = True HERE = Path(__file__).resolve().parent -ROOT = next(p for p in HERE.parents if (p / 'tools/run_all_tests.py').is_file()) +WORKTREE = next(p for p in HERE.parents if (p / 'tools/run_all_tests.py').is_file()) +ROOT = WORKTREE / 'build/owner-handoff/p04-after-p26-closure-r01/verified-m-engine-free-r45' def load(name, path): - spec = importlib.util.spec_from_file_location(name, path) + spec = importlib.util.spec_from_file_location(name, path, loader=SourceFileLoader(name, str(path))) value = importlib.util.module_from_spec(spec) spec.loader.exec_module(value) return value -s4 = load('receipt_s4', HERE / 'run_s4_native.py') +s4 = load('receipt_s4_historical', HERE / 'historical/run_s4_native_r28.py.reference') r = load('receipt_standard', ROOT / 'tools/run_all_tests.py') series = load('receipt_series', HERE.parent / 'p04_native_series.py') @@ -78,7 +80,7 @@ def case(base, failure=None): path.parent.mkdir(parents=True, exist_ok=True) path.write_bytes(data) - # Real 1338-entry source_refs and 316-entry script roster, synthetic bytes. + # Historical-pinned r28 fixture only. Current-derived cases: admission_controls.py. scripts = [s4.TEST, 'tests/transport/test_runtime_transport.gd', 'tests/staff/test_rescue_elevator.gd'] scripts += ['scripts/fixture_%03d.gd' % i for i in range(313)] @@ -92,7 +94,7 @@ def case(base, failure=None): assert len(r.source_refs(product)) == 1338 qa = staged / 'p04_s4_power_probe.gd' put(qa, b'extends Node\n# synthetic override\n') - put(staged / 'run_s4_native.py', (HERE / 'run_s4_native.py').read_bytes()) + put(staged / 'run_s4_native.py', (HERE / 'historical/run_s4_native_r28.py.reference').read_bytes()) put(staged / 'S4_ROOT_RUN.md', b'synthetic fixture material\n') contracts = base / 'contracts.json' r.write(contracts, {}) diff --git a/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/run_s4_native.py b/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/run_s4_native.py index 70db4b2..cc308bc 100644 --- a/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/run_s4_native.py +++ b/docs/plans/original-completion-2026-10-02/execution/p04-01/s4/run_s4_native.py @@ -97,6 +97,28 @@ def engine_pin(path, expected=None): raise ValueError("engine identity changed") return value +CHECKER = "tools/check_p04_order_evidence.py" + +def admission(selected, product, paths): + """Engine-free exact selection and parse admission; no historical counts.""" + if CHECKER in product: + raise ValueError("checker is not a product input") + if set(selected) - set(product) not in (set(), {CHECKER}): + raise ValueError("only checker may be a selected extra") + if {n: p for n, p in selected.items() if n != CHECKER} != product: + raise ValueError("exact selected/product source map") + expected = ["res://" + n for n in sorted(product) if n.endswith(".gd")] + if paths != expected: + raise ValueError("exact source-derived parse roster") + return paths + +def cleanup_uid_guard(r, snapshot, stage, source, plan, state): + if state["phase"] is None: + r.require(state["accepted"] is None and r.inventory(stage, stage=True) == source, + "exact original source and no generated UID before import") + else: + r.require(snapshot(stage, source, plan) == state["accepted"], "UID seal after cleanup") + def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--project-root", type=Path, default=PRODUCT) @@ -147,6 +169,9 @@ def main(): refs = dict(source_before) refs[TEST] = pin(QA) template_guard(root, historical=not fresh) + product_refs = {n: p for n, p in refs.items() if n != CHECKER} + paths = ["res://" + n for n in sorted(product_refs) if n.endswith(".gd")] + admission(refs, product_refs, paths) expected = {n: dict(bytes=p["bytes"], sha256=p["sha256"]) for n, p in refs.items()} fixed = [pin(p) for p in ([] if fresh else MATERIALS) + [ QA, Path(__file__), HERE / "S4_ROOT_RUN.md", @@ -171,7 +196,7 @@ def main(): break plan = dict(protocol="p04-s4-preparation-v1", project_root=str(root), output=str(out), engine_path=str(args.godot.resolve()), source_before=source_before, selected_source_map=selected["map"], - QA_overrides=[TEST], fixed_input_pins=fixed, + QA_overrides=[TEST], parse_paths=paths, fixed_input_pins=fixed, cache_run=str(args.cache_run) if args.cache_run is not None else None, import_mode="cache" if args.cache_run is not None else "fresh", engine_sha256=ENGINE_SHA256, engine=engine_descriptor, @@ -237,7 +262,9 @@ def main(): r.require(cache_input["engine_sha256"] == ENGINE_SHA256, "cache engine identity") old_map = cache_input["selected_source_map"] current_map = {n: p["sha256"] for n, p in source_before.items()} - r.require({k: v for k, v in old_map.items() if k != "tools/check_p04_order_evidence.py"} == current_map and len(old_map) == 1339, "immutable full cache: all 1338 product inputs equal; checker is not parsed/executed by product suites") + r.require(set(old_map) == (set(current_map) - {CHECKER}) | {CHECKER}, + "cache selection is exact product plus checker") + admission(old_map, {k: v for k, v in current_map.items() if k != CHECKER}, paths) protected = r.default_player(root) outer = module("s4_owned_outer", r.SUPPORT / "owned_outer.py") r.require(not outer.native.helper["live_engines"](), "another Godot owns CPU") @@ -297,8 +324,7 @@ def main(): r.write(out / "cache-reuse.json", dict(ended_run=str(old), receipts=cache_receipts, whole_cache=cache_before, independent_inode=True, ordinary_import_required=True, ordinary_parse_required=True)) - paths = ["res://" + n for n in sorted(refs) if n.endswith(".gd")] - r.require(len(paths) == 316, "complete 316-script parse roster") + admission(refs, product_refs, paths) r.write(out / "parse-paths.json", paths) markers = module("s4_markers", root / "tools/strict_test_markers.py") contracts = markers.load_contracts(root / shared.C_REL if fresh else CONTRACTS) @@ -377,7 +403,7 @@ def main(): # Fixed guard always follows ownership cleanup, even if setup or an engine failed. try: fixed_guard() - r.require(uid_snapshot(stage, uid_source, uid_plan_map) == uid_state["accepted"], "UID seal after cleanup") + cleanup_uid_guard(r, uid_snapshot, stage, uid_source, uid_plan_map, uid_state) r.write(out / "fresh-engine-checks.json", engine_checks) after = r.source_refs(root) r.write(out / "source_after.json", after)