Skip to content

B-Y1NS-quality-gate-bun-test-dashboard-server-races-as-spurious-new

Status: closed/abandoned

Surfaced by T-0008 (PR #356, rumdl wiring). The bun test quality-check verb non-deterministically reports new-drift even on a markdown-only branch: a dashboard test races a transient HTTP server up and down, so sdlc quality run --diff-against-baseline flags 2 findings whose pid and port differ every run (e.g. pid 10230 :56521, pid 5974 :52586). The baseline-diff gate cannot filter a finding that is randomly present — whether the server is caught depends on test timing, not on the branch.

Effect: every task-work run whose gate includes bun test may show a spurious FAIL new-drift=2, forcing the operator to manually confirm it is the known flaky rather than real drift. T-0008 hit this and had to prove the branch touched no server code to clear it.

Two candidate fixes (triage to pick):

  • Make the dashboard test deterministic — bind to a fixed sentinel or tear the server down synchronously before the test returns, so it is never observable to a concurrent quality run.
  • Teach the gate’s bun test finding-parser to ignore transient server-listing lines (http://127.0.0.1:<port> (pid <n>) and the <TMPDIR> <pid> <url> shape), so ephemeral servers never count as drift.

Found-in: T-0008 / D-0011-markdown-formatting-tool post-mortem.

Closed 2026-08-16: duplicate of T-NRTX-mask-bare-pid-columns-in-findings and T-B75W-dashboard-test-isolates-live-dashboards, which carry the two candidate fixes named here.


← Back to Backlog