Skip to content

fix(board-transition): the run is a binding identity; edge-verbs probe by mtime (board ticket 34) - #113

Merged
SSFSKIM merged 4 commits into
mainfrom
integration-drill-fence
Sep 5, 2026
Merged

SSFSKIM merged 4 commits into
mainfrom
integration-drill-fence

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

Board ticket 34 (P2). Two independent fixes:

  1. The run is a binding identity. 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's run_id is 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.
  2. 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.sh case (f) still pinned the pre-ticket-35 reconciler answer for an orphaned spawn (now retire, release, re-dispatch), and test-protocol-walk.sh never ended its scripted worker's turn before the closing human transition; drill-lib.sh gained end_turn, mirroring what sminos sync does 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

  • Hermetic: 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.
  • Integration (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 to test-protocol-walk.sh and test-escalation.sh for the first time.
  • tests/issue-tracker/test-board-scripts.sh, test-board-sweep.sh, tests/claude-code/run-skill-tests.sh green.
  • shellcheck clean on every touched shell file.

…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.
@SSFSKIM
SSFSKIM merged commit e382503 into main Sep 5, 2026
@SSFSKIM
SSFSKIM deleted the integration-drill-fence branch September 5, 2026 07:37
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.

1 participant