Repository navigation
fix(acp): repair main's typecheck after the legacy journal-path removal - #26094
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
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 failed-attach test now makes Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The test now exercises the intended journal-open failure and verifies that attachment rejects; no concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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
Two changes landed on main at nearly the same time. One removed a function; the other added a test that pretends that function fails. Each passed CI alone, but together main no longer typechecks, so every open PR's "static analysis and typecheck" job is red. This updates the test.
What Changed
src/main/acp/acp-structured-host-restore-failed.test.ts(added in #25225) spied onJournalHostDatabase.legacyDirectoryForto make the chat journal's open fail. #26038 deleted that method and moved its own tests tovi.spyOn(AgentSessionJournal.prototype, 'open').mockRejectedValueOnce(...). This test now uses the same spy, and drops thejournalDatabasebinding it no longer needs. No product code changes.Why
It reuses the exact replacement #26038 chose for the same failure injection, so all the "journal open fails" tests use one seam.
Linked Issue
N/A (main-wide typecheck break, seen on #26088 and #26093).
Visual Proof
N/A, test-only change.
Testing
tsc --noEmit -p config/tsconfig.node.jsonclean.vitest run src/main/acp/acp-structured-host-restore-failed.test.ts: 6/6 pass, including the two tests that use the injected failure.oxlint / oxfmt clean.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
Test-only.
Checklist
N/Afor visuals with reason