test(provider-pi): cover continuation offers through the driver #17407
main fromrefs/pull/17407/head·merged by juliusmarminge View on GitHubCodeRabbit flagged this on #17381 after it merged. That PR moved Pi's continuation tests from PiAdapterV2Driver.create to calling makePiAdapterV2 directly. As a result, if the driver stopped forwarding ProviderContinuationRequests, those tests would still pass.
This sends the continuation cases back through PiAdapterV2Driver.create, with the continuation queue provided as a service the way production does it. Tests that don't need continuations keep calling the factory directly.
Verification: all 98 Pi tests pass. I also removed the driver's continuationRequests forwarding as a check, and 14 continuation tests failed. Without this change, those same 14 would still pass.
Done by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Approvability#
Verdict: Approved at
2c3630aMacroscope's review found this PR approvable — The PR is confined to ignored, test-only changes that exercise continuation offers through the provider driver without modifying production behavior or product defaults. No security, billing, schema, deployment, or static-analysis suppression changes are involved.
Notes:
- No code objects were reviewed. Approvability was decided on eligibility alone.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 4.9 KiB 5.0 KiB +23 B (+0.5%) 6.8 KiB ✅ Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB +23 B (+1.9%) 2.0 KiB ✅ Codex Live turn WebSocket decoded 20.8 KiB 20.9 KiB +41 B (+0.2%) 29.3 KiB ✅ Codex Live turn messages 1 2 +1 (+100.0%) 8 ✅ Claude Total thread wire 5.0 KiB 5.0 KiB +24 B (+0.5%) 6.8 KiB ✅ Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB +24 B (+2.0%) 2.0 KiB ✅ Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB +41 B (+0.2%) 29.3 KiB ✅ Claude Live turn messages 1 2 +1 (+100.0%) 8 ✅ Baseline:
563645c· PR result:2c3630a· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
4f7dd96b-ef65-4780-958b-787f731a394a
📥 Commits
Reviewing files that changed from the base of the PR and between 563645cf6e104ad930f4c9b209678a77eef07e65 and 2c3630af384d33201d18c7cf30d2c1ffdb80d27e.
📒 Files selected for processing (1)
packages/provider-pi/src/server/adapter.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough#
The test adapter helper now uses
PiAdapterV2Driver.createwhen continuation requests are supplied. Without continuation requests, it continues to usemakePiAdapterV2.Changes#
Pi adapter test setup
Layer / File(s) Summary Conditional adapter construction
packages/provider-pi/src/server/adapter.test.tsThe helper creates the adapter through the v2 driver when continuation requests are supplied, with a spawner, an empty HostProcessEnvironment, and a continuation service whosetakeeffect isEffect.never. Other calls still usemakePiAdapterV2.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Other
Merge Risk: ⚪ Minimal · up to
2c363The changed tests exercise continuation forwarding through the driver; no merge-blocking risk was identified in the reviewed change.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation Title check The title clearly and concisely describes the main change: testing continuation offers through the provider driver. Description check The description explains the problem, the change, and focused verification results. It identifies the related issue and explains why the driver path must be tested. Although it does not use the templa… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. ✨ Finishing Touches
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment `@coderabbitai help` to get the list of available commands.juliusmarminge merged thiscb46c62
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes