Repository navigation
fix(docs): preserve runtime module links in the container - #8054
Conversation
Keep the runner under /app/shell-docs so generated MDX and Shiki aliases resolve to the installed modules as they do in the builder. Render docs pages from the final image in PR CI without external networking, so a successful build cannot hide a broken runtime module layout.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Runner setup and route validation showcase/shell-docs/Dockerfile |
The runner uses /app/shell-docs. A build-time check starts the production server on loopback, waits for it to listen, and verifies HTTP 200 responses and expected content markers for three routes. The check sends the server SIGTERM when it ends. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- CopilotKit/CopilotKit#8039: Adds catalog routes that the Dockerfile check exercises.
- CopilotKit/CopilotKit#7819: Introduces the Generative UI standard catalog and its shell-docs documentation.
Merge Risk: 
Minimal · up to 68290
-
No merge-blocking issue was identified in the runtime layout change.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "fix(docs): preserve runtime module links in the container" matches the main change. The PR keeps the runtime runner at /app/shell-docs so generated MDX and Shiki links resolve to the copied dependencies, and it adds a network-isolated runtime page check. The title is specific, concise, and follows a conventional-commit style. It does not mention the added build-time check, but that is a secondary detail.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Production Digest-Pinning AuditAll 43 services digest-pinned. Run 2026-10-28 10:12:59 PDT — 0 finding(s). |
|
Size Change: 0 B Total Size: 2.37 MB ℹ️ View Unchanged
|
Keep the isolated runtime check in the docs Dockerfile so both PR and main builds exercise the deployed filesystem before publishing an image. Restore the shared workflow, keeping this follow-up scoped to docs.
❌ Showcase Build FailedThe Docker build triggered by this PR's merge failed. Run: https://github.com/CopilotKit/CopilotKit/actions/runs/40741365910 @contextablemark — please check the build logs and fix the issue. |
…it#8064) The docs runtime currently copies the complete installed dependency tree and complete `.next` directory. This packages compiler/test tooling and files the serving process does not need. Use Next's standalone server and traced dependencies while preserving the `/app/shell-docs` layout required by Turbopack's relative MDX/Shiki aliases. Enable `output: "standalone"` with the parent tracing root; copy the standalone tree to `/app`, explicitly copy `.next/static`, `public`, and `src/content`, and launch `node server.js` on port 10000 with an explicit hostname. Adapt the existing network-isolated final-image check to launch this same server and also check Markdown, JS, CSS, and a public image. Only `showcase/shell-docs/Dockerfile` and `showcase/shell-docs/next.config.ts` change. No dependency/lockfile, shared workflow, deployment policy, pin, or Railway configuration changes. ## Matched local packaging experiment Both images were built on Mark's Mac for **linux/amd64**, using the same pinned source `68290394694a981d274294a07de0e8b2e66d04c8`, build arguments, and existing Node 22.23.4 base image. The trial adds the two-file packaging patch. The patch was uncommitted during that experiment, so its build label identifies the starting revision, not the complete trial file tree. The control uses the original Dockerfile via stdin and restores the original Next config inside the builder via an inline COPY; it does not overwrite the working tree or preview files. Sizes below are the **sum of compressed gzip layer sizes from exported OCI manifests**, excluding configuration, manifest/index metadata, and provenance attestations. Archives were streamed and parsed in memory; neither image was pushed. | Packaging | Compressed layer bytes | Decimal MB | | --- | ---: | ---: | | Original control | 554,409,182 | 554.4 | | Standalone trial | 196,850,682 | 196.9 | | Saved | **357,558,500** | **357.6 (64.49%)** | These matched local builds are distinct from the previously observed published CopilotKit#8054 image (578,551,545 compressed layer bytes). The 64.49% figure is the matched local A/B result, not a cross-revision comparison with that published image. Both production builds passed compilation, TypeScript, static-page generation, the Node-version check, and their final-runtime route assertions. The control retained the original three HTML assertions. The trial additionally passed: - `/generative-ui/components.md`: HTTP 200, Markdown MIME type, expected content. - A JS chunk and CSS stylesheet referenced by the Button page: HTTP 200 and non-empty bodies. - `/images/ag-ui-overview-with-partners.png`: HTTP 200 and non-empty body. The build-time runtime check runs with **`RUN --network=none`**, uses loopback only, and needs no model, backend credentials, Railway access, or live service. <details> <summary>Local image identities and layer evidence</summary> ### albert-docs-full:control-6829039469 Linux AMD64 manifest: `sha256:532712ccb8b7c2044f5534f51a367b91e256fc1b6c6932fe8e0a49babecb02e7` Sum of gzip layer sizes: **554,409,182 bytes**. | Layer | Compressed bytes | | --- | ---: | | `COPY docker-entrypoint.sh /usr/local/bin/` | 449 | | `COPY /app/shell-docs/.next ./.next` | 119,895,746 | | `COPY /app/shell-docs/node_modules ./node_modules` | 337,416,203 | | `COPY /app/shell-docs/package.json ./` | 881 | | `COPY /app/shell-docs/public ./public` | 15,985,023 | | `COPY /app/shell-docs/src/content ./src/content` | 1,260,794 | ### albert-docs-standalone:trial-6829039469 Linux AMD64 manifest: `sha256:70d098cf6d1fc827418f4dd31178b3758f91ee820a7e97f52023e48600750075` Sum of gzip layer sizes: **196,850,682 bytes**. | Layer | Compressed bytes | | --- | ---: | | `COPY docker-entrypoint.sh /usr/local/bin/` | 449 | | `COPY /app/shell-docs/.next/standalone/ /app/` | 90,889,026 | | `COPY /app/shell-docs/.next/static ./.next/static` | 8,865,307 | | `COPY /app/shell-docs/public ./public` | 15,985,028 | | `COPY /app/shell-docs/src/content ./src/content` | 1,260,786 | The OS/Node base image is identical in both builds. Local OCI index digests: - Control: `sha256:2de83afffeea29d6fb3ea357f9ffc3e6b462dda2e9a76d510ceb8b2d9446593c` - Trial: `sha256:8ee84bd7fd768f4348ec306854a955803bcc05c6735be781a20228c0bd6963a7` </details> ## Additional isolated runtime evidence A separate disposable container launched the generated `server.js` with **`docker run --rm --network none --platform linux/amd64`**, without publishing a host port. It discovered the dedicated component links from the catalog index, required exactly 59 distinct pages, and checked all 59 for HTTP 200 plus their Props section. **64 HTTP checks passed:** the catalog index, 59 component pages, two Markdown endpoints, `llms.txt`, and `sitemap.xml`. The following generated aliases all existed and resolved: - `.next/node_modules/next-mdx-remote-53ad903680e5eefa` → `../../../shell-docs/node_modules/next-mdx-remote` - `.next/node_modules/shiki-1d93e12c152e1c92` → `../../../shell-docs/node_modules/streamdown/node_modules/shiki` - `.next/node_modules/shiki-9d074a75d82e0a5b` → `../../../shell-docs/node_modules/shiki` Runtime `node_modules` checks confirmed these build-only packages were absent: `typescript`, `vitest`, `tsx`, and `@next/swc-linux-x64-gnu`. <details> <summary>All 64 HTTP results from the matched trial</summary> | Route | HTTP | Response bytes | Assertion | | --- | ---: | ---: | --- | | `/generative-ui/components/standard-catalog` | 200 | 215816 | expected marker | | `/generative-ui/components/standard-catalog/box` | 200 | 125887 | expected marker | | `/generative-ui/components/standard-catalog/card` | 200 | 126711 | expected marker | | `/generative-ui/components/standard-catalog/carousel` | 200 | 138829 | expected marker | | `/generative-ui/components/standard-catalog/column` | 200 | 125781 | expected marker | | `/generative-ui/components/standard-catalog/divider` | 200 | 122377 | expected marker | | `/generative-ui/components/standard-catalog/flow` | 200 | 131622 | expected marker | | `/generative-ui/components/standard-catalog/grid` | 200 | 131544 | expected marker | | `/generative-ui/components/standard-catalog/row` | 200 | 125906 | expected marker | | `/generative-ui/components/standard-catalog/spacer` | 200 | 121599 | expected marker | | `/generative-ui/components/standard-catalog/tabs` | 200 | 121968 | expected marker | | `/generative-ui/components/standard-catalog/badge` | 200 | 122665 | expected marker | | `/generative-ui/components/standard-catalog/blockquote` | 200 | 121743 | expected marker | | `/generative-ui/components/standard-catalog/bold` | 200 | 121649 | expected marker | | `/generative-ui/components/standard-catalog/caption` | 200 | 122548 | expected marker | | `/generative-ui/components/standard-catalog/code` | 200 | 121602 | expected marker | | `/generative-ui/components/standard-catalog/italic` | 200 | 121538 | expected marker | | `/generative-ui/components/standard-catalog/label` | 200 | 122567 | expected marker | | `/generative-ui/components/standard-catalog/link` | 200 | 121721 | expected marker | | `/generative-ui/components/standard-catalog/markdown` | 200 | 121858 | expected marker | | `/generative-ui/components/standard-catalog/math` | 200 | 121674 | expected marker | | `/generative-ui/components/standard-catalog/shimmer-text` | 200 | 123034 | expected marker | | `/generative-ui/components/standard-catalog/strikethrough` | 200 | 121742 | expected marker | | `/generative-ui/components/standard-catalog/text` | 200 | 124306 | expected marker | | `/generative-ui/components/standard-catalog/title` | 200 | 123200 | expected marker | | `/generative-ui/components/standard-catalog/tooltip` | 200 | 121842 | expected marker | | `/generative-ui/components/standard-catalog/underline` | 200 | 121626 | expected marker | | `/generative-ui/components/standard-catalog/button` | 200 | 124263 | expected marker | | `/generative-ui/components/standard-catalog/check-box` | 200 | 122755 | expected marker | | `/generative-ui/components/standard-catalog/choice-picker` | 200 | 123347 | expected marker | | `/generative-ui/components/standard-catalog/date-time-input` | 200 | 123662 | expected marker | | `/generative-ui/components/standard-catalog/form` | 200 | 125902 | expected marker | | `/generative-ui/components/standard-catalog/pressable` | 200 | 126663 | expected marker | | `/generative-ui/components/standard-catalog/radio` | 200 | 121843 | expected marker | | `/generative-ui/components/standard-catalog/radio-group` | 200 | 122880 | expected marker | | `/generative-ui/components/standard-catalog/segmented-control` | 200 | 123150 | expected marker | | `/generative-ui/components/standard-catalog/select` | 200 | 123359 | expected marker | | `/generative-ui/components/standard-catalog/slider` | 200 | 123146 | expected marker | | `/generative-ui/components/standard-catalog/text-area` | 200 | 123105 | expected marker | | `/generative-ui/components/standard-catalog/text-field` | 200 | 123517 | expected marker | | `/generative-ui/components/standard-catalog/chart` | 200 | 125136 | expected marker | | `/generative-ui/components/standard-catalog/list` | 200 | 125792 | expected marker | | `/generative-ui/components/standard-catalog/map` | 200 | 122441 | expected marker | | `/generative-ui/components/standard-catalog/table` | 200 | 128390 | expected marker | | `/generative-ui/components/standard-catalog/audio-player` | 200 | 122032 | expected marker | | `/generative-ui/components/standard-catalog/favicon` | 200 | 121979 | expected marker | | `/generative-ui/components/standard-catalog/html-view` | 200 | 122033 | expected marker | | `/generative-ui/components/standard-catalog/icon` | 200 | 122666 | expected marker | | `/generative-ui/components/standard-catalog/image` | 200 | 124764 | expected marker | | `/generative-ui/components/standard-catalog/svg` | 200 | 123302 | expected marker | | `/generative-ui/components/standard-catalog/video` | 200 | 122714 | expected marker | | `/generative-ui/components/standard-catalog/flashcard-flip` | 200 | 122121 | expected marker | | `/generative-ui/components/standard-catalog/modal` | 200 | 122203 | expected marker | | `/generative-ui/components/standard-catalog/popover` | 200 | 125407 | expected marker | | `/generative-ui/components/standard-catalog/pulse-indicator` | 200 | 122642 | expected marker | | `/generative-ui/components/standard-catalog/citation` | 200 | 122417 | expected marker | | `/generative-ui/components/standard-catalog/entity-card` | 200 | 123764 | expected marker | | `/generative-ui/components/standard-catalog/follow-up` | 200 | 122153 | expected marker | | `/generative-ui/components/standard-catalog/image-grid` | 200 | 122445 | expected marker | | `/generative-ui/components/standard-catalog/link-card` | 200 | 122526 | expected marker | | `/generative-ui/components.md` | 200 | 8109 | expected marker | | `/generative-ui/components/standard-catalog.md` | 200 | 11267 | expected marker | | `/llms.txt` | 200 | 17782 | expected marker | | `/sitemap.xml` | 200 | 577375 | expected marker | </details> ## Final PR revision verification - Packaging commit: `1f357675b260cd49acec8f5d6a7757b56b9b95fe`. - Freshly fetched main `6cfc310041943dc12e73701c7274750c279fcefb` was integrated without conflicts. Assessed PR head: `575ed88fefd3a89aa0264b1103ce97cf5259a057`. - The three-dot diff against that main contains exactly the two packaging files: 47 insertions, 9 deletions. - `oxfmt --check showcase/shell-docs/next.config.ts`: passed. - `oxlint showcase/shell-docs/next.config.ts`: 0 warnings, 0 errors. - Explicit `tsc --noEmit --incremental false`: passed both on the host and in the fresh Linux builder. - Fresh Linux builder: production compilation, TypeScript, and all **232 static pages** passed. - Fresh Linux docs unit suite: **91 files, 582 tests passed**, two workers, networking disabled. - Commit hooks ran normally and passed; no hook bypass or history rewrite. The fresh-builder unit run supplies 10 repository fixtures as read-only mounts (the .NET example files referenced by its test, the travel agent lockfile, and `packages/runtime/package.json`) and a container-only `/showcase -> /app` alias for tests that assume a checkout layout. These fixtures are not added to the production image. Validation setup findings are recorded rather than hidden: - The first host unit run after integrating main had 579 passes and three Vue failures. Its pre-existing ignored generated registry marked Vue non-runnable and had zero runnable Vue catalog cells. Fresh builder generation marked Vue runnable and generated 22 cells; those three tests then passed. - The first unit run in the narrow builder had missing-fixture ENOENT errors (two suites plus one test). Supplying the exact repository fixtures and checkout alias above yielded the complete 582/582 pass. No source/test changes or skips were needed. - The OG-image negative-path test intentionally logs `Error generating OG image: Error: render failed`; that diagnostic remains present in the passing suite. - Final `linux/amd64` runner at PR head `575ed88fefd3a89aa0264b1103ce97cf5259a057`: **production build and all final-image checks passed**. - Final local image: `albert-docs-standalone:pr-575ed88fef`. - Linux AMD64 manifest: `sha256:a68fa66f904b31565e55fd25e1e93683b5746ca6443d96d96bd5b0cef7afb699`; OCI index: `sha256:64d52d07815193ebe0ecf3c856511ed743e26ad442a9e9db46392b9979f9948b`. - Final compressed layer sum: **200,050,016 bytes (200.1 MB)**. This includes the integrated main changes and regenerated Vue data; it is not substituted into the earlier matched-control percentage. - The additional isolated probe was repeated on this final image: **65/65 HTTP checks passed**, including all 59 component pages, the earlier 64-route set, and `/vue/prebuilt-components/chat` with the expected `CopilotChat` marker. All three aliases still resolve; the four build-only packages above remain absent. - No test containers remain running; the local image tags are retained for reproduction. <details> <summary>Final-revision HTTP results (65 checks)</summary> | Route | HTTP | Response bytes | Assertion | | --- | ---: | ---: | --- | | `/generative-ui/components/standard-catalog` | 200 | 215816 | expected marker | | `/generative-ui/components/standard-catalog/box` | 200 | 125887 | expected marker | | `/generative-ui/components/standard-catalog/card` | 200 | 126711 | expected marker | | `/generative-ui/components/standard-catalog/carousel` | 200 | 138829 | expected marker | | `/generative-ui/components/standard-catalog/column` | 200 | 125781 | expected marker | | `/generative-ui/components/standard-catalog/divider` | 200 | 122377 | expected marker | | `/generative-ui/components/standard-catalog/flow` | 200 | 131622 | expected marker | | `/generative-ui/components/standard-catalog/grid` | 200 | 131544 | expected marker | | `/generative-ui/components/standard-catalog/row` | 200 | 125906 | expected marker | | `/generative-ui/components/standard-catalog/spacer` | 200 | 121599 | expected marker | | `/generative-ui/components/standard-catalog/tabs` | 200 | 121968 | expected marker | | `/generative-ui/components/standard-catalog/badge` | 200 | 122665 | expected marker | | `/generative-ui/components/standard-catalog/blockquote` | 200 | 121743 | expected marker | | `/generative-ui/components/standard-catalog/bold` | 200 | 121649 | expected marker | | `/generative-ui/components/standard-catalog/caption` | 200 | 122548 | expected marker | | `/generative-ui/components/standard-catalog/code` | 200 | 121602 | expected marker | | `/generative-ui/components/standard-catalog/italic` | 200 | 121538 | expected marker | | `/generative-ui/components/standard-catalog/label` | 200 | 122567 | expected marker | | `/generative-ui/components/standard-catalog/link` | 200 | 121721 | expected marker | | `/generative-ui/components/standard-catalog/markdown` | 200 | 121858 | expected marker | | `/generative-ui/components/standard-catalog/math` | 200 | 121674 | expected marker | | `/generative-ui/components/standard-catalog/shimmer-text` | 200 | 123034 | expected marker | | `/generative-ui/components/standard-catalog/strikethrough` | 200 | 121742 | expected marker | | `/generative-ui/components/standard-catalog/text` | 200 | 124306 | expected marker | | `/generative-ui/components/standard-catalog/title` | 200 | 123200 | expected marker | | `/generative-ui/components/standard-catalog/tooltip` | 200 | 121842 | expected marker | | `/generative-ui/components/standard-catalog/underline` | 200 | 121626 | expected marker | | `/generative-ui/components/standard-catalog/button` | 200 | 124263 | expected marker | | `/generative-ui/components/standard-catalog/check-box` | 200 | 122755 | expected marker | | `/generative-ui/components/standard-catalog/choice-picker` | 200 | 123347 | expected marker | | `/generative-ui/components/standard-catalog/date-time-input` | 200 | 123662 | expected marker | | `/generative-ui/components/standard-catalog/form` | 200 | 125902 | expected marker | | `/generative-ui/components/standard-catalog/pressable` | 200 | 126663 | expected marker | | `/generative-ui/components/standard-catalog/radio` | 200 | 121843 | expected marker | | `/generative-ui/components/standard-catalog/radio-group` | 200 | 122880 | expected marker | | `/generative-ui/components/standard-catalog/segmented-control` | 200 | 123150 | expected marker | | `/generative-ui/components/standard-catalog/select` | 200 | 123359 | expected marker | | `/generative-ui/components/standard-catalog/slider` | 200 | 123146 | expected marker | | `/generative-ui/components/standard-catalog/text-area` | 200 | 123105 | expected marker | | `/generative-ui/components/standard-catalog/text-field` | 200 | 123517 | expected marker | | `/generative-ui/components/standard-catalog/chart` | 200 | 125136 | expected marker | | `/generative-ui/components/standard-catalog/list` | 200 | 125792 | expected marker | | `/generative-ui/components/standard-catalog/map` | 200 | 122441 | expected marker | | `/generative-ui/components/standard-catalog/table` | 200 | 128390 | expected marker | | `/generative-ui/components/standard-catalog/audio-player` | 200 | 122032 | expected marker | | `/generative-ui/components/standard-catalog/favicon` | 200 | 121979 | expected marker | | `/generative-ui/components/standard-catalog/html-view` | 200 | 122033 | expected marker | | `/generative-ui/components/standard-catalog/icon` | 200 | 122666 | expected marker | | `/generative-ui/components/standard-catalog/image` | 200 | 124764 | expected marker | | `/generative-ui/components/standard-catalog/svg` | 200 | 123302 | expected marker | | `/generative-ui/components/standard-catalog/video` | 200 | 122714 | expected marker | | `/generative-ui/components/standard-catalog/flashcard-flip` | 200 | 122121 | expected marker | | `/generative-ui/components/standard-catalog/modal` | 200 | 122203 | expected marker | | `/generative-ui/components/standard-catalog/popover` | 200 | 125407 | expected marker | | `/generative-ui/components/standard-catalog/pulse-indicator` | 200 | 122642 | expected marker | | `/generative-ui/components/standard-catalog/citation` | 200 | 122417 | expected marker | | `/generative-ui/components/standard-catalog/entity-card` | 200 | 123764 | expected marker | | `/generative-ui/components/standard-catalog/follow-up` | 200 | 122153 | expected marker | | `/generative-ui/components/standard-catalog/image-grid` | 200 | 122445 | expected marker | | `/generative-ui/components/standard-catalog/link-card` | 200 | 122526 | expected marker | | `/generative-ui/components.md` | 200 | 8109 | expected marker | | `/generative-ui/components/standard-catalog.md` | 200 | 11267 | expected marker | | `/llms.txt` | 200 | 17772 | expected marker | | `/sitemap.xml` | 200 | 589968 | expected marker | | `/vue/prebuilt-components/chat` | 200 | 172668 | expected marker | </details> <details> <summary>Reproduce the final Linux image and isolated runtime probe</summary> Check out PR head `575ed88fefd3a89aa0264b1103ce97cf5259a057`, then run from the repository root: ```sh docker buildx build --platform linux/amd64 --load \ --tag docs-standalone:trial \ --file showcase/shell-docs/Dockerfile \ --build-arg COMMIT_SHA=575ed88fefd3a89aa0264b1103ce97cf5259a057 \ --build-arg BRANCH=contextablemark/docs-standalone-packaging . ``` The Dockerfile itself runs the network-isolated final-image route/asset assertions. For the extended 65-route probe: ```sh docker run --rm --network none --platform linux/amd64 \ --entrypoint node -i docs-standalone:trial --input-type=module - <<'JS' import {spawn} from 'node:child_process'; import {connect} from 'node:net'; import {setTimeout as delay} from 'node:timers/promises'; import fs from 'node:fs'; let logs=''; const server=spawn(process.execPath,['server.js'],{env:{...process.env,HOSTNAME:'127.0.0.1'},stdio:['ignore','pipe','pipe']}); for(const s of [server.stdout,server.stderr])s.on('data',b=>{logs=(logs+b).slice(-5000)}); const results=[]; try{ const deadline=Date.now()+30000; for(;;){ const up=await new Promise(resolve=>{const s=connect(10000,'127.0.0.1');s.once('connect',()=>{s.destroy();resolve(true)});s.once('error',()=>{s.destroy();resolve(false)})}); if(up)break; if(Date.now()>deadline||server.exitCode!==null)throw Error('server not ready'); await delay(100); } async function get(path,marker){const r=await fetch('http://127.0.0.1:10000'+path,{redirect:'error',signal:AbortSignal.timeout(30000)});const body=await r.text();results.push({path,status:r.status,bytes:Buffer.byteLength(body),marker:marker?body.includes(marker):undefined});if(r.status!==200||(marker&&!body.includes(marker)))throw Error('Bad route '+path+' status '+r.status);return body;} const index=await get('/generative-ui/components/standard-catalog','standardUI'); const prefix='/generative-ui/components/standard-catalog/'; const paths=[...new Set([...index.matchAll(/href="([^"]+)"/g)].map(m=>m[1].split('#')[0]).filter(p=>p.startsWith(prefix)))]; if(paths.length!==59)throw Error('Expected 59 standalone pages, found '+paths.length); for(const path of paths)await get(path,'id="props"'); await get('/generative-ui/components.md','Let your agent render your React components'); await get('/generative-ui/components/standard-catalog.md','standardUI'); await get('/llms.txt','CopilotKit'); await get('/sitemap.xml','<urlset'); await get('/vue/prebuilt-components/chat','CopilotChat'); const aliases=fs.readdirSync('.next/node_modules').filter(x=>/shiki|next-mdx-remote/.test(x)).map(x=>({name:x,target:fs.readlinkSync('.next/node_modules/'+x),resolved:fs.existsSync('.next/node_modules/'+x)})); if(aliases.length!==3||aliases.some(x=>!x.resolved))throw Error('Unresolved external alias'); const omitted=['typescript','vitest','tsx','@next/swc-linux-x64-gnu'].map(x=>({package:x,present:fs.existsSync('node_modules/'+x)})); console.log(JSON.stringify({ok:true,catalogPages:paths.length,httpChecks:results.length,results,aliases,buildOnlyPackages:omitted})); }catch(e){console.error(JSON.stringify({ok:false,error:String(e),results,logTail:logs}));process.exitCode=1} finally{server.kill('SIGTERM');} JS ``` For the full docs unit suite, the existing `test / unit-shell-docs` CI workflow documents the fresh-checkout dependency installation and generation steps. The 582-test Linux result above used the builder's freshly generated data and only the read-only checkout fixtures described above. </details> ## Limits and deployment behavior - The local experiment verifies Linux container packaging, server rendering, route content, raw Markdown, and representative asset delivery. It does **not** verify browser hydration or interactive behavior. - No Railway deployment, restart, redeploy, variable change, image-tag advance, pin promotion, workflow dispatch, or merge was performed. No Railway cold-pull/cache-hit/activation-time claim is made. - The existing PR Docker workflow builds linux/amd64 with `push: false`; the final-image assertions execute during that build. The main-branch Showcase publish/redeploy workflow remains unchanged. - Local no-credential runtime checks emitted the existing missing-`NEXT_PUBLIC_SHELL_URL` fallback diagnostic; the asserted routes still passed. This PR does not change runtime configuration. - The earlier MDX failure fixed by CopilotKit#8054 was a broken relative alias after flattening the runner layout. This packaging change preserves the corrected layout. - The separate finding that early `COMMIT_SHA` build arguments invalidate dependency-install caching is deliberately excluded from this packaging experiment. ## PR CI CI runs for head `575ed88fefd3a89aa0264b1103ce97cf5259a057`: - [Fresh-checkout docs unit suite](https://github.com/CopilotKit/CopilotKit/actions/runs/40756197558) - [Linux AMD64 Docker build check — no image push](https://github.com/CopilotKit/CopilotKit/actions/runs/40756197592) - [Static quality checks](https://github.com/CopilotKit/CopilotKit/actions/runs/40756197639) - [Showcase validation](https://github.com/CopilotKit/CopilotKit/actions/runs/40756197544) - [All PR checks](https://github.com/CopilotKit/CopilotKit/pull/8064/checks) These were in progress when the PR was created. The completed local results above are independent of these GitHub checks; their current status is available at the links. No merge or Railway deployment was performed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Improvements** * The documentation showcase now serves its pages, Markdown content, and static assets from a standalone deployment. Build checks also verify that pages respond correctly and referenced assets are available and non-empty. * **Bug Fixes** * Deployment checks now catch missing documentation content, incorrect page responses, and unavailable or empty assets before the build completes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
The docs image from #8039 builds and starts Next.js, then returns HTTP 500 while loading MDX. Runtime logs report an unresolved
next-mdx-remote-53ad903680e5eefa/rscalias.Turbopack generates relative links under
.next/node_modulesthat expect the builder's/app/shell-docs/node_moduleslayout. Flattening the runner into/appleaves those MDX and Shiki links pointing at nonexistent/shell-docs/node_modulespaths. Keep the runner at/app/shell-docsso the existing copies preserve the expected layout.Add a network-isolated check in the Dockerfile's final runtime stage: start Next and request the components overview, standard catalog, and Button page. Each must return HTTP 200 with expected content. This exercises the copied runtime filesystem in both PR and main builds before an image can be published. The server is stopped afterward, and no model, credentials, or backend is needed.
Validation: inline JavaScript syntax, Git whitespace checks, and commit hooks passed. An in-memory path check against the existing build's three generated aliases confirms the corrected layout resolves them to their copied dependencies. No application source or dependency versions changed. The Docker build and runtime page checks passed at commit
68290394694a981d274294a07de0e8b2e66d04c8: all three routes returned HTTP 200 with expected content from the isolated final runtime stage. Other PR checks are still running, so this remains draft pending their results.This follow-up changes only
showcase/shell-docs/Dockerfile; shared workflows are unchanged.Related failure: Showcase run 40715098341. No Railway settings, deployments, restarts, or reruns were performed for this change.
Summary by CodeRabbit