Repository navigation
console: vendor the TypeScript console from upstream's dist/ - #38
Conversation
fold-run/fold-console is a built TypeScript SPA now — Preact, TanStack Router
and TanStack Query, compiled by Vite — where it was hand-written HTML/CSS/JS.
Its build output moved to dist/, so the path this script reads moves with it.
That is the whole functional change here; the rest of the diff is the
re-vendored bundle and the pin.
Two notes for whoever reviews the next bump, now recorded in the script:
- gateway/console/app.js is minified bundle output. Reading this diff is not
a review — read upstream's diff on src/. Upstream CI rebuilds and fails on
any drift between source and dist/, so the bytes here are entailed by it.
- The pin and the source path move together. A pin from before the rename has
no dist/, one from after has no console/; either mismatch fails loudly here
rather than vendoring stale bytes. The error names the case explicitly,
because the generic message sends the reader upstream to look for a
directory that is sitting right there under its old name.
The embedded file set is unchanged — index.html, app.js, style.css and the four
font subsets plus OFL.txt come out of the new build under exactly the names
MANIFEST already lists — so neither the manifest nor
gateway/introspection_test.go needs an edit, and the CSP the page runs under is
untouched.
The MANIFEST comment is retargeted at what an allowlist now protects against:
not upstream's README and CI config, but a source map, a second chunk, or a
stats file that a build happened to emit.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
a372f51 to
157b585
Compare
Retrospective verification recordThis is not an independent review. It was written with Claude Code in the Verified
Reasoning worth recordingThe script and the pin have to move together. A pre-rename pin has no Not reviewedThe vendored |
fold-run/fold-console is a built TypeScript SPA now — Preact, TanStack Router
and TanStack Query, compiled by Vite — where it was hand-written HTML/CSS/JS.
Its build output moved to
dist/, so the pathscripts/sync-console.shreadsmoves with it. That one-line change is the whole functional diff; the rest is
the re-vendored bundle and the pin.
Pinned at
ea4c545, the current head of fold-consolemain(fold-run/fold-console#1 and #2, both merged).
console-sync.ymlis failing until this lands, because fold-consolemainalready carries the rename and this repo still looks for
console/. That isthe designed failure mode — a pin from before the rename has no
dist/, onefrom after has no
console/, and either mismatch fails loudly in the syncrather than vendoring stale bytes — but it means the weekly job is red until
merge, not broken.
Reviewing this
gateway/console/app.jsis minified bundle output. Reading this diff is nota review — read the upstream diff on
src/. Upstream CI rebuilds and fails onany drift between source and
dist/, so the bytes here are entailed by it.That note is now in the script itself, since it applies to every future bump.
What did not change, and so needs no edit:
index.html,app.js,style.cssand the fourfont subsets plus
OFL.txtcome out of the new build under exactly the namesMANIFESTalready lists —gateway/introspection_test.gois untouched.lives in page memory only; upstream-controlled strings are still never markup
(JSX escapes text children, and upstream CI rejects the escape hatches);
fetches are still relative so a path-prefixed deployment works. Upstream now
also fails its build on inline
<script>andstyleattributes, whichdefault-src 'self'was already dropping silently.The
MANIFESTcomment is retargeted at what an allowlist protects against now:not upstream's README and CI config, but a source map, a second chunk, or a
stats file that a build happened to emit. That is a weaker threat than a
hand-maintained tree posed, but a likelier one.
Verification
Run locally against this branch:
./scripts/sync-console.sh— vendors 8 files, writes the pinmake console-check—gateway/console matches its pingo build ./...go test ./gateway— full package,okin 8.8sTestConsoleAssetsTargetCurrentAPIearned its keepWorth recording, since this repo owns that test. Upstream's first cut composed
its fetch paths from a shared base constant. That minifies to
${e}/federation, so the literals this test greps for vanished from the bundle— while the console kept working. The guard had silently stopped guarding,
which would have left genuine v1.9 skew to be discovered by an operator
watching a dashboard never load.
This suite caught it, on the vendored bundle, before any of it reached
mainhere. Upstream now spells the paths out, says in the source why they must not
be refactored back into a base, and mirrors the assertion in its own CI — so
the next occurrence fails in the PR that causes it rather than during a
supply-chain review here.
🤖 Generated with Claude Code