Context
PR #13536 is red after a clean rebase onto current origin/dev because the unit suite repeatedly fails test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs:656 on the Neural Link Bridge supervision test introduced by the closed #13483 feature lane.
Release classification: post-release CI hardening (boardless). This does not add product scope; it removes a CI-only false red that can block unrelated Agent OS documentation/substrate PRs.
Live latest-open sweep: checked the latest 30 open GitHub issues on 2026-06-19 around 12:03 UTC; no open duplicate for the #13483 Neural Link Bridge liveness wait / localStarted === [] CI failure. A2A in-flight sweep: checked latest 30 all-status messages immediately before creation; no competing [lane-claim] or [lane-intent] on this scope.
Memory sweep: query_raw_memories("Orchestrator Neural Link Bridge localStarted empty CI Orchestrator.spec 13483 liveness probe wait") found the original #13483 supervision ticket context from session d1903453-9b2d-4f5d-bb5a-cf51ac2f7538, not a follow-up fix. A second query for supervisor liveness probe CI flake surfaced prior CI-runner timing flakes, reinforcing that this is a test-stability lane, not a product behavior change.
The Problem
The #13483 Neural Link Bridge supervision unit test asserts localStarted after one setTimeout(0) flush:
- CI job
82341474623 failed on #13536 with Expected { taskName: 'neuralLinkBridge', reason: 'supervisor-restart' }, Received array: [].
- A rerun job
82342460380 failed with the same assertion.
- After rebasing #13536 onto current
origin/dev, fresh job 82344322498 failed again with the same assertion.
- Local focused reproduction passes:
UNIT_TEST_MODE=true npx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs returned 54 passed on the rebased head.
This makes the test under-waited or CI-sensitive. A single macrotask flush is not a stable proof that the async liveness probe and runTask callback completed under the full CI unit suite.
The Architectural Reality
test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs owns the regression surface.
ProcessSupervisorService.gateRestartOnLivenessProbe() executes an async liveness probe before scheduling a supervisor restart.
- The test overrides
livenessProbe to return false, overrides runTask to push into localStarted, calls poll(), awaits one zero-delay flush, then asserts synchronously.
- The product behavior under test remains valid: when the local Neural Link Bridge task is enabled and the liveness probe reports down, the orchestrator schedules a
supervisor-restart; cloud mode skips the task.
The Fix
Make the unit wait for the observed side effect instead of assuming one zero-delay tick is enough.
Expected shape:
- Replace the brittle one-shot
flushProbe() assertion for the #13483 Neural Link Bridge supervision test with a bounded polling assertion or equivalent existing local test helper.
- Keep the assertion focused on the same contract:
taskName: 'neuralLinkBridge', reason: 'supervisor-restart'.
- Avoid broad production changes unless investigation proves the test failure reflects a real scheduling bug.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback / Edge Case |
Docs |
Evidence |
| #13483 Neural Link Bridge supervision unit |
test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs |
Wait for the async liveness-probe restart callback before asserting |
Bounded wait fails loud if no restart is scheduled |
Test name/comments only if needed |
Focused unit spec + CI green |
| Orchestrator product behavior |
ai/daemons/orchestrator/Orchestrator.mjs + ProcessSupervisorService |
No intended behavior change |
If investigation proves a real race, patch production with focused coverage |
Existing JSDoc remains authority |
Existing orchestrator unit suite |
Decision Record impact
none — this is CI/test stability for the accepted #13483 supervision behavior.
Acceptance Criteria
Out of Scope
- Reworking Neural Link Bridge supervision product behavior from #13483.
- Changing orchestrator task definitions or config leaves unless fresh investigation proves the test is exposing a product race.
- Addressing unrelated flaky tests from the same full-suite CI run.
Avoided Traps
- Treating the repeated CI failure as a random one-off after three same-signature failures.
- Hiding the fix inside the unrelated #13535 documentation PR without a ticket authority.
- Rerunning indefinitely when the assertion is structurally under-waited.
Related
Refs #13483
Related: #13536
Handoff Retrieval Hints: query_raw_memories("Orchestrator Neural Link Bridge localStarted empty CI Orchestrator.spec 13483 liveness probe wait"); CI job anchors 82341474623, 82342460380, 82344322498; file anchor test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs.
Context
PR #13536 is red after a clean rebase onto current
origin/devbecause the unit suite repeatedly failstest/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs:656on the Neural Link Bridge supervision test introduced by the closed #13483 feature lane.Release classification: post-release CI hardening (boardless). This does not add product scope; it removes a CI-only false red that can block unrelated Agent OS documentation/substrate PRs.
Live latest-open sweep: checked the latest 30 open GitHub issues on 2026-06-19 around 12:03 UTC; no open duplicate for the #13483 Neural Link Bridge liveness wait /
localStarted === []CI failure. A2A in-flight sweep: checked latest 30 all-status messages immediately before creation; no competing[lane-claim]or[lane-intent]on this scope.Memory sweep:
query_raw_memories("Orchestrator Neural Link Bridge localStarted empty CI Orchestrator.spec 13483 liveness probe wait")found the original #13483 supervision ticket context from sessiond1903453-9b2d-4f5d-bb5a-cf51ac2f7538, not a follow-up fix. A second query for supervisor liveness probe CI flake surfaced prior CI-runner timing flakes, reinforcing that this is a test-stability lane, not a product behavior change.The Problem
The #13483 Neural Link Bridge supervision unit test asserts
localStartedafter onesetTimeout(0)flush:82341474623failed on #13536 withExpected { taskName: 'neuralLinkBridge', reason: 'supervisor-restart' },Received array: [].82342460380failed with the same assertion.origin/dev, fresh job82344322498failed again with the same assertion.UNIT_TEST_MODE=true npx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjsreturned54 passedon the rebased head.This makes the test under-waited or CI-sensitive. A single macrotask flush is not a stable proof that the async liveness probe and
runTaskcallback completed under the full CI unit suite.The Architectural Reality
test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjsowns the regression surface.ProcessSupervisorService.gateRestartOnLivenessProbe()executes an async liveness probe before scheduling a supervisor restart.livenessProbeto returnfalse, overridesrunTaskto push intolocalStarted, callspoll(), awaits one zero-delay flush, then asserts synchronously.supervisor-restart; cloud mode skips the task.The Fix
Make the unit wait for the observed side effect instead of assuming one zero-delay tick is enough.
Expected shape:
flushProbe()assertion for the #13483 Neural Link Bridge supervision test with a bounded polling assertion or equivalent existing local test helper.taskName: 'neuralLinkBridge',reason: 'supervisor-restart'.Contract Ledger Matrix
test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjsai/daemons/orchestrator/Orchestrator.mjs+ProcessSupervisorServiceDecision Record impact
none — this is CI/test stability for the accepted #13483 supervision behavior.
Acceptance Criteria
localStarted.UNIT_TEST_MODE=true npx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs.Out of Scope
Avoided Traps
Related
Refs #13483 Related: #13536
Handoff Retrieval Hints:
query_raw_memories("Orchestrator Neural Link Bridge localStarted empty CI Orchestrator.spec 13483 liveness probe wait"); CI job anchors82341474623,82342460380,82344322498; file anchortest/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs.