Skip to content

fix(station): eliminate title-nudge race in mb-live-station and runner exit race in claude.test - #8919

Merged
CommaBot merged 1 commit into
mainfrom
fix/test-mb-live-station-title-race
Nov 26, 2026
Merged

CommaBot merged 1 commit into
mainfrom
fix/test-mb-live-station-title-race

Conversation

@CommaBot

@CommaBot CommaBot commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Root causes

  1. station/test/mb-live-station.test.ts (a release with no Node: a relay enrolled by an agent's token on the station's door, listed and revoked) (failed on fix(mesh): bump noq-proto so a discarded path 0 no longer aborts the front #8847 run 45866338282 / job 140079184248):

    • fakeClaude called chat_post without a title, causing the station to trigger an asynchronous its chat has no title; asking it to name it turn right after turn 1 (enroll).
    • That unsolicited title-nudge turn raced with call 2 (list) writing $FAKE_OUT/extra and posting relays 2, claiming extra.<sid>.2 on the title nudge and leaving relays 2 as an unread message that caused subsequent chat_post calls to be held back (turn ended without a state; nudging attempt=1), hanging call 3 (revoke) until the 60 s until timeout.
    • Fix: pass "title":"fake chat" on turn 1 ($n = 1) in fakeClaude's chat_post call so no unsolicited title-nudge turn fires.
  2. station/test/claude.test.ts (a TUI turn is taken up after handover and its next input reaches the same terminal, C21) (failed on perf(station): keep Readers.retireMismatchedIdle stat-free on Pion hot path #8916 pion-station run 45869169521 / job 140083918232):

    • After taken.abort() and closed, the test returned and after() ran drivers.map(d => d.shutdown()) + rmSync(data) without waiting for the stillfail-runner OS process to finish exiting, tripping the test harness orphan-process check (left running after its tests (ended now): stillfail-runner --id claude-slack_T1_C21_...).
    • Fix: capture the adopted session's stillfail-runner PID(s) and wait for them to exit (process.kill(pid, 0) -> ESRCH) after closed, and wait for all existingRunners(data) PIDs to exit in after() before removing data.

Verification

  • pnpm --dir station exec tsgo --noEmit passed (0 errors).
  • node scripts/native.ts run mesh runner launcher reader -- sh -c 'cd station && node --import ./test/setup-env.mjs --test test/claude.test.ts': 28/28 passed in 1.3 s with zero leaked runner processes.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@CommaBot
CommaBot merged commit fc8a3e8 into main Nov 26, 2026
81 checks passed
@CommaBot
CommaBot deleted the fix/test-mb-live-station-title-race branch November 26, 2026 18:13
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