Skip to content

ci(showcase): run the harness and shell-dashboard unit suites in CI - #6168

Merged
jpr5 merged 4 commits into
mainfrom
ci/showcase-run-harness-unit-suite
Jul 25, 2026
Merged

jpr5 merged 4 commits into
mainfrom
ci/showcase-run-harness-unit-suite

Conversation

@jpr5

@jpr5 jpr5 commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

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 of main this branched from), by reading every workflow's actual run: lines rather than trusting job names:

Suite Tests Ran in CI before? Where
showcase/harness 3646 (3625 pass / 3 fail / 18 skip) NO nowhere
showcase/shell-dashboard 1331 (1330 pass / 1 skip) NO nowhere
showcase/shell ~57 (8 files) NO nowhere
showcase/scripts — yes showcase_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-ignore lists showcase/**, and its nx selection is hard-scoped to --projects='packages/**'.
  • showcase_validate.yml runs pnpm exec vitest run only in showcase/scripts. It has two working-directory: showcase/harness steps, 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.yml does run nx run-many -t check-types. This resolves the reported name/invocation divergence: the job is called check-types and the harness's script is called typecheck, so no check-types target 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 to showcase/**:

  • harness unit suite — nx run @copilotkit/showcase-harness:test:ci, then nx run @copilotkit/showcase-harness:test:quarantine-ratchet. Driven through nx per the root CLAUDE.md task convention.
  • shell-dashboard unit suite — vitest run directly; the dashboard is deliberately outside the pnpm workspace (see the note in pnpm-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's nx.targets block, not in nx.json — they are harness-specific, and a nx.json targetDefaults entry would silently apply to any future project that happens to share the script name. Both are cache: false on purpose: the nx test named-input covers src/** and *.test.* but not vitest.ci.config.ts or vitest.quarantine.json, so a cached result could survive an edit to the quarantine list.

Why a separate workflow rather than steps in showcase_validate.yml

That 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-error and no || true anywhere 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 under showcase/harness/. It reaches the dashboard suite via that package's include: ["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 build its beforeAll calls — 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 build plus two next start boots 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 the include glob 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 --exclude values restate the package's existing config excludes (tests/visual/**, node_modules/**) because vitest's CLI --exclude replaces the config value rather than extending it — dropping them would silently re-enable them.

2. Gitignored generated artifacts

showcase/.gitignore ignores shell/src/data/*.json and shell-dashboard/src/data/*.json, but the suites consume them:

  • harness/src/probes/frontend-matrix.test.ts statically imports shell/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.ts reads shell/src/data/registry.json at runtime.
  • shell-dashboard/src/lib/docs-status.ts statically imports @/data/docs-status.json.

Generated as an explicit job step (generate-registry.ts, plus probe-docs.ts for the dashboard), mirroring how showcase_validate.yml drives the same generators. The dashboard job invokes vitest directly rather than npm test specifically so the pretest hook does not re-run probe-docs.ts and double its ~50 outbound HEAD requests.

Also load-bearing: npm ci --ignore-scripts in the dashboard job. That package's postinstall is cd ../scripts && npm install, which would lay an npm-resolved showcase/scripts/node_modules over the pnpm-managed one.

3. The 3 pre-existing failures — quarantined behind a ratchet, none deleted or weakened

Confirmed byte-identical to origin/main and pre-existing. A job that is red on arrival gets ignored or disabled, so the three files are excluded via showcase/harness/vitest.quarantine.json + vitest.ci.config.ts — and scripts/quarantine-ratchet.ts re-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 carry file / since / reason / unquarantineWhen).

Local pnpm test still uses the unfiltered config, so a developer sees the quarantined failures.

File Disposition Why
src/probes/frontend-matrix.test.ts quarantine Asserts hard-coded per-frontend counts (react=660, angular=636) against the generated frontend-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.ts quarantine Stranded by a completed refactor. It regex-scrapes CATALOG_TO_D5_KEY out of shell-dashboard/src/lib/live-status.ts to prove the dashboard copy hasn't drifted from the harness's REGISTRY_TO_D5. That file is now a one-line export * barrel over the canonical harness/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.ts quarantine Genuine product gap, deliberately not fixed here. d5-browser-use-smoke registers browser-use-smoke in D5_REGISTRY but D5_REPRESENTATIVES has no entry, so getD5Representative('browser-use-smoke') returns undefined and 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-clock elapsed < 150 against 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: 2 in 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 the retry should 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 e100df27a7 broke two product-source files, then 4f092eccb1 reverted it. The final branch diff is 578 insertions, 0 deletions, and zero product source touched.

Run SHA harness unit suite shell-dashboard unit suite Quarantine ratchet
baseline 30140087665 452a26115e success (3m33s) success (1m35s) success
breakage 30140218159 e100df27a7 FAILURE (3m31s) FAILURE (1m28s) success

The breakage — both reproduced locally before pushing:

  • showcase/harness/src/shared/cell-model/staleness.ts: D4_STALE_AFTER_MS 1h → 10h (a frozen-green D4 row would credit D4 for ten hours instead of one)
  • showcase/shell-dashboard/src/lib/sort-order.ts: sortOrder mastra: 8 → 88

What the RED run actually caught:

harness unit suite   —  Test Files 3 failed | 168 passed | 2 skipped (173)
                        Tests      4 failed | 3612 passed | 18 skipped (3634)
  FAIL src/http/matrix.test.ts > stale green ladder: raw state='green' but /api/matrix folds to gray (U8)
  FAIL src/shared/cell-model/cell-model.contribution.test.ts > family fold: one stale-green sibling forces STALE_DEGRADED
       AssertionError: expected 'GREEN_FRESH' to be 'STALE_DEGRADED'
  FAIL src/shared/cell-model/cell-model.equivalence.test.ts > golden-master identity > fixture: pos-d4-stale-green
  FAIL src/shared/cell-model/cell-model.equivalence.test.ts > golden-master identity > fixture: stale-column

shell-dashboard unit suite —  Test Files 3 failed | 64 passed (67)
                              Tests      4 failed | 1326 passed | 1 skipped (1331)
  FAIL src/components/__tests__/depth-utils.test.ts > does not credit D4 when its green chat row is stale
       AssertionError: expected 4 to be 3
  FAIL src/lib/__tests__/cell-model.test.ts > comm-error staleness window > scopes the window PER ROW FAMILY (G3e)
       AssertionError: expected 36060000 to be less than 21600000

Three things this establishes beyond "the job can go red":

  1. It catches exactly the class of defect that went undetected on fix(showcase): cold-load gray chip was masking genuinely-red cells #6156 — a change to showcase/harness/src/shared/cell-model/** landed 4 failures in the harness gate, including two golden-master equivalence fixtures.
  2. The dashboard job also caught the harness defect, through the live-status.ts re-export barrel. The shared cell-model now has two independent gates over it.
  3. retry: 2 is not suppression. Every FAIL line 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:

Job CI wall-clock (whole job) Suite only (local) Files
harness unit suite 3m33s 63.5s 173 (171 pass / 2 skip, 3616 tests)
shell-dashboard unit suite 1m35s 7.2s 67 (1330 pass / 1 skip)

They 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 affected needed. nx affected would in fact be actively wrong here: the entire point is that a change anywhere under showcase/** 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/shell is likewise outside the pnpm workspace) and its vitest.config.ts already has a globalSetup that generates its own registry.json. Cheap follow-up.

Coordination

Concurrent work is adding a vacuity/drift text gate under showcase/scripts and compile-time completeness exports. This PR owns only the suite invocation. The one plausible cherry-pick conflict is showcase/harness/package.json (I added two scripts entries and an nx.targets block); .github/workflows/test_unit-showcase.yml is a new file and nx.json is deliberately untouched.

jpr5 added 2 commits July 24, 2026 19:13
…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.
@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 41 services digest-pinned.

Run 2026-07-24 19:24:19 PDT — 0 finding(s).

@github-actions

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 1.19 MB

ℹ️ View Unchanged
Filename Size
packages/a2ui-renderer/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/a2ui-renderer/dist/a2ui-types.cjs 172 B
packages/a2ui-renderer/dist/a2ui-types.mjs 171 B
packages/a2ui-renderer/dist/index.cjs 842 B
packages/a2ui-renderer/dist/index.mjs 563 B
packages/a2ui-renderer/dist/index.umd.js 12.2 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/A2uiSurface.cjs 1.49 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/A2uiSurface.mjs 1.43 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/adapter.cjs 1.07 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/adapter.mjs 1.01 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.cjs 904 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.mjs 492 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Button.cjs 1 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Button.mjs 596 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Card.cjs 829 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Card.mjs 419 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.cjs 1.1 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.mjs 1.02 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.cjs 799 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.mjs 737 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.cjs 1.63 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.mjs 1.57 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Column.cjs 856 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Column.mjs 802 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.cjs 1.12 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.mjs 1.05 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.cjs 842 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.mjs 432 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.cjs 877 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.mjs 469 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Image.cjs 995 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Image.mjs 587 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/List.cjs 920 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/List.mjs 508 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.cjs 1.19 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.mjs 1.13 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Row.cjs 855 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Row.mjs 801 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.cjs 1.06 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.mjs 984 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.cjs 1.1 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.mjs 1.04 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Text.cjs 903 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Text.mjs 489 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.cjs 1.21 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.mjs 1.14 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Video.cjs 788 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Video.mjs 378 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/index.cjs 928 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/index.mjs 855 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/utils.cjs 579 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/utils.mjs 556 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.cjs 982 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.mjs 580 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.cjs 800 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.mjs 735 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.cjs 1.08 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.mjs 1.02 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.cjs 1.07 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.mjs 1.01 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.cjs 894 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.mjs 839 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.cjs 1.21 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.mjs 802 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/index.cjs 849 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/index.mjs 804 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/index.cjs 310 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/index.mjs 325 B
packages/a2ui-renderer/dist/react-renderer/catalog-utils.cjs 1.59 kB
packages/a2ui-renderer/dist/react-renderer/catalog-utils.mjs 1.52 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIProvider.cjs 1.5 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIProvider.mjs 1.42 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIRenderer.cjs 728 B
packages/a2ui-renderer/dist/react-renderer/core/A2UIRenderer.mjs 671 B
packages/a2ui-renderer/dist/react-renderer/create-catalog.cjs 1.35 kB
packages/a2ui-renderer/dist/react-renderer/create-catalog.mjs 1.28 kB
packages/a2ui-renderer/dist/react-renderer/hooks/useA2UI.cjs 316 B
packages/a2ui-renderer/dist/react-renderer/hooks/useA2UI.mjs 309 B
packages/a2ui-renderer/dist/react-renderer/index.cjs 399 B
packages/a2ui-renderer/dist/react-renderer/index.mjs 515 B
packages/a2ui-renderer/dist/react-renderer/lib/utils.cjs 236 B
packages/a2ui-renderer/dist/react-renderer/lib/utils.mjs 188 B
packages/a2ui-renderer/dist/react-renderer/styles/index.cjs 239 B
packages/a2ui-renderer/dist/react-renderer/styles/index.mjs 231 B
packages/a2ui-renderer/dist/react-renderer/theme/ThemeContext.cjs 436 B
packages/a2ui-renderer/dist/react-renderer/theme/ThemeContext.mjs 381 B
packages/a2ui-renderer/dist/web-components/_virtual/_rolldown/runtime.cjs 260 B
packages/a2ui-renderer/dist/web-components/_virtual/_rolldown/runtime.mjs 258 B
packages/a2ui-renderer/dist/web-components/adapter.cjs 346 B
packages/a2ui-renderer/dist/web-components/adapter.mjs 335 B
packages/a2ui-renderer/dist/web-components/bound-component.cjs 670 B
packages/a2ui-renderer/dist/web-components/bound-component.mjs 662 B
packages/a2ui-renderer/dist/web-components/catalog/basic/audio-player.cjs 536 B
packages/a2ui-renderer/dist/web-components/catalog/basic/audio-player.mjs 492 B
packages/a2ui-renderer/dist/web-components/catalog/basic/button.cjs 647 B
packages/a2ui-renderer/dist/web-components/catalog/basic/button.mjs 604 B
packages/a2ui-renderer/dist/web-components/catalog/basic/card.cjs 448 B
packages/a2ui-renderer/dist/web-components/catalog/basic/card.mjs 402 B
packages/a2ui-renderer/dist/web-components/catalog/basic/check-box.cjs 743 B
packages/a2ui-renderer/dist/web-components/catalog/basic/check-box.mjs 695 B
packages/a2ui-renderer/dist/web-components/catalog/basic/choice-picker.cjs 1.27 kB
packages/a2ui-renderer/dist/web-components/catalog/basic/choice-picker.mjs 1.24 kB
packages/a2ui-renderer/dist/web-components/catalog/basic/column.cjs 474 B
packages/a2ui-renderer/dist/web-components/catalog/basic/column.mjs 431 B
packages/a2ui-renderer/dist/web-components/catalog/basic/components.cjs 482 B
packages/a2ui-renderer/dist/web-components/catalog/basic/components.mjs 424 B
packages/a2ui-renderer/dist/web-components/catalog/basic/date-time-input.cjs 756 B
packages/a2ui-renderer/dist/web-components/catalog/basic/date-time-input.mjs 714 B
packages/a2ui-renderer/dist/web-components/catalog/basic/divider.cjs 450 B
packages/a2ui-renderer/dist/web-components/catalog/basic/divider.mjs 404 B
packages/a2ui-renderer/dist/web-components/catalog/basic/icon.cjs 504 B
packages/a2ui-renderer/dist/web-components/catalog/basic/icon.mjs 455 B
packages/a2ui-renderer/dist/web-components/catalog/basic/ids.cjs 192 B
packages/a2ui-renderer/dist/web-components/catalog/basic/ids.mjs 190 B
packages/a2ui-renderer/dist/web-components/catalog/basic/image.cjs 624 B
packages/a2ui-renderer/dist/web-components/catalog/basic/image.mjs 578 B
packages/a2ui-renderer/dist/web-components/catalog/basic/index.cjs 465 B
packages/a2ui-renderer/dist/web-components/catalog/basic/index.mjs 526 B
packages/a2ui-renderer/dist/web-components/catalog/basic/list.cjs 534 B
packages/a2ui-renderer/dist/web-components/catalog/basic/list.mjs 483 B
packages/a2ui-renderer/dist/web-components/catalog/basic/modal.cjs 842 B
packages/a2ui-renderer/dist/web-components/catalog/basic/modal.mjs 800 B
packages/a2ui-renderer/dist/web-components/catalog/basic/row.cjs 471 B
packages/a2ui-renderer/dist/web-components/catalog/basic/row.mjs 427 B
packages/a2ui-renderer/dist/web-components/catalog/basic/slider.cjs 701 B
packages/a2ui-renderer/dist/web-components/catalog/basic/slider.mjs 653 B
packages/a2ui-renderer/dist/web-components/catalog/basic/tabs.cjs 780 B
packages/a2ui-renderer/dist/web-components/catalog/basic/tabs.mjs 730 B
packages/a2ui-renderer/dist/web-components/catalog/basic/text-field.cjs 857 B
packages/a2ui-renderer/dist/web-components/catalog/basic/text-field.mjs 814 B
packages/a2ui-renderer/dist/web-components/catalog/basic/text.cjs 553 B
packages/a2ui-renderer/dist/web-components/catalog/basic/text.mjs 501 B
packages/a2ui-renderer/dist/web-components/catalog/basic/utils.cjs 484 B
packages/a2ui-renderer/dist/web-components/catalog/basic/utils.mjs 462 B
packages/a2ui-renderer/dist/web-components/catalog/basic/video.cjs 400 B
packages/a2ui-renderer/dist/web-components/catalog/basic/video.mjs 352 B
packages/a2ui-renderer/dist/web-components/catalog/children.cjs 302 B
packages/a2ui-renderer/dist/web-components/catalog/children.mjs 300 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/button.cjs 629 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/button.mjs 584 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/column.cjs 609 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/column.mjs 559 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/components.cjs 245 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/components.mjs 263 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/index.cjs 724 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/index.mjs 654 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/row.cjs 593 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/row.mjs 544 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/text-field.cjs 874 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/text-field.mjs 822 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/text.cjs 509 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/text.mjs 477 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/utils.cjs 291 B
packages/a2ui-renderer/dist/web-components/catalog/minimal/utils.mjs 287 B
packages/a2ui-renderer/dist/web-components/create-catalog.cjs 1.89 kB
packages/a2ui-renderer/dist/web-components/create-catalog.mjs 1.83 kB
packages/a2ui-renderer/dist/web-components/define.cjs 440 B
packages/a2ui-renderer/dist/web-components/define.mjs 341 B
packages/a2ui-renderer/dist/web-components/index.cjs 960 B
packages/a2ui-renderer/dist/web-components/index.mjs 655 B
packages/a2ui-renderer/dist/web-components/node.cjs 1.05 kB
packages/a2ui-renderer/dist/web-components/node.mjs 1.04 kB
packages/a2ui-renderer/dist/web-components/surface.cjs 2.83 kB
packages/a2ui-renderer/dist/web-components/surface.mjs 2.81 kB
packages/core/dist/index.cjs 48.1 kB
packages/core/dist/index.mjs 47.7 kB
packages/core/dist/index.umd.js 51.4 kB
packages/react-core/dist/copilotkit-DL0LvmwQ.mjs 105 kB
packages/react-core/dist/copilotkit-rYTwMndy.cjs 107 kB
packages/react-core/dist/index.cjs 16.9 kB
packages/react-core/dist/index.mjs 16.8 kB
packages/react-core/dist/index.umd.js 64.3 kB
packages/react-core/dist/v2/context.cjs 1.55 kB
packages/react-core/dist/v2/context.mjs 1.47 kB
packages/react-core/dist/v2/headless.cjs 12.8 kB
packages/react-core/dist/v2/headless.mjs 12.3 kB
packages/react-core/dist/v2/index.cjs 1.26 kB
packages/react-core/dist/v2/index.mjs 1.11 kB
packages/react-core/dist/v2/index.umd.js 106 kB
packages/react-textarea/dist/index.cjs 18.1 kB
packages/react-textarea/dist/index.mjs 17.4 kB
packages/react-textarea/dist/index.umd.js 18.8 kB
packages/react-ui/dist/index.cjs 24.6 kB
packages/react-ui/dist/index.mjs 23.9 kB
packages/react-ui/dist/index.umd.js 25.8 kB
packages/runtime-client-gql/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/runtime-client-gql/dist/client/conversion.cjs 1.52 kB
packages/runtime-client-gql/dist/client/conversion.mjs 1.45 kB
packages/runtime-client-gql/dist/client/CopilotRuntimeClient.cjs 1.58 kB
packages/runtime-client-gql/dist/client/CopilotRuntimeClient.mjs 1.54 kB
packages/runtime-client-gql/dist/client/types.cjs 701 B
packages/runtime-client-gql/dist/client/types.mjs 642 B
packages/runtime-client-gql/dist/graphql/@generated/gql.cjs 850 B
packages/runtime-client-gql/dist/graphql/@generated/gql.mjs 850 B
packages/runtime-client-gql/dist/graphql/@generated/graphql.cjs 2.4 kB
packages/runtime-client-gql/dist/graphql/@generated/graphql.mjs 2.36 kB
packages/runtime-client-gql/dist/graphql/definitions/mutations.cjs 740 B
packages/runtime-client-gql/dist/graphql/definitions/mutations.mjs 732 B
packages/runtime-client-gql/dist/graphql/definitions/queries.cjs 316 B
packages/runtime-client-gql/dist/graphql/definitions/queries.mjs 304 B
packages/runtime-client-gql/dist/index.cjs 679 B
packages/runtime-client-gql/dist/index.mjs 495 B
packages/runtime-client-gql/dist/index.umd.js 9.58 kB
packages/runtime-client-gql/dist/message-conversion/agui-to-gql.cjs 1.72 kB
packages/runtime-client-gql/dist/message-conversion/agui-to-gql.mjs 1.7 kB
packages/runtime-client-gql/dist/message-conversion/gql-to-agui.cjs 1.56 kB
packages/runtime-client-gql/dist/message-conversion/gql-to-agui.mjs 1.53 kB
packages/runtime-client-gql/dist/package.cjs 181 B
packages/runtime-client-gql/dist/package.mjs 116 B
packages/shared/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/shared/dist/a2ui-prompts.cjs 2.85 kB
packages/shared/dist/a2ui-prompts.mjs 2.85 kB
packages/shared/dist/attachments/utils.cjs 1.74 kB
packages/shared/dist/attachments/utils.mjs 1.7 kB
packages/shared/dist/constants/index.cjs 362 B
packages/shared/dist/constants/index.mjs 345 B
packages/shared/dist/debug.cjs 454 B
packages/shared/dist/debug.mjs 452 B
packages/shared/dist/finalize-events.cjs 1.05 kB
packages/shared/dist/finalize-events.mjs 1 kB
packages/shared/dist/index.cjs 1.99 kB
packages/shared/dist/index.mjs 1.66 kB
packages/shared/dist/index.umd.js 20.3 kB
packages/shared/dist/logger.cjs 112 B
packages/shared/dist/logger.mjs 112 B
packages/shared/dist/package.cjs 181 B
packages/shared/dist/package.mjs 116 B
packages/shared/dist/standard-schema.cjs 740 B
packages/shared/dist/standard-schema.mjs 737 B
packages/shared/dist/telemetry/lambda-client.cjs 1.14 kB
packages/shared/dist/telemetry/lambda-client.mjs 1.13 kB
packages/shared/dist/telemetry/telemetry-client.cjs 1.33 kB
packages/shared/dist/telemetry/telemetry-client.mjs 1.27 kB
packages/shared/dist/telemetry/utils.cjs 321 B
packages/shared/dist/telemetry/utils.mjs 277 B
packages/shared/dist/transcription-errors.cjs 951 B
packages/shared/dist/transcription-errors.mjs 944 B
packages/shared/dist/utils/clipboard.cjs 407 B
packages/shared/dist/utils/clipboard.mjs 405 B
packages/shared/dist/utils/conditions.cjs 540 B
packages/shared/dist/utils/conditions.mjs 536 B
packages/shared/dist/utils/console-styling.cjs 1.24 kB
packages/shared/dist/utils/console-styling.mjs 1.22 kB
packages/shared/dist/utils/errors.cjs 4.51 kB
packages/shared/dist/utils/errors.mjs 4.41 kB
packages/shared/dist/utils/index.cjs 1.39 kB
packages/shared/dist/utils/index.mjs 1.65 kB
packages/shared/dist/utils/json-schema.cjs 1.97 kB
packages/shared/dist/utils/json-schema.mjs 1.91 kB
packages/shared/dist/utils/random-id.cjs 618 B
packages/shared/dist/utils/random-id.mjs 559 B
packages/shared/dist/utils/requests.cjs 706 B
packages/shared/dist/utils/requests.mjs 704 B
packages/shared/dist/utils/types.cjs 161 B
packages/shared/dist/utils/types.mjs 160 B
packages/voice/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/voice/dist/index.cjs 175 B
packages/voice/dist/index.mjs 95 B
packages/voice/dist/index.umd.js 1.5 kB
packages/voice/dist/transcription/transcription-service-openai.cjs 495 B
packages/voice/dist/transcription/transcription-service-openai.mjs 434 B
packages/web-inspector/dist/assets/inspector-logo-icon.cjs 499 B
packages/web-inspector/dist/assets/inspector-logo-icon.mjs 434 B
packages/web-inspector/dist/assets/inspector-logo.cjs 4.32 kB
packages/web-inspector/dist/assets/inspector-logo.mjs 4.23 kB
packages/web-inspector/dist/index.cjs 59.3 kB
packages/web-inspector/dist/index.mjs 59.3 kB
packages/web-inspector/dist/index.umd.js 77.4 kB
packages/web-inspector/dist/lib/context-helpers.cjs 862 B
packages/web-inspector/dist/lib/context-helpers.mjs 830 B
packages/web-inspector/dist/lib/persistence.cjs 1.2 kB
packages/web-inspector/dist/lib/persistence.mjs 1.16 kB
packages/web-inspector/dist/lib/telemetry.cjs 2.54 kB
packages/web-inspector/dist/lib/telemetry.mjs 2.44 kB
packages/web-inspector/dist/package.cjs 181 B
packages/web-inspector/dist/package.mjs 116 B
packages/web-inspector/dist/styles/generated.cjs 6.42 kB
packages/web-inspector/dist/styles/generated.mjs 6.36 kB

compressed-size-action

jpr5 added 2 commits July 24, 2026 19:19
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.
@jpr5
jpr5 marked this pull request as ready for review July 25, 2026 15:00
@jpr5
jpr5 merged commit 7282ecd into main Jul 25, 2026
28 checks passed
@jpr5
jpr5 deleted the ci/showcase-run-harness-unit-suite branch July 25, 2026 15:01
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.
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