Skip to content

feat(web): add fact-drift CI gate for version, providers, and tool inventory (#3415)#3473

Open
idling11 wants to merge 1 commit into
Hmbown:mainfrom
idling11:fix/issue-3415-stale-website-facts
Open

feat(web): add fact-drift CI gate for version, providers, and tool inventory (#3415)#3473
idling11 wants to merge 1 commit into
Hmbown:mainfrom
idling11:fix/issue-3415-stale-website-facts

Conversation

@idling11

Copy link
Copy Markdown
Contributor

Extract shared derivation logic into web/scripts/facts-lib.mjs and create a check-facts.mjs CI gate that fails when web/lib/facts.generated.ts is stale relative to the workspace sources.

  • facts-lib.mjs: single-source-of-truth derivation shared by derive-facts.mjs (prebuild) and check-facts.mjs (gate)
  • derive-facts.mjs: slimmed to ~63 lines, imports from facts-lib.mjs
  • check-facts.mjs: re-derives facts and compares against committed file; exits non-zero when version, providers, crates, sandboxBackends, defaultModel, nodeEngines, toolCount, or license have drifted
  • web/package.json: add npm run check:facts script
  • .github/workflows/web.yml: run check:facts after prebuild in lint job
  • web/lib/check-facts.test.ts: 9 vitest tests covering stale version (0.8.62 vs 0.8.64), provider drift, multi-field detection, edge cases

Closes #3415.

Summary

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features
  • cargo test --workspace --all-features

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes
  • Harvested/co-authored credit uses a GitHub numeric noreply address

@idling11 idling11 requested a review from Hmbown as a code owner June 23, 2026 09:49
…ventory (Hmbown#3415)

Extract shared derivation logic into web/scripts/facts-lib.mjs and
create a check-facts.mjs CI gate that fails when web/lib/facts.generated.ts
is stale relative to the workspace sources.

- facts-lib.mjs: single-source-of-truth derivation shared by
  derive-facts.mjs (prebuild) and check-facts.mjs (gate)
- derive-facts.mjs: slimmed to ~63 lines, imports from facts-lib.mjs
- check-facts.mjs: re-derives facts and compares against committed file;
  exits non-zero when version, providers, crates, sandboxBackends,
  defaultModel, nodeEngines, toolCount, or license have drifted
- web/package.json: add npm run check:facts script
- .github/workflows/web.yml: run check:facts after prebuild in lint job
- web/lib/check-facts.test.ts: 9 vitest tests covering stale version
  (0.8.62 vs 0.8.64), provider drift, multi-field detection, edge cases

Closes Hmbown#3415
@idling11 idling11 force-pushed the fix/issue-3415-stale-website-facts branch from ab16346 to 38ba9ad Compare June 23, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.8.69: Add a website fact-drift gate for version, providers, and tool inventory

1 participant