Repository navigation
fix(runtime): persist explicit incomplete capability results as failed turns - #1956
Merged
pancacake merged 2 commits intoOct 18, 2026
Merged
Conversation
This was referenced Oct 13, 2026
alvinets
pushed a commit
to alvinets/DeepTutor
that referenced
this pull request
Nov 8, 2026
…ete-outcome fix(runtime): persist explicit incomplete capability results as failed turns
alvinets
pushed a commit
to alvinets/DeepTutor
that referenced
this pull request
Nov 8, 2026
…ete-outcome fix(runtime): persist explicit incomplete capability results as failed turns
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.
Problem
A capability can emit a final result with
completed: falseand return normally.The orchestrator previously treated the absence of an exception as success,
emitting
DONE status=completed. The durable turn store consequently marked arejected interaction completed even though the capability's finish guard had
correctly refused it.
Change
Read the last explicit capability-result completion flag through the existing
turn-local stream owner. A final boolean
falseemits the native terminal errorcontract and failed DONE (
capability_incomplete, retryable). Existing resultpayloads, usage, partial text and saved learner work remain intact. Omitted
completion flags and successful results keep their previous lifecycle; a later
successful result supersedes an intermediate incomplete result.
There is no alternate turn store, exception-policy rewrite or Mastery-specific
shortcut. Ordinary recoverable tool errors remain recoverable.
Evidence
instead of failed (1 failed, 2 passed in the selected parameterized test).
outcome handling in the clean contribution, and separately in the combined
installation. Assertions include persisted outcome/failure-metadata mapping.
claims. Those are separately tracked workflow concerns.
Related: #1955, #1941 and the contribution map #1940. This resolves only the terminal-outcome portion of #1955.