Repository navigation
fix(native-chat): main typechecks again — report a failed stop-child through the host logger - #24438
brennanb2025 wants to merge 1 commit into
Conversation
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — full diff of the single commit 5270ee1a67 (4 files).
- Failed stop-child now goes to the host logger —
structured-agent-session-chat-stop.tsreports a failed post-interrupt child end withcontext.deps.logger.warn(…, { scope: 'chat-stop', sessionId, error }), matching the neighbouring wind-down failure in the same function. - Test asserts the logger —
structured-agent-session-conversation-stop.test.tsreplaces the removedonEventSinkErrormock with awarnmock and asserts thechat-stopscope/sessionId. - Required
loggerpassed —structured-agent-session-repeat-press.test.tsandstructured-agent-session-repeated-stop.test.tsnow build the host with the requiredlogger.
Verified on the branch: pnpm tc:node passes, and the three touched test files pass (35 tests). Logging through the never-throwing logger preserves the invariant that reporting cannot fail the operation, and onStopChildError stays optional in performCancel.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)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 (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughDuring chat Stop, the child-error callback now logs a warning with the Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Child-stop errors now use the structured warning path, whose production logger is guarded against throwing. No remaining issue blocks merging; normal checks still apply. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve 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. Comment |

What this fixes
mainno longer typechecks, so every open PR's CI is red (CI typechecks each PR merged withmain).Why: #24312 replaced the structured chat host's optional
onEventSinkErrorcallback with a requiredlogger. Two PRs written before it landed after it, and each passed CI on its own:context.deps.onEventSinkError, which no longer exists (structured-agent-session-chat-stop.ts), and its test mocks that callback.logger.Scope: build only. No user-facing change: the failure is now written to the host's diagnostics log (the same place #24312 sends every other structured chat failure) instead of to a callback that no longer exists.
What changed
structured-agent-session-chat-stop.ts: the failed stop-child is reported withcontext.deps.logger.warn(…, { scope: 'chat-stop', sessionId, error }), matching the neighbouring wind-down failure in the same file.structured-agent-session-conversation-stop.test.ts: asserts the logger'swarninstead of the removed callback.structured-agent-session-repeat-press.test.ts,structured-agent-session-repeated-stop.test.ts: pass the host its requiredlogger.Testing
tsc --noEmit -p config/tsconfig.node.jsonon this branch: passes (it fails onmainat 56c7642 with TS2339 / TS2741 in exactly these files).oxlint,oxfmtand the anti-slop audit on the changed files: clean.Visual Proof
N/A: build fix with no UI change.
Checklist
pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)