Skip to content

chore(showcase): mark multimodal unsupported for llamaindex and crewai-crews - #6158

Merged
jpr5 merged 3 commits into
mainfrom
chore/multimodal-unsupported-llamaindex-crewai
Jul 26, 2026
Merged

jpr5 merged 3 commits into
mainfrom
chore/multimodal-unsupported-llamaindex-crewai

Conversation

@jpr5

@jpr5 jpr5 commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

What this is

multimodal (Attachments) has never worked on llamaindex or crewai-crews, but both manifests
listed it under features, so the fleet probed it and reported red. A red chip says "this regressed".
The truth is "this was never built". This PR marks both cells unsupported instead. It does not
implement the feature, and it does not suppress the cell — the cell still exists, the demo stays wired,
and the chip renders the 🚫 unsupported glyph.

Mechanism used (existing, not invented)

The repo already has exactly one way to declare a feature unsupported for an integration:
not_supported_features in the integration's manifest.yaml. The full derivation chain:

Step Location
Declaration showcase/integrations/<slug>/manifest.yaml -> not_supported_features:
Schema showcase/shared/manifest.schema.json — "feature IDs that this integration's framework cannot architecturally support … excluded from parity computation"
Status fold showcase/harness/src/shared/catalog/catalog-flatten.ts:239 — determineCellStatus() checks not_supported_features first, returns status: "unsupported"
Input mapping showcase/harness/src/shared/cell-model/catalog-input.ts:53 — isSupported: cell.status !== "unsupported"
Model showcase/harness/src/shared/cell-model/cell-model.ts:847 — if (!isSupported) return UNSUPPORTED; (the frozen singleton at :551: supported: false, chipColor: "gray", isRegression: false)
/api/matrix showcase/harness/src/http/matrix.ts:206 -> matrix-compute.ts:53 — projects that same model, so the API value is the rendered chip by construction
Render showcase/shell-dashboard/src/components/unified-cell.tsx:308 — if (!model.supported) renders data-testid="unified-cell-unsupported" with 🚫 and title="Not supported by this framework"

The mechanical guard at catalog-flatten.ts:169 rejects a feature that appears in both features and
not_supported_features, so each entry was moved, not duplicated.

Note this mechanism is strictly stronger than a probe-side skip: buildCellModel returns UNSUPPORTED
regardless of what the live PocketBase row says. Verified against the existing not-supported cells on these
same two integrations, which carry green PB rows and still render 🚫:

llamaindex/gen-ui-interrupt        matrix: chip=gray supported=False | PB rows: d5=green d6=green e2e=green
llamaindex/shared-state-streaming  matrix: chip=gray supported=False | PB rows: d5=green d6=green e2e=green
crewai-crews/mcp-apps              matrix: chip=gray supported=False | PB rows: d5=green d6=green e2e=green

So the cell can never read green or red once declared here — which is the property we want.

Per-integration reason (recorded inline in each manifest)

llamaindex — upstream gap. The pinned llama-index-protocols-ag-ui==0.2.2
(llama_index/protocols/ag_ui/utils.py:82-85) passes an AG-UI UserMessage's content straight into
ChatMessage(...). A text-only turn passes a plain string (fine — every other llamaindex cell is green);
an attachment turn passes a list of AG-UI content-part models, which pydantic routes into
ChatMessage.blocks, a union discriminated on block_type — a field AG-UI's TextInputContent /
ImageInputContent / BinaryInputContent do not carry. Live backend error:

pydantic_core._pydantic_core.ValidationError: 3 validation errors for ChatMessage
blocks.0
  Unable to extract tag using discriminator 'block_type' [type=union_tag_not_found,
    input_value=TextInputContent(type='te... image I just attached'), input_type=TextInputContent]

Fixing it needs a content-part -> TextBlock/ImageBlock/DocumentBlock conversion, upstream or on our
side of get_ag_ui_workflow_router. This PR also corrects that module's docstring, which asserted the
router "normalizes them via the OpenAI input_file path" — it does not.

crewai-crews — never implemented, ours. src/agent_server.py registers a dedicated AG-UI endpoint for
every other demo but no /multimodal route (the block ends at the catch-all
add_crewai_crew_fastapi_endpoint(app, LatestAiDevelopment(), "/")), and there is no
src/agents/multimodal_agent.py. So src/app/api/copilotkit-multimodal/route.ts aliases the generic shared
crew, which has no vision handling and dies on a content-part message:

