fix(hooks): ignore matcherless event fields
This commit is contained in:
@@ -212,8 +212,9 @@ const SCENARIOS: Scenario[] = [
|
||||
headerClass: 'advanced',
|
||||
configPath: ADVANCED_CONFIG,
|
||||
},
|
||||
// Prompt-submit blocks are authored keylessly. Admission rejects before a
|
||||
// turn opens, so only the ACP stop reason is observable and no log is harvested.
|
||||
// Prompt-submit blocks are authored keylessly with malformed matcher fields,
|
||||
// which these matcherless events must ignore. Admission rejects before a turn
|
||||
// opens, so only the ACP stop reason is observable and no log is harvested.
|
||||
{ name: 'hook-cc-promptsubmit-block', hasModelTurn: false, recorded: false },
|
||||
{ name: 'hook-codex-promptsubmit-block', hasModelTurn: false, recorded: false },
|
||||
// Each invalid matcher follows a runnable prompt blocker. Reaching the replay
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"hooks": {
|
||||
"UserPromptSubmit": [
|
||||
{
|
||||
"matcher": "[",
|
||||
"hooks": [
|
||||
{ "type": "command", "command": "echo 'blocked by policy hook' >&2; exit 2" }
|
||||
]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"hooks": {
|
||||
"UserPromptSubmit": [
|
||||
{
|
||||
"matcher": "[",
|
||||
"hooks": [
|
||||
{ "type": "command", "command": "echo 'blocked by codex policy hook' >&2; exit 2" }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user