Repository navigation
api tick: a successor fresh-spawn starts from the predecessor's commits, not from main - #153
Conversation
…ts; bump 7.87.0 The resume ladder's recovery premise is that a reclaimed worker left origin-visible artifacts. Nothing made that true: no worker protocol gates on pushing, and a fresh successor is spawned into a NEW worktree branched from the base ref, so committed-but-unpushed work is unreachable from where the successor stands and gets redone from the top (arkho #17: four committed milestones, recovered by hand). The tick can see what the successor cannot — the predecessor's worktree is on this host and its meta names it. On the fresh-spawn leg only (a resumed session is already sitting in that worktree), the tick now resolves that worktree, and when its branch is ahead of the base ref pushes it under its own git identity and names the branch and head in the bootstrap. A failed push still names the local worktree: the successor runs on the same host and can fetch from it directly. Uncommitted changes are named, never committed — what a half-finished tree means is the worker's judgment. The other half, in implement-worker-protocol.md: one sentence asking workers to push each commit, so the origin-visible premise holds without the rescue. A default with its reason, not a gate. Drills in test-sweep-resume.sh cover three shapes — ahead of the base and dirty, level with the base, and a push that cannot reach its remote — and run the recommended fetch-from-a-linked-worktree command rather than asserting the sentence that recommends it. The suite's sminos stub now files spawned metas under $DAEMON_HOME (what the real CLI does) so a drill on its own registry sees the bind land.
`_predecessor_work` declared `local name`, which the fresh-spawn caller also holds — the successor's seat name. Bash restores it on return so nothing broke, which is precisely what made the collision worth removing rather than leaving for the next reader to re-derive. Renamed to `wtname`. Also: the test stub's resume arm now says why its registry READ follows $DAEMON_HOME while its artifact SINK does not (every *.json under a registry is read back as a seat meta, and a drill does not want its own artifact in its own scan), and the push line says why git's chatter goes to stderr — on stdout it would land inside a worker's prompt.
The marketplace updates by version number alone, so a feature merged under a number the cache already holds never installs. 7.87.0 was claimed by main's 7.88.0/7.89.0 run (and by the in-flight #58 branch); this clears both.
Fix wave for six review findings on the successor-rescue path. The rescue itself is unchanged in intent; what changes is what it is willing to do unattended, and what it hands a worker to run. Bounded (P1). GIT_TERMINAL_PROMPT=0 refuses an interactive credential prompt and nothing else — it puts no deadline on DNS, a connect, an SSH handshake, a credential helper, or a remote that accepts and then stalls. The push now runs under BOARD_PUSH_TIMEOUT (60s default, validated and clamped beside RELAY_RESUME_TIMEOUT, which bounds itself for the same reason) through python3's subprocess deadline, since timeout(1) is not on stock macOS. The child is killed on expiry: a push still talking to a sick remote is what holds the whole-tick lock that starves renewal, relay, recovery and dispatch. Scoped to this repo (P1). The meta's `cwd` is a claim, not a proof — stale or reused, it resolves to a shared checkout or a neighbouring repository, after which the tick pushes a repo it does not govern under its own credentials. The candidate must now share a git common dir with the repo the successor is spawned into, which is the identity _binding.sh already resolves a board through. Scoped to the dispatcher's branch (P1). HEAD is whatever the predecessor last checked out. A worker that switched its worktree to main, a release branch, or a colleague's would have had it published past the PR path. Only worktree-<sanitized name> is pushed; anything else is still NAMED for the successor via the local-worktree route, so the work is withheld from origin without being withheld from its heir. This also makes the ref shell-safe by construction — git accepts `;` and a backtick in a ref name. Escaped (P1). Every value interpolated into a command the worker is told to run is single-quoted through _shq. A repo path may contain a space, which breaks the command silently; a ref may contain metacharacters, which changes it silently. The drills now lift the emitted `git fetch` line out of the captured prompt and eval it, rather than hand-writing a fetch that would only test the drill's own quoting — and one fixture's repo root contains a space, so the quoting is load-bearing rather than decorative. Dirty trees, with or without commits (P2). The status read moved ahead of the ahead-of-base gate. A worker reclaimed before its FIRST commit is the ordinary early death and the one shape no push can help; read after the gate, that tree went unmentioned and its successor could not weigh salvaging it. It now gets a short block naming the worktree and how to read it — no push, no fetch. Dangling origin/HEAD (P2). symbolic-ref succeeds for a remote default branch since renamed or deleted, and an unverified answer poisoned the whole function rather than falling through. The symbolic target is now just the first candidate in the same verified chain as origin/main, origin/master, main, master. Drills: the predecessor worktree is now built inside the board repo in every case, because a fixture standing in an unrelated repo would prove the new common-dir refusal works while claiming to prove the rescue does. Six shapes covered — ahead (+dirty), level and clean, dirty with no commits, push that cannot reach its remote (from a path with a space), a foreign repository, and a worktree switched off its branch. rboard takes an optional repo root so one drill can choose a path a mktemp never produces. Version held at 7.90.0.
The block fires whenever nothing is ahead of the base — which includes a repo where _base_ref resolved no base at all. There the predecessor may well have committed; only the yardstick is missing, so "committed nothing" asserted something false to an agent that acts on it. Reworded to what the tick knows, with the reason recorded at the gate that produces the case.
…onfig blocks); bump 7.95.0
Review trail — PR #153 (ticket #59)Outcome: this PR merged while its review was still in its first fix wave. Reviewed head: Engine roundsOne round, three parallel runs — codex
No run failed. Union after collapsing duplicates: 10 distinct findings. A second engine round was not run: by the time the wave was graded, the Compliance auditVerdict: no PROTOCOL BLOCKER, no SPEC FINDING. DIRECT mode, anchored on the
Closing artifact: Evidence verified independently, on the reviewed head:
AUDIT NOTES (trail only, never merge blockers):
Findings and dispositionsAll eight WAVE items: FIXED, graded, accepted — and not landed here.
W1-1's open question was settled against the bundled CLI rather than assumed: Deferred findings
Environmental friction
Why nothing was pushed hereAt the push gate, Ticket #59 → |
…81.1; log PR #153's two deferred rescue findings
sweep: re-land PR #153's eight review fixes to the predecessor rescue, and one more (7.181.0)
MW1 machine half (sminos 1.11.0): reviewed clean (medium, both halves), ci-gate GREEN 8/8 (run 40284656890). MAWS #153 merged first (320257391). Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
The hub reduction moves ahead of the transport's removal (M4 before M5), as sminos_hub, test-hub and on_legacy_key use the transport's helpers. Acceptance 2 fixes the RL10 suites' assertions and MAWS's frames, with an enumerated mechanical migration, not their bytes. Two-machine behaviours get real-sminos compositions (MAWS's e2e:remote runs a fake sminos); open latency gets an RL10 replacement before its instruments go; the recovery of persisted Resume/Retire/Stop claims stays, tested on RL10. M3 splits into five batches; the release's evidence is M8. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…rollment (M4); the DX2-only assertions allowed to go are listed Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
The desk refuses DX2 enrollment and every machine's enrollment is its MAWS endpoint's, so devcloud calls no `sminos hub` verb any more: - step 11 enrolls nothing (sminos_host.enroll, the one-time code file and the enrollment's deferral go); a host is a sminos machine once cut over (identity.json) or while it provisions its endpoint, and a stray hub.json makes nothing enrolled, for the daemon, the notices and the departure alike; - the departure's `hub leave` arm goes: a machine with no certified endpoint is "not enrolled"; - the v1 desk key is refused by name, as `[desk] provisioning_secret` in the driver profile and as DEVCLOUD_SMINOS_SECRET in a boot descriptor; - `vm up --enroll-code` and its delivery go; - the devcloud-enroll service finishes step 13's deferral alone. The stand-in sminos plays no `hub` verb and records any verb it does not play, so the systemd integration case proves a boot and a departure ask none. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
LocalHub, make_hub and DESK_HUB leave test_session_plane, test_rpcs and test_policy_requests: their Uplink classes run on the hub stand-in, the only mode CI ever selected, and each branch keeps its stand-in arm as it was. bench_rig's Local, LocalBrowser and free_pair go, and bench_open's --hub and --maws; ws_client.py, the local hub's browser client, goes with its last users. bench_open's `held` ran on the local hub alone: it is refused at the command line until M5 removes it with --uplink. Counts unchanged: test_session_plane 270 (2 Linux-only skips), test_rpcs 162, test_policy_requests 57. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ection logged Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…#153 M1) A live VM an older driver made (dc-linux171-1e68) still carries DEVCLOUD_SMINOS_SECRET in its boot.env, so refusing the key would fail its next boot or reconcile. The host now ignores it, and each run says so once ("boot descriptor: ignoring DEVCLOUD_SMINOS_SECRET, …"). The driver keeps refusing the v1 `[desk] provisioning_secret`, so no new host gets it. The systemd integration VM's boot.env names the key, and its reconcile proves the line and no failed step. TECH-DEBT: the v2 delegation code's expiry (about 2027-01-26) points at MAWS board #512, where the v1 key's row was. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
The uplink's HTTP/SSE transport goes (Stream, Sender, dial, post and the rest of map §1.1's (a) list, run_dx2, load_credential, credential_path), with cmd_uplink's credential branch and the daemon's credential_bytes, LEFT_THE_HUB, the dx2 arms of uplink_wanted and uplink_change and uplink_status's hub.json line. A machine with no identity.json starts no uplink, whatever a stray hub.json holds; hub.json's one reader is the endpoint's legacy-key?. The tests of the transport alone go with it: hub_standin.py, pause_proxy.py, bench_codes.py, the DX2 arms of bench_rig, bench_open (--uplink, held), bench_scale (run and opens without --rl10, now the default) and measure_pages part 2, and the DX2 classes and runs of test_session_plane, test_rpcs, test_policy_requests, test_withheld, test_reach, test_scale and test_visibility. Each shared behaviour keeps its RL10 test (the M3 checklist); two Lifecycle twins are added on RL10's SocketLane. test-uplink is RL10 throughout, and pins the supervisor's wait on a machine with a hub.json and no identity.json. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…the control socket's Stream Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
sminos speaks RL10 alone, so every `coded` branch takes its RL10 arm and the DX2 one goes: HubLog's seals, nonce index, ask-wait pause and coded take; the Rpcs key, kinds and DX2 checks; the coded Requests and outcome messages; the Plane's host/launches/kinds switches; Link's handler split and DX1 welcome; sminos_codes' MAC half. Resume, Retire and Stop stay offered and refused `unsupported` as on RL10; their admission and execution, steer without a bridge, and live-resume/live-stop-check go, while the recovery of a persisted claim (reconcile, trace, launched_by) stays. The M3a twin pairs collapse onto their RL10 classes, names kept. New: an RL10 test of a SocketLane past its send bound ending the connection. Acceptance 2's suites change only by the dropped `coded` argument, the sealed-outbox test's DX2 halves, test_visibility's RL10_ONLY/RPC_NAMES assertions and test_rl10's nonce-index patch; the conformance replay is 107 ok before and after. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ndpoint; machines' DX2 branch out (#153 M7) AGENT_ID.match admitted a trailing newline at subscribe's check; it is fullmatch now, as everywhere else, with a test. hub_here's hint, machines' not-enrolled line and the usage say mawsd endpoint enroll, and cmd_machines loses its online/last-seen branch, which no enrolled machine reaches since the enrollment is identity.json alone. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…one (#153 M7) The uplink's docstring is rewritten around the endpoint's socket and its one lane; the daemon, hublog, requests, owed, rpc, plane, rl10, codes and audience docstrings lose the HTTP sender lanes, POST answers, DX1 codes and the hub's stream. Log lines that said POST say write. run_suites' labels name what each file tests now, and fake_claude.py loses the reopen-first, no-hold and resumes.log branches no surviving test reaches. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…out of the docs (#153 M7) scripts/CLAUDE.md's hub-project and cutover paragraphs describe RL10 alone; setup.md's desk-hub section points at mawsd endpoint enroll and the first welcome; SKILL.md's description and Setup pointer drop hub enrollment. README, whats-inside and INSTALL say the hub is reached through the endpoint. TECH-DEBT drops the uplink POST deadline, the many-projects POST and the hub stand-in's mute entries, and logs board #149's residue against the RL10 lane. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…g alone (#153 M7) Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ctory's age is the endpoint's, Link.open without DX2's gate (#153 M7) - Plane.read: READ_WHAT.fullmatch, so "mcp\n" is passed by (FrameChecks). - org_age_line: one line, the endpoint's; projects reached the stream's arm without an enrollment check (a test on an undone cutover). - Link.open, report, reported: one write, its continuation once written. - hub show's usage: the latest welcome. Three long docstring lines wrapped. - test_policy_requests' restated barrier counts only a connection opened after the mark, so an old connection's late restated cannot satisfy it. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…s's reset names provisioning alone (#153 M7) Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Closes #59
The API tick's resume ladder recovers a ticket whose run the board reclaimed: it
claims a successor run, tries to resume the predecessor's session, and on failure
fresh-spawns a new worker. That fresh worker gets a new worktree branched from
the base ref — so a predecessor's committed-but-unpushed work is not merely
unfetched, it is unreachable from where the successor stands, and the successor
redoes it from the top.
Observed live on arkho #17: four committed milestones on an unpushed worktree
branch, recovered by hand. The ladder's premise is "origin-visible artifacts";
nothing made that premise true for the Executor lane.
What changed
skills/issue-tracker/scripts/_sweep_api.sh—_predecessor_workresolvesthe predecessor's worktree from its registry meta, pushes its branch when there
is something to rescue, and appends a block to the successor's bootstrap naming
the branch, its head, and how to take those commits onto the successor's own
branch. Wired into the fresh-spawn leg only: a resumed predecessor session is
already sitting in that worktree.
Supporting helpers:
_base_ref(what "ahead" is measured against, verifiedrather than assumed),
_common_dir(repo identity),_shq(POSIX single-quoting),_push_bounded(the deadline).Four properties are load-bearing, and each exists because of a specific way the
naive version is wrong:
cwdis a claim,not a proof — stale or reused, it resolves to a shared checkout or a
neighbouring repository just as happily. The candidate must share a git common
dir with the repo the successor is spawned into, or nothing is pushed and
nothing is named.
HEADiswhatever the predecessor last checked out. A worker that had switched to
mainor a release branch would otherwise have that pushed to origin by anunattended process, straight past the PR path. On a mismatch the work is
withheld from origin without being withheld from its successor — the block
still points at the local worktree. This also makes the ref shell-safe by
construction, since the worktree name is sanitized to
[a-zA-Z0-9._-]whilegit itself accepts
;and backticks inside a ref name.BOARD_PUSH_TIMEOUT(60s, validated and clamped,sitting beside the existing
RELAY_RESUME_TIMEOUT) via python3's subprocessdeadline —
timeout(1)is not on stock macOS. The tick holds the whole-ticklock throughout, so a push stalled on a sick remote would starve lease
renewal, relay, recovery and dispatch alike.
GIT_TERMINAL_PROMPT=0handlesthe credential-prompt case; it does not impose a wall clock, which is why the
deadline is separate.
commands, so
_shqsingle-quotes each interpolation. A repo path with a spacesilently breaks the fallback; a ref name with a metacharacter silently changes
what the command does.
Uncommitted changes are named, never committed — what a half-finished tree means
is the worker's judgment, and a dispatcher that committed it would forge
authorship on work nobody reviewed.
skills/issue-tracker/references/implement-worker-protocol.md— one sentenceasking workers to push each commit, so the origin-visible premise holds without
the rescue. A default with its reason, not a gate. This mirrors what
architect-worker-protocol.md:131already says for the plan commit; the Executorlane was the one that never said it.
Validation Evidence
bash tests/claude-code/board-api/test-sweep-resume.sh→PASS. 31 new assertions: ahead-of-base (+dirty), level and clean, dirty with no commits, unreachable remote from a path containing a space, foreign repository, worktree switched off its branch.git -C <bare origin> branch --list/rev-parsedirectly, not the tick's own log.sedthegit fetch …line out of the captured prompt andevalit, assertingFETCH_HEADis the predecessor's head. One such case sits at a path containing a space, which unquoted splits into two arguments.nton that repository's branch list and on the bootstrap. The earlier fixture used unrelated repos and so demonstrated the hole while claiming to demonstrate the rescue; predecessor worktrees are now built inside the board repo._shqround-tripped independently againstwith space,it's,a;echo PWNED, backticks,$(…),$HOME,a&&b,multi'quote'ish— eachevals back byte-identical.git checkouttrap were caught.scripts/lint-shell.sh --all→ exactly 8 findings before and after, none in_sweep_api.sh.scripts/bump-version.sh 7.90.0, all four manifests in sync, audit clean.bash tests/claude-code/run-skill-tests.sh→ 21 passed / 1 failed / 9 skipped. The failure istest-subagent-driven-execution.shTest 7, is pre-existing and unrelated, and is filed as #65 — see below.tests/issue-tracker/:test-protocol-content.sh,test-board-sweep.sh,test-execute-dispatch.sh,test-board-scripts.sh,test-board-gc.sheachall tests passed.About the one failing test
test-subagent-driven-execution.shTest 7 asserts that the SDE controllerprovides task text directly (
provide.*directly\|full.*text\|paste\|include.*prompt).The skill no longer works that way:
skills/subagent-driven-execution/SKILL.md:43extracts a brief with
scripts/task-briefand:165-168make the brief paththe dispatch payload. So the correct answer is "by file", which the assertion
rejects.
It reads as flakiness because the assertion is a regex alternation over a live
model's free text — it passed twice and failed twice across four consecutive
full-suite runs on this branch. It is not caused by this branch:
git diff --name-only origin/main...HEADlists seven files, none of them SDE.Filed as #65 rather than fixed here — it is outside this diff and the fix is
a judgment call about a skill-behavior test, which this repo gates deliberately.
Confusions
sminosstub hard-coded the registry it was written beside, whilethe real CLI files records under
$DAEMON_HOMEand the sweep hands each childits own. Harmless until a drill runs on its own registry — mine run one apiece
— at which point the spawned meta lands where the bind will not look for it.
The stub now follows
$DAEMON_HOME, which is also the more faithful shape. Itsmeta-at-resume.jsonsink deliberately stays fixed: every*.jsonunder aregistry is read back as a seat meta, and a drill does not want its own
artifact inside its own scan. Both are commented at the site.
mainreached 7.89.0 while this branch was in flight, so the bump moved7.87.0 → 7.90.0. The in-flight api tick: recover a bound worker whose turn died on a harness error #151 (ticket fix(triaging-feedback): dp#8 ultrareview — fence the raw feedback quote (6 of 7 findings overtaken by the ticket-only redesign) #58, same file) still claims
7.87.0, which would merge as a version downgrade; noted on that PR. The two
branches'
_sweep_api.shhunks do not overlap — only the four versionmanifests should conflict.
board-search.shis claim-gated for run bearers (arkho#12), so thepre-registration seam search for dp#51 deferrals + dp#60: meta opener walk, qagent returns, typed claim recovery, truncation guards, render fences (v7.51.0) #65 could not be run from this session.
Scope note
The dirty-tree-with-no-commits case is a small, deliberate extension past the
ticket's Shape, which conditioned everything on the branch being ahead of the
base. A worker reclaimed before its first commit is the ordinary early death and
the one shape no push can help; leaving it out would have shipped a rescue that
misses it. It gets a short block naming the worktree — no push, no fetch
instructions.
FOLLOW-UPS: #65