Repository navigation
fix(docs): the documentation site builds, and a job that notices when it stops - #334
Conversation
… it stops
`vitepress build` had never been run by anything in this repository. Three independent failures
had accumulated behind that silence, and each was only visible once the previous one was fixed —
which is the argument for the CI job rather than for any of the three fixes:
1. `.vitepress/theme/index.js` imported InteractiveExample.vue, PerformanceChart.vue and
ConfigurationBuilder.vue. None of the three has ever existed — not deleted, never written;
`git log --all --` finds no history for any of them. A missing import is a hard rollup
error, so this alone made every page in the tree unbuildable. Two pages mounted the
components anyway and now say what they would have shown. PerformanceChart was imported and
used by nothing, which fits the hardcoded chart removed from index.md earlier in this
release.
2. README.md nested a ```python fence inside a ```markdown fence of equal length. The inner
fence closes the outer block rather than nesting, so `</CodeRunner>` reached the Vue
compiler as a stray tag. It reported as `Invalid end tag` at a line and column in the middle
of an unrelated heading, pointing nowhere near the cause. The outer fence is four backticks
now, with a note saying why.
3. `[LICENSE](../LICENSE)` leaves the VitePress site root. Correct for a reader on GitHub, a
dead link to the builder, and dead links fail the build.
Each fix was verified by reverting it against the otherwise-fixed tree and watching the build
fail with that specific error, rather than by trusting that three plausible fixes explain one red
build:
restore the import -> Could not resolve "../components/PerformanceChart.vue"
restore the 3-backtick -> README.md (175:218): Invalid end tag.
restore ../LICENSE -> Found dead link ./../LICENSE in file README.md
all three fixed -> build complete in 1.40s. (6 pages rendered)
Also bumps github/codeql-action v3 -> v4 across its three upload-sarif call sites. Dependabot
proposed @v4.37.4 (#323); this takes @v4, the floating major, because that is what every other
action in this repository uses and the patch pin was stale before it could be reviewed —
v4.37.5 had already shipped. `upload-sarif`'s inputs are unchanged across the major, and v4's
breaking changes are all in the analysis actions. trivy-action is the one exact pin and is exact
only because it publishes no major ref; it carries a comment saying so, and this now carries the
inverse.
The new `docs-site` job uses `npm install` rather than `npm ci` because docs-platform still
commits no lockfile. That is the rest of #214, and the reason its npm security updates cannot
apply at all.
Refs #214, #323.
Dependabot's #299 proposed markdown-it 14 -> 15 for docs-platform. Investigating whether that major was safe turned up the better answer: the dependency, and two sibling plugins, are not used by anything. The reason it looked load-bearing is a trap worth recording, because it misleads in a specific order. .vitepress/config.js had a `markdown.config` hook registering markdown-it-container for 'tip', 'warning' and 'danger' — which reads as a real use of a real dependency. It is redundant three times over: - VitePress ships those exact three containers built in. - No page in this tree uses `:::` syntax at all. The 142 custom-block elements in the rendered output are all VitePress's own. - The `md` handed to that hook is VitePress's *bundled* markdown-it instance. vitepress 1.6.4 does not list markdown-it in its dependencies and carries its own copy in dist/node/. So the hook never extended the top-level package it appeared to justify. markdown-it-anchor was referenced by nothing but package.json. Measured, both directions. Removing all three from node_modules and rebuilding gives a site that builds with all six pages byte-identical to the baseline once asset content hashes are normalized; a clean install from an empty node_modules reproduces it. And leaving the hook with the package gone fails the build with "Cannot find module 'markdown-it-container'" — so the hook and the dependency are a matched pair, and this commit removes both rather than either. This is the disposition of #299 on its merits: a major bump of a dependency nothing imports is a lockfile change with no behaviour attached, so neither taking it nor holding it was the right question. Verified against the docs-site CI job added in the parent commit, which is what makes any of this checkable in the first place.
TestDocumentedLinksResolve failed on CHANGELOG.md:244. The entry describing the dead-link fix quoted the broken link in its markdown form, and the link checker cannot tell a quoted example from a real reference — so the entry explaining why `../LICENSE` does not resolve was itself an unresolvable `../LICENSE` link. Written out as prose instead, with a note saying why, so the next person who wants to quote a link in this file learns it from the file rather than from CI. Verified: `go test ./internal/config/ -run TestDocumentedLinksResolve` passes, reference-link definitions still complete (used-not-defined: []), markdownlint diagnostics unchanged at 361.
|
Two commits added since this was opened, both from following the thread this PR started.
Verified in both directions: removing all three and rebuilding gives 6 pages byte-identical to baseline once asset content hashes are normalized, reproduced from a clean
Worth saying plainly that this is the second time in this PR that a gate caught something I would otherwise have shipped — the Current state: all checks green except |
Brings in #310 (@types/node bump in sdks/javascript), which touches nothing this branch does. Merge rather than rebase so the three commits keep their published hashes — this branch is already pushed and under review.
Replaces #323 (same codeql-action upgrade,
@v4instead of@v4.37.4) and fixes the build half of #214.The site has never built
vitepress buildhad never been run by anything in this repository. Three independent failures had accumulated behind that silence, and each was only visible once the previous one was fixed — which is the argument for the CI job rather than for any of the three fixes.1. Three components that have never existed
.vitepress/theme/index.jsimportedInteractiveExample.vue,PerformanceChart.vueandConfigurationBuilder.vue. None of them was deleted — none was ever written:A missing import is a hard rollup error, so this alone made every page unbuildable. Two pages mounted the components anyway and now say what they would have shown;
PerformanceChartwas imported and used by nothing, which fits the hardcoded chart removed fromindex.mdearlier in this release.2. Nested equal-length code fences
README.mdput a```pythonfence inside a```markdownfence of the same length. The inner fence closes the outer block rather than nesting, so</CodeRunner>reached the Vue compiler as a stray tag. It reported at a line and column in the middle of an unrelated heading:Outer fence is four backticks now, with a note saying why.
3. A link that leaves the site root
[LICENSE](../LICENSE)is correct for a reader on GitHub and a dead link to the builder, and dead links fail the build.Verified by reverting each fix
Rather than trusting that three plausible fixes explain one red build, I reverted each against the otherwise-fixed tree:
PerformanceChartimportCould not resolve "../components/PerformanceChart.vue"README.md (175:218): Invalid end tag.[LICENSE](../LICENSE)Found dead link ./../LICENSE in file README.mdbuild complete in 1.40s.— 6 pages renderedThe control build ran against the actual branch files at the baseline dependency versions, so nothing here depends on #296/#299/#300 landing.
Also: codeql-action v3 → v4
Dependabot proposed
@v4.37.4in #323. This takes@v4, the floating major, for two reasons: every other action in this repo is pinned major-only, and the patch pin was already stale by review time (v4.37.5had shipped).upload-sarif's inputs are unchanged across the major and v4's breaking changes are all in the analysis actions — all three call sites ran green under v4 in #323's own Security Scan job.trivy-actionis the single exact pin and is exact only because it publishes no major ref; it carries a comment saying so, and this now carries the inverse note.Note on the new job
docs-siteusesnpm install, notnpm ci, becausedocs-platform/still commits no lockfile — that is the remainder of #214 and the reason its npm security updates cannot apply at all. So this is a weaker gate than the SDK one; it will still catch a broken page, a missing component, and a dead link, which is what it is for.The site is not published by anything, so this gates content rather than a deploy. It earns its place anyway: these pages are read on GitHub whether or not the site renders, and a tree that cannot build is a tree where nobody notices the next thing that breaks.