Repository navigation
Run localization catalog checks on Bun (26% less time) - #25999
Conversation
8c085dc to
f3a7d06
Compare
035e7ac to
53e7443
Compare
53e7443 to
87a7367
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe preflight workflow sets up Bun when static analysis is selected. The localization verifier package script now runs with Bun. CLI tests run valid-catalog and failure scenarios with both Node and Bun, then check exit codes, timeout status, output equality, and expected text. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The supported PR and documented local lint paths provide the required Bun runtime, and no material merge-blocking issue is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
ELI5
The localization catalog check now runs on Bun and finishes sooner. It checks the same source files, English catalog, runtime catalog, and existing translations.
What Changed
Run the combined
verify:localization-catalogscommand on the already pinned Bun runtime. Install that version in the PR static-analysis job. Add real Node/Bun CLI comparisons for valid catalogs and failures in each of the two checks.Why
This is a small runtime change to an existing checker. It preserves its shared source scan and validation logic, without maintaining a second implementation or caching stale results.
Measured on macOS arm64, Apple M4 Max, Node 24.20.0, Bun 1.4.2, source
d8c871a1f0a31a5ae276e2d6f1fd5641c631f717:One warmup per runtime, seven measured runs each, alternating order in each round, sequential execution. Timings include startup, scanning, validation, output, and process exit. All sixteen invocations returned 0 with byte-identical stdout and stderr (SHA-256
bde26d7b7afd7a32ebb2aa789ec001d6f8a6778a7bb34c9d69cda528cd4759f5, stdout + NUL + stderr). Each verified 15,655 source references, 15,390 English entries, 1,881 runtime entries, and the same five translation catalogs.Measured samples in seconds:
Reproduce with
node config/scripts/verify-localization-catalogs.mjsandbun config/scripts/verify-localization-catalogs.mjson the same checkout. These measure the checker process, excluding pnpm's unchanged command-dispatch overhead. This is not a whole-lint or CI wall-time claim: CI also pays for Bun installation. It does not establish the separate 2× full-test-suite goal.Linked Issue
Maintainer-requested follow-up to the Bun migration. Targets main after #25998 merged; this PR adds only the four catalog/CI files. The benchmark remains the explicitly frozen earlier source above.
Visual Proof
N/A — developer verification tooling; no rendered UI or interaction change.
Testing
macOS arm64: all four catalog/runtime-catalog/workflow test files pass under both Bun/Vitest and Node/Vitest (59 cases per runner). The added subprocess cases run the actual Node and Bun CLIs against valid catalogs, a missing source reference, and a missing runtime entry; both runtimes return the same verdicts and complete diagnostics. Repeated real-checkout measurements above also passed. The changed-code quality gate and formatting pass. Full typecheck passed with the prerequisite review fixes. CI covers Linux; no Windows or SSH runtime changes.
Review
Reviewed command entry-point execution, failure exit codes, fresh source scans, and conditional CI runtime installation. The standalone and catalog-writing commands keep their existing implementation and runtime.
Agent skill upstream boundary
Notes
No application runtime, remote protocol, or catalog-content changes. Bun was already a pinned development tool for unit tests.
Checklist