Skip to content

v0.8.66: Make check-docs fail when install snippets are stale #3770

Description

@Hmbown

Why this matters

npm run check:docs is a release/website parity gate. If it prints FAIL for stale install snippets but still exits successfully and prints PASS, CI can miss public install-copy drift. That undercuts the exact release-doc protection the gate is supposed to provide.

Current behavior

web/scripts/check-docs.mjs detects stale install snippets and prints a failure:

  • web/scripts/check-docs.mjs:139-145

But after printing the stale snippet details it does not call process.exit(1). Control falls through to:

  • web/scripts/check-docs.mjs:150
console.log("[check-docs] PASS");

Current clean run output still passes:

[check-docs] parsed 16 doc topics
[check-docs] OK — all repo source files exist
[check-docs] OK — version=0.8.66
[check-docs] OK — install snippets
[check-docs] PASS

The bug is the stale-snippet failure path: if install.ok is false, the script reports FAIL but does not exit non-zero.

Desired behavior

  1. When stale install snippets are found, check-docs.mjs exits non-zero.
  2. The script should not print final PASS after any FAIL condition.
  3. CI should fail on stale website install/version snippets.

Repro or evidence

Inspect the control flow:

nl -ba web/scripts/check-docs.mjs | sed -n '139,150p'

The stale-snippet branch logs FAIL and then falls through to the final PASS line.

Acceptance criteria

  • check-docs.mjs exits with status 1 when checkInstallSnippets() returns stale entries.
  • Final PASS is printed only if every check passed.
  • Add a focused test or fixture-style script assertion covering the stale install-snippet path.
  • cd web && npm run check:docs still passes when snippets are fresh.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationrelease-blockerMust be fixed before the next releasereliabilityReliability, flaky behavior, retries, fallbacks, and robustnessv0.8.66Targeting v0.8.66

    Projects

    Status
    In progress

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions