Repository navigation
fix: clear recovered run errors during conversation replay - #106
Conversation
jerelvelarde
left a comment
There was a problem hiding this comment.
The recovered-run replay fix has clear user value, but the clearing needs to target run errors rather than every error in Chat. All 11 focused replay/composer/page-request tests pass, and the real installed SDK outcome contract and subscription cleanup were checked. A separate regression fixture reproduces the unrelated-save error disappearing and passes when these added lines are removed.
| const events = agent.subscribe({ | ||
| onRunErrorEvent: ({ event }) => setError(event.message), | ||
| onRunFinishedEvent: ({ outcome }) => { | ||
| if (outcome === 'success') setError(''); |
There was a problem hiding this comment.
[P2] Only clear errors that belong to the recovered run. This clears shared error state for every successful finish, so a failed “Save conversation as page” alert disappears when a scheduled run in the same conversation finishes, even though saving still failed. A fixture rejecting the save API and delivering RUN_FINISHED through the installed SDK’s defaultApplyEvents reproduces the disappearance. Track run errors separately or scope clearing to the recovered run, and add that failed-save/background-finish regression.
|
Thanks for the review. I'll update the recovery handling so that a successful run clears run errors while preserving unrelated errors, including failed page saves. I'll also add the failed-save/background-finish regression you described. |
|
The updated commit separates run errors from unrelated errors, with regression coverage for a failed page save followed by a successful background run. I appreciate your careful review, and I'm sorry to ask for another pass. Would you mind reviewing the changes when convenient? |
jerelvelarde
left a comment
There was a problem hiding this comment.
The previous failed-page-save alert blocker is fixed: run errors now have separate state, successful RUN_FINISHED clears only run errors, and unrelated save/connection errors remain visible. Running the current mounted regressions against prior reviewed f695864 reproduces three failures (both failed-save cases and unrelated connection error); all nine pass on the updated head. Actual installed SDK event application/error forwarding covers historical replay, latest/new failures, interruption, transport failure and failed-current-turn recovery.
Value/template/security: useful bounded reliability correction, accurate description, no new dependency/configuration or actionable security issue. Current main0fc09e was integrated without conflicts. The only additional correction adds appsAllowed:false and composioToolkits:[] to the new test Dot fixture to match the fields introduced by external Composio PR150; both main and contributor behavior are retained.
Verification on updated head9684e54 (Node24 clean-environment sandbox, external network and user credentials inaccessible): formatter, lint, typecheck, all327 tests and production build pass. Before integration the original head passed all five gates and263 tests. Mounted React tests use mocked UI hooks plus actual installed SDK; no browser pixel or live Intelligence check was performed. Merge remains gated on successful exact-head GitHub CI after this integration commit is pushed and final current-main compatibility.
Summary
Fixes #63.
Clear recovered agent-run errors during conversation history replay while preserving unrelated errors, including failed page saves.
Cause
A historical
RUN_ERRORrestores the error banner. A later successful run needs to clear that run error, but clearing the shared Chat error state also hides unrelated failures when a background run succeeds.Fix
RUN_FINISHEDreports success.Historical events remain intact. New failures remain visible, and interrupted runs do not clear run errors.
Validation
defaultApplyEventsbefore the fix.Prepared with AI assistance using gwitg, a GPT-6.1 Sol project lead and GPT-6 Luna workers.