Repository navigation
Conversation
ymichael
deleted the
bb/ci-flake-fix-runtime-restartrecommended-recovery-thr_apec7qjf5m
branch
August 25, 2026 00:06
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.
What was wrong
The real-process recovery suite launched both the provider bridge worker and the scripted-echo bridge from TypeScript source, so every
restartRecommendedreplacement process paid the sametsxtransform/import cost again. Under package-shard CPU contention, the runtime had already shut down the original bridge and registered the replacement child, but the replacement had not reached the bridge's top-levelspawnlog or answeredthread/resumebefore the tests' unchanged 5-second hang detector expired. That one startup path caused both same-SHA signatures in CI attempt 2 and attempt 4; the polling-order bug fixed by #2352 was not involved.What changed
@bb/agent-runtime#generate:test-bridgestask that bundles the real provider bridge worker and real scripted-echo bridge once per test run.The tests still exercise real child-process shutdown, replacement, Provider Bridge Protocol initialization, and
thread/resume; no timeout, retry budget, assertion, product behavior, or wire contract changed, soHOST_DAEMON_PROTOCOL_VERSIONis unchanged.How you verified
processLog=[spawn:<old pid>,...,exit:<old pid>],resumedThreadIds=[], andrunningProviders=[fake]: the replacement child existed but was still before bridge top-level startup.pnpm exec turbo run test --filter=@bb/agent-runtime --force -- 'src/runtime.recovery.test.ts' -t 'restartRecommended: an idle thread|restartRecommended read while'— 1 file, 2 tests passed.pnpm exec turbo run build typecheck test --filter=@bb/agent-runtime --force— 7 Turbo tasks passed; 22 files / 318 tests passed.pnpm exec prettier --check packages/agent-runtime/package.json packages/agent-runtime/scripts/build-test-bridges.mjs packages/agent-runtime/src/test/runtime-test-harness.ts packages/agent-runtime/vitest.config.ts turbo.jsonandgit diff --check— passed.Fixes: no issue — repeated exact and broad open GitHub issue/PR searches returned no matches, and the only exact bb thread match was this worker.