release: baton 1.3.3 — stable spawn id + run-trail de-dup (observed known-count PASS)#36
Merged
Merged
Conversation
…roposal Stable spawn id (from SubagentStart/Stop, the event that carries it) + ledger de-dup so multi-scope wiring doesn't double-count, with an OBSERVED known-count end-to-end run as the acceptance gate (a green writer unit suite is declared insufficient). No change to the enforcement contract — the id is for the trail/dedup/correlation, not the gate. Validates --strict. Proposal awaiting approval before implementation. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…observed known-count PASS Probe-first (design mandated it): a live probe of the real PostToolUse payload showed the spawn id IS present — tool_response.agentId (+ top-level tool_use_id) — so the null task_id was a WRONG-KEY extraction bug, not a payload limitation, and no SubagentStart/Stop hook is needed. - Extract the id (tool_response.agentId -> tool_use_id -> old fallbacks) in record_lane_spawn.py and ledger.py (kept in lockstep; a twin test pins it against drift — review R1). - ledger.py: race-safe first-writer-wins de-dup via O_CREAT|O_EXCL per-id marker (_ledger_seen/<id>), so a spawn double-fired under multi-scope wiring (project + global) yields exactly ONE lane line; no id -> never drop. Enforcement unaffected: the id stays a SECONDARY match to non-generic subagent_type (it's model-visible, so forgeable), never the sole certifier. OBSERVED acceptance (real dispatch, this double-wired repo): 3 lanes (implementer/code-reviewer/ researcher) -> exactly 3 lane lines, each carrying its real agentId; dedup collapsed the double-fire. So items 1-4 of the known-count gate now pass end-to-end, not just the writer unit suite. Independent cold-read review: PASS, no blockers (40-process race stress green; enforcement selftest green). Full smoke green (9 hook self-tests, hooks-e2e 23). openspec add-ledger-spawn-id-and-dedup updated to the probe finding; validates --strict. Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
Patch release (1.3.2 → 1.3.3). Closes the run-ledger fidelity gaps an end-to-end verification surfaced, verified by an observed firing on a real routed session (not a writer unit pass). No change to the frozen 1.0 contract or the enforcement gate.
What it fixes
PostToolUsepayload showed the id is present attool_response.agentId(+ top-leveltool_use_id) — the earlier nulltask_idwas a wrong-key extraction bug, not a payload limitation, so no new lifecycle hook was needed. Recorded in bothrecord_lane_spawn.pyandledger.py; stays a secondary signal to non-genericsubagent_typein the deriver (a model-visible id never solely certifies a specialist).O_CREAT|O_EXCLfirst-writer-wins marker keyed on the id (verified under 40-process contention). N routed lanes → exactly N lines even multi-wired.Observed acceptance (the gate)
Real dispatch — implementer + code-reviewer + researcher → exactly 3 lane lines, each with its real
agentId; de-dup collapsed the double-fire. Your known-count items 1–4 pass end-to-end, not just the writer suite.Verification
add-ledger-spawn-id-and-dedupupdated to the probe finding; validates--strict.🤖 Generated with Claude Code