feat(web): add fact-drift CI gate for version, providers, and tool inventory (#3415)#3473
Open
idling11 wants to merge 1 commit into
Open
feat(web): add fact-drift CI gate for version, providers, and tool inventory (#3415)#3473idling11 wants to merge 1 commit into
idling11 wants to merge 1 commit into
Conversation
…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
ab16346 to
38ba9ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Closes #3415.
Summary
Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-featurescargo test --workspace --all-featuresChecklist