[CopilotKit] Error (agent_run_error_event): Error: thread=… run=…: CrewAI flow failed; see server logs

That route file's own header comment already concedes the gap ("A dedicated per-demo crew with vision-tuned
agent prompts is tracked as follow-up work").

Proof

Method: the real GET /api/matrix handler (registerMatrixRoute) driven over the real production
PocketBase status collection (all 3082 rows, fetched verbatim from
showcase-pocketbase-production.up.railway.app) and the real on-disk manifests (default loadCells =
buildCatalogCells, the single flattening authority). Same rows, same fixed clock
(now = max(observed_at) + 60s = 1784932566438) for both runs — the only variable is the manifest diff.

BEFORE — real GET /api/matrix, real prod PocketBase rows, manifests at origin/main (3861362)

llamaindex/multimodal
  {"chipColor": "red", "supported": true, "achievedDepth": 4, "ceilingDepth": 6, "isRegression": true, "surfaceState": "red", "isStaleCell": false}
crewai-crews/multimodal
  {"chipColor": "red", "supported": true, "achievedDepth": 4, "ceilingDepth": 6, "isRegression": true, "surfaceState": "red", "isStaleCell": false}

AFTER — same route, same rows, same clock, manifests with this PR

llamaindex/multimodal
  {"chipColor": "gray", "supported": false, "achievedDepth": 0, "ceilingDepth": 0, "isRegression": false, "surfaceState": "gray", "isStaleCell": false}
crewai-crews/multimodal
  {"chipColor": "gray", "supported": false, "achievedDepth": 0, "ceilingDepth": 0, "isRegression": false, "surfaceState": "gray", "isStaleCell": false}

Full multimodal column, AFTER (control)

ag2                      chip=green  supported=True  depth=6/6  [unchanged]
agno                     chip=red    supported=True  depth=4/6  [unchanged]
built-in-agent           chip=red    supported=True  depth=4/6  [unchanged]
claude-sdk-python        chip=green  supported=True  depth=6/6  [unchanged]
claude-sdk-typescript    chip=green  supported=True  depth=6/6  [unchanged]
crewai-crews             chip=gray   supported=False depth=0/0  [CHANGED]
google-adk               chip=green  supported=True  depth=6/6  [unchanged]
langgraph-fastapi        chip=green  supported=True  depth=6/6  [unchanged]
langgraph-python         chip=green  supported=True  depth=6/6  [unchanged]
langgraph-typescript     chip=green  supported=True  depth=6/6  [unchanged]
langroid                 chip=green  supported=True  depth=6/6  [unchanged]
llamaindex               chip=gray   supported=False depth=0/0  [CHANGED]
mastra                   chip=red    supported=True  depth=4/6  [unchanged]
ms-agent-dotnet          chip=green  supported=True  depth=6/6  [unchanged]
ms-agent-harness-dotnet  chip=green  supported=True  depth=6/6  [unchanged]
ms-agent-python          chip=red    supported=True  depth=4/6  [unchanged]
pydantic-ai              chip=green  supported=True  depth=6/6  [unchanged]
spring-ai                chip=green  supported=True  depth=6/6  [unchanged]
strands                  chip=green  supported=True  depth=6/6  [unchanged]
strands-typescript       chip=green  supported=True  depth=6/6  [unchanged]

CONTROL — an already-supported multimodal cell is untouched

langgraph-python/multimodal (the reference integration) is chip=green supported=true depth=6/6 before
and after
, byte-identical. So is every other integration's multimodal cell, including the four that are
red for unrelated reasons (agno, mastra, ms-agent-python, built-in-agent) — those stay red, they
were not swept up.

Complete set of cells whose state changed — exactly 2 of 1000

Diffing every field of every cell in the /api/matrix body, before vs after (identical 1000-cell keyset):

crewai-crews/multimodal   red -> unsupported
llamaindex/multimodal     red -> unsupported

Nothing else. Aggregate confirms no green was manufactured:

                BEFORE                                   AFTER
chipColor       green=632  gray=317  red=51              green=632  gray=319  red=49
supported=false 94                                       96

