P5: stabilize proof barriers and post-run hygiene - #39
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stabilize the required P5 multi-worker proof without changing production runtime or authority semantics.
Accepted base:
bf15e7abf7f2abdab8ab52eab1344c17e96a200fFinal head:
aa2887f1ab260115da2a619d9cb48226cc6edd66Final tree:
b61488d7249bb1192ce86adb4814e5c27c9977c5The failures were in deterministic proof orchestration, not the lease/fencing implementation:
claim.before/claim.resultschedule while a worker was already insideclaim_next_run, so the worker skipped the new before hook but consumed the new result hook.multiprocessing.Arraymutex, deadlocking controller diagnostics.Changes
claim_next_runcycle with a shared claim-cycle lock.RawArray; each slot has exactly one writer.idle_in_transaction_count.Changed files remain limited to proof scaffolding, tests, documentation, and its CI wrapper:
.github/workflows/ci.ymldocs/p5-multi-worker-recovery-proof.mdexamples/p5_multi_worker_proof.pyexamples/p5_proof_worker.pytests/test_p5_multi_worker_proof.pyNo
runtime_service/production code changed. No cloud SDK, AWS resource, AWS API, apply, or destroy is involved.Red-before-green evidence
Each relevant fix was independently reverted and the corresponding regression went red:
A separate cross-process generation stress probe completed 200 generations.
Local verification
git diff --check: passThe final proof-only synchronization refinements were not followed by another local full-suite run. The final head's GitHub
test (3.11)andtest (3.12)jobs are both green.Final-head CI evidence
Workflow run: 32965043620
The first final-head attempt was fully green across all eight jobs, including PostgreSQL conformance, PostgreSQL mutation proof, action recovery, P5 proof, and P5 mutation proof.
Because the defect was timing-sensitive, the P5 chain was then rerun twice without changing the head or tree. All three independent samples passed:
Each P5 proof log records S1–S8 as passed and a summary of
{"failed": 0, "passed": 8}. Each dependent mutation log records P5M01–P5M09 as killed.Earlier commits/runs on this branch include genuine failed diagnostic attempts that exposed the races above. They are intentionally retained as history; the final-head claims use only the SHA/tree and job IDs listed here.
Scope
This PR remains separate from #38 so the portable-substrate contract stays independently reviewable. It repairs the repository-level P5 evidence gate that blocked later P6 work; it does not broaden P6 scope and does not authorize a merge or any real AWS action.