feat(method): wave-protocol-runtime — streams.md merge-time fork-base + worker commits its report#7
Merged
Conversation
Tracks the deferred robustness half found during PR #6 review: the CLI rejects `gate <outcome> --flags <slug>` (flags before the optional slug positional) on Python <=3.12 across every optional-slug subcommand — argparse cannot bind an optional positional that follows value-taking flags (3.13+ intermixing fixed it). The test helpers were fixed to the natural order in 9d52302; the engine itself is left as-is and tracked here behind a future pin bump. Scaffold carries the repro + fix-direction in §0/§1 so it is actionable. author: Tin Dang
… + worker commits its report Amend the parallel-streams rubric (streams.md ×3) to close v19 wave deltas #7 and #8, so the concurrency protocol is satisfiable on a spawn-time-worktree runner and a worker durably persists its own report. Amendment A — merge-time fork-base shift: on a runner that creates each worktree AT spawn from a pool, the pre-spawn `rev-parse HEAD` evidence cell is unsatisfiable, so the `unverified_fork_base` check SHIFTS (it never skips) to worker step-0 (sync-to-base + re-echo), verified by the orchestrator at merge-time before merge-back. The pre-spawn rule stays the DEFAULT for fresh-HEAD-worktree runners; the merge-time path is an additive ALTERNATIVE. Amendment B — worker commits its report: the worker `<return>` contract now requires COMMITTING SUMMARY.md + deltas.md in the worktree (uncommitted files survive only by harness courtesy), so the serial-integration merge-back carries the worker's verdict. Bundle ran §1→§7 under risk:high · autonomy:conservative with red/green TDD: 4 token-presence + ×3-parity guards in test_streams.py (2 new-behaviour tests red before the build, 2 invariant tests green throughout). Full suite 843 OK on py3.10 AND py3.14. Tamper tripwire CLEAN (engine `_tripwire_divergence` -> []); §3 and test_streams.py byte-unchanged since the tests->build snapshot — the build touched only streams.md ×3. engine_pin HOLDS (prose-only, no add.py change). Human verify gate: PASS (green EARNED per the refute-read). The one residue is the freeze-approved deferred-enforcement flag: these guards lock the WORDS and the MIRROR, not engine EXECUTION of the shift (the engine can't see a worktree pool). Logged as the engine-merge-base-enforcement follow-up so the disclosed gap is tracked, not forgotten. author: Tin Dang
…3-named home (ledger evidence-cell) PR #7 careful review found Amendment A stated the merge-time fork-base shift in the "Design for failure" bullet but NOT in the ledger "Evidence cells, not ticks" paragraph — a same-file second mention that still read pre-spawn-only, so a reader of the ledger section alone would think a spawn-time-pool-runner spawn is impossible (the opposite of what A enables). Add one clause to that paragraph: on a spawn-time pool runner the pre-spawn paste is unsatisfiable, so the fork-base cell holds the worker's step-0 post-sync echo (still == base) and the `unverified_fork_base` refusal shifts to merge-time before merge-back — it shifts, it never lifts. WITHIN the frozen §3 — the contract named "the evidence-cell `unverified_fork_base` note" as a valid home and the freeze flag said "either spot is conformant". No test weakened, no contract edited, engine_pin HOLDS. streams.md ×3 re-synced byte-identical (md5 82e08b0d); full suite 843 OK on py3.10; dogfood check 256/0. A post-gate honesty note records that this text changed AFTER the PASS as a within-frozen-§3 merge-review refinement. author: Tin Dang
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.
What
Amends the parallel-streams rubric (
streams.md×3) to close v19 wave deltas #7 + #8, so the concurrency protocol is satisfiable on a spawn-time-worktree runner and a worker durably persists its own report. Prose-discipline change-request — noadd.pychange,engine_pinHOLDS.Amendment A — merge-time fork-base shift
On a runner that creates each worktree at spawn from a pool, the pre-spawn
rev-parse HEADevidence cell is unsatisfiable. Theunverified_fork_basecheck now SHIFTS (it never skips) to worker step-0 (sync-to-base + re-echo), verified by the orchestrator at merge-time before merge-back. The pre-spawn rule stays the DEFAULT for fresh-HEAD-worktree runners; the merge-time path is an additive ALTERNATIVE, never a replacement.Amendment B — worker commits its report
The worker
<return>contract now requires COMMITTING SUMMARY.md + deltas.md in the worktree (uncommitted files survive only by harness courtesy), so the serial-integration merge-back carries the worker's verdict.How it was verified (risk:high · autonomy:conservative · human gate)
test_streams.py— 2 new-behaviour tests red before the build, 2 invariant tests (pre-spawn rule preserved + ×3 parity) green throughout._tripwire_divergence→[]; §3 contract +test_streams.pybyte-unchanged since the tests→build snapshot (the build touched onlystreams.md×3).streams.mdcopies byte-identical (6ff3a544).Known residue (disclosed + tracked)
These guards lock the words and the mirror, not engine execution of the merge-time shift (the engine can't observe a worktree pool). Enforcement was explicitly deferred at the contract freeze and is logged as the
engine-merge-base-enforcementfollow-up task (anadd.pyguard on merge-back), so the gap is tracked, not forgotten.Files
add-method/skill/add/streams.md(+ ×2 mirror:.claude/skills/add/,_bundled/skill/add/) — the two amendmentsadd-method/tooling/test_streams.py—WaveProtocolRuntimeTest(4 guards).add/tasks/wave-protocol-runtime/TASK.md— the §1→§7 bundle record (PASS).add/tasks/engine-merge-base-enforcement/TASK.md— the deferred-enforcement follow-up.add/state.json— phase/gate/tripwire transitions