ci: regenerate stale derived files with one command (npm run generate) #9673
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.50) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 454 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 77% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.366
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #9673"
general
weight: 0.35
greptile-apps[bot]
Why
Stale generated files cause over half of CI test failures: 484 occurrences on 130 branches over five weeks, from tests such as
public-product-facts,ai-search-product-facts,docs-stats-,product-catalog-freshnessandllms-txt-mcp-tools. More than 20 generators write these files, and nothing runs them all, so each failure meant working out which generator the test wanted.What
npm run generate(scripts/generate-derived.mjs) runs every generator's--checkin dependency order and rewrites only the stale ones. It repeats until every check passes, up to 3 passes. Generators that stamp today's date or rebuild PDFs leave current files alone.npm run generate:checkreports without writing and prints each failing check's output.docs-statsjob runsgenerate:check. It replaces that job's three single-generator checks: source attribution, teasers and the entitlement crosswalk. Docs-only PRs skipunit, so they now also get the product facts, llms and AI search checks.tests/generate-derived.test.mjsfails when a new:checkgenerator is neither in the list nor explicitly excluded.CONTRIBUTING.mdand a row in theAGENTS.mdcode-and-check table.Not covered, as listed in the script header:
make generate: proto output, which already has its own hook and CI flow.Verification
generate:checkpasses in about 9s andgeneratechanges nothing.npm run generate.- Four came out byte-identical to what the author committed.
- Five differed only in the "reconciled: <date>" stamp, which the generator sets to today.
- Two left differences only in hand-written prose that the rollback had also reverted. On one of them (#9622), product facts failed loudly because the prose it patches was gone. No commit showed a generator defect.
- After
npm run generate, all tests passed on the first two.- The third (#9438) kept 2 failures, coming from a hand-written CII paragraph in
llms.txtthat the rollback had reverted.test.ymlor the pre-push hook pass.docs:checkand biome pass.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Developer Tools
Added commands to check or regenerate committed derived files.
The pre-push check now regenerates stale files and stops the push so changes can be reviewed and committed.
CI now checks generated-file freshness, with the zh-TW check handled separately.
Documentation
Added contributor guidance on regenerating derived files and checking them before committing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->