fix(llm-model-catalog): stop generated files showing as modified#4170
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (29)
WalkthroughThis change updates Changes
Sequence Diagram(s)Not applicable; this is a configuration-only change. Compact Metadata Related Issues: None specified Poem 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.5.1).oxfmtrc.jsonFile contains syntax errors that prevent linting: Line 27: Expected an array, an object, or a literal but instead found '// Maybe turn these on in the future'.; Line 28: End of file expected; Line 28: End of file expected; Line 29: End of file expected; Line 29: End of file expected; Line 30: End of file expected; Line 31: End of file expected Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
e07d3cb to
19c6801
Compare
defaultPrices.ts and modelCatalog.ts are generated by scripts/generate.mjs with JSON.stringify (quoted keys, no trailing commas), but oxfmt reformatted the checked-in copies (unquoted keys, trailing commas). So every 'turbo run generate' (e.g. via 'pnpm run db:migrate') left both files dirty with an identical-data diff. Exclude the two generated files in .oxfmtrc.json and commit the raw generator output, matching how other codegen files in the repo are handled. Generation is now deterministic and a clean no-op.
19c6801 to
cf9f473
Compare
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
Summary
Running
pnpm run db:migratelocally leftdefaultPrices.tsandmodelCatalog.tsinllm-model-catalogshowing as modified every time, a ~10k-line diff that only ever changed formatting. This stops the churn.Root cause
The root
db:migratescript ends in&& turbo run generate, which runs thegeneratescript in every package that has one, including this one. The generator writes its output withJSON.stringify(quoted keys, no trailing commas), but the checked-in copies had been reformatted by oxfmt (unquoted keys, trailing commas). So the generator output never matched what was committed, even though the parsed data was identical.Fix
Add the two generated files to
.oxfmtrc.json's ignore list and commit the raw generator output, matching how other codegen files in the repo are already handled (e.g. the tsql grammar). Generation is deterministic, sogenerateandformatare both no-ops on a clean tree now.No changeset: internal package, dev tooling only, no runtime or public API change.