Skip to content

fix(build): ship /worlds source route in packaged images (OSS-381) - #530

Merged
athNdev merged 2 commits into
mainfrom
codex/prod-worlds-route
Nov 18, 2026
Merged

athNdev merged 2 commits into
mainfrom
codex/prod-worlds-route

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Defect

The live packaged image returned Svelte "Page not found" for /worlds: the
served production bundle (app.aQAtqdjs.js at image d8597d4e) contained
/library, /players, /servers but no /worlds, even though the source
routes exist. Root cause: the broad worlds / **/worlds / Worlds /
**/Worlds patterns in .dockerignore removed
web/carbon-panel/src/routes/worlds/ from the Docker build context, so the
frontend builder never saw the route source.

Fix

  • Move the worlds ignore block above the general sensitive/persistent
    exclusions in .dockerignore, so later credential/database/data rules still
    win for anything nested under the route tree.
  • Re-include the SvelteKit route with a narrow, source-only override
    (!web/carbon-panel/src/routes/worlds/**/*.svelte and .../*.ts) rather than
    a broad ** negation. All saved-world exclusions (data/, backups/, tmp/,
    instance world folders, root/nested worlds dirs) are preserved.
  • Extend scripts/test-ignore-policies.py with:
    • route source files in the required Docker-context inventory;
    • saved-world data canaries under data/backups/tmp/instance folders;
    • sentinels inside the route tree (.env, route.db, token.key,
      nested data/worlds, backups, tmp) that must remain excluded.

Verification evidence

Evidence directory:
C:/Users/Daybreak8458/Documents/Codex/2026-11-12/carbonpanel-main-audit/oss381-evidence/

  • route-manifest-before.txt — served route table from the actual packed
    frontend-builder image at the pre-fix source: 18 routes, no /worlds.
  • route-manifest-final.txt — served route table from the actual packed
    frontend-builder image after the fix: /worlds and
    /worlds/[server]/[world] present.
  • Docker-context policy: python scripts/test-ignore-policies.py --docker
    against the WSL Docker daemon — PASS: Git ignore matrix (56 excluded, 14
    included); PASS: clean and cluttered Docker contexts match (1706 files)
    .
    Regression proof: with the broad trailing negation restored, the check fails
    listing all eleven leaked route-tree sentinels; with the narrow ordered fix it
    passes.
  • Packed image CI: full docker build -f docker/Dockerfile.carbon-panel PASS;
    module images geyser and status PASS.
  • Frontend: bun install --frozen-lockfile PASS, bun run check 0 errors
    / 0 warnings
    , bun run test 360 pass / 0 fail, bun run lint PASS.
  • Knowledge: go run ./cmd/knowledge-lint -root . -fix then without -fix —
    OK: 64 concept(s), indexes current, 38/38 queries pass.

Real-browser QA (actual packaged production image)

Full packaged image carbon-panel:oss381-qa-final (built from this branch with
the fix) run as two disposable containers with isolated named volumes and a
synthetic admin account — no live user data. Task-owned Chromium 1.49.1,
PLAYWRIGHT_SKIP_BROWSER_GC=1.

browser/report.json and screenshots browser/01-*.png … browser/06-*.png:

  • Admin (local auth, empty inventory): sidebar /worlds link present and
    navigates; direct load; refresh; deep link into /worlds/[server]/[world]
    — all render the real Worlds UI (no "Page not found"), EMPTY state
    "No viewable worlds" and onboarding world-detail state.
  • Anonymous access: direct load and deep link show ACCESS-DENIED state
    "No world-view access" with no redirect to /login.
  • Result: PASS (0 failures) across 19 assertions.

Scope

No release/deployment/registry mutation. Do not merge until independent review
is recorded.

The broad worlds/Worlds exclusions in .dockerignore stripped the SvelteKit
/worlds route source from packaged frontend builds, so the served bundle had
no /worlds route. Move the exclusions above the general sensitive/persistent
rules and add a narrow source-only re-include limited to .svelte/.ts files,
so credential, database and nested data files under the route tree stay
excluded. Extend the Docker-context policy fixture with route-include
assertions and sentinel canaries that catch a leaky re-include ordering.
Extend the OSS-381 route-tree sentinel matrix with .pem, .p12, config.yaml,
.mcp.json and node_modules canaries so a future broad re-include cannot leak
any credential, config or generated dependency type under the source route.
@athNdev
athNdev merged commit 88fd0e4 into main Nov 18, 2026
20 checks passed
@athNdev
athNdev deleted the codex/prod-worlds-route branch November 18, 2026 09:17
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