Skip to content

fix(docs): the documentation site builds, and a job that notices when it stops - #334

Merged
scttfrdmn merged 4 commits into
mainfrom
ci/codeql-action-v4
Aug 4, 2026
Merged

scttfrdmn merged 4 commits into
mainfrom
ci/codeql-action-v4

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Replaces #323 (same codeql-action upgrade, @v4 instead of @v4.37.4) and fixes the build half of #214.

The site has never built

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. Three components that have never existed

.vitepress/theme/index.js imported InteractiveExample.vue, PerformanceChart.vue and ConfigurationBuilder.vue. None of them was deleted — none was ever written:

$ git log --oneline --all -- docs-platform/.vitepress/components/PerformanceChart.vue
(nothing)

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; PerformanceChart was imported and used by nothing, which fits the hardcoded chart removed from index.md earlier in this release.

2. Nested equal-length code fences

README.md put a ```python fence inside a ```markdown fence 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:

README.md (166:218): Invalid end tag.

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:

mutation result
restore the PerformanceChart import Could not resolve "../components/PerformanceChart.vue"
restore the 3-backtick outer fence README.md (175:218): Invalid end tag.
restore [LICENSE](../LICENSE) Found dead link ./../LICENSE in file README.md
all three fixed build complete in 1.40s. — 6 pages rendered

The 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.4 in #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.5 had 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-action is 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-site uses npm install, not npm ci, because docs-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.

… 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.
@scttfrdmn scttfrdmn added dependencies Dependency updates (Dependabot) github-actions GitHub Actions workflow dependency area: docs Documentation content and structure area: ci-cd CI workflows, gates, and release automation labels Aug 4, 2026
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.
@scttfrdmn

Copy link
Copy Markdown
Owner Author

Two commits added since this was opened, both from following the thread this PR started.

ea38912 — three markdown-it packages removed. Dependabot's #299 proposed the markdown-it 15 major, and now that the site builds I could actually measure it. The answer turned out to be that the dependency is unused, along with two siblings:

  • .vitepress/config.js had a markdown.config hook registering markdown-it-container for tip/warning/danger — which reads as a real use. VitePress ships those three containers built in, no page in this tree uses ::: syntax at all, and the md handed to that hook is VitePress's bundled markdown-it instance ([email protected] does not list markdown-it in its dependencies). So the hook never extended the declared package.
  • markdown-it-anchor was referenced by nothing but package.json.

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 node_modules; and leaving the hook with the package gone fails with Cannot find module 'markdown-it-container', so the hook and the dependency are a matched pair. docs-site passes here on CI, which is the point of adding it. #299 closed on this basis.

fd4841a — a CHANGELOG entry that failed the test it described. coverage went red on TestDocumentedLinksResolve, and it was my error, not a flake: the entry explaining why ../LICENSE does not resolve quoted the broken link in markdown form, and the link checker cannot distinguish a quoted example from a real reference. Written as prose now, with a note in the file so the next person learns it there rather than from CI.

Worth saying plainly that this is the second time in this PR that a gate caught something I would otherwise have shipped — the docs-site job caught nothing new because I had already fixed the build locally, but TestDocumentedLinksResolve caught a live defect in my own documentation. Which is the argument for the job this PR adds.

Current state: all checks green except test, still running. Not merging — my standing authority covers closing Dependabot PRs, not merging my own replacement PRs. This is ready for review.

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.
@scttfrdmn
scttfrdmn merged commit 6d453aa into main Aug 4, 2026
25 checks passed
@scttfrdmn
scttfrdmn deleted the ci/codeql-action-v4 branch August 4, 2026 03:34
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
CHANGELOG conflict only: #334's docs-site and codeql-v4 entries landed in the
same 'Fixed' section this branch adds its #309 entry to. Both kept, in the
order main has them.
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
CHANGELOG conflict only, in two places: #334 added its docs-site and codeql-v4
entries to the same 'Fixed' section this branch adds #291 to, and a reference
link definition adjacent to this branch's. Both sides kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci-cd CI workflows, gates, and release automation area: docs Documentation content and structure dependencies Dependency updates (Dependabot) github-actions GitHub Actions workflow dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant