Repository navigation
fix(board-transition): the run is a binding identity; edge-verbs probe by mtime (board ticket 34) - #113
Merged
Conversation
…ssion The dp#63 fence recognized an owner by session id alone, so the caller the record itself names — a worker driving the protocol from a second shell, a resume of the run into a fresh session, every integration drill — was refused on its own ticket. The run bearer is the client's principal now, so a caller holding run N's bearer is run N wherever it runs; the fence matches the record's run_id against the run this process speaks as, resolved lazily on the would-refuse path. A different run, and no run context at all, stay fenced.
leak_probe diffed a full pre-listing of the shared temp directory against a post-listing with grep -vxF -f — quadratic on a directory holding six figures of entries, tens of minutes for a probe looking for at most one file. A marker file stamped before the verb runs and find -newer answers the same question in one pass; the fixture log, which the pre-listing absorbed for free, is excluded by name. Suite wall time: ~5.5s.
…nswer An orphaned spawn — a session registered before the bind landed — is no longer left live: it can never speak for its run, so the reconciler retires it, releases the run and lets the ticket be dispatched afresh. The drill still pinned the older answer (not ended, run keeps the ticket, no second spawn) and failed on all three.
…loses A scripted worker is a meta and a transcript, never a session, so nothing in this tier takes it out of `working` — in production the next tick's `sminos sync` does, the moment the turn finishes. The fence reads exactly that field, so the walk's closing human transition was refused by a worker whose run had already ended. drill-lib grows end_turn for it.
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
Board ticket 34 (P2). Two independent fixes:
board-transition.sh's dp#63 fence (only the binding owner may move a ticket held by a live mid-turn worker) identified the owner by session id alone. Since ticket 35 the run bearer is the client's principal identity and the server derives the actor from it, so a caller whose resolved run (_board_api.run_context()) equals the record'srun_idis now the owner too. A different run, a human with no run context, and gh mode keep today's behaviour; the override is unchanged. This is what let five integration drills — which drive the worker protocol from the harness holding the run's bearer — fail on the fence.test-edge-verbs.sh's spool probe compares by mtime. It diffed two full listings of the temp directory, quadratic on a directory with 100k+ entries (this Mac: ~167k, tens of minutes). It now touches a marker and lists files newer than it. The suite runs in about 5 seconds.Two drill-side repairs surfaced once the fence let the drills run:
test-crash-boundaries.shcase (f) still pinned the pre-ticket-35 reconciler answer for an orphaned spawn (now retire, release, re-dispatch), andtest-protocol-walk.shnever ended its scripted worker's turn before the closing human transition;drill-lib.shgainedend_turn, mirroring whatsminos syncdoes in production. No product code was touched for either.Design:
.doperpowers/direct/integration-drill-fence/brief.md.Review
One codex review round (
gpt-5.6-sol): no findings. The reviewer's summary: the run-identity fence is scoped to the current board and repo, preserves existing session and override behaviour, and remains backed by server-side bearer and fence validation; the test updates match current reconciliation and scripted-turn behaviour.Tests
tests/claude-code/board-api/— 16/16 suites PASS one at a time. The fence gained cases: a foreign session holding the record's run may transition; a different run is refused with the dp#63 message and nothing on the wire; no run env is refused as today; the self-location form (own seat record, no env) still passes.ARKHO_DIR, real board-service on scratch Postgres): all 9 drills PASS, no skips — the first time the whole integration tier has been green. This also exercises ticket 36's keyed-store path changes totest-protocol-walk.shandtest-escalation.shfor the first time.tests/issue-tracker/test-board-scripts.sh,test-board-sweep.sh,tests/claude-code/run-skill-tests.shgreen.