Skip to content

Claude final-message extractor returns the first result event, not the terminal one#488

Open
clkao wants to merge 1 commit into
mainfrom
spacedock-ensign/claude-result-extractor-first-vs-terminal
Open

Claude final-message extractor returns the first result event, not the terminal one#488
clkao wants to merge 1 commit into
mainfrom
spacedock-ensign/claude-result-extractor-first-vs-terminal

Conversation

@clkao

@clkao clkao commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

The Claude live-CI oracle returned a transcript's first success result instead of the last, making shared-scenario assertions flake independent of actual FO behavior.

What changed

  • Return the transcript's last non-error success result instead of the first
  • Keep is_error/401 launch-failure detection unchanged and unmaskable in either direction
  • Add regression tests for multiple success results and success-then-error ordering

Evidence

  • TestExtractClaudeFinalMessage: 7/7 passed
  • Detached adversarial audit (separate throwaway clone, reverted to first-return): both new tests failed red under the regression, passed green on the fix

6h

…not the first

The extractor returned on the first non-error success result event instead of
scanning to the terminal one, contradicting its own doc comment. A transcript
with an early status-update result and a later actual-final result silently
returned the wrong text to scenario assertions. Now retains the last
non-error success result while keeping is_error/401 short-circuit failure
unmaskable by any preceding success.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant