Skip to content

Separate declaration key coverage from lifecycle startup - #2356

Merged
ymichael merged 1 commit into
mainfrom
bb/ci-flake-fix-runtime-changed-declaration-bridge-thr_xb85zm8fai
Aug 24, 2026
Merged

Separate declaration key coverage from lifecycle startup#2356
ymichael merged 1 commit into
mainfrom
bb/ci-flake-fix-runtime-changed-declaration-bridge-thr_xb85zm8fai

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

What was wrong

PR #2084 removed avoidable TypeScript fixture transforms from this test, but the unified provider-harness work in #2325 later moved it back onto the TypeScript scripted-echo bridge while preserving three serial real-process launches. The packages shard makes each tsx-backed startup compete with many other workers; the redundant third launch pushed the test over its unchanged 15-second cap. Under controlled contention, the request log reached the third process's initialize request but timed out before its thread/start request, confirming cumulative process startup as the cause rather than a polling deadline. No bridge process remained after the timed-out worker exited.

What changed

Successive capability-declaration fingerprints at one artifact hash now have deterministic coverage in bridge-launch-process-key.test.ts. The end-to-end lifecycle test retains the minimum real-process boundary: two equal declarations share one initialized bridge, then one changed declaration initializes a distinct second bridge. This keeps assertions for hangs, process reuse, and process distinction while removing the third serial launch. The 15-second timeout is unchanged. This is test-only; there is no production, wire, CLI, guide, or protocol-version change.

I rejected a timeout increase because scheduler contention is only the reproduction condition. I also kept two real bridges instead of replacing the lifecycle boundary with an injected process factory, because two processes are the minimum needed to prove end-to-end distinction.

How you verified

  • Unchanged baseline, unloaded: focused test passed in 596ms.
  • Unchanged baseline under 192 and 384 CPU competitors: passed in 7.484s and 11.895s.
  • Unchanged baseline under 576 CPU competitors: reproduced the exact failure at 15.009s with Test timed out in 15000ms.
  • Changed test under the identical 576-competitor condition: passed in 11.052s with the same timeout; no scripted bridge process remained afterward.
  • Changed test, unloaded: 330ms; 10/10 fresh Turbo/Vitest repetitions passed (about 0.31s when reported).
  • pnpm exec turbo run test --filter=@bb/agent-runtime --force --output-logs=full -- src/bridge-launch-process-key.test.ts (2 passed).
  • pnpm exec turbo run test --filter=@bb/agent-runtime --force --output-logs=full -- --project '@bb/agent-runtime:isolated' src/runtime.process-lifecycle.test.ts (35 passed).
  • pnpm exec turbo run test --filter=@bb/agent-runtime --force --output-logs=full (21 files, 317 tests passed).
  • pnpm exec turbo run typecheck --filter=@bb/agent-runtime --force --output-logs=full (passed).
  • pnpm exec turbo run build --filter=@bb/agent-runtime --force --output-logs=full (upstream generation passed; this package has no build task).
  • pnpm exec turbo run lint --filter=@bb/agent-runtime --force --output-logs=full (this package has no lint task), plus targeted oxlint, oxfmt --check, and git diff --check (passed).

AGENT GENERATED: by GPT-5.6-Sol

@ymichael
ymichael merged commit a5afd97 into main Aug 24, 2026
15 checks passed
@ymichael
ymichael deleted the bb/ci-flake-fix-runtime-changed-declaration-bridge-thr_xb85zm8fai branch August 24, 2026 22:41
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