Skip to content

[CI] Bound YAML merge conversion and close SQLite routing review gaps - #25998

Merged
nwparker merged 3 commits into
mainfrom
nwparker/bun-test-review-followup
Oct 7, 2026
Merged

nwparker merged 3 commits into
mainfrom
nwparker/bun-test-review-followup

Conversation

@nwparker

@nwparker nwparker commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​184 $\color{#cf222e}{\Huge{\mathbf{−}}}$​88 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​94 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​90

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:

Contract Before After
34,279-byte YAML, 96 merges × 2,001 source fields Accepted; at least 384,192 converted/copied entries, toJS called once Rejected before toJS; zero conversion calls
680–681-byte nested merges inside !!omap / !!pairs Escaped the preflight collection budget Rejected before conversion
Ordinary shared defaults across 40 tabs All 40 retained All 40 retained
Small valid !!omap / !!pairs values Accepted Still accepted
Default import plus type-only named import Runtime dependency missed Runtime dependency detected
Empty named import Runtime dependency missed Runtime dependency detected
Pure type-only import Excluded from runtime dependencies Still excluded
Notification fixture under a valid jitter schedule Exit confirmed at 5,631ms; delivery can follow its 7,000ms observation Fixed fixture cadence confirms at 4,866ms; delivery fits the same observation window

The 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

  • I manually tested these changes locally
  • Automated tests added/updated

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 tc passes. 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 head f3a7d065; 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

  • Not applicable; no upstream skill source copied.

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

  • This PR is small and focused
  • I explained what changed and why
  • Visual proof is N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform and SSH/remote impact considered
  • Relevant local checks and full PR CI pass

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 112d15a8-0ca2-45c7-b71b-8e1922b5829d
📥 Commits

Reviewing files that changed from the base of the PR and between b5dba89 and f3a7d06.

📒 Files selected for processing (4)
  • config/scripts/vitest-sqlite-runtime-boundary.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-hook-completion-side-effects.test.ts
  • src/shared/orca-yaml-alias-bounds.test.ts
  • src/shared/orca-yaml-merge-expansion.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The 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 f3a7d

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)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: bounding YAML merge conversion and addressing SQLite runtime-routing gaps.
Description check ✅ Passed The description covers the change, rationale, testing, visual-proof status, and compatibility considerations. The linked section points to PR discussion threads rather than an issue, and the AI Disclo…
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 8 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker force-pushed the nwparker/bun-test-review-followup branch from 8c085dc to f3a7d06 Compare October 6, 2026 23:52
@nwparker
nwparker merged commit 3308ff8 into main Oct 7, 2026
32 checks passed
@nwparker nwparker changed the title Bound YAML merge conversion and close SQLite routing review gaps [CI] Bound YAML merge conversion and close SQLite routing review gaps Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant