← Back to Pull requests

fix(docs): restore the versioned docs build used by pages #636

Closed
unknown closed this pull request without merging on Dec 02, 2026 15:17 UTC
View on GitHub
unknown unknown commented on Dec 02, 2026 13:26 UTC
Author

Problem

The pages workflow has failed on every run since 2026-10-26 — the last green run was 2026-10-19. Consequences:

  • The docs site is frozen at the 2026-10-19 build.

  • The Helm chart index is frozen at 0.5.0. The chart published with v0.6.0-rc.1 is attached to the release but is not installable via helm repo, because cr index never ran.
  • hack/build-versioned-docs.sh is only invoked by pages.yml, so the breakage was invisible to PR CI.

    Two independent regressions

    Both share a pattern: a change fixed the local preview path and left the production path behind.

    1. Missing --user 0:0 — fails on the first version built

    7de6641 (Docsy 0.14.3 → 0.18.0) added USER hugo (uid 1000) to docs/Dockerfile and added --user 0:0 to the Makefile's docs.api and docs.chroma, but not to this script. On Linux the bind-mounted worktree is owned by the invoking user, so uid 1000 cannot create api.md under it:

    crd-ref-docs  Failed to render  {"error": "open docs/content/reference/api.md: permission denied"}
    

    Hugo then fails the same way on its build lock (open /src/.hugo_build.lock: permission denied).

    Both runs already chown their output back to the host user — which only ever made sense as root, confirming the original intent. Docker Desktop on macOS masks the ownership mismatch, which is why this was never seen locally.

    2. Missing hugo.container.yaml — fails on dev/HEAD only

    Docsy 0.18 takes Bootstrap and Font Awesome from npm instead of vendoring them. docs/hugo.container.yaml (added in 6ea4416) is what mounts them from /deps/node_modules into assets/vendor, and it was wired into docs.serve only. Without it:

    TOCSS-DART: failed to transform "/scss/main.scss":
      docsy/theme@v0.18.0/assets/scss/td/_main.scss:3:8: Can't find stylesheet to import.
    

    It is passed conditionally: v0.4.0 and v0.5.0 predate the file and vendor their own Bootstrap via Docsy 0.14, and Hugo errors on a config that does not exist in the tree. The per-version override stays last so it still wins on conflicts.

    This one was hidden behind the first: the build died on the first version and never reached dev.

    Verification

    Reproduced both failures against a uid-1001-owned worktree on a Linux filesystem (macOS/Docker Desktop and Colima both mask the uid mismatch, so neither reproduces it):

    | Step | Before | After |
    |---|---|---|
    | crd-ref-docs | permission denied — byte-identical to the CI log | generated, owned by the host uid |
    | hugo (tagged refs) | .hugo_build.lock: permission denied | 33 pages |
    | hugo (dev/HEAD) | Can't find stylesheet to import — reproduced with no --user flag, so independent of fix 1 | 36 pages |

    Then make docs.build end to end, exit 0:

  • latest (v0.5.0), v0.4 (v0.4.0) and dev all build

  • Bootstrap compiles into the CSS (403 KB, navbar classes present)

  • version dropdown lists all three versions

  • root redirect points at latest

  • no root-owned files left behind
  • docs/static does not exist at HEAD, so the static/webfonts mount in hugo.container.yaml drops nothing; older refs do not use that config at all.

    After merge

    Merging triggers pages, which should rebuild the site and index the v0.6.0-rc.1 chart (cr index --release-name-template "v{{ .Version }}" resolves chart 0.6.0-rc.1 → tag v0.6.0-rc.1, which is published and carries a .tgz). Worth confirming the run is green and that helm search repo ... --devel shows 0.6.0-rc.1.

    Note this also means the fix cannot be verified by PR CI — pages.yml runs only on push to main and workflow_dispatch.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Documentation
    Versioned documentation builds now handle generated file permissions more consistently, keeping output accessible after container-based generation. Builds use the base configuration, include an optional configuration when available for a version, and apply version-specific overrides last so each version uses its intended settings.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 527 lines (+395 / -132) across 6 files Reviewer: rikatz Review duration: 110m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 527 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.375
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #636"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.8% (MEDIUM) · Higher = larger blast radius
    47.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.9% · Safe to merge
    18.9%