Repository navigation
test: stop main failing on three tests the store and close-cause changes crossed - #24231
Conversation
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThree tests now use explicit session close reasons. The idle-sweep test also uses the test-harness store helper instead of opening the store directly. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The test updates align their setup and explicit close reasons with the existing contracts. No production behavior changes or actionable merge-blocking risks are evident. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — a test-only fix that restores main's green typecheck after three PRs (#24006, #23467, #23684) crossed.
codex-provider-retry-idle-sweep.test.ts— opens the store throughopenTestAgentSessionRecordStore(root)(the post-#24006 journal-database helper) instead of the removedopen({ directory, hostId }), and asserts the idle sweep's close carries'evict'.structured-chat-tab-table.test.ts— passes the now-required'user-close'cause tohost.close.
I verified both changes against the code they exercise: the idle sweep wires stopAgent(sessionId, 'evict') (structured-agent-session-conversation-lifetime.ts:80) and eviction forwards that cause to adapter.closeSession (structured-agent-session-eviction.ts:93), so the exact-argument assertion pins real behavior rather than absorbing it. 'user-close' is a valid StructuredAgentSessionCloseCause.
pnpm run typecheck:node exits cleanly and the two files run 14 tests green, matching the PR's testing claims.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the incremental delta since the prior review is one commit: the third test file catches up with the already-required session close cause.
structured-agent-session-startup-reconcile.test.ts— the cast forcloseStructuredAgentSessionTabnow declares the requiredcause: 'user-close'parameter, the call passes'user-close', and the host assertion is tightened totoHaveBeenCalledWith(sessionId, 'user-close').
I verified this against the code the test exercises: closeStructuredAgentSessionTab(tab, cause) (orca-runtime-close-structured-agent-session-tab.ts:20) forwards cause to host.close(tab.sessionId, cause) (line 37), so the exact-argument assertion pins real behavior. 'user-close' is a valid StructuredAgentSessionCloseCause. The file runs 4 tests green locally, and the two files from the prior review are unchanged.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Main's typecheck is failing, so every PR that merges main fails CI. Three tests were written against old versions of code that has since changed, and this PR updates them. No user-facing change: only three test files change.
What Changed
Three PRs crossed on main:
AgentSessionRecordStore.open({ directory, hostId });close(sessionId, cause));codex-provider-retry-idle-sweep.test.ts, written against the old store open call and the old close call.The fix:
codex-provider-retry-idle-sweep.test.tsopens the store with the existingopenTestAgentSessionRecordStorehelper, and expects the idle sweep's close to carry'evict', as the file's other close checks already do.structured-chat-tab-table.test.tspasses'user-close'tohost.close.structured-agent-session-startup-reconcile.test.tspasses'user-close'to the runtime's close and expects it on the host close. It typechecks on main (it reaches the method through a cast) but fails when run.Why
Main's typecheck fails on these calls (
tc:node), and the idle-sweep test also fails when run. The fix changes the tests to match what shipped, not the other way round, because each production change was intended.Linked Issue
Follow-up to #24006, #23467 and #23684 (no issue: a main CI regression).
Visual Proof
N/A: only tests change.
Testing
The three files pass: 18 tests. The startup-reconcile test fails on main's copy and passes with this change.
tsc -p config/tsconfig.node.jsonshows no errors in either file. The only errors were a missing optional package in the local install.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Differences from the common pattern
None: matches the common pattern. This is a test-only fix.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)