Repository navigation
fix(showcase): resolve dashboard build of shared cell-model fold + close CI gap - #5955
Merged
Merged
Conversation
…ose CI gap PR #5952 (9a8cf61) added explicit `.js` extensions to the relative imports inside the harness's shared cell-model fold (showcase/harness/src/shared/cell-model/{cell-model,live-status,staleness}.ts) — REQUIRED for the harness's pure-Node-ESM runtime and correct as-is. But the dashboard re-exports that fold via shims (showcase/shell-dashboard/src/lib/{cell-model,live-status,staleness,format-ts}.ts `export * from "../../../harness/src/shared/cell-model/*"`), pulling the fold into the dashboard's `next build`. `export *` does not rewrite the fold's INTERNAL `.js` edges, and the dashboard's empty next.config.ts had no extensionAlias, so webpack resolved `./live-status.js` literally, found only the `.ts` source, and failed: Module not found: Can't resolve './live-status.js' Module not found: Can't resolve './staleness.js' Module not found: Can't resolve './format-ts.js' > Build failed because of webpack errors Two-part fix (one coherent subject): 1. Resolution: add `webpack.resolve.extensionAlias` to showcase/shell-dashboard/next.config.ts so `.js`/`.mjs` specifiers resolve to `.ts`/`.tsx`/`.mts` sources — the bundler complement to TS NodeNext's `.js`-import convention. Covers the `next build` (webpack) path CI uses. The harness fold's `.js` imports are left untouched (they are correct). 2. CI gap: the dashboard build did not run on #5952 because the build matrix is path-filtered and #5952 only touched `showcase/harness/**`, which selects `showcase_harness` but not `shell_dashboard`. Add `showcase/harness/src/shared/**` to the `shell_dashboard` paths-filter so any change to the shared fold the dashboard compiles in also selects the dashboard build — a fold change can never again ship an unbuilt dashboard. Local red-green proof: - RED (main, before fix): `next build` in showcase/shell-dashboard emitted the 4 fold-resolve errors above. - GREEN (after extensionAlias): same build → 0 fold-resolve errors; the fold resolves. Remaining `@/data/*.json` errors are the prebuild-generated files (generate-registry/probe-docs) skipped in the local repro, produced in CI's Docker build — unrelated to this fix.
jpr5
requested review from
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
July 14, 2026 05:02
Contributor
📣 Social Copy GeneratorGenerate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.
|
Contributor
Production Digest-Pinning AuditAll 41 services digest-pinned. Run 2026-07-13 22:02:39 PDT — 0 finding(s). |
Contributor
|
Size Change: 0 B Total Size: 1.19 MB ℹ️ View Unchanged
|
This was referenced Jul 14, 2026
jpr5
added a commit
that referenced
this pull request
Jul 14, 2026
…d failures (#5956) ## Two silent-failure gaps in the showcase build/deploy/notify pipeline These are **pre-existing** silent-failure holes surfaced in code review (not caused by any recent PR). This PR fixes the two load-bearing ones. ### 1. Green-but-zero-redeploy (silent "we thought we shipped but didn't") The `redeploy-staging` job computes the redeploy set as the intersection of the build matrix and the build-success set. This job **only runs when `aggregate-build-results.outputs.any_success == 'true'`** (job-level `if:` guard). So if that intersection comes back **EMPTY**, it does NOT mean "nothing to deploy" — it means at least one slot built successfully yet none of those successes maps back to a matrix `dispatch_name`. That's a `dispatch_name`↔ `service` contract skew (the aggregator's `service` values and the matrix's `dispatch_name` values drifted apart). The old code emitted `services=` (empty) and exited 0 → the build went **GREEN while redeploying NOTHING**, silently. **Fix:** on an empty intersection in this any_success-guaranteed step, fail loud (`::error::` + `exit 1`) with a diagnostic naming both sides of the skew. The legitimate "nothing changed / nothing succeeded" no-op paths are guarded at the **job level** (`has_changes=='true' && any_success=='true'`), so the fixed step never runs there — no false-red. ### 2. Starter build failures had no alert surface (invisible failures) The `notify` job's `needs` (and its `if: failure()`) omitted `detect-starter-changes` and `build-starters`, and `build-starters` wrote no per-slot build-result artifact. So a **failed starter image build produced NO Slack alert and NO PR comment** — it shipped silently. **Fix:** - Added `detect-starter-changes` + `build-starters` to `notify.needs` so `if: failure()` sees a starter build failure → Slack alert + PR comment. - Gave `build-starters` a per-slot build-result artifact **mirroring the main `build` matrix** (same `{service,status}` shape, `cancelled→skipped` normalization, `if: always()`, `if-no-files-found: error`), using a **distinct `starter-build-result-*` prefix** so it never matches the aggregator's `build-result-*` download pattern (starters must not pollute the showcase redeploy set keyed by `dispatch_name`). ### Red / Green **Finding #1** — extracted the step's shell/jq logic and drove it with synthetic inputs: RED (pre-fix), any_success=true + empty intersection: ``` No services in matrix ∩ success-set — skipping redeploy. Computed services CSV (matrix ∩ build-success): EXIT=0 # $GITHUB_OUTPUT: services= -> silent pass, redeploys NOTHING ``` GREEN (post-fix), same inputs: ``` ::error::Build succeeded (any_success=true) but matrix ∩ success-set is EMPTY — dispatch_name/service contract skew; nothing would be redeployed. Successful build service values: ["shell-RENAMED","mastra-RENAMED"] Scheduled matrix dispatch_name values: ["shell","mastra"] EXIT=1 # fails loud ``` No-regression: non-empty intersection → `EXIT=0 ; services=shell`. The nothing-changed/nothing-succeeded paths are skipped at the job level (never reach the step) → no false-red. **Finding #2** — modeled `if: failure()` (fires iff any `needs` job result is `failure`): ``` BEFORE (starters NOT in needs), starter=failure -> notify fires = False (INVISIBLE, the bug) AFTER (starters IN needs), starter=failure -> notify fires = True (FIXED) AFTER no-regression, starters=skipped, all green -> notify fires = False (quiet) ``` ### Validation - `python3 yaml.safe_load` parses OK. - `actionlint`: only pre-existing findings remain (matrix jq SC2086 + the known `depot-ubuntu-24.04-4` runner-label warning); no new errors in edited regions. - `yamllint`: only pre-existing line-length/document-start/truthy warnings. ### Scope Touches **only** `.github/workflows/showcase_build.yml`, and only these two concerns. Does NOT touch the `shell_dashboard` paths-filter region (PR #5955's domain), nor the other backlog debt (false-root-cause comment, double-alert, check-lockfile guard). Self-contained; not stacked on #5955.
jpr5
added a commit
that referenced
this pull request
Jul 14, 2026
…mment corruption
The Turbopack transform loader that strips `.js` off relative import/export
specifiers (so the harness cell-model fold resolves to its `.ts` sources) used
a raw-text regex that matched `from "…".js` anywhere in the source, so a
`.js`-shaped specifier inside a string, comment, or template literal was
corrupted. It also missed bare side-effect imports and `.mjs`/`.cjs`
specifiers, and discarded the incoming sourcemap.
Harden matching to real import/export STATEMENT context:
- static/re-export forms matched only when the `from` clause (or leading
import/export keyword, single-line) begins a line — covers multi-line
`import { … } from "./x.js"` blocks, never mid-line string data
- bare side-effect `import "./x.js";` (line-anchored)
- dynamic `import("./x.js")` by call syntax
- extend to `.mjs`/`.cjs` for symmetry with webpack extensionAlias
- forward the sourcemap via `this.callback(null, code, map)`
Relative-only throughout; bare/package specifiers untouched.
Narrow the next.config turbopack rule glob from `cell-model/*.ts` (which also
matched `*.test.ts` / `*.equivalence-fixtures.ts` data siblings) to an explicit
`{cell-model,live-status,staleness,format-ts}.ts` alternation — the 4 fold
modules the dashboard actually imports.
Add a red-green unit test pinning the hardened behavior (strips real
static/bare/dynamic/.mjs/.cjs specifiers; leaves string/comment/template data
untouched; forwards the map).
Verified: webpack `next build` (no #5955 regression), `next build --turbopack`,
and `next dev --turbopack` all resolve the fold; harness fold `.js` untouched.
jpr5
added a commit
that referenced
this pull request
Jul 14, 2026
… cell-model fold (#5959) ## Problem `pnpm dev` on the shell-dashboard fails to start the fold-importing routes: ``` Module not found: Can't resolve './live-status.js' Module not found: Can't resolve './format-ts.js' Module not found: Can't resolve './staleness.js' GET / 500 ``` The dashboard re-exports the shared **cell-model fold** from the harness (`showcase/harness/src/shared/cell-model/*.ts`). Those fold files are authored for the harness's pure-Node-ESM runtime, so their internal relative imports carry explicit `.js` extensions (e.g. `import { formatTs } from "./format-ts.js"`) even though they exist on disk as `.ts`. `export *` does not rewrite those internal edges. `next build` (webpack) already resolves this via the `resolve.extensionAlias` in `next.config.ts` (added in #5955), which tells webpack to try the TS sources for a `.js` specifier. But the `dev` script forced Turbopack (`next dev --turbopack`), and **Turbopack has no `resolve.extensionAlias` parity** ([Next #82945](vercel/next.js#82945)) — so dev couldn't resolve the fold. ## Fix Drop `--turbopack` from the `dev` script. On Next 15.5.x, `--turbopack` is an explicit opt-in flag (there is no `--webpack` opt-out); plain `next dev` runs **webpack**, which honours the existing `extensionAlias`. ```diff - "dev": "next dev --turbopack --port 3002", + "dev": "next dev --port 3002", ``` `build` is unchanged (`next build` = webpack). A note in `next.config.ts` explains why dev uses webpack. **Tradeoff:** dev loses Turbopack's faster HMR and falls back to webpack-speed dev until Turbopack ships `extensionAlias` parity (#82945), at which point dev can switch back. ## Red / Green (empirical, this branch) **Empirical proof of which bundler each command runs** (Next 15.5.15 startup banner): - `next dev --turbopack` → `▲ Next.js 15.5.15 (Turbopack)` - `next dev` → `▲ Next.js 15.5.15` (no "(Turbopack)" = webpack) **RED** — `next dev --turbopack`, `GET /`: ``` ▲ Next.js 15.5.15 (Turbopack) Module not found: Can't resolve './format-ts.js' Module not found: Can't resolve './live-status.js' Module not found: Can't resolve './staleness.js' GET / 500 in 3691ms ``` **GREEN** — `next dev` (webpack), `GET /`: ``` ▲ Next.js 15.5.15 ✓ Ready in 1124ms ✓ Compiled / in 1948ms (704 modules) GET / 200 in 2844ms ``` No `Can't resolve`. **No regression** — `next build` (webpack) still resolves the fold: ``` Creating an optimized production build ... ✓ Compiled successfully in 3.1s ``` (The fold compiles clean under webpack via the unchanged `extensionAlias`.) ## Deploy path is UNAFFECTED The `dev` script is never in the build or runtime path. `showcase/shell-dashboard/Dockerfile` builds with `npx next build` (webpack) and serves with `npx next start`. This change touches only local `pnpm dev` — the built/deployed dashboard image is byte-for-byte identical.
pull Bot
pushed a commit
to TheTechOddBug/CopilotKit
that referenced
this pull request
Jul 14, 2026
… cell-model fold Turbopack has no resolve.extensionAlias parity (Next #82945), so 'next dev --turbopack' can't resolve the shared cell-model fold's .js->.ts specifiers and fails with Can't resolve './live-status.js'. The extensionAlias in next.config.ts (added in CopilotKit#5955) is honoured by webpack, which next build already uses. Drop --turbopack from the dev script so dev runs on webpack too and resolves the fold. Deploy path unaffected: the Dockerfile builds with 'next build' (webpack) and serves with 'next start' -- the dev script is never in the build or runtime path.
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 broke
PR #5952 (
9a8cf615) added explicit.jsextensions to the relative imports inside the harness's shared cell-model fold (showcase/harness/src/shared/cell-model/{cell-model,live-status,staleness}.ts). Those.jsextensions are REQUIRED for the harness's pure-Node-ESM runtime and are correct — this PR does not revert them.The problem: the dashboard re-exports that fold via re-export shims (
showcase/shell-dashboard/src/lib/{cell-model,live-status,staleness,format-ts}.ts, eachexport * from "../../../harness/src/shared/cell-model/*"), which pulls the fold into the dashboard'snext build.export *does not rewrite the fold's internal.jsedges, and the dashboard'snext.config.tswas empty (noextensionAlias), so webpack resolved./live-status.jsliterally, found only the.tssource, and failed:First-red at
9a8cf615; reproduced in CI run29306712559(shell-dashboard build job).The fix (two parts, one coherent subject)
1. Resolution —
showcase/shell-dashboard/next.config.ts: add a webpackresolve.extensionAliasso.js/.mjsspecifiers resolve to.ts/.tsx/.mtssources. This is the standard bundler complement to TypeScript NodeNext's.js-import convention, and it applies to thenext build(webpack) path CI uses. A shim-only fix does not work —export *doesn't intercept the fold's internal.jsedges; the alias in the dashboard build is the correct layer. The harness fold.jsimports are left untouched.2. CI gap —
.github/workflows/showcase_build.yml: the dashboard build didn't run on #5952 because the build matrix is path-filtered and #5952 only touchedshowcase/harness/**, which selectsshowcase_harnessbut notshell_dashboard. Addedshowcase/harness/src/shared/**to theshell_dashboarddorny/paths-filterset. Now any change to the shared fold the dashboard compiles in also selects the dashboard build — a fold change can never again ship an unbuilt dashboard. (Verified onlyshell-dashboardconsumes this fold, so the gate is scoped precisely.)Local red-green proof
RED (latest main, before the
next.config.tsfix) — fromshowcase/shell-dashboard,next build:(4 fold-resolve errors.)
GREEN (after the
extensionAliasfix) — samenext build:The only remaining
Module not founderrors are@/data/{catalog,registry,docs-status}.json, which are generated by the dashboard'sprebuildscripts (generate-registry.ts/probe-docs.ts) that were skipped in the local repro. CI's Docker build runsprebuildfirst, so those files exist there — unrelated to this fix.CI-gap trace
dorny/paths-filteremitschangesas the JSON array of filter keys whose patterns matched. A change toshowcase/harness/src/shared/cell-model/live-status.tsnow matches bothshowcase_harness(viashowcase/harness/**) andshell_dashboard(via the newshowcase/harness/src/shared/**), so the matrixselect($dispatch == "" and ($changes | index($fk) != null)) includes theshell-dashboardslot. Gap closed.🤖 Generated with Claude Code