captain-hook: 馃悰 Fail open when hook transcript evidence is missing - #196
Merged
Merged
Conversation
yasyf
force-pushed
the
fix/missing-evidence-failopen
branch
2 times, most recently
from
September 26, 2026 07:33
dcdbc6d to
9da97c1
Compare
Context: UserPromptSubmit prints a Python traceback when its transcript path is absent. Summary: Treat typed missing snapshot evidence as incomplete at the hook boundary and cover valid and missing prompt paths. Motivation: A missing transcript cannot support a hook decision and should not interrupt a prompt. Details: Preserve visible invalid-request and permission errors, document the fix, and return an empty allow response for missing evidence.
yasyf
force-pushed
the
fix/missing-evidence-failopen
branch
from
September 26, 2026 07:34
9da97c1 to
45fdf9c
Compare
yasyf
marked this pull request as ready for review
September 26, 2026 07:37
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.
Context
A
UserPromptSubmithook that reads transcript evidence prints a Python traceback and exits 1 when its transcript path is absent. The snapshot service returns the typedmissingstatus, but the hook boundary does not include that status in its fail-open set.Summary
Treat missing transcript evidence as incomplete at the hook boundary. Keep invalid requests, parse errors, and permission failures visible. Add a focused
UserPromptSubmitregression for both an available and an absent transcript.Motivation
A missing transcript cannot support a hook decision and should not interrupt a prompt with a stack trace.
Details
The error was reproduced against the signed 12.59.5 host with a synthetic
UserPromptSubmithook. The absent path returnedEvidenceIncomplete("missing")and a traceback; the available path completed normally.ruff checkandgit diff --checkpass. The full test matrix runs in CI.