green is unchanged at 632 — this PR turned two reds into unsupported and created zero greens.

Second, independent derivation (the dashboard's own generated catalog.json, via
showcase/scripts/generate-registry.ts, which runs full AJV validation first) agrees, and also changes
exactly 2 cells:

crewai-crews/multimodal (integrated): status wired -> unsupported, max_depth 4 -> 0
llamaindex/multimodal   (integrated): status wired -> unsupported, max_depth 4 -> 0

metadata BEFORE: total_cells 980, wired 688, stub 0, unshipped 198, unsupported 94, docs_only 20
metadata AFTER : total_cells 980, wired 686, stub 0, unshipped 198, unsupported 96, docs_only 20

parity_tier is unchanged on both columns (already partial), and no other integration's cells moved.

Live dashboard render

shell-dashboard run locally against the prod PocketBase, Playwright over the real DOM. On the
feature-row-multimodal ("Attachments") row, exactly two of twenty columns carry
data-testid="unified-cell-unsupported":

CrewAI (Crews)     unsupportedGlyph=TRUE   text="🚫"
LlamaIndex         unsupportedGlyph=TRUE   text="🚫"
LangGraph (Python) unsupportedGlyph=false  text="Demo ↗ Code </> D6 UI ✓ BE ✓ 1P ✓ D6 ✓"
Agno               unsupportedGlyph=false  text="Demo ↗ Code </> D4 UI ✓ BE ✓ 1P ✗ D6 —"
… 16 more, all unsupportedGlyph=false

Visually: a grey outlined 🚫 badge in those two columns — plainly not a green D6 pill, and not a red ✗.
Control row feature-row-agentic-chat has unsupportedGlyph=false in all twenty columns.

Quality gates

  • oxfmt --check on all three changed files — clean
  • oxlint — 0 warnings, 0 errors
  • generate-registry.ts --validate-only (AJV against manifest.schema.json) — passes; confirms no
    features / not_supported_features overlap
  • shell-dashboard: production build ✓, 68 test files / 1333 tests passed, 1 skipped
  • harness: tsc --noEmit clean; 171 test files / 3625 tests passed. 3 pre-existing failures
    (d5-mapping-drift, frontend-matrix, d5-representatives — the last complains about
    browser-use-smoke) fail identically on clean origin/main, verified by stashing this diff and
    re-running. Unrelated to this change.
  • Diff is 3 files, no lockfile churn, no generated artifacts, no stray worktree files.

Deliberately not done

  • Not implementing the feature for either integration (the upstream conversion for llamaindex and the
    vision crew for crewai-crews remain open work).
  • Not touching agno / mastra / ms-agent-python / built-in-agent, whose multimodal cells are red for
    four unrelated reasons and stay red here.
  • Not loosening the D5 assertion, not dropping skipSend, not deleting the cell, not skipping the probe,
    and not special-casing the probe to pass — every one of those would green a broken cell.

Follow-up commit: CI-caught wired-count bound

The first push failed Showcase: Validate -> "Run build pipeline tests" (the showcase/scripts vitest,
which I had not run locally — my mistake; the harness and dashboard suites both passed):

FAIL __tests__/generate-catalog.test.ts > parity tier: crewai-crews wired cells render
     at_parity or partial against the elected reference
AssertionError: expected 29 to be greater than or equal to 30
 ❯ __tests__/generate-catalog.test.ts:257:32

Real and caused by this PR: reclassifying crewai-crews/multimodal from wired to unsupported drops that
integration's wired-cell count 30 -> 29.

That 30 is a snapshot floor, not an invariant — the assertion's own comment states the partial parity
tier requires only intersection >= 3 with the reference's wired set. 29 clears that by a wide margin, and
the two tier assertions immediately below it (parity_tier in ["at_parity","partial"], uniform across the
column) still pass untouched. So the floor was updated to 29 with a comment recording exactly which cell
moved and why, rather than being deleted or loosened to a no-op.

Nothing else in that suite moved: metadata.total_cells is still 980 and the
wired + stub + unshipped + unsupported == total_cells sum invariant still holds (686 + 0 + 198 + 96 = 980).

Re-run locally after the fix: 72 test files / 2323 tests passed, 0 failed.
oxfmt --check and oxlint clean on the changed test file.

