Skip to content

AutoStory: save the stream history when a story event fails - #308

Draft
dayfine wants to merge 4 commits into
nav/grid-story-stepsfrom
autostory/failure-capture
Draft

dayfine wants to merge 4 commits into
nav/grid-story-stepsfrom
autostory/failure-capture

Conversation

@dayfine

@dayfine dayfine commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Base nav/grid-story-steps (#362 (which replaced #122)); the diff shows only this change.

A failed AutoStory event left only its last screenshot: the games throw with NO_ERROR_REPORT, so no error report (and no Video.mp4) is ever written, and a retry reloads the game before anything looks at the failure. This adds a failed hook to SegmentHooks, called for each failed attempt and verify run before any reload, and FailureCapture, which saves USER_FILE_PATH()/<game>/AutoStoryFailures/<time>-<checkpoint>-<event>/ with Video.mp4 (the whole stream history), Screenshot.png and Failure.json (checkpoint, event, error, last 30 log lines), independent of the error-report send mode; save_thrown() covers exceptions out of the run. The BDSP and FRLG executors attach it in their own PRs. Tested with the headless runner: Pokemon::StorySegments (new hook test) and the new Pokemon::AutoStoryFailureCapture suite pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 4 commits November 9, 2026 10:58
A story failure throws with NO_ERROR_REPORT, so no error report (and no
Video.mp4) was written for it, and a retry reloaded the game before anyone
saw the failure frame. SegmentHooks gets a `failed` hook, told of each failed
attempt and verify run before any reload. FailureCapture attaches to it and
saves USER_FILE_PATH()/<game>/AutoStoryFailures/<time>-<checkpoint>-<event>/
with Video.mp4 (stream history), Screenshot.png and Failure.json, whatever
the error-report send mode; save_thrown() covers exceptions out of the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The unit-test runner's registration function is at its length limit on the
game stacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
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