Repository navigation
ci(showcase): run the harness and shell-dashboard unit suites in CI - #6168
Merged
Merged
Conversation
…suite
Wiring the harness unit suite into CI (next commit) found it already RED on
main with exactly three failures. A job that is red on arrival gets ignored or
disabled, so this adds a CI-only vitest config that excludes those three files
— and a ratchet that stops the exclusion from becoming permanent.
vitest.quarantine.json the three entries, each with a date, a reason,
and an explicit exit criterion
vitest.ci.config.ts `test` minus the quarantined files
scripts/quarantine-ratchet.ts re-runs each quarantined file and requires it
to STILL FAIL
The ratchet is what makes the exclusion defensible: the moment somebody fixes a
quarantined test, it goes red and names the entry to delete, so an entry can
never outlive the failure it excuses. It also fails on an entry that points at a
missing file, on an entry whose filter matches more than one file, and on a
malformed manifest.
No test is deleted and no assertion is changed. The three failures are a stale
hard-coded cell count, a drift test stranded by a completed single-source
refactor, and a genuine `D5_REPRESENTATIVES` gap for `browser-use-smoke` that
belongs to the D5 owner.
`test:ci` and `test:quarantine-ratchet` are declared in the harness package.json
`nx.targets` block (project-local, not a workspace default) with `cache: false`:
the nx `test` named-input covers `src/**` but not the quarantine manifest, so a
cached result could survive an edit to the exclusion list.
Local `pnpm test` still uses the unfiltered config — a developer should see the
quarantined failures.
No CI job ran the showcase unit suites. Verified per suite on 91f0321: showcase/harness 3646 tests NOT RUN showcase/shell-dashboard 1331 tests NOT RUN showcase/shell 57 tests NOT RUN showcase/scripts - run by showcase_validate.yml `test_unit.yml` excludes them twice over: `paths-ignore` lists `showcase/**` AND its nx selection is scoped to `--projects='packages/**'`. `showcase_validate.yml` runs vitest only in `showcase/scripts`; its two `working-directory: showcase/harness` steps are a CVDIAG perf bench and an ESM boot-smoke. `static_quality.yml` runs `nx run-many -t check-types` and the harness's script is named `typecheck`, so it is not typechecked there either. So ~5000 showcase unit tests gated nothing — a PR could carry real defects in `showcase/harness/src/**` and still show an all-green check list. This adds `test / unit-showcase` with two parallel jobs (harness via nx, dashboard via npm since it is deliberately outside the pnpm workspace). Both hazards that make a bare `vitest run` useless here are handled as job steps: - generated artifacts: `showcase/.gitignore` ignores `shell/src/data/*.json` and `shell-dashboard/src/data/*.json`, but tests statically import `frontend-catalog.json` and `docs-status.json` — a missing file is a module load error, not a test failure. Generated before the suite runs. - `runtime-env-switch.spike.test.ts` HANGS: vitest sits at 0.0% CPU with zero output and never spawns the `next build` its beforeAll calls. It is an integration spike (one `next build` plus two `next start` boots on fixed ports) that this package's own config comment already calls "too heavy for the per-file unit suite". Excluded from the unit gate; it needs its own job with a real server budget. A separate workflow rather than steps in showcase_validate.yml: that file is a single ~900-line job already budgeted at 25 minutes, and the two suites need different package managers, so they parallelize instead of lengthening the critical job. Naming matches test_unit.yml / test_unit-python-sdk.yml. No `continue-on-error` and no `|| true` anywhere in the file.
Contributor
Production Digest-Pinning AuditAll 41 services digest-pinned. Run 2026-07-24 19:24:19 PDT — 0 finding(s). |
Contributor
|
Size Change: 0 B Total Size: 1.19 MB ℹ️ View Unchanged
|
TEMPORARY — reverted in the next commit. A job that has never failed is not yet
a gate, so this proves both new jobs actually catch a defect in product source.
harness: D4_STALE_AFTER_MS 1h -> 10h in shared/cell-model/staleness.ts
(a frozen-green D4 row would credit D4 for ten hours instead of one)
dashboard: sortOrder mastra 8 -> 88 in lib/sort-order.ts
Both reproduce locally before pushing: harness 3 failed / 177 passed in
src/shared/cell-model, dashboard 4 failed / 1326 passed.
…gate fails" This reverts the scratch commit. Its only purpose was to prove the two new jobs fail on a real defect in product source — see the PR body for the RED run ID. The branch is back to a strictly additive CI change with no product diff.
This was referenced Jul 25, 2026
jpr5
marked this pull request as ready for review
July 25, 2026 15:00
jpr5
requested review from
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
July 25, 2026 15:00
jpr5
added a commit
that referenced
this pull request
Jul 26, 2026
…hat it actually shipped (#6171) ## The hole A partially-cancelled showcase build was **indistinguishable from a clean one in both directions**: it emitted no alert, and it suppressed post-deploy verification — while having actually redeployed real images to staging. Three merges landed on `main` on 2026-07-25 with **zero post-deploy verification**. Reconstructed from the API, with run IDs: | # | build run | conclusion | what happened | |---|---|---|---| | #5483 | `30162754730` | cancelled | `shell-docs` killed at 10m04s. Alert **did** fire (all-failed path). No verify. | | — | `30162770765` | cancelled | `shell` killed at 10m04s. **Silent.** No verify. | | #6160 | `30162773601` | cancelled | 5 slots killed, **23 redeployed to staging**. **Silent.** No verify. | | #6168 | `30162784491` | success | clean — and its verify was then cancelled by a sibling. | ### The chain, for run `30162773601` 1. #6160's workflow edit forced a full-fleet rebuild. Five slots died — `shell`, `shell-docs`, `shell-dashboard`, `shell-dojo`, `showcase-aimock`. 2. The intersection guard correctly excluded them. `redeploy-staging` **succeeded** and uploaded `redeploy-summary`, redeploying the 23 that built. 3. The run concluded **`cancelled`** (5 legs cancelled, 0 failed → GitHub rolls the run up to `cancelled`). 4. `notify` was **skipped** → no Slack, no PR comment. 5. `showcase_deploy.yml` requires `conclusion == 'success'` → never started. 23 services redeployed, unverified. 6. The one legitimate verify — run `30163309977`, from #6168's successful build — started 15:17:13 and was **cancelled at 15:17:22** by run `30163312882`, which was triggered by a *different* partially-cancelled build and then skipped every job anyway. ## Which links I verified in the YAML, and where the brief was wrong | Link | Verdict | |---|---| | Intersection guard excludes cancelled slots | ✅ Confirmed — `showcase_build.yml` `redeploy-staging` intersects matrix ∩ `status == "success"`. | | Run concluded `cancelled`, not failure/success | ✅ Confirmed via API on all three runs. | | `showcase_deploy.yml` requires `conclusion == 'success'` | ✅ Confirmed verbatim on `resolve-matrix`. | | Global `showcase-verify-deploy` concurrency group preempted a sibling | ✅ Confirmed — group had no commit key, `cancel-in-progress: true`; timestamps above show the 9-second preemption. | | **`notify`'s condition is `if: failure()`** | ❌ **Wrong.** It is already `!cancelled() && (failure() \|\| any_success == 'false')`. | | **The suppressor is `failure()` not matching `cancelled`** | ❌ **Wrong, and the proposed fix would not have worked.** See below. | | **Depot `Step canceled by GitHub` is a flake** | ❌ **Wrong.** It is a `timeout-minutes` kill. See "Root cause". | ### Why `if: failure() || cancelled()` would NOT have fixed this I built a throwaway probe workflow on a scratch branch — a matrix with one leg killed by `timeout-minutes` and one green leg, plus dependent jobs guarded by each candidate expression. **Probe run [`30166429073`](https://github.com/CopilotKit/CopilotKit/actions/runs/30166429073)**: | probe | result | conclusion | |---|---|---| | killed leg's `job.status` | `cancelled` | a timeout kill reports as *cancelled* | | matrix rollup `needs.legs.result` | `cancelled` | | | `if: cancelled()` | **SKIPPED** | `cancelled()` evaluated **FALSE** | | `if: failure()` | **SKIPPED** | `failure()` evaluated **FALSE** | | pre-fix `notify` condition | **SKIPPED** | ← the bug, reproduced | | post-fix `notify` condition | **RAN** | ← the fix, proven | | workflow run conclusion | `cancelled` | matches production | `cancelled()` is **workflow-scoped**: ["Returns `true` if the workflow was cancelled."](https://docs.github.com/en/actions/reference/evaluate-expressions-in-workflows-and-actions) Individual legs dying does not cancel the *run*, so it is false. And `failure()` ["returns `true` if any ancestor job fails"](https://docs.github.com/en/actions/reference/evaluate-expressions-in-workflows-and-actions) — a **cancelled** ancestor did not *fail*, so it is false too. With 23 slots green, `any_success` is `'true'`. Every clause the old guard had went the wrong way. Independently corroborated in production: in run `30162773601`, both `!cancelled()`-guarded jobs (`aggregate-build-results`, `redeploy-staging`) **ran**, which is only possible if `cancelled()` was false. ## Root cause of the cancellations: a timeout, not a flake From the Depot log of the killed `shell` leg: ``` 15:04:03 depot build --file showcase/shell/Dockerfile ... --push 15:13:29 #25 [builder 15/15] RUN cd scripts && ... generate-registry.ts DONE 54.3s 15:13:32 failed to solve: Canceled: context canceled 15:13:32 ##[error]Step canceled by GitHub 15:13:32 BUILD_STATUS: cancelled ``` Started 15:03:28, killed 15:13:34 — **exactly `timeout-minutes: 10`**. Same for the other three shell slots; `showcase-aimock` died at exactly its 5. The build was making real but slow progress the whole time (repeated docker.io base-image pull stalls, `#9 ...` for seven minutes) and was 2 steps from done. So **a retry is the wrong lever twice over**: a cancelled job cannot run further steps, and the build was not erroring. The underlying cause is Depot builder contention — three full-fleet rebuilds ran concurrently (~84 simultaneous amd64 builds). Measured budgets: | slot | warm | contended | budget | |---|---|---|---| | shell / shell-docs / shell-dashboard / shell-dojo | 2–5 min | killed at 10 | **10 → 20** | | showcase-aimock | 2 min | killed at 5 | **5 → 12** | | showcase-pocketbase | — | **8.8 min** (near-miss) | **10 → 15** | | webhooks | 0.6 min | — | 5 (unchanged, `skip_build`) | The `context: "."` slots build the whole monorepo root and are the heaviest in the fleet, yet carried the *smallest* budgets — inverted. ## The design **1. Stop laundering the signal** (`build-outputs.ts`, per-slot writer). `cancelled` becomes a first-class `BuildOutcome` instead of being mapped to `skipped`. The per-slot result is the *only* place the cancellation survives, because the status functions can't see it. `successSet` still excludes it, so the redeploy intersection is unchanged — a slot that pushed no image still cannot enter the redeploy CSV. **2. Alert on it** — aggregator publishes `any_cancelled` + `cancelled_services`; `notify` gains an `any_cancelled == 'true'` clause (the exact expression proven by the probe), and its PR comment now distinguishes *incomplete* from *failed*. **3. Red the run, don't leave it `cancelled`** — new `notify-cancelled-builds` job exits non-zero, so the conclusion is `failure`. A slot killed by its timeout budget *is* a failure, and `cancelled` is precisely what suppressed everything downstream. **4. Verify the partial deploy anyway** — the `conclusion == 'success'` gate becomes a terminal-conclusion allowlist (`success|failure|cancelled|timed_out`). > **Tradeoff, stated plainly.** Relaxing the gate rather than only failing loudly is deliberate: a build that redeployed 23 services *needs* verifying, and gating on `success` guaranteed it never would. It is safe because the decision of *what* to verify never depended on the rollup — no `redeploy-summary` artifact still means `has_services=false` and verify is skipped, and the redeploy gate still narrows to the per-service success set, so a cancelled slot can never be probed against a stale `:latest` and reported healthy. The cost is one extra no-op deploy run for builds that die before redeploying. Note this *also* fixes the same hole for `conclusion == 'failure'`, which was equally unverified. **5. Key verification per commit** — `showcase-verify-deploy-${{ github.event.workflow_run.head_sha || github.sha }}`, so a later cancelled run can no longer destroy an earlier successful run's verification. `cancel-in-progress: true` is kept, so re-verifying the *same* commit still supersedes. (`github` context is [documented as available](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts) in `concurrency`.) **6. Realistic timeout budgets** — separate commit, droppable independently. Mitigation, not the root fix; the durable lever is a non-cancelling concurrency queue on the build workflow, noted inline as a follow-up since this workflow deliberately has *no* concurrency group. ### On alerting for a genuine manual cancel It stays **silent**, and that is correct. `!cancelled()` is retained on both notify jobs as the flake-vs-intentional discriminator, and the probe proves it discriminates: a human cancelling the whole RUN makes `cancelled()` true → silent; a leg-level timeout leaves it false → alerts. Belt and braces — on a run-level cancel, `aggregate-build-results` is itself skipped by its own `!cancelled()` guard, so `any_cancelled` resolves to `''` rather than `'true'`. Two independent reasons for silence, zero manual-cancel noise. ## What I proved - **Real end-to-end red-green on GitHub Actions** — probe run [`30166429073`](https://github.com/CopilotKit/CopilotKit/actions/runs/30166429073), table above. Old condition skipped, new condition ran, on a genuinely timeout-killed matrix leg. Scratch branch deleted; the run is permanent. - **Local red-green on the TS layer** — 8 tests failing before the fix (`cancelledSet is not a function`, `invalid "status" (must be success|failure|skipped)`), 46 passing after. - **Local red-green on the live workflow expression.** `redeploy-guard.test.ts` parses the **actual `if:` strings out of the YAML** and evaluates them. Pointed at `origin/main`'s YAML, the new `GREEN: the live guard FIRES on the production partial-cancel` test fails (`expected false to be true`) and is the *only* failure; pointed at this branch, all 31 pass. The pre-fix guard is pinned as a literal so the test permanently encodes the difference rather than just the current behaviour. - **No new alert noise** — explicit tests that `notify` stays silent on a clean build, on a human run-cancel, and on a no-changes push. That last one exposed a latent inaccuracy in the test harness's own model (a skipped aggregator's outputs are `''`, not `'false'`), now fixed. - **Lint** — `actionlint` finding count unchanged at 10 vs the `origin/main` baseline (all pre-existing: the unknown `depot-ubuntu-24.04-4` label and shellcheck `info` notes on untouched scripts). `zizmor` with the repo's own config at `min-severity: low`: *No findings to report*. - **Suite** — 77 tests green across the three touched files. Full `showcase/scripts` suite has 5 pre-existing failing files (`emit-railway-envs-json`, `generate-catalog`, `generate-registry`, `integration-smoke-registry`); I reproduced the identical 5 files / 8 tests on a pristine `origin/main` worktree, so they are unrelated to this change. ## What remains unproven until it runs on `main` - The **production** partial-cancel path end-to-end. The probe reproduced the expression semantics on a synthetic matrix, not the real 28-slot fleet with real Depot builds; the Slack message and PR-comment rendering have not been exercised against a live webhook. - The relaxed deploy gate firing on a real `cancelled`/`failure` build — including the "no artifact → skipped, no noise" path. - The per-commit concurrency group under real rapid-fire merges. - Whether 20 minutes is actually enough for `shell` under peak Depot contention. It was ~3 steps from done at 10; 20 is inference from that, not measurement. `\n` handling in the new Slack payload follows the existing `fromJSON('"\n"')` convention in this file, but is not verified against a live webhook.
pull Bot
pushed a commit
to HinchK/copilotkit
that referenced
this pull request
Jul 26, 2026
… preemption Two independent ways verification was silently lost on 2026-07-25. 1. `resolve-matrix` required `github.event.workflow_run.conclusion == 'success'`. But `redeploy-staging` gates on the artifact-derived `any_success`, not on the matrix rollup, so a build with some slots cancelled (rollup `cancelled`) or failed (rollup `failure`) still pushes real images and still redeploys the slots that built. Run 30162773601 redeployed 23 services to staging and this workflow never started. An unverified real deploy is worse than a verified partial one, so the trigger is now "the build reached a terminal conclusion" and WHAT to verify stays decided by evidence: no redeploy-summary artifact still means has_services=false and verify is skipped, and the redeploy gate still narrows to the per-service success set, so a cancelled slot can never be probed against a stale `:latest`. 2. The `showcase-verify-deploy` concurrency group was global, so any later-finishing build preempted an earlier run's verification even though they verify DIFFERENT commits. Verify run 30163309977 for the one genuinely successful build of the day (CopilotKit#6168, 7282ecd) started at 15:17:13 and was cancelled 9 seconds later by run 30163312882 — which was triggered by a different, partially-cancelled build and then skipped every job anyway. Key the group per triggering commit.
BenTaylorDev
pushed a commit
that referenced
this pull request
Aug 29, 2026
…llowlist Commits the one-off diagnostic that produced the highest-severity finding of PR #6156's round-2 review (slot 1-A #1) as a permanent guard. The diagnostic reconstructed both engines in scratch dirs and diffed them field-by-field; that form depends on `origin/main` at a moment in time. This is the committable form: the invariant plus a shape-exact allowlist, one engine, no cross-revision diff. INV7 promoted from six fixtures to the whole domain — the 6^7 = 279,936 cross-product of the seven status rows an agent-axis cell is derived from (7 slots x {absent, green, greenStale, redFresh, redInfra, redStripped}) — asserting that no combination renders a red depth pill under a non-committal chip unless every contributing red row carries positive INFRA_ERROR_CLASSES attribution. Reproduces slot 1-A's measurement exactly: 19,328 of 279,936, in the same eight red-pill buckets (pinned separately as SLOT_1A_RED_PILL_BUCKETS). Two tables, not one, because the residue is not one mechanism: - KNOWN_I1_GAP_BREAK_SHAPES (7 shapes, 17,088) — EXCUSED as invariant-I1 debt. `scanWorst` breaks at the first ABSENT rung, so a red above the gap is never folded and the chip provably never read it. Round-2 partition bucket (d4). - QUARANTINED_NON_GAP_MASKING (6 entries, 2,240) — NOT excused. 2,048 are a non-infra red D6 sitting outside `scanWorst`'s [D3,D4,D5] walk; 192 have their gap at or above the red. The chip read a verdict and still hid a red; contiguity excuses nothing here. Separate table, separate wording, separate follow-ups, so the I1 note cannot be read as covering them. The gap predicate mirrors `ladderGapDepth` from cell-model.coherence.test.ts @ 49bf40943f: a rung is a gap when no row exists for any of its keys (equivalent to `classifyRung`'s ABSENT), NOT the strip's `status === null`. Keying off the strip mis-files the 192 non-gap combinations as excused — measured, not assumed. When both land, the shared helper should be imported and this copy deleted; the header says so. Two-sided by construction, and mutation-proven against the real engine: - a shape in no table fails ("NEW masking shape") — proven by deleting an entry: reported as 864 + 96 unlisted combinations; - an allowlisted shape that stops masking fails ("RATCHET ... OVER-BROAD"), so fixing the gap-break forces the table to shrink rather than leaving stale cover — proven by inflating an entry 2880 -> 2881; - a quarantined shape that stops masking fails ("QUARANTINE SHRANK") — proven by inflating an entry 64 -> 65. In-suite teeth cover the same three directions, including that an emulated (d4) fix clears all seven allowlisted shapes while leaving the quarantine intact. Exhaustive, not sampled: the full sweep runs ~2.1 s, so no covering array is needed. The LiveStatusMap is built once and mutated one key per step in mixed-radix reflected Gray-code order (Knuth 7.2.1.1 Algorithm H); a control test re-runs the whole domain rebuilding a fresh map per combination and asserts an identical histogram. Deterministic: fixed `now` literal, pure engine, no randomness, no I/O, no wall-clock. The domain identity is asserted too — 6^7 distinct tuples visited exactly once, every (slot, variant) pair 6^6 times, every step a single-slot delta — so the sweep cannot silently degenerate into a subset. Product logic is untouched: this is a new test file and nothing else. NOTE: gates nothing until PR #6168 lands the harness/shell-dashboard unit suites in CI (they were excluded twice over, by `paths-ignore: showcase/**` and by `--projects='packages/**'`). Until then it is a local + cr-loop pre-audit instrument.
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.
The gap
No CI job ran the showcase unit suites. Not "ran them partially" — no job invoked them at all. Verified per suite against
91f0321397(the tip ofmainthis branched from), by reading every workflow's actualrun:lines rather than trusting job names:showcase/harnessshowcase/shell-dashboardshowcase/shellshowcase/scriptsshowcase_validate.yml→ "Run build pipeline tests"Why each candidate workflow misses them:
test_unit.yml— the one whose name implies it covers this — excludes them twice over:paths-ignorelistsshowcase/**, and its nx selection is hard-scoped to--projects='packages/**'.showcase_validate.ymlrunspnpm exec vitest runonly inshowcase/scripts. It has twoworking-directory: showcase/harnesssteps, but they are a CVDIAG perf bench (vitest bench src/cvdiag/emit-perf.bench.ts) and an ESM boot-smoke — neither runs the unit suite.static_quality.ymldoes runnx run-many -t check-types. This resolves the reported name/invocation divergence: the job is calledcheck-typesand the harness's script is calledtypecheck, so nocheck-typestarget exists on the harness and the harness is not typechecked either.Net effect: ~5000 showcase unit tests gated nothing. A PR could carry real defects in
showcase/harness/src/**and still show an all-green check list, because no job structurally could have caught them.What this wires
New workflow
test / unit-showcase(.github/workflows/test_unit-showcase.yml), two parallel jobs on PR + push-to-main filtered toshowcase/**:harness unit suite—nx run @copilotkit/showcase-harness:test:ci, thennx run @copilotkit/showcase-harness:test:quarantine-ratchet. Driven through nx per the rootCLAUDE.mdtask convention.shell-dashboard unit suite—vitest rundirectly; the dashboard is deliberately outside the pnpm workspace (see the note inpnpm-workspace.yaml) so it is not an nx project and has no target to run.New nx targets are declared in
showcase/harness/package.json'snx.targetsblock, not innx.json— they are harness-specific, and anx.jsontargetDefaultsentry would silently apply to any future project that happens to share the script name. Both arecache: falseon purpose: the nxtestnamed-input coverssrc/**and*.test.*but notvitest.ci.config.tsorvitest.quarantine.json, so a cached result could survive an edit to the quarantine list.Why a separate workflow rather than steps in
showcase_validate.ymlThat file is a single ~900-line job already budgeted at 25 minutes and is the busiest merge-path workflow in the repo. Splitting the unit suites out gives them their own name in the check list, their own concurrency group, and — since the two suites need different package managers — lets them run in parallel instead of lengthening the critical job. Naming follows the existing convention (
test_unit.yml,test_unit-python-sdk.yml,test_unit-spring-ai.yml).No
continue-on-errorand no|| trueanywhere in the file. A gate that cannot fail is not a gate.Hazards, and how each is handled
1. The hanging spike test
Correction to the reported location: it is
showcase/shell-dashboard/tests/runtime-env-switch.spike.test.ts, not undershowcase/harness/. It reaches the dashboard suite via that package'sinclude: ["src/**/*.test.{ts,tsx}", "tests/**/*.spike.test.ts"].Reproduced locally. vitest sat at 0.0% CPU with zero output and never even spawned the
next builditsbeforeAllcalls — no worker fork, nothing. Killed at ~2 minutes; consistent with the reported ~25-minute stall.Handled by excluding it from the unit gate, not by a hard timeout. Justification: it is an integration spike by construction — one
next buildplus twonext startboots on fixed ports 3801/3802 — and this package's own config comment already says it is "too heavy for the per-file unit suite" even though theincludeglob pulls it in anyway. A hard timeout would convert a 25-minute stall into a red gate with nothing actionable in it; this suite has to stay a fast, trustworthy unit signal. The spike needs its own job with a real server budget, which is out of scope for wiring up the unit gate.Note the
--excludevalues restate the package's existing config excludes (tests/visual/**,node_modules/**) because vitest's CLI--excludereplaces the config value rather than extending it — dropping them would silently re-enable them.2. Gitignored generated artifacts
showcase/.gitignoreignoresshell/src/data/*.jsonandshell-dashboard/src/data/*.json, but the suites consume them:harness/src/probes/frontend-matrix.test.tsstatically importsshell/src/data/frontend-catalog.json— a missing file is a module load error, not a test failure.harness/src/fleet/control-plane/d0-gone-predicate.test.tsreadsshell/src/data/registry.jsonat runtime.shell-dashboard/src/lib/docs-status.tsstatically imports@/data/docs-status.json.Generated as an explicit job step (
generate-registry.ts, plusprobe-docs.tsfor the dashboard), mirroring howshowcase_validate.ymldrives the same generators. The dashboard job invokes vitest directly rather thannpm testspecifically so thepretesthook does not re-runprobe-docs.tsand double its ~50 outbound HEAD requests.Also load-bearing:
npm ci --ignore-scriptsin the dashboard job. That package'spostinstalliscd ../scripts && npm install, which would lay an npm-resolvedshowcase/scripts/node_modulesover the pnpm-managed one.3. The 3 pre-existing failures — quarantined behind a ratchet, none deleted or weakened
Confirmed byte-identical to
origin/mainand pre-existing. A job that is red on arrival gets ignored or disabled, so the three files are excluded viashowcase/harness/vitest.quarantine.json+vitest.ci.config.ts— andscripts/quarantine-ratchet.tsre-runs each one and requires it to STILL FAIL. The moment somebody fixes a quarantined test, the ratchet goes red and names the entry to delete. An entry therefore cannot outlive the failure it excuses. The ratchet also fails on an entry pointing at a missing file, on an entry whose filter matches more than one file, and on a malformed or under-documented manifest (every entry must carryfile/since/reason/unquarantineWhen).Local
pnpm teststill uses the unfiltered config, so a developer sees the quarantined failures.src/probes/frontend-matrix.test.tsreact=660,angular=636) against the generatedfrontend-catalog.json, which has grown to 1302 runnable cells (react=664). Stale literals, not a product defect — the two assertions that express the test's stated intent ("without loss or duplication":length === metadata.runnable, ids unique) both pass. Exit criterion: derive the counts from the catalog; re-hard-coding fresh numbers just resets the clock.src/probes/helpers/d5-mapping-drift.test.tsCATALOG_TO_D5_KEYout ofshell-dashboard/src/lib/live-status.tsto prove the dashboard copy hasn't drifted from the harness'sREGISTRY_TO_D5. That file is now a one-lineexport *barrel over the canonicalharness/src/shared/cell-model/live-status.ts— there is no second copy to drift and nothing for the regex to find, so the test throws its own "could not locate" guard. Exit criterion: cell-model owner deletes it (single-source is a strictly stronger guarantee) or rewrites it to assert the barrel re-export.src/probes/helpers/d5-representatives.test.tsd5-browser-use-smokeregistersbrowser-use-smokeinD5_REGISTRYbutD5_REPRESENTATIVEShas no entry, sogetD5Representative('browser-use-smoke')returnsundefinedand the D5 driver has no representative fixture. The test is correct and reporting a real hole; the fix belongs to the D5 owner, and this PR touches no product source.4. New finding: a load-sensitive flaky test
Not one of the 3, and worth fixing separately:
src/probes/loader/probe-invoker.test.ts→ "times out at the invoker level when enumerate() ignores abortSignal" asserts a wall-clockelapsed < 150against a 100ms invoker timeout racing a 200ms enumerate. 50ms of headroom does not survive CPU contention — it passed 5/5 in isolation but failed twice at ~217ms while the machine was running other vitest suites, and a 4-vCPU runner executing 173 test files in parallel is exactly that condition.Mitigated with
retry: 2in the CI config only (base config unchanged, so local runs still surface non-determinism). This is not suppression: a genuinely broken test fails all three attempts and the gate stays red, and vitest prints every retried test. The real fix is for the probe-loader owner to drive that assertion off fake timers or widen the bound, after which theretryshould come out. Flagging the tradeoff explicitly rather than burying it.Deliberate-breakage proof
A job that has never failed is not yet a gate. Scratch commit
e100df27a7broke two product-source files, then4f092eccb1reverted it. The final branch diff is 578 insertions, 0 deletions, and zero product source touched.harness unit suiteshell-dashboard unit suite30140087665452a26115e30140218159e100df27a7The breakage — both reproduced locally before pushing:
showcase/harness/src/shared/cell-model/staleness.ts:D4_STALE_AFTER_MS1h → 10h (a frozen-green D4 row would credit D4 for ten hours instead of one)showcase/shell-dashboard/src/lib/sort-order.ts:sortOrdermastra: 8→88What the RED run actually caught:
Three things this establishes beyond "the job can go red":
showcase/harness/src/shared/cell-model/**landed 4 failures in the harness gate, including two golden-master equivalence fixtures.live-status.tsre-export barrel. The shared cell-model now has two independent gates over it.retry: 2is not suppression. EveryFAILline above appears three times in the log — the test was retried the full budget and failed all three attempts. A genuinely broken test cannot pass through it. And the quarantine ratchet stayed green on the broken run, confirming the quarantine is scoped to its three files and does not swallow unrelated regressions.Runtime
Measured on CI (Depot 4-vCPU), baseline run
30140087665— both jobs green:harness unit suiteshell-dashboard unit suiteThey run in parallel, so the added critical-path cost is ~3m33s — comfortably under
showcase_validate.yml's existing 25-minute budget and nowhere near irritating-enough-to-disable. In both jobs the budget is dominated by install and (for the harness) nx^build, not by the tests.No sharding or
nx affectedneeded.nx affectedwould in fact be actively wrong here: the entire point is that a change anywhere undershowcase/**should run the suite covering it, and the historical failure mode was scope-narrowing, not slowness. If install time later dominates, the lever is pnpm/npm store caching (already configured) — not cutting test scope.Not covered
showcase/shell's 8 test files (~57 tests) are also ungated and I left them out to keep this change to one concern. They need a third install path (showcase/shellis likewise outside the pnpm workspace) and itsvitest.config.tsalready has aglobalSetupthat generates its ownregistry.json. Cheap follow-up.Coordination
Concurrent work is adding a vacuity/drift text gate under
showcase/scriptsand compile-time completeness exports. This PR owns only the suite invocation. The one plausible cherry-pick conflict isshowcase/harness/package.json(I added twoscriptsentries and annx.targetsblock);.github/workflows/test_unit-showcase.ymlis a new file andnx.jsonis deliberately untouched.