…i-crews

Attachments (`multimodal`) has never worked on either integration, and both
manifests were over-claiming it under `features`, so the D5/D6 probe correctly
reported red — a red chip that read as "this regressed" when the truth is "this
was never built".

Use the repo's existing unsupported mechanism — `not_supported_features` in the
integration manifest, which `determineCellStatus`
(showcase/harness/src/shared/catalog/catalog-flatten.ts:239) folds to
`status: "unsupported"` -> `isSupported: false` -> the `UNSUPPORTED` CellModel
(gray, `supported: false`, 🚫). Both cells now render as genuinely unsupported:
not green (no false claim of working) and not red (no false claim of
regression). Each entry carries an inline note recording WHY, so a future reader
does not mistake it for an oversight.

- llamaindex: upstream gap in `llama-index-protocols-ag-ui==0.2.2`
  (`utils.py:82-85` passes AG-UI content parts straight into `ChatMessage`,
  which rejects them on the `block_type` discriminator).
- crewai-crews: never implemented on our side — `src/agent_server.py` registers
  no `/multimodal` route, so the demo route aliases the generic crew and fails.

Also corrects the llamaindex `multimodal_agent.py` docstring, which asserted a
normalization the upstream router does not perform.

Demo entries stay wired on both, matching every other `not_supported_features`
entry in these manifests.
@github-actions

github-actions Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 41 services digest-pinned.

Run 2026-07-25 23:04:40 PDT — 0 finding(s).

jpr5 and others added 2 commits July 24, 2026 16:02
… unsupported

`generate-catalog.test.ts` pinned crewai-crews' wired-cell count at >= 30. Moving
`multimodal` from `features` to `not_supported_features` reclassifies that cell
from `wired` to `unsupported`, so the real count is 29 and CI's
`showcase/scripts` vitest failed.

The bound is a snapshot floor, not an invariant: the test's own comment says the
partial parity tier only requires intersection >= 3 with the reference's wired
set. 29 still clears that by a wide margin, so the floor tracks the manifest.
Updated to 29 with a note recording which cell moved and why, so the next reader
does not read the decrement as a regression.
@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/@copilotkit/a2ui-renderer@6158

@copilotkit/agentcore-runner

pnpm add https://pkg.pr.new/@copilotkit/agentcore-runner@6158

@copilotkit/angular

pnpm add https://pkg.pr.new/@copilotkit/angular@6158

@copilotkit/channels

pnpm add https://pkg.pr.new/@copilotkit/channels@6158

@copilotkit/channels-core

pnpm add https://pkg.pr.new/@copilotkit/channels-core@6158

@copilotkit/channels-discord

pnpm add https://pkg.pr.new/@copilotkit/channels-discord@6158

@copilotkit/channels-intelligence

pnpm add https://pkg.pr.new/@copilotkit/channels-intelligence@6158

@copilotkit/channels-slack

pnpm add https://pkg.pr.new/@copilotkit/channels-slack@6158

@copilotkit/channels-teams

pnpm add https://pkg.pr.new/@copilotkit/channels-teams@6158

@copilotkit/channels-telegram

pnpm add https://pkg.pr.new/@copilotkit/channels-telegram@6158

@copilotkit/channels-ui

pnpm add https://pkg.pr.new/@copilotkit/channels-ui@6158

@copilotkit/channels-whatsapp

pnpm add https://pkg.pr.new/@copilotkit/channels-whatsapp@6158

@copilotkit/core

pnpm add https://pkg.pr.new/@copilotkit/core@6158

@copilotkit/react-core

pnpm add https://pkg.pr.new/@copilotkit/react-core@6158

@copilotkit/react-native

pnpm add https://pkg.pr.new/@copilotkit/react-native@6158

@copilotkit/react-textarea

pnpm add https://pkg.pr.new/@copilotkit/react-textarea@6158

@copilotkit/react-ui

pnpm add https://pkg.pr.new/@copilotkit/react-ui@6158

@copilotkit/runtime

pnpm add https://pkg.pr.new/@copilotkit/runtime@6158

@copilotkit/runtime-client-gql

pnpm add https://pkg.pr.new/@copilotkit/runtime-client-gql@6158

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/@copilotkit/sdk-js@6158

