Repository navigation
fix(helm): keep the post-synth barrel edge-clean — WHM503 reads a light render-records module - #2055
Merged
Merged
Conversation
…ht render-records module (#428/#1621 class) Found bumping the hosted audit (blacklight#25) to 0.53.1: the worker crashed at startup with "__filename is not defined". The chain: WHM503 → ../../render → the full @intentius/chant barrel → build() → discovery/fold-import → the TypeScript compiler, whose module init touches __filename — fatal on workerd. The barrel the hosted service edge-imports had silently stopped being init-safe when WHM503 landed. - The HelmRender invocation ledger (HelmRenderRecord + get/clear + a new recordHelmRender) moves to lexicons/helm/src/render-records.ts, a module with no runtime imports. render.ts re-exports it all, so the lexicon's public surface is unchanged; WHM503 imports the records module directly. - edge-init-safety gains the guard this class needed: the transitive closure of every edge-imported barrel must not statically import the bare @intentius/chant package barrel (subpath imports remain the edge-clean seams). The relative-import walk stopped at package specifiers, which is exactly how this escaped. Verified: the helm suite (861) and the extended guard pass; the hosted bundle boots on workerd with this fix applied (tested via the blacklight bump branch). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
11 of 13 tasks
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.
The break
Bumping blacklight (the hosted audit) to
@intentius/*@0.53.1crashed the worker at startup:Uncaught ReferenceError: __filename is not definedfrom TypeScript's own module init. Traced with esbuild's metafile: WHM503 →../../render→ the full@intentius/chantbarrel →build.ts→discovery/fold-import.ts→typescript. WHM503 landed after the last blacklight bump (0.44.1), so the regression was invisible until now — the post-synth barrels are the modules #409/#428/#1621 promise are edge-clean.Fix
lexicons/helm/src/render-records.ts: theHelmRenderinvocation ledger (HelmRenderRecord,getHelmRenderRecords,clearHelmRenderRecords, newrecordHelmRender) in a module whose only import is a type.render.tsre-exports everything — public surface unchanged — and WHM503 imports the records module directly.edge-init-safety.test.tswalked only relative imports, so the chain escaped through a package specifier. It now also asserts the transitive closure of every edge-imported barrel contains no static import of the bare@intentius/chantbarrel (subpaths like@intentius/chant/lint/post-synthstay allowed — they are the deliberately edge-clean seams). With the walk mechanics, this fails on the pre-fix tree and points atrender.ts.Verification
Helm suite: 861 green. Extended guard green. Repo-wide typecheck: no regressions. Boot verified on workerd via the blacklight bump branch (
wrangler dev --local+ fixture audit) with this fix applied.Unblocks blacklight#25 (which will carry the hosted-side proof).
🤖 Generated with Claude Code