Repository navigation
fix(native-chat): restore main typecheck after #24312 and #24334 crossed - #24437
Conversation
|
| expect(log.entries).toContainEqual( | ||
| expect.objectContaining({ | ||
| fields: expect.objectContaining({ scope: 'stop-child', sessionId: SESSION }) | ||
| }) | ||
| ) |
There was a problem hiding this comment.
Stop error goes unchecked The two new assertions check only the log scope and session ID. They would still pass if the Stop-child warning stopped including the caught error, leaving the failure detail this change is meant to preserve untested. The recording logger retains the warning level and error field; please assert those for both cases, especially the case that throws
route release failed.
…rt-failure-on-message Brings in main's native-chat Stop work (#24333 owed stop retried by the next message, #24072 queue pause derived from Stop/Resume rows, #24334, #24437) and #24312 (structured chat failures go through the host logger). Conflicts, each keeping main's behaviour and this branch's design: - queued-message-pause-table.ts: deleted, as #24072 did. Its "a returned card holds the queue only when it was not a failed start" rule (queuedCardHoldsQueue) is ported into main's queued-message-pause.ts (nextSendableQueuedCard and resumableQueuePause); the drain's pick in queued-messages.ts takes main's pause-aware nextSendableQueuedCard. New test pins it. - delivery-loop: main's wind-down wait (#24333) goes into this branch's prepare step: a held owed stop records its waiting row and stops; a start refused because the previous exit is unverifiable waits the same way instead of being recorded as a failed start. onError becomes main's logger, including the deps type (now in delivery-loop-deps.ts). The retry-wake booking moved to structured-agent-session-start-retry-wakes.ts to stay under max-lines. - dead-generation settlement: main's { ok, error } result with this branch's unprovenStart (the delivery loop writes a failed start); unexpected-exit and host-lifetime pass unprovenStart and log through main's logger. - agent-start, attach-flow: main's logger calls; this branch's startPending preparation and at-rest create. - conversation-lifetime, provider-child, host, host-delivery: main's finishOwedWindDown and endedAt with this branch's comments and startFailureRecorded; conversation delivery now takes the attach context (one line in host.ts, which was over max-lines). - restart-continuation: both imports; the handed-over/verdict reading moved to structured-agent-session-continuation-verdict.ts for max-lines. - tests: main's logger added to this branch's hosts and attach inputs; the provider-start log expectation uses main's logger line.
ELI5
Two native-chat changes merged close together and each passed on its own, but together main stopped typechecking. This updates the newer one to use the other's reporting mechanism.
What Changed
#24312 replaced the optional
onEventSinkErrorcallback on the structured chat host with a required diagnosticslogger. #24334, merged right after, still reported a failed "end the Codex process on Stop" throughonEventSinkError, and its new tests built hosts without alogger.structured-agent-session-chat-stop.ts: the failed child end is now written throughcontext.deps.logger.warn(scopestop-child, with the session id and error), so it lands in the same diagnostics log as every other host failure.structured-agent-session-conversation-stop.test.ts: asserts astop-childentry for the session through a recording logger instead of the removed callback.structured-agent-session-repeat-press.test.ts,structured-agent-session-repeated-stop.test.ts: pass the now-requiredlogger.No user-visible behavior changes: Stop handling is untouched, only where its failure is reported.
Why
Smallest change that makes main typecheck while keeping #24334's failure reporting, routed through #24312's single required logger.
Linked Issue
N/A (main build fix, maintainer)
Visual Proof
N/A: typecheck fix, no UI change.
Testing
pnpm tcpasses.pnpm test src/main/native-chat/agent-session-wire: 152 files, 1284 tests pass.oxlinton touched files andpnpm run check:code-quality:changedpass.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
Checklist
N/Afor visual proof with reason