@copilotkit/shared

pnpm add https://pkg.pr.new/@copilotkit/shared@6158

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/@copilotkit/sqlite-runner@6158

@copilotkit/voice

pnpm add https://pkg.pr.new/@copilotkit/voice@6158

@copilotkit/vue

pnpm add https://pkg.pr.new/@copilotkit/vue@6158

@copilotkit/web-components

pnpm add https://pkg.pr.new/@copilotkit/web-components@6158

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/@copilotkit/web-inspector@6158

commit: 4a303f8

@jpr5
jpr5 marked this pull request as ready for review July 26, 2026 06:18
@jpr5
jpr5 merged commit db75a04 into main Jul 26, 2026
30 checks passed
@jpr5
jpr5 deleted the chore/multimodal-unsupported-llamaindex-crewai branch July 26, 2026 06:18
jpr5 added a commit that referenced this pull request Jul 29, 2026
…nnot overwrite a newer one (#6174)

## The race, with evidence

Three PRs merged within 34 seconds on 2026-07-26. `Showcase: Build &
Push` has **no concurrency group** (deliberately), so all three ran
simultaneously and raced to push the same `:latest` tags.

| run | commit | PR | start → end |
|---|---|---|---|
| `30190815370` | `7b28934387` | #6162 | 06:18:05 → 06:29:44 |
| `30190823203` | `59f275eedc` | #6161 | 06:18:21 → 06:29:44 |
| `30190831480` | `db75a04837` | #6158 | 06:18:39 → **06:29:13** ←
newest, finished FIRST |

The newest commit finished first, so the older builds overwrote its
`:latest`. Per-service job completion times — older beating newer on
every shared slot:

| service | newer (`db75a04837`) | older (`59f275eedc`) | older won by |
|---|---|---|---|
| `shell-dashboard` | 06:25:33 | 06:25:34 | +1s |
| `showcase-harness` | 06:27:51 | 06:27:55 | +4s |
| `shell` | 06:27:17 | 06:27:28 | +11s |
| `shell-dojo` | 06:25:10 | 06:25:26 | +16s |

**All three runs reported `success`.** Staging served pre-#6158 code
while CI, the redeploy gate and deploy verification all looked clean.
Same failure class as #6171: a success that doesn't mean what it says.

## What I verified in YAML vs took on trust

Verified by reading the files / querying the API:

- **Tagging** — `showcase_build.yml` pushed `:latest` **and** `:${{
github.sha }}` in one `depot/build-push-action` step, in both the
`build` and `build-starters` matrices. **A per-commit sha tag already
existed**; confirmed in GHCR (`showcase-shell-dashboard` has digests
tagged `db75a04837…`, `59f275eedc…`, `d28384a2eb…`).
- **Nothing serialized the pushes.** No concurrency group; confirmed the
header comment states this is intentional.
- **Deploy consumes `:latest`** — `verify-railway-image-refs.ts` is the
SSOT assertion: staging is `ghcr.io/copilotkit/<repo>:latest` (mutable),
**prod is `ghcr.io/copilotkit/<repo>@sha256:<digest>` (already immutably
pinned)**. So this race is **staging-only**; prod was never exposed.
- **`Showcase: Verify Deploy` structurally cannot catch it.** It is a
health probe; it asserts no digest or commit provenance anywhere. Its
#6171 per-commit concurrency key is about *which run verifies*, not
*what image is running*. A stale-but-healthy service passes.
- **The racing runs build DISJOINT service sets** (see below) — I pulled
the actual job lists.

Taken on trust: nothing material. The issue description matched the API
on every point I checked.

## Why NOT a concurrency group

`detect-changes` builds a **per-push, path-filtered** matrix, so
concurrent runs build overlapping but **non-identical** service sets:

- `7b28934387` → ag2, agno, built-in-agent, claude-sdk-python,
claude-sdk-typescript, crewai-crews, langgraph-fastapi,
langgraph-python, langroid, llamaindex, mastra, pydantic-ai, shell-docs,
spring-ai, strands (**15**)
- `db75a04837` → crewai-crews, llamaindex, shell, shell-dashboard,
shell-docs, shell-dojo, showcase-harness (**7**)

`cancel-in-progress: true` would have cancelled the `7b28934387` run and
the ~10 services **only it builds would never have shipped** — trading a
stale-image bug for a never-shipped bug. Per [GitHub's
docs](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#concurrency),
`cancel-in-progress: false` is no better: *"Any previously pending job
or workflow in the concurrency group will be canceled"* — with three
rapid merges the **middle** commit's build is dropped outright. GitHub
also does not guarantee FIFO ordering of queued runs.

Concurrent runs here are **not redundant**, so they must not be
cancelled.

**Re the #6171 interaction:** this design does **not** use
`cancel-in-progress`, so no build is ever superseded-and-cancelled and
the cancelled-slot notifier is never tripped by this change. That
interaction stays theoretical — deliberately.

## The design

Make the one shared mutable resource monotonic instead of serializing
the fleet.

1. The build step pushes **only** the immutable `:<sha>` tag, plus an
`org.opencontainers.image.revision` label.
2. A guard resolves the commit behind the current `:latest`, asks GitHub
`compare/<theirs>...<ours>`, and advances `:latest` (registry-side
retag, no pull) **unless ours is `behind`** — i.e. `:latest` already
holds a descendant and moving it would roll staging back.

**Fails open by design.** No `:latest` yet, unlabelled legacy image,
unreachable API, diverged history → advance. A stuck `:latest` is the
very failure being fixed, so it declines only on *positive proof* of
regression.

**Placement:** in `redeploy-staging` / `redeploy-staging-starters`,
immediately before the Railway pull that consumes `:latest` — not per
build slot. Those jobs already have Node (build slots do **not**, so
per-slot would mean an unpinned `npx tsx` fetch on ~50 parallel
runners), and deciding right before the pull makes the window as narrow
as possible. The image list is the **same matrix ∩ build-success
intersection** that decides what gets redeployed, so a failed build can
never move a tag.

Also adds `showcase_build.yml` to `showcase_validate.yml`'s trigger
paths — the new test asserts against that file's live text, and without
the path a PR re-adding `:latest` would never run the test that catches
it.

## Tradeoffs / what stays open

- **Residual sub-second TOCTOU.** GHCR has no compare-and-swap on tags,
so two runs reading `:latest` simultaneously could still both advance.
This narrows the window from the whole build (~10 min) to inspect→retag.
Fully closing it means retiring the mutable staging tag and pinning
staging to digests the way prod already is — a change to the Railway
image-ref SSOT contract, not a workflow change. **Recommended
follow-up.**
- **The guard is inert for one build per image.** Today's `:latest`
images carry no labels (verified: `showcase-shell-dashboard:latest` has
no `Labels` at all), so the first post-merge build fails open and
advances unconditionally — same as today. Protection starts from the
second build of each image.
- Failure to retag exits non-zero, redding the redeploy job and stopping
the deploy. That is intended: redeploying against a tag that did not
move is exactly the silent false green being fixed.

## Proof

**Red/green on the live YAML.** `advance-latest-tag.test.ts` parses the
real `showcase_build.yml` (extending #6171's `redeploy-guard.test.ts`
pattern). Reverting the workflow to its pre-fix state: **14 failed / 23
passed**. With the fix: **37 passed**. Full `showcase/scripts` suite:
**2382 passed, 73 files**.

**The load-bearing predicate, verified live against the real incident
commits:**

```
compare/db75a04837...59f275e  => behind     (older run arriving late → DECLINE)
compare/59f275eedc...db75a04  => ahead      (newer run → advance)
compare/db75a04837...db75a04  => identical
```

**Label reading, verified against a real multi-platform registry image**
— `docker buildx imagetools inspect ghcr.io/astral-sh/uv:latest` piped
through `extractRevisionLabel()` returns
`3010295ae7ff572de459987ad70db315a62ecd61`, matching `jq` exactly. The
platform-keyed shape is handled.

**Shell/jq transforms** exercised directly, including the empty-CSV edge
case (empty → empty, step skipped by its `if:`).

**Lint:** `actionlint` finding counts byte-identical to the pre-change
baseline (no new findings; the 11 pre-existing are unrelated). `zizmor
--min-severity low` with the repo config: **no findings**.

**Typecheck:** both new files are in `showcase/scripts/tsconfig.json`'s
include set and produce **zero** errors. Worth stating plainly: `nx
run-many -t check-types` **does not reach `showcase/scripts`** — the
project isn't in the nx graph and has no `check-types` target (there are
9 pre-existing type errors in sibling files, which is how I confirmed
it). So the typecheck above is mine, not CI's. The *tests* are gated:
`showcase_validate.yml` runs bare `pnpm exec vitest run` in
`showcase/scripts`, which auto-discovers the new file.

### What I could NOT prove

**I did not construct a real concurrent race on scratch branches.**
Doing it faithfully needs two builds pushing the same GHCR repo with
controlled finish ordering, which means merging to `main` — the only
branch the build workflow triggers on. No run IDs for a live race
demonstration; I am not implying one.

Unproven until this runs on main: that `docker buildx imagetools create`
retags cleanly under the runner's GHCR credentials, and that `npx tsx`
behaves in the redeploy jobs (it is already the established invocation
there — `redeploy-env.ts` — so this is low risk, not zero).

## Normal single-merge builds are unaffected

No concurrency group is added, so nothing queues or cancels. A lone
merge finds `:latest` at its own parent → `ahead` → advances, exactly as
before. Cost is one `imagetools inspect` + one `gh api` + one
registry-side retag per built service, in a job that already exists — no
extra job, no extra checkout, no change to build parallelism.

---

Branched from `db75a04837`; #6156/#6159 landed after, so this will need
main merged in before it goes green.

Probable conflict with the concurrent `git lfs pull` work in
`showcase_validate.yml` — my edit there is only the top-level `on:
paths:` list, so it should merge cleanly, but flagging it.
pull Bot pushed a commit to TheTechOddBug/CopilotKit that referenced this pull request Jul 29, 2026
…nnot overwrite a newer one

Three merges landed on main within 34 seconds on 2026-07-26. The build
workflow has no concurrency group by design, so all three ran at once and
raced to push the same `:latest` tags. The NEWEST commit's build finished
FIRST, so the two older builds overwrote it:

  run 30190815370  7b28934  (CopilotKit#6162)  06:18:05 -> 06:29:44
  run 30190823203  59f275e  (CopilotKit#6161)  06:18:21 -> 06:29:44
  run 30190831480  db75a04  (CopilotKit#6158)  06:18:39 -> 06:29:13   <- NEWEST

Per-service, the older commit beat the newer one on every shared slot:
shell-dashboard (+1s), showcase-harness (+4s), shell (+11s), shell-dojo
(+16s). All three runs reported `success`. Staging served pre-CopilotKit#6158 code
while CI, the redeploy gate and deploy verification all looked clean.

A concurrency group is the wrong fix. `detect-changes` builds a per-push,
path-filtered matrix, so concurrent runs build overlapping but NON-IDENTICAL
service sets -- 7b28934 was the only run building ag2, agno, langroid,
spring-ai, strands and 10 others. `cancel-in-progress: true` would have
dropped those entirely, trading a stale-image bug for a never-shipped bug.
`cancel-in-progress: false` is no better: GitHub keeps at most one pending
run per group and cancels any previously-pending one.

Instead make the mutable pointer monotonic. The build step now pushes only
the immutable `:<sha>` tag plus an `org.opencontainers.image.revision`
label. A new guard then advances `:latest` unless the tag already points at
a DESCENDANT of the commit being built, which is exactly the regression
case. Every ambiguous state (no tag, unlabelled legacy image, unreachable
API, diverged history) advances -- a stuck `:latest` is the failure mode
being fixed, so the guard declines only on positive proof of regression.

The guard runs in redeploy-staging / redeploy-staging-starters, immediately
before the Railway pull that consumes `:latest`, over the same
matrix-intersect-build-success set that decides what gets redeployed. That
placement keeps the read->retag window minimal and avoids an unpinned
`npx tsx` fetch on ~50 parallel build slots that have no Node.

Also adds showcase_build.yml to showcase_validate.yml's trigger paths: the
new test asserts against that file's live text, and without the path a PR
re-adding `:latest` to the push step would never run the test that catches it.

Prod is unaffected -- verify-railway-image-refs.ts already pins prod to
`@sha256:<digest>`; only staging consumes the mutable tag.
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