test(coding-agent): cover provider-error goal recovery - #727
Open
realsigridjin wants to merge 1 commit into
Open
test(coding-agent): cover provider-error goal recovery#727realsigridjin wants to merge 1 commit into
realsigridjin wants to merge 1 commit into
Conversation
Exercise the real AgentSession path from terminal provider failure through direct-input reactivation and completion while preserving deliberate blocks. Add an isolated RPC QA scenario that proves the same lifecycle through the source CLI without real credentials or provider traffic.
realsigridjin
marked this pull request as ready for review
August 5, 2026 10:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentSessionregression that joins terminal provider failure, persisted blocking, next-input reactivation beforeagent_start, and completion.blockedAt.Context
The stale-goal behavior was reproduced on published Senpi
2026.8.3-3. Production code is already fixed by #688 and included in newer releases; this PR closes the remaining end-to-end coverage gap rather than duplicating that fix. Existing coverage manually invokes goal handlers or tests direct input separately, so it would not catch a break in the full provider-error -> input disposition ->agent_startordering.RED -> GREEN
agent_startobserved[null, "blocked"]instead of[null, "active"].Waiting on a user decisionas mechanical): the real direct prompt observedactiveinstead ofblocked.main:goal-provider-error-recovery.test.tspasses 3/3.Manual QA
Result: 14/14 checks passed. The real source CLI made exactly seven localhost provider requests, reactivated the mechanical block on the next direct prompt, preserved the intentional block on a later prompt, exited RPC with code 0, left real auth unchanged, stopped the fake server, and removed its sandbox.
Validation
npm --prefix packages/coding-agent test -- test/suite/goal-provider-error-recovery.test.ts test/suite/goal-abort-extension.test.ts test/suite/goal-extension.test.ts test/suite/goal-turn-usage.test.ts— 53/53 passednpm run check— passednode --check .agents/skills/senpi-qa/scripts/goal-provider-error-recovery.mjs— passedSummary by cubic
Added an end-to-end test and a hermetic RPC QA script to cover goal recovery after a terminal provider error. Confirms the next direct prompt reactivates the goal before agent_start, while intentional user blocks remain with the same blockedAt; runs fully against a fake localhost provider with no real auth or traffic.
Written for commit 30fce90. Summary will update on new commits.