Context
Two hosted workflow_dispatch runs at dev@f8425236af (2026-09-14), each measuring an arm excluded from the e2e tier as "observed, cause not established":
- 34880690522 —
portal/LearnLinkRoutingNL ×3: the in-content-link arm :77 fails 3/3, the article still showing the source guide; the three sibling arms pass 3/3.
- 34880701320 —
rendering/LivePreviewMultiWindow ×2: the three Dev arms that visit FormsEngine fail; the Home-route arm passes 2/2.
Both pass locally. The operator confirmed the engine now imports highlight.js into the App Worker, with the main-thread HighlightJS addon effectively legacy.
The Problem
A guide renders only if every code fence that survives extraction can be highlighted, and on a CI runner none can.
src/util/HighlightJs.mjs#load() imports Neo.config.basePath + 'dist/highlight/highlight.custom(.min).js' into the App Worker and caches only a success.
src/component/Markdown.mjs#render() extracts mermaid, live-preview and json neo-component fences, then highlights every other fence (regexCodeBlock does not check for readonly) and awaits Promise.all before set({html}). The plaintext .catch retry calls load() again, so a failed import rejects render(): the article keeps its previous HTML, or stays empty on a first load. The error stays in the App Worker, and the import is worker-initiated, so a page network log shows nothing.
dist/highlight is gitignored (/dist) and is not an npm dependency. Only build-highlightjs produces it (a GitHub clone, npm install, build) and build-all runs that. bundle-browser-deps — parse5, marked, mermaid — does not, and it is what test.yml, test-e2e.yml, consumer-runtime-build.yml and check-package-contents.yml run. A fresh checkout lacks the file; a checkout that once ran build-all keeps it, which is why the arms pass locally.
Surviving fences separate every hosted observation:
| page |
surviving fences |
hosted |
DockLayouts (direct load) |
0 |
renders |
UsingTheseTopics (sidebar) |
0 |
renders |
DockLayoutsAdoption (in-content link) |
14 |
keeps the source guide |
FormsEngine (direct load) |
4 |
empty article |
DockLayoutsFirstLayout (LearnMermaidRender's editor route) |
2 |
no editor |
Two aggravations:
buildScripts/build/highlightJs.mjs exits 0 when it fails. Its catch logs and returns; mermaid.mjs and parse5.mjs call process.exit(1). The clone has failed transiently before (a bootstrapWorktree build-all run, 2026-05-30), so wiring it into CI as-is could reproduce this defect behind a green step.
- The package cannot ship it.
.npmignore re-includes only parse5, marked and mermaid, and REQUIRED_ENTRIES in buildScripts/util/check-package-contents.mjs omits it — although its dist/mermaid.mjs rationale describes an importer building the same Neo.config.basePath + 'dist/…' URL. Consumer runtime impact is not verified.
The Architectural Reality
src/util/HighlightJs.mjs — worker singleton, lazy import(/* webpackIgnore: true */ path).
src/component/Markdown.mjs — render() pass order; processReadonlyCodeBlocks(); regexCodeBlock.
package.json — bundle-browser-deps, build-highlightjs.
buildScripts/build/highlightJs.mjs — skip-if-exists, clone, install, build, swallowed failure.
.github/workflows/classify-test-scope.yml — e2eScriptKeys pins the bundle scripts whose change triggers e2e.
buildScripts/util/check-package-contents.mjs + .npmignore — the shipped dist/ set.
buildScripts/util/e2eCiSelection.mjs — the three exclusions this explains.
The Fix
bundle-browser-deps also runs build-highlightjs, matching the browser artifacts build-all produces.
highlightJs.mjs exits non-zero on failure, as its sibling bundlers do.
e2eScriptKeys gains build-highlightjs.
- Record the package decision: ship
dist/highlight/highlight.custom.min.js (a REQUIRED_ENTRIES row with its why, plus the .npmignore re-include), or record why consumers do not need it.
- Measure the build's added CI time; add a cache keyed on the build script if a cold build is slow or flaky.
e2eCiSelection.mjs: LearnLinkRoutingNL returns to RUN_PATHS; the LivePreviewMultiWindow entry records the Dev arms' cause (its Dist half is unchanged); the LearnMermaidRender entry records its precondition's cause and names #18675 as the remaining blocker, replacing a pointer to the closed #18568.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
bundle-browser-deps |
package.json |
also builds dist/highlight |
skip-if-exists keeps warm runs cheap |
buildScripts/README.md |
hosted dispatch on the branch |
build-highlightjs exit status |
buildScripts/build/highlightJs.mjs |
non-zero on any failure |
none — a failure must be loud |
script docblock |
a failing run observed non-zero |
e2eScriptKeys |
classify-test-scope.yml |
includes build-highlightjs |
— |
inline comment |
buildDependencyResolution.spec.mjs |
shipped dist/ set |
REQUIRED_ENTRIES, .npmignore |
decision recorded with its reason |
— |
the entry's why |
check-package-contents job |
| e2e selection |
e2eCiSelection.mjs |
three entries updated |
— |
entry reason text |
selection floor + CI run |
Decision Record impact
none — no decision record governs dist/ bundles or package contents.
Acceptance Criteria
Out of Scope
- Replacing the custom bundle with the
highlight.js npm package — a dependency decision.
- The legacy main-thread
HighlightJS addon.
- #18675, the DockLayouts guide rendering its body twice.
- The Dist arms' production build.
- A stale-response race in
Neo.app.content.Component#doFetchContent, which assigns value without checking that the record is still current — captured as a defect-note.
Avoided Traps
- A longer assertion window. Falsified 2026-09-07: widened to 30s, the arm still failed at 32.4s.
- Building it only in
test-e2e.yml. The unit, consumer-runtime and package-contents runners, and every fresh checkout, keep the gap.
- Reading a green
build-highlightjs step as proof. Today it exits 0 on failure.
Related
Resolves the root cause behind #18422 and #18427. Related: #18554 (App Worker errors never reach a test), #18675, #7790 (created the bundle), #7823 (skip-if-exists), #17492 (the clone's argv).
Live latest-open sweep: checked latest 20 open issues at 2026-09-14T18:47:10Z (newest #18694); no equivalent found.
A2A in-flight claim sweep: latest 30 messages at 2026-09-14T18:47Z; no claim on this scope — the nearest, #18675 / PR #18702, is a different mechanism (a substitution in restored inline code). MC sweep: symptom-keyed ("guide content never renders on a hosted CI runner … passes locally") and mechanism-keyed queries, 12 results, no prior decision found. Own-assignment sweep: 11 open; <a href="#/news/tickets/18422">#18422</a> and <a href="#/news/tickets/18427">#18427</a> are this defect's symptoms, <a href="#/news/tickets/18554">#18554</a> its observability gap; none files this root cause. KB + corpus sweep:resources/content/issues` holds only closed #7790, #7816, #7823, #11163; no equivalent.
Origin Session ID: ba9a1772-0ad8-4759-9105-d089aa9c4368
Retrieval Hint: "dist/highlight never built in CI; bundle-browser-deps; build-highlightjs exits 0; surviving code fence blocks Markdown render"
⚖️ Ada · @neo-opus-ada · Claude Opus 5 · Claude Code
Context
Two hosted
workflow_dispatchruns atdev@f8425236af(2026-09-14), each measuring an arm excluded from the e2e tier as "observed, cause not established":portal/LearnLinkRoutingNL×3: the in-content-link arm:77fails 3/3, the article still showing the source guide; the three sibling arms pass 3/3.rendering/LivePreviewMultiWindow×2: the three Dev arms that visitFormsEnginefail; the Home-route arm passes 2/2.Both pass locally. The operator confirmed the engine now imports highlight.js into the App Worker, with the main-thread
HighlightJSaddon effectively legacy.The Problem
A guide renders only if every code fence that survives extraction can be highlighted, and on a CI runner none can.
src/util/HighlightJs.mjs#load()importsNeo.config.basePath + 'dist/highlight/highlight.custom(.min).js'into the App Worker and caches only a success.src/component/Markdown.mjs#render()extractsmermaid,live-previewandjson neo-componentfences, then highlights every other fence (regexCodeBlockdoes not check forreadonly) and awaitsPromise.allbeforeset({html}). The plaintext.catchretry callsload()again, so a failed import rejectsrender(): the article keeps its previous HTML, or stays empty on a first load. The error stays in the App Worker, and the import is worker-initiated, so a page network log shows nothing.dist/highlightis gitignored (/dist) and is not an npm dependency. Onlybuild-highlightjsproduces it (a GitHub clone,npm install, build) andbuild-allruns that.bundle-browser-deps— parse5, marked, mermaid — does not, and it is whattest.yml,test-e2e.yml,consumer-runtime-build.ymlandcheck-package-contents.ymlrun. A fresh checkout lacks the file; a checkout that once ranbuild-allkeeps it, which is why the arms pass locally.Surviving fences separate every hosted observation:
DockLayouts(direct load)UsingTheseTopics(sidebar)DockLayoutsAdoption(in-content link)FormsEngine(direct load)DockLayoutsFirstLayout(LearnMermaidRender's editor route)Two aggravations:
buildScripts/build/highlightJs.mjsexits 0 when it fails. Itscatchlogs and returns;mermaid.mjsandparse5.mjscallprocess.exit(1). The clone has failed transiently before (abootstrapWorktreebuild-allrun, 2026-05-30), so wiring it into CI as-is could reproduce this defect behind a green step..npmignorere-includes only parse5, marked and mermaid, andREQUIRED_ENTRIESinbuildScripts/util/check-package-contents.mjsomits it — although itsdist/mermaid.mjsrationale describes an importer building the sameNeo.config.basePath + 'dist/…'URL. Consumer runtime impact is not verified.The Architectural Reality
src/util/HighlightJs.mjs— worker singleton, lazyimport(/* webpackIgnore: true */ path).src/component/Markdown.mjs—render()pass order;processReadonlyCodeBlocks();regexCodeBlock.package.json—bundle-browser-deps,build-highlightjs.buildScripts/build/highlightJs.mjs— skip-if-exists, clone, install, build, swallowed failure..github/workflows/classify-test-scope.yml—e2eScriptKeyspins the bundle scripts whose change triggers e2e.buildScripts/util/check-package-contents.mjs+.npmignore— the shippeddist/set.buildScripts/util/e2eCiSelection.mjs— the three exclusions this explains.The Fix
bundle-browser-depsalso runsbuild-highlightjs, matching the browser artifactsbuild-allproduces.highlightJs.mjsexits non-zero on failure, as its sibling bundlers do.e2eScriptKeysgainsbuild-highlightjs.dist/highlight/highlight.custom.min.js(aREQUIRED_ENTRIESrow with itswhy, plus the.npmignorere-include), or record why consumers do not need it.e2eCiSelection.mjs:LearnLinkRoutingNLreturns toRUN_PATHS; theLivePreviewMultiWindowentry records the Dev arms' cause (its Dist half is unchanged); theLearnMermaidRenderentry records its precondition's cause and names #18675 as the remaining blocker, replacing a pointer to the closed #18568.Contract Ledger Matrix
bundle-browser-depspackage.jsondist/highlightbuildScripts/README.mdbuild-highlightjsexit statusbuildScripts/build/highlightJs.mjse2eScriptKeysclassify-test-scope.ymlbuild-highlightjsbuildDependencyResolution.spec.mjsdist/setREQUIRED_ENTRIES,.npmignorewhycheck-package-contentsjobe2eCiSelection.mjsreasontextDecision Record impact
none— no decision record governsdist/bundles or package contents.Acceptance Criteria
LearnLinkRoutingNL×3 on a branch whose only change builds the bundle turns arm:77green 3/3 (baseline: run 34880690522, red 3/3).LivePreviewMultiWindowDev arms that visitFormsEnginepass hosted, and the Home-route arm still passes.build-highlightjsexits non-zero when clone, install or build fails.build-highlightjsclassifies as e2e-relevant.check-package-contentspasses.e2eCiSelection.mjsentries are updated as above and the selection floor passes.Out of Scope
highlight.jsnpm package — a dependency decision.HighlightJSaddon.Neo.app.content.Component#doFetchContent, which assignsvaluewithout checking that the record is still current — captured as a defect-note.Avoided Traps
test-e2e.yml. The unit, consumer-runtime and package-contents runners, and every fresh checkout, keep the gap.build-highlightjsstep as proof. Today it exits 0 on failure.Related
Resolves the root cause behind #18422 and #18427. Related: #18554 (App Worker errors never reach a test), #18675, #7790 (created the bundle), #7823 (skip-if-exists), #17492 (the clone's argv).
Live latest-open sweep: checked latest 20 open issues at 2026-09-14T18:47:10Z (newest #18694); no equivalent found. A2A in-flight claim sweep: latest 30 messages at 2026-09-14T18:47Z; no claim on this scope — the nearest, #18675 / PR #18702, is a different mechanism (a
substitution in restored inline code). MC sweep: symptom-keyed ("guide content never renders on a hosted CI runner … passes locally") and mechanism-keyed queries, 12 results, no prior decision found. Own-assignment sweep: 11 open; <a href="#/news/tickets/18422">#18422</a> and <a href="#/news/tickets/18427">#18427</a> are this defect's symptoms, <a href="#/news/tickets/18554">#18554</a> its observability gap; none files this root cause. KB + corpus sweep:resources/content/issues` holds only closed #7790, #7816, #7823, #11163; no equivalent.Origin Session ID: ba9a1772-0ad8-4759-9105-d089aa9c4368 Retrieval Hint: "dist/highlight never built in CI; bundle-browser-deps; build-highlightjs exits 0; surviving code fence blocks Markdown render"
⚖️ Ada ·
@neo-opus-ada· Claude Opus 5 · Claude Code