Repository navigation
[CI] Bound YAML merge conversion and close SQLite routing review gaps - #25998
Conversation
|
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; 2 remain after this review. 📝 WalkthroughWalkthroughThe SQLite runtime boundary test now classifies SQLite imports with a shared helper, and the runtime test include list adds two tests. YAML parsing now checks conversion work before converting a document and returns null when the check fails. YAML tests cover conversion limits and merge behavior. A renderer test fixes and restores Math.random during process-exit timing checks. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to This change bounds YAML conversion work to reject over-budget inputs and tightens test-only classification and timing. No concrete merge-blocking risk remains. 🚥 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 |
8c085dc to
f3a7d06
Compare
ELI5
Shared YAML defaults still work, but a small configuration cannot request unbounded repeated map conversion. Tests importing real SQLite code are reliably assigned to Node.
What Changed
Bound YAML collection conversion work before creating JavaScript objects, including repeated merges, nested values, merge sequences, explicit ordered-map/pair tags, and cycles. Keep the dependency's separate alias limit. Use the real parser in the bounds tests.
Fix SQLite import classification for a default import combined with type-only names and for an empty named import. Route two newly detected database suites to Node. Fix one notification fixture's polling cadence so its observation window no longer depends on random offsets; production polling remains unchanged.
Why
Addresses the two valid post-merge review findings in #25967. The dependency's alias limit does not bound repeated map conversion/copying. Fixing the source-level bound preserves ordinary shared defaults without relying on a dependency patch. Checking whether an import has a runtime binding preserves pure type-only imports while catching side effects.
Measured before/after behavior on the same macOS checkout:
toJScalled oncetoJS; zero conversion calls!!omap/!!pairs!!omap/!!pairsvaluesThe new collection-work budget is 262,144 entries, derived from the existing source-text cap. This is a bounded-work correctness fix, not a suite-speed claim. A single unsafe-input timing of 57.1ms → 27.3ms is diagnostic only, not a repeated performance benchmark.
Linked Issue
Follow-up to #25967: YAML merge bound and SQLite import guard.
Visual Proof
N/A — configuration parser and test infrastructure; no rendered UI or interaction change.
Testing
macOS arm64: all 86 focused YAML/import-boundary/routed-database/stopped-send-order/notification cases pass, including five tagged-pair regressions. All 18 YAML bounds cases and all 10 notification cases also pass under the Node fallback. Full
pnpm tcpasses. Tests cover source-order anchor redefinition, quoted literal merge keys, merge precedence, nested map values, exponential merge sequences, cycles, explicit tagged-pair descendants and merge keys, and rejection before conversion. Over-budget tagged fixtures install a throwing conversion spy so a future regression fails without expanding them. Changed-code checks pass. Full PR CI passed all five unit shards and their aggregate verification on headf3a7d065; CodeRabbit was clean before merge.Review
Compared the guard with the installed YAML library's merge conversion and alias resolution. Independently reviewed the cost bound and ordinary-configuration preservation. No new module mocking, weakened assertions, skips, or relaxed deadlines. The two review findings covered here are fixed and resolved in #25967: YAML proof and SQLite proof. All three original review threads are now resolved. A controlled polling-jitter sequence reproduced the CI notification failure; fixed fixture cadence passes on both runtimes without changing its waits or assertions.
Agent skill upstream boundary
Notes
Uses the same parser for local and SSH-delivered configuration. No wire protocol changes or local-path assumptions. SQLite consumers keep the application's actual Node runtime.
Checklist