fix(ci): reconcile pages tests with the built landing SPA - #117
Merged
Conversation
Every pipeline has been red since the landing page became a built React SPA: test/pages.test.js still enforced the hand-authored static contract against landing/index.html, so six assertions failed and took the Node 20/22/Windows matrix, the quality gate, and both install-smoke jobs down with them. Five Dependabot PRs were blocked purely by the inherited failure. Make the shell comply where it genuinely can, and scope the rest honestly: - landing/index.html: inline critical CSS carrying the brand.json colors (both schemes) and the shared system font stack. The shell shipped zero inline CSS, so it painted white until the jsDelivr chunks landed; it now paints branded pre-hydration. Verified offline with all HTTP blocked: #171310/#f2ede7 dark, #f7f3ed/#201a15 light, system-ui — so these tokens are load-bearing, not markup added to satisfy an assertion. Also adds the missing apple-touch-icon (static.yml already copies it to the site root) and replaces a theme-color that belonged to no palette with per-scheme values from brand.json. - test/pages.test.js: scope the type/space scale assertion to the generated status page — the SPA computes its own scale, and inlining --fs-N/--sp-N into the shell would satisfy the check with markup nothing reads. Soften the landing metric and version assertions from "must be present" to "must be correct if present" so they still bite on a regression. Color and font-stack parity remain enforced on both surfaces. - Add a jsDelivr pin-integrity test. static.yml never deploys landing/assets/, so the site depends on those pins, and nothing checked them: a typo'd chunk name 404s the whole page on a green build. Asserts a full 40-char SHA and that each pinned file exists. Deliberately not == HEAD, which would fail on every unrelated commit. - build-pages.mjs: the status page claimed "same design tokens as the landing page"; that is now true of colors and fonts only. Corrected. Known debt, unchanged here: landing/assets/c-*.js hardcode "forgekit v0.27.0" against package.json 0.27.3. The SPA's source is not in this repo — only its minified output — so the fix is to commit that source, not to hand-patch a build artifact into passing a test. npm test 1073 pass / 0 fail (was 1066/6) · biome, typecheck, docs check green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ELFQHdFokx5L6A6dfUvKZg
CodeWithJuber
marked this pull request as ready for review
August 4, 2026 12:26
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 & why
Every pipeline on
masterhas been red since27324a6, when the landing page became a built React/shadcn SPA.test/pages.test.jsstill enforced the old hand-authored static contract againstlanding/index.html, so six assertions failed — taking downTest (Node 20),Test (Node 22),Test (Windows / Git Bash),Quality gate, bothInstall smokejobs, andBump version / gate(the smoke and bump jobs just re-runnpm test).This was the only root cause: Biome,
tsc, anddocs checkwere already green.PRs #110, #113, #114, #115, #116 are all Dependabot changes blocked purely by this inherited failure — nothing wrong with their own diffs.
Approach: keep the SPA, make the shell comply where it genuinely can, and scope the rest honestly rather than deleting the guarantee.
landing/index.html— inline critical CSS carrying thebrand.jsoncolors (both schemes) and the shared system font stack. The shell shipped zero inline CSS, so it painted white until the jsDelivr chunks arrived; it now paints branded pre-hydration. Verified in Chromium with all HTTP blocked (no jsDelivr, no Google Fonts):#171310/#f2ede7dark,#f7f3ed/#201a15light,system-ui— these tokens are load-bearing, not markup added to satisfy an assertion. Also adds the missingapple-touch-icon(static.ymlalready copies it to the site root, same as the workingfavicon.svg) and replaces atheme-colorof#FAF8F3, which belonged to no palette, with per-scheme values frombrand.json.test/pages.test.js— the type/space scale assertion is scoped to the generated status page: the SPA computes its own scale, and inlining--fs-N/--sp-Ninto the shell would satisfy the check with markup nothing reads. The landing metric and version assertions soften from "must be present" to "must be correct if present", so they still bite on a regression. Color and font-stack parity stay enforced on both surfaces.static.ymlnever deployslanding/assets/, so the live site depends entirely on those pinned CDN references, and nothing checked them. A typo'd chunk name 404s the whole page on a green build. Asserts a full 40-char SHA and that each pinned file exists on disk. Deliberately not== HEAD, which would fail on every unrelated commit.scripts/build-pages.mjs— the status page footer claimed "same design tokens as the landing page". That is now true of colors and fonts only; corrected in both the footer string and the module comment.Known debt (not addressed here, by design)
landing/assets/c-*.jshardcodeforgekit v0.27.0whilepackage.jsonis0.27.3.landing/assets/. That is why recent commits hand-edit minified chunks, and why the stale version can't be corrected properly from here.Committing the landing source is the real fix for both. Hand-patching a build artifact to make a test pass would be worse than the drift it hides, so this PR leaves it visible and documented in the test comment.
Checklist
npm testpasses — 1073 pass / 0 fail (was 1066 / 6)npm run checkpasses (Biome lint + format) — 10 warnings / 4 infos, byte-identical to the pre-change baseline, all in untouched filesfix:)CHANGELOG.mdupdated under## [Unreleased]forge substrate,forge impact, router/gate, or MCP substrate tools — n/a, none touchedRisk & rollback
src/runtime code is touched, so no shipped behavior changes. The one user-visible change is the landing page's pre-hydration paint, which is strictly an improvement over a white flash.git revertthis commit. CI returns to its current red state; nothing else regresses. The landing page reverts to painting white before hydration.Extra checks
npm run typecheckpassesGenerated by Claude Code