Skip to content

fix: fail closed on malformed stop hook input - #682

Open
weivwang wants to merge 1 commit into
openai:mainfrom
weivwang:fix/stop-gate-malformed-json
Open

fix: fail closed on malformed stop hook input#682
weivwang wants to merge 1 commit into
openai:mainfrom
weivwang:fix/stop-gate-malformed-json

Conversation

@weivwang

Copy link
Copy Markdown

Summary

  • catch failures while reading or parsing Stop-hook input
  • emit a valid decision: "block" response instead of exiting without a decision
  • add regression coverage for malformed non-empty JSON input

Testing

  • npm test (92 tests passed)
  • npm run build
  • npm run check-version

Fixes #676

@weivwang
weivwang requested a review from a team August 25, 2026 05:06
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.

Stop review gate fails open when hook stdin is malformed JSON

1 participant