ReviewOS

zig-utils/zig-js

Docs: consume and improve owned BunPress tooling locally

#464
Closed chris opened this 9 days ago ·
9 days ago

Parent: #459 Depends on: #462 Related: #497

Goal

Make zig-js documentation consume the owned BunPress ecosystem from maintained sources under ~/Code/Tools and ~/Code/Libraries, improving those projects when capabilities are missing instead of replacing or removing them.

BunPress (stacksjs/bunpress) and ts-syntax-highlighter are Chris-owned dependencies. Their presence is intentional architecture, not third-party debt. The remaining problem is exact, offline, reproducible resolution and end-to-end quality.

Scope

  • Preserve and improve Markdown, front matter, navigation, code highlighting, links, redirects, static assets, search/index metadata, and local preview behavior.
  • Resolve BunPress and its owned transitive packages from pinned local sibling checkouts for ordinary development and CI; do not substitute an in-repository documentation renderer.
  • Make missing capabilities or defects in BunPress, STX, ts-md, ts-syntax-highlighter, or other owned dependencies at their source repositories, with upstream commits linked here.
  • Keep generated benchmark/release marker regions and evidence links byte-stable.
  • Add deterministic output verification in the appropriate owned tool so every consumer benefits.
  • Document bootstrap, update, and cache behavior without treating owned dependencies as prohibited.

No-workaround rules

  • Do not replace an owned dependency merely to reduce the dependency count.
  • Do not vendor snapshots, check in node_modules, use opaque prebuilt generators, or reduce documentation coverage.
  • Do not paper over an upstream defect in zig-js; fix and test the owning project.

Acceptance

  • zig-js uses BunPress and owned companion libraries through an explicit, pinned, locally resolvable dependency contract.
  • Docs build/preview works from the repository plus owned local tooling, with no mutable registry dependency in the ordinary path.
  • Link checking, generated evidence blocks, navigation, search, highlighting, and the complete published page inventory remain green.
  • CI proves deterministic output and exact owned revisions.
  • The #462 dependency inventory classifies the docs stack as owned and local.
9 days ago

Implemented and pushed to main in 418b51ef.

Acceptance evidence:

  • removed the root package manifest/lock, BunPress and ts-syntax-highlighter, executable TypeScript config, and Bun CI bootstrap
  • added the in-tree Zig builder/preview server, declarative config, component/data expansion, syntax highlighting, clean routes, search metadata, sitemap/robots, evidence copying, and generated 404
  • rendered all 49 public pages and copied 128 evidence/assets into 183 deterministic outputs
  • checked tree SHA-256: b841f32412d7baf222351ac296841eafdc0741705a2c8c9a8763cc09594609c4
  • zig build docs-build passes inside a network-deny sandbox after removing local node_modules and BunPress cache
  • source link gate: 89 files, all links resolve
  • preview HTTP and browser QA passed; browser QA exposed and verified the fix for a keep-alive asset-loading bug
  • dependency audit: 13 classified edges, migration targets 6 → 4
  • flips 0 test262 cases

The remaining Bun-based test262 data generator is outside the docs build/preview chain and remains explicitly owned by #497.

9 days ago

Correction: 7a40622c restores BunPress after clarifying that it and the companion libraries are owned dependencies. The prior replacement direction was architecturally wrong. This issue is reopened and now tracks local pinned consumption plus improvements in the owning repositories; flips 0 test262 cases.

9 days ago

Corrected implementation is now on main in cc4ba5ff, backed by upstream BunPress commits e38af56 and 7f24aa8.

Progress:

  • BunPress remains the documentation engine and is executed directly from ../../Tools/bunpress.
  • CI checks out the exact upstream commit in the same Tools/ + Libraries/ layout.
  • BunPress now builds through a complete replacement tree, supports deterministic output manifests with exact drift diagnostics, and no longer emits random code-group IDs.
  • BunPress now correctly declares its CLI and syntax-highlighter runtime imports.
  • zig-js checks 49 pages / 52 rendered outputs against docs/.data/bunpress-output-v1.json.
  • repeat builds, link checking, dependency audit, and a network-denied docs build pass.
  • flips 0 test262 cases.

Keeping #464 open for the remaining owned-transitive resolution and Bun bootstrap pin; the owned dependency itself is now correctly classified as allowed, not as debt to remove.

9 days ago

Progress landed in zig-js commit 56ba547 and BunPress commit dd82b74: https://github.com/stacksjs/bunpress/commit/dd82b741f1f1a789c2f0d51635574adb354888b8

The upstream fix removes filesystem-mtime/current-clock sitemap output, upgrades to the current owner-maintained STX renderer, imports the narrow renderer entry point, and makes STX/component failures fatal instead of silently dropping content. BunPress now passes 370/370 tests plus typecheck/build.

zig-js verification: 49 pages build reproducibly across repeated and network-denied runs; 89 links resolve; all 282 checked test262 suite rows render on both report pages; no raw STX markers remain; dependency audit reports 14 classified edges and 4 migration targets. CI is now running the exact BunPress commit. Keeping this issue open for the acceptance requirement that the owned companion-library source resolution itself be local and pinned end to end.

9 days ago

Completed by zig-js dd0c423b, with fixes in the owning repositories:

  • STX c215f1b makes inline CSS injection opt-in and covers both default and explicit behavior.
  • BunPress 047ea6b adds the exact local-workspace/bootstrap contract for STX and ts-syntax-highlighter.
  • BunPress 56f5fee explicitly renders inline STX without page CSS.
  • BunPress 1262895 builds the complete owned STX graph for fresh checkouts.

Acceptance evidence:

Sign in to comment on this issue.