Skip to content

feat(method): wave-protocol-runtime — streams.md merge-time fork-base + worker commits its report#7

Merged
pilotspacex-byte merged 3 commits into
mainfrom
feat/wave-protocol-runtime
Jun 11, 2026
Merged

feat(method): wave-protocol-runtime — streams.md merge-time fork-base + worker commits its report#7
pilotspacex-byte merged 3 commits into
mainfrom
feat/wave-protocol-runtime

Conversation

@pilotspacex-byte

Copy link
Copy Markdown
Contributor

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 — no add.py change, engine_pin HOLDS.

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. The unverified_fork_base check 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)

  • Bundle ran §1→§7 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 (pre-spawn rule preserved + ×3 parity) green throughout.
  • Full suite 843 OK on py3.10 AND py3.14 (CI-version run, per the PR feat(method): ground phase · ground-context · verify-integrity (foundation fv25→27) #6 lesson).
  • Tamper tripwire CLEAN — engine's own _tripwire_divergence[]; §3 contract + test_streams.py byte-unchanged since the tests→build snapshot (the build touched only streams.md ×3).
  • Earned-green refute-read: green is EARNED, not gamed — substantive mechanism prose (WHY the cell is unsatisfiable, the step-0 sync + merge-time verify, "it never skips"), not keyword-stuffing.
  • ×3 streams.md copies byte-identical (6ff3a544).
  • No security finding (markdown ×3, no secrets/injection/deps).

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-enforcement follow-up task (an add.py guard 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 amendments
  • add-method/tooling/test_streams.pyWaveProtocolRuntimeTest (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

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
@pilotspacex-byte pilotspacex-byte merged commit 45b2010 into main Jun 11, 2026
3 checks passed
@pilotspacex-byte pilotspacex-byte deleted the feat/wave-protocol-runtime branch June 11, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants