Repository navigation
fix(showcase): use each integration's own name in demo page titles - #6162
Merged
Merged
Conversation
14 integrations' `src/app/demos/layout.tsx` hardcoded "LangChain - Python" in `generateMetadata` — a copy-paste leftover from langgraph-python, which the file was cloned from. Every `/demos/*` page in mastra, strands, ag2, agno and 10 others rendered `<title>LangChain - Python</title>`. Each now uses the display name from its own `manifest.yaml` `name:` field, matching the convention the already-correct integrations use (langgraph-typescript -> "LangGraph (TypeScript)", strands-typescript -> "AWS Strands (TypeScript)"). langgraph-python itself is included: its manifest name and root layout both say "LangGraph (Python)", so "LangChain - Python" (the legacy Notion partner-column label) was stale there too.
Contributor
Production Digest-Pinning AuditAll 41 services digest-pinned. Run 2026-07-25 23:04:30 PDT — 0 finding(s). |
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/channels
@copilotkit/channels-core
@copilotkit/channels-discord
@copilotkit/channels-intelligence
@copilotkit/channels-slack
@copilotkit/channels-teams
@copilotkit/channels-telegram
@copilotkit/channels-ui
@copilotkit/channels-whatsapp
@copilotkit/core
@copilotkit/react-core
@copilotkit/react-native
@copilotkit/react-textarea
@copilotkit/react-ui
@copilotkit/runtime
@copilotkit/runtime-client-gql
@copilotkit/sdk-js
@copilotkit/shared
@copilotkit/sqlite-runner
@copilotkit/voice
@copilotkit/vue
@copilotkit/web-components
@copilotkit/web-inspector
commit: |
jpr5
marked this pull request as ready for review
July 26, 2026 06:18
jpr5
requested review from
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
July 26, 2026 06:18
This was referenced Jul 26, 2026
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.
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.
What
showcase/integrations/*/src/app/demos/layout.tsxwas cloned fromlanggraph-pythonand 14 copies kept its hardcoded"LangChain - Python"title. Every/demos/*page in those integrations rendered someone else's name in the browser tab. Each file now uses the display name from its ownmanifest.yamlname:field.Two string literals per file, nothing else.
Convention matched
The already-correct integrations hardcode their own display name, which equals their
manifest.yamlname::langgraph-typescript→LangGraph (TypeScript)strands-typescript→AWS Strands (TypeScript)Same shape used here: bare name when no demo slug is resolvable,
"<Name> - <Demo>"otherwise.Full list of mismatched titles (all fixed)
ag2agnobuilt-in-agentclaude-sdk-pythonclaude-sdk-typescriptcrewai-crewslanggraph-fastapilanggraph-pythonlangroidllamaindexmastrapydantic-aispring-aistrandslanggraph-pythonis included because"LangChain - Python"is the legacy Notion partner-column label, not the integration's name — its ownmanifest.yamland root layout both sayLangGraph (Python).Untouched (already name themselves correctly):
langgraph-typescript,strands-typescript,ms-agent-dotnet,ms-agent-harness-dotnet,ms-agent-python.Proof — rendered titles from locally served pages
Not a source diff:
next devper app, realdocument.titleread via Playwright / served HTML.Red → green on the same running server (
mastra,/demos/multimodal, port 3411):langgraph-python(/demos/multimodal, port 3415) — the only integration whose middleware setsx-pathname, so it is the one that exercises the"<Name> - <Demo>"branch:Second sample,
strands(/demos/multimodal, port 3414):Control —
langgraph-typescript(/demos/multimodal, port 3413), file not touched:Why the title is not read from
manifest.yamlat runtimeThe obvious "right level" fix is to have
generateMetadatareadmanifest.nameinstead of a literal. I built that, then backed it out: 15 of 20 runner images never copymanifest.yaml, so amanifest.yamlread on the no-slug path (which is the path every integration exceptlanggraph-pythonactually takes, since only that one has middleware settingx-pathname) would throw ENOENT and 500 every demo page in production.langgraph-python's Dockerfile documents exactly this failure mode at the line where it copies the manifest in. Making the config the runtime source would mean touching 15 Dockerfiles and re-verifying 15 image builds — out of proportion for a title string, and a much larger blast radius.Adjacent issues found, deliberately not fixed here
x-pathnameis only set bylanggraph-python(src/middleware.ts). Everywhere elsegenerateMetadatanever resolves a slug, so demo pages show just the integration name and never"<Name> - <Demo>". The per-demo title needs middleware per app (or a different pathname source) — separate change.google-adkhas nosrc/app/demos/layout.tsxat all, so its demo pages fall back to the root layout's"CopilotKit Showcase". That is a missing file, not a wrong string.src/app/layout.tsxtitles are inconsistent — 16 integrations use a bare"CopilotKit Showcase"whilemastra,langgraph-python,langgraph-typescriptandbuilt-in-agentappend their own name. No integration names a different integration there, so it is untidy rather than wrong.Checks
prettier --checkon all 14 changed files: cleantsc --noEmitinmastra(107 pre-existing errors, unrelated files) — count identical with the HEAD version of the file vs this change; no errors indemos/layout.tsx. Same forstrandsandlanggraph-typescript.shell-dashboard's"LangChain - Python"strings are the Notion partner label and are untouched), so there are no affected tests.