harness-everything 0.42.0 → 0.42.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +18 -0
  4. package/benchmarks/results/codex-pr-metadata-2026-10-26/README.md +68 -0
  5. package/benchmarks/results/codex-pr-metadata-2026-10-26/green-final.log +162 -0
  6. package/benchmarks/results/codex-pr-metadata-2026-10-26/green.log +158 -0
  7. package/benchmarks/results/codex-pr-metadata-2026-10-26/live-installed-runtime-rejection.json +31 -0
  8. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-action-family-cross-product.js +143 -0
  9. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-action-family-cross-product.log +7 -0
  10. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-codex-action-gate-prehook-smoke.js +78 -0
  11. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-codex-action-gate-prehook-smoke.log +8 -0
  12. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-review.md +151 -0
  13. package/benchmarks/results/codex-pr-metadata-2026-10-26/original-rejection.json +31 -0
  14. package/benchmarks/results/codex-pr-metadata-2026-10-26/red.log +158 -0
  15. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-descriptor-green.log +192 -0
  16. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-descriptor-red.log +192 -0
  17. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-family-green.log +206 -0
  18. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-family-red.log +206 -0
  19. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-hints-green.log +174 -0
  20. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-hints-red.log +174 -0
  21. package/benchmarks/results/codex-pr-metadata-2026-10-26/verification.md +31 -0
  22. package/benchmarks/results/doc-evidence-e1/README.md +68 -0
  23. package/benchmarks/results/doc-evidence-e1/evidence.json +360 -0
  24. package/benchmarks/results/doc-evidence-e1/pilot-report.json +175 -0
  25. package/benchmarks/results/h1-provider-independence-qualification/README.md +26 -3
  26. package/benchmarks/results/live-host/opencode-d1-d2-2026-10-25/README.md +30 -0
  27. package/benchmarks/results/live-host/opencode-d1-d2-2026-10-25/evidence.json +128 -0
  28. package/ci/action-gate.test.js +86 -0
  29. package/ci/lib/doc-reconciliation-prep-fixtures.js +5 -4
  30. package/ci/mechanism-2aa-codex-action-gate-policy.test.js +47 -0
  31. package/ci/mechanism-325-3b-s2b-wiring.test.js +11 -0
  32. package/ci/mechanism-task-git-authorization.test.js +12 -0
  33. package/docs/codex-action-gate.md +27 -1
  34. package/docs/doc-workflow-reconciliation.md +4 -3
  35. package/docs/document-lifecycle.md +3 -3
  36. package/docs/platform-capabilities.md +8 -2
  37. package/hooks/scripts/action-gate.js +35 -8
  38. package/opencode-plugin/plugin.json +1 -1
  39. package/package.json +1 -1
  40. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  41. package/plugins/harness-everything/hooks/scripts/action-gate.js +35 -8
  42. package/plugins/harness-everything/plugin.json +1 -1
  43. package/sbom.cdx.json +7 -7
@@ -0,0 +1,192 @@
1
+ === Issue #85 Phase 5 — Pre-action gate ===
2
+ PASS production action-gate rule table loads without fallback
3
+ PASS production rule table is non-empty and keeps the destructive baseline
4
+ PASS rule table contains git-force-push
5
+ PASS rule table contains git-reset-hard
6
+ PASS rule table contains git-clean-force-delete
7
+ PASS rule table contains recursive-delete
8
+ PASS rule table contains powershell-recursive-force-delete
9
+ PASS rule table contains sql-destructive-ddl
10
+ PASS rule table contains package-publish
11
+ PASS rule table contains github-release-create
12
+ PASS rule table contains production-deploy
13
+ PASS Claude force-push defers to the host permission flow without forcing a prompt
14
+ PASS deferred decision still names the matched rule
15
+ PASS matched Claude action is audited as deferred-to-host
16
+ PASS audit records matched rule
17
+ PASS audit hashes the exact command payload
18
+ PASS always-ask policy restores the forced Claude prompt
19
+ PASS ask decision uses Claude PreToolUse hookSpecificOutput
20
+ PASS ask reason names the matched rule
21
+ PASS always-ask action is audited as pending-approval
22
+ PASS git status passes untouched
23
+ PASS safe unmatched command creates no gate audit record
24
+ PASS permission_mode=default defers to the host without a forced prompt
25
+ PASS audit records permission_mode=default
26
+ PASS permission_mode=acceptEdits defers to the host without a forced prompt
27
+ PASS audit records permission_mode=acceptEdits
28
+ PASS permission_mode=plan defers to the host without a forced prompt
29
+ PASS audit records permission_mode=plan
30
+ PASS permission_mode=auto defers to the host without a forced prompt
31
+ PASS audit records permission_mode=auto
32
+ PASS permission_mode=dontAsk defers to the host without a forced prompt
33
+ PASS audit records permission_mode=dontAsk
34
+ PASS permission_mode=bypassPermissions defers to the host without a forced prompt
35
+ PASS audit records permission_mode=bypassPermissions
36
+ PASS permission_mode=missing defers to the host without a forced prompt
37
+ PASS audit records permission_mode=missing
38
+ PASS command classification gates destructive action even when router hint says not required
39
+ PASS router actionGate hint is recorded without controlling enforcement
40
+ PASS safe command is not gated solely because prompt router predicted risk
41
+ PASS structured MCP delete is gated before execution
42
+ PASS audit retains normalized structured action identity
43
+ PASS structured action audit binds to exact payload hash
44
+ PASS structured action audit does not persist raw secret arguments
45
+ PASS read-only MCP fixture passes without a false gate
46
+ PASS obvious structured mutation is classified from tool identity
47
+ PASS non-shell local-function destructive fixture uses the same structured gate
48
+ PASS unknown structured action fails closed when workflow requires a gate
49
+ PASS unknown structured action is not fabricated as destructive without a gate requirement
50
+ PASS changed structured payload cannot reuse a prior approval/audit decision
51
+ PASS PowerShell recursive force delete outside scratch is gated
52
+ PASS PowerShell recursive force delete inside session scratch is exempt
53
+ PASS rm -rf outside scratch is gated
54
+ PASS rm -rf inside OS temp is exempt
55
+ PASS git reset --hard HEAD matches git-reset-hard
56
+ PASS git clean -fd matches git-clean-force-delete
57
+ PASS psql -c "DROP TABLE users" matches sql-destructive-ddl
58
+ PASS npm publish matches package-publish
59
+ PASS gh release create v1.2.3 matches github-release-create
60
+ PASS npm run deploy matches production-deploy
61
+ PASS host without verified ask-style decision blocks with exit 2
62
+ PASS non-ask host block reason names the matched rule
63
+ PASS non-ask host block is audited as rejected
64
+ PASS internal action-gate error on Claude defers to the host instead of allowing or forcing a prompt
65
+ PASS internal error is shown to the user as a systemMessage without a permission decision
66
+ PASS internal error on Claude is audited as deferred-to-host
67
+ PASS internal action-gate error under always-ask fails closed to ask
68
+ PASS internal error on host without ask fails closed to block
69
+ PASS missing/invalid rule table visibly falls back to built-in defaults
70
+ PASS built-in fallback still classifies and audits destructive action
71
+ PASS fallback degradation is shown to the user as a systemMessage
72
+ PASS valid empty rule table does not silently activate built-in defaults
73
+ PASS empty-table mutation control disables detection, proving production non-empty assertion is meaningful
74
+ PASS null-prototype serialization preserves an own __proto__ key
75
+ PASS own __proto__ key changes the full-input digest
76
+ PASS PostToolUse closes a deferred payload as executed
77
+ PASS executed audit keeps exact approved payload hash
78
+ PASS PostToolUseFailure records attempted execution without pretending success
79
+ PASS post-tool payload mismatch is never accepted as the approved command
80
+ PASS Stop closes unexecuted deferred and pending payloads
81
+ PASS unexecuted deferred payload is audited as rejected
82
+ PASS unexecuted always-ask approval is audited as rejected
83
+ PASS hook process returns no decision for a matched command under the default policy
84
+ PASS hook process audits the deferred command with its permission mode
85
+ PASS HARNESS_ACTION_GATE_POLICY=always-ask makes the hook process emit ask
86
+ PASS Claude hook manifest wires action-gate to shell and MCP pre-action surfaces
87
+ PASS Claude hook manifest audits successful tool execution
88
+ PASS Claude hook manifest audits failed tool execution
89
+ PASS Claude hook manifest closes unresolved approvals on Stop
90
+ PASS OpenAI plugin preserves the attribution-aware Codex shell action-gate adapter
91
+ PASS OpenAI plugin packages an isolated structured MCP pre-action adapter without widening unrelated hooks
92
+ PASS OpenAI plugin packages an isolated structured MCP post-action audit adapter
93
+ PASS Codex plugin does not declare unsupported PostToolUseFailure lifecycle event
94
+ PASS Codex plugin infers action-gate outcome from supported PostToolUse
95
+ PASS Codex PostToolUse maps zero exit code to success
96
+ PASS Codex PostToolUse maps non-zero exit code to failure
97
+ PASS Codex PostToolUse conservatively recognizes failure stderr without exit code
98
+ PASS OpenAI plugin closes pending approvals at Stop
99
+ PASS canonical and plugin action-gate rule tables are byte-identical
100
+ PASS OpenAI plugin packages action-gate runtime
101
+ PASS update_pull_request body defers without a permission decision
102
+ PASS metadata remains a non-safe mutation
103
+ PASS update_pull_request title defers without a permission decision
104
+ PASS metadata remains a non-safe mutation
105
+ PASS update_pull_request title,body defers without a permission decision
106
+ PASS metadata remains a non-safe mutation
107
+ PASS mcp__github__update_pull_request body defers without a permission decision
108
+ PASS metadata remains a non-safe mutation
109
+ PASS mcp__github__update_pull_request title defers without a permission decision
110
+ PASS metadata remains a non-safe mutation
111
+ PASS mcp__github__update_pull_request title,body defers without a permission decision
112
+ PASS metadata remains a non-safe mutation
113
+ PASS mcp__codex_apps__github__update_pull_request body defers without a permission decision
114
+ PASS metadata remains a non-safe mutation
115
+ PASS mcp__codex_apps__github__update_pull_request title defers without a permission decision
116
+ PASS metadata remains a non-safe mutation
117
+ PASS mcp__codex_apps__github__update_pull_request title,body defers without a permission decision
118
+ PASS metadata remains a non-safe mutation
119
+ PASS mcp__codex_apps__github_update_pull_request body defers without a permission decision
120
+ PASS metadata remains a non-safe mutation
121
+ PASS mcp__codex_apps__github_update_pull_request title defers without a permission decision
122
+ PASS metadata remains a non-safe mutation
123
+ PASS mcp__codex_apps__github_update_pull_request title,body defers without a permission decision
124
+ PASS metadata remains a non-safe mutation
125
+ PASS provider-neutral selectors support metadata updates
126
+ PASS provider-neutral selectors support metadata updates
127
+ PASS own __proto__ field cannot escape the argument allowlist
128
+ PASS explicit higher-risk action cannot inherit metadata deferral
129
+ PASS metadata with {"state":"closed"} remains gated
130
+ PASS metadata with {"state":"open"} remains gated
131
+ PASS metadata with {"state":null} remains gated
132
+ PASS metadata with {"base_branch":"other"} remains gated
133
+ PASS metadata with {"maintainer_can_modify":false} remains gated
134
+ PASS metadata with {"maintainer_can_modify":null} remains gated
135
+ PASS metadata with {"unknown":true} remains gated
136
+ PASS metadata with {"title":"mixed","state":"closed"} remains gated
137
+ PASS metadata with {"draft":true} remains gated
138
+ PASS metadata with {"base":"other"} remains gated
139
+ PASS metadata with {"action_descriptor":{"action":"delete"}} remains gated
140
+ PASS missing or malformed metadata remains gated
141
+ PASS missing or malformed metadata remains gated
142
+ PASS missing or malformed metadata remains gated
143
+ PASS missing or malformed metadata remains gated
144
+ PASS missing or malformed metadata remains gated
145
+ PASS missing or malformed metadata remains gated
146
+ PASS missing or malformed metadata remains gated
147
+ PASS missing or malformed metadata remains gated
148
+ PASS mcp__demo__update_pull_requests receives no metadata exception
149
+ PASS mcp__demo__foo_update_pull_request receives no metadata exception
150
+ PASS mcp__demo__update_pull_request_and_delete receives no metadata exception
151
+ PASS mcp__codex_apps__github_update_pull_request_extra receives no metadata exception
152
+ PASS mcp__demo__merge_pull_request receives no metadata exception
153
+ PASS mcp__demo__close_pull_request receives no metadata exception
154
+ PASS claude retains existing mutation rule
155
+ PASS opencode retains existing mutation rule
156
+ PASS unknown retains existing mutation rule
157
+ PASS explicit required metadata gate cannot be bypassed
158
+ PASS explicit required metadata gate cannot be bypassed
159
+ PASS explicit required metadata gate cannot be bypassed
160
+ PASS explicit required metadata gate cannot be bypassed
161
+ FAIL known Codex PR mutation cannot be downgraded to read
162
+ FAIL downgrade refusal remains an audited mutation
163
+ FAIL known Codex PR mutation cannot be downgraded to read
164
+ FAIL downgrade refusal remains an audited mutation
165
+ FAIL known Codex PR mutation cannot be downgraded to read
166
+ FAIL downgrade refusal remains an audited mutation
167
+ FAIL input read descriptor cannot hide a required PR mutation gate
168
+ PASS known Codex PR mutation cannot be downgraded to unknown
169
+ FAIL downgrade refusal remains an audited mutation
170
+ PASS known Codex PR mutation cannot be downgraded to unknown
171
+ FAIL downgrade refusal remains an audited mutation
172
+ PASS known Codex PR mutation cannot be downgraded to unknown
173
+ FAIL downgrade refusal remains an audited mutation
174
+ PASS input unknown descriptor cannot hide a required PR mutation gate
175
+ FAIL provider namespace read token cannot downgrade exact PR mutation
176
+ PASS claude explicit descriptor behavior remains unchanged
177
+ PASS opencode explicit descriptor behavior remains unchanged
178
+ PASS unknown explicit descriptor behavior remains unchanged
179
+ PASS required hint envelope 0 wins over optional envelopes
180
+ PASS audit retains required hint instead of a conflicting optional hint
181
+ PASS PR creation still honors the documented explicit required gate
182
+ PASS required hint envelope 1 wins over optional envelopes
183
+ PASS audit retains required hint instead of a conflicting optional hint
184
+ PASS PR creation still honors the documented explicit required gate
185
+ PASS required hint envelope 2 wins over optional envelopes
186
+ PASS audit retains required hint instead of a conflicting optional hint
187
+ PASS PR creation still honors the documented explicit required gate
188
+ PASS required hint envelope 3 wins over optional envelopes
189
+ PASS audit retains required hint instead of a conflicting optional hint
190
+ PASS PR creation still honors the documented explicit required gate
191
+
192
+ FAIL: action-gate phase 5 (11 failures)
@@ -0,0 +1,206 @@
1
+ === Issue #85 Phase 5 — Pre-action gate ===
2
+ PASS production action-gate rule table loads without fallback
3
+ PASS production rule table is non-empty and keeps the destructive baseline
4
+ PASS rule table contains git-force-push
5
+ PASS rule table contains git-reset-hard
6
+ PASS rule table contains git-clean-force-delete
7
+ PASS rule table contains recursive-delete
8
+ PASS rule table contains powershell-recursive-force-delete
9
+ PASS rule table contains sql-destructive-ddl
10
+ PASS rule table contains package-publish
11
+ PASS rule table contains github-release-create
12
+ PASS rule table contains production-deploy
13
+ PASS Claude force-push defers to the host permission flow without forcing a prompt
14
+ PASS deferred decision still names the matched rule
15
+ PASS matched Claude action is audited as deferred-to-host
16
+ PASS audit records matched rule
17
+ PASS audit hashes the exact command payload
18
+ PASS always-ask policy restores the forced Claude prompt
19
+ PASS ask decision uses Claude PreToolUse hookSpecificOutput
20
+ PASS ask reason names the matched rule
21
+ PASS always-ask action is audited as pending-approval
22
+ PASS git status passes untouched
23
+ PASS safe unmatched command creates no gate audit record
24
+ PASS permission_mode=default defers to the host without a forced prompt
25
+ PASS audit records permission_mode=default
26
+ PASS permission_mode=acceptEdits defers to the host without a forced prompt
27
+ PASS audit records permission_mode=acceptEdits
28
+ PASS permission_mode=plan defers to the host without a forced prompt
29
+ PASS audit records permission_mode=plan
30
+ PASS permission_mode=auto defers to the host without a forced prompt
31
+ PASS audit records permission_mode=auto
32
+ PASS permission_mode=dontAsk defers to the host without a forced prompt
33
+ PASS audit records permission_mode=dontAsk
34
+ PASS permission_mode=bypassPermissions defers to the host without a forced prompt
35
+ PASS audit records permission_mode=bypassPermissions
36
+ PASS permission_mode=missing defers to the host without a forced prompt
37
+ PASS audit records permission_mode=missing
38
+ PASS command classification gates destructive action even when router hint says not required
39
+ PASS router actionGate hint is recorded without controlling enforcement
40
+ PASS safe command is not gated solely because prompt router predicted risk
41
+ PASS structured MCP delete is gated before execution
42
+ PASS audit retains normalized structured action identity
43
+ PASS structured action audit binds to exact payload hash
44
+ PASS structured action audit does not persist raw secret arguments
45
+ PASS read-only MCP fixture passes without a false gate
46
+ PASS obvious structured mutation is classified from tool identity
47
+ PASS non-shell local-function destructive fixture uses the same structured gate
48
+ PASS unknown structured action fails closed when workflow requires a gate
49
+ PASS unknown structured action is not fabricated as destructive without a gate requirement
50
+ PASS changed structured payload cannot reuse a prior approval/audit decision
51
+ PASS PowerShell recursive force delete outside scratch is gated
52
+ PASS PowerShell recursive force delete inside session scratch is exempt
53
+ PASS rm -rf outside scratch is gated
54
+ PASS rm -rf inside OS temp is exempt
55
+ PASS git reset --hard HEAD matches git-reset-hard
56
+ PASS git clean -fd matches git-clean-force-delete
57
+ PASS psql -c "DROP TABLE users" matches sql-destructive-ddl
58
+ PASS npm publish matches package-publish
59
+ PASS gh release create v1.2.3 matches github-release-create
60
+ PASS npm run deploy matches production-deploy
61
+ PASS host without verified ask-style decision blocks with exit 2
62
+ PASS non-ask host block reason names the matched rule
63
+ PASS non-ask host block is audited as rejected
64
+ PASS internal action-gate error on Claude defers to the host instead of allowing or forcing a prompt
65
+ PASS internal error is shown to the user as a systemMessage without a permission decision
66
+ PASS internal error on Claude is audited as deferred-to-host
67
+ PASS internal action-gate error under always-ask fails closed to ask
68
+ PASS internal error on host without ask fails closed to block
69
+ PASS missing/invalid rule table visibly falls back to built-in defaults
70
+ PASS built-in fallback still classifies and audits destructive action
71
+ PASS fallback degradation is shown to the user as a systemMessage
72
+ PASS valid empty rule table does not silently activate built-in defaults
73
+ PASS empty-table mutation control disables detection, proving production non-empty assertion is meaningful
74
+ PASS null-prototype serialization preserves an own __proto__ key
75
+ PASS own __proto__ key changes the full-input digest
76
+ PASS PostToolUse closes a deferred payload as executed
77
+ PASS executed audit keeps exact approved payload hash
78
+ PASS PostToolUseFailure records attempted execution without pretending success
79
+ PASS post-tool payload mismatch is never accepted as the approved command
80
+ PASS Stop closes unexecuted deferred and pending payloads
81
+ PASS unexecuted deferred payload is audited as rejected
82
+ PASS unexecuted always-ask approval is audited as rejected
83
+ PASS hook process returns no decision for a matched command under the default policy
84
+ PASS hook process audits the deferred command with its permission mode
85
+ PASS HARNESS_ACTION_GATE_POLICY=always-ask makes the hook process emit ask
86
+ PASS Claude hook manifest wires action-gate to shell and MCP pre-action surfaces
87
+ PASS Claude hook manifest audits successful tool execution
88
+ PASS Claude hook manifest audits failed tool execution
89
+ PASS Claude hook manifest closes unresolved approvals on Stop
90
+ PASS OpenAI plugin preserves the attribution-aware Codex shell action-gate adapter
91
+ PASS OpenAI plugin packages an isolated structured MCP pre-action adapter without widening unrelated hooks
92
+ PASS OpenAI plugin packages an isolated structured MCP post-action audit adapter
93
+ PASS Codex plugin does not declare unsupported PostToolUseFailure lifecycle event
94
+ PASS Codex plugin infers action-gate outcome from supported PostToolUse
95
+ PASS Codex PostToolUse maps zero exit code to success
96
+ PASS Codex PostToolUse maps non-zero exit code to failure
97
+ PASS Codex PostToolUse conservatively recognizes failure stderr without exit code
98
+ PASS OpenAI plugin closes pending approvals at Stop
99
+ PASS canonical and plugin action-gate rule tables are byte-identical
100
+ PASS OpenAI plugin packages action-gate runtime
101
+ PASS update_pull_request body defers without a permission decision
102
+ PASS metadata remains a non-safe mutation
103
+ PASS update_pull_request title defers without a permission decision
104
+ PASS metadata remains a non-safe mutation
105
+ PASS update_pull_request title,body defers without a permission decision
106
+ PASS metadata remains a non-safe mutation
107
+ PASS mcp__github__update_pull_request body defers without a permission decision
108
+ PASS metadata remains a non-safe mutation
109
+ PASS mcp__github__update_pull_request title defers without a permission decision
110
+ PASS metadata remains a non-safe mutation
111
+ PASS mcp__github__update_pull_request title,body defers without a permission decision
112
+ PASS metadata remains a non-safe mutation
113
+ PASS mcp__codex_apps__github__update_pull_request body defers without a permission decision
114
+ PASS metadata remains a non-safe mutation
115
+ PASS mcp__codex_apps__github__update_pull_request title defers without a permission decision
116
+ PASS metadata remains a non-safe mutation
117
+ PASS mcp__codex_apps__github__update_pull_request title,body defers without a permission decision
118
+ PASS metadata remains a non-safe mutation
119
+ PASS mcp__codex_apps__github_update_pull_request body defers without a permission decision
120
+ PASS metadata remains a non-safe mutation
121
+ PASS mcp__codex_apps__github_update_pull_request title defers without a permission decision
122
+ PASS metadata remains a non-safe mutation
123
+ PASS mcp__codex_apps__github_update_pull_request title,body defers without a permission decision
124
+ PASS metadata remains a non-safe mutation
125
+ PASS provider-neutral selectors support metadata updates
126
+ PASS provider-neutral selectors support metadata updates
127
+ PASS own __proto__ field cannot escape the argument allowlist
128
+ PASS explicit higher-risk action cannot inherit metadata deferral
129
+ PASS metadata with {"state":"closed"} remains gated
130
+ PASS metadata with {"state":"open"} remains gated
131
+ PASS metadata with {"state":null} remains gated
132
+ PASS metadata with {"base_branch":"other"} remains gated
133
+ PASS metadata with {"maintainer_can_modify":false} remains gated
134
+ PASS metadata with {"maintainer_can_modify":null} remains gated
135
+ PASS metadata with {"unknown":true} remains gated
136
+ PASS metadata with {"title":"mixed","state":"closed"} remains gated
137
+ PASS metadata with {"draft":true} remains gated
138
+ PASS metadata with {"base":"other"} remains gated
139
+ PASS metadata with {"action_descriptor":{"action":"delete"}} remains gated
140
+ PASS missing or malformed metadata remains gated
141
+ PASS missing or malformed metadata remains gated
142
+ PASS missing or malformed metadata remains gated
143
+ PASS missing or malformed metadata remains gated
144
+ PASS missing or malformed metadata remains gated
145
+ PASS missing or malformed metadata remains gated
146
+ PASS missing or malformed metadata remains gated
147
+ PASS missing or malformed metadata remains gated
148
+ PASS mcp__demo__update_pull_requests receives no metadata exception
149
+ PASS mcp__demo__foo_update_pull_request receives no metadata exception
150
+ PASS mcp__demo__update_pull_request_and_delete receives no metadata exception
151
+ PASS mcp__codex_apps__github_update_pull_request_extra receives no metadata exception
152
+ PASS mcp__demo__merge_pull_request receives no metadata exception
153
+ PASS mcp__demo__close_pull_request receives no metadata exception
154
+ PASS claude retains existing mutation rule
155
+ PASS opencode retains existing mutation rule
156
+ PASS unknown retains existing mutation rule
157
+ PASS explicit required metadata gate cannot be bypassed
158
+ PASS explicit required metadata gate cannot be bypassed
159
+ PASS explicit required metadata gate cannot be bypassed
160
+ PASS explicit required metadata gate cannot be bypassed
161
+ PASS known Codex PR mutation cannot be downgraded to read
162
+ PASS downgrade refusal remains an audited mutation
163
+ PASS known Codex PR mutation cannot be downgraded to read
164
+ PASS downgrade refusal remains an audited mutation
165
+ PASS known Codex PR mutation cannot be downgraded to read
166
+ PASS downgrade refusal remains an audited mutation
167
+ PASS input read descriptor cannot hide a required PR mutation gate
168
+ PASS known Codex PR mutation cannot be downgraded to unknown
169
+ PASS downgrade refusal remains an audited mutation
170
+ PASS known Codex PR mutation cannot be downgraded to unknown
171
+ PASS downgrade refusal remains an audited mutation
172
+ PASS known Codex PR mutation cannot be downgraded to unknown
173
+ PASS downgrade refusal remains an audited mutation
174
+ PASS input unknown descriptor cannot hide a required PR mutation gate
175
+ PASS provider namespace read token cannot downgrade exact PR mutation
176
+ PASS claude explicit descriptor behavior remains unchanged
177
+ PASS opencode explicit descriptor behavior remains unchanged
178
+ PASS unknown explicit descriptor behavior remains unchanged
179
+ PASS shell family cannot disguise exact Codex PR read
180
+ PASS known MCP identity is preserved in audit
181
+ PASS shell family cannot disguise exact Codex PR unknown
182
+ PASS known MCP identity is preserved in audit
183
+ PASS shell family cannot disguise exact Codex PR mutate
184
+ PASS known MCP identity is preserved in audit
185
+ PASS shell family cannot disguise exact Codex PR delete
186
+ PASS known MCP identity is preserved in audit
187
+ PASS shell family cannot disguise exact Codex PR publish
188
+ PASS known MCP identity is preserved in audit
189
+ PASS shell family cannot disguise exact Codex PR deploy
190
+ PASS known MCP identity is preserved in audit
191
+ PASS shell family cannot disguise exact Codex PR send
192
+ PASS known MCP identity is preserved in audit
193
+ PASS required hint envelope 0 wins over optional envelopes
194
+ PASS audit retains required hint instead of a conflicting optional hint
195
+ PASS PR creation still honors the documented explicit required gate
196
+ PASS required hint envelope 1 wins over optional envelopes
197
+ PASS audit retains required hint instead of a conflicting optional hint
198
+ PASS PR creation still honors the documented explicit required gate
199
+ PASS required hint envelope 2 wins over optional envelopes
200
+ PASS audit retains required hint instead of a conflicting optional hint
201
+ PASS PR creation still honors the documented explicit required gate
202
+ PASS required hint envelope 3 wins over optional envelopes
203
+ PASS audit retains required hint instead of a conflicting optional hint
204
+ PASS PR creation still honors the documented explicit required gate
205
+
206
+ PASS: action-gate phase 5 (0 failures)
@@ -0,0 +1,206 @@
1
+ === Issue #85 Phase 5 — Pre-action gate ===
2
+ PASS production action-gate rule table loads without fallback
3
+ PASS production rule table is non-empty and keeps the destructive baseline
4
+ PASS rule table contains git-force-push
5
+ PASS rule table contains git-reset-hard
6
+ PASS rule table contains git-clean-force-delete
7
+ PASS rule table contains recursive-delete
8
+ PASS rule table contains powershell-recursive-force-delete
9
+ PASS rule table contains sql-destructive-ddl
10
+ PASS rule table contains package-publish
11
+ PASS rule table contains github-release-create
12
+ PASS rule table contains production-deploy
13
+ PASS Claude force-push defers to the host permission flow without forcing a prompt
14
+ PASS deferred decision still names the matched rule
15
+ PASS matched Claude action is audited as deferred-to-host
16
+ PASS audit records matched rule
17
+ PASS audit hashes the exact command payload
18
+ PASS always-ask policy restores the forced Claude prompt
19
+ PASS ask decision uses Claude PreToolUse hookSpecificOutput
20
+ PASS ask reason names the matched rule
21
+ PASS always-ask action is audited as pending-approval
22
+ PASS git status passes untouched
23
+ PASS safe unmatched command creates no gate audit record
24
+ PASS permission_mode=default defers to the host without a forced prompt
25
+ PASS audit records permission_mode=default
26
+ PASS permission_mode=acceptEdits defers to the host without a forced prompt
27
+ PASS audit records permission_mode=acceptEdits
28
+ PASS permission_mode=plan defers to the host without a forced prompt
29
+ PASS audit records permission_mode=plan
30
+ PASS permission_mode=auto defers to the host without a forced prompt
31
+ PASS audit records permission_mode=auto
32
+ PASS permission_mode=dontAsk defers to the host without a forced prompt
33
+ PASS audit records permission_mode=dontAsk
34
+ PASS permission_mode=bypassPermissions defers to the host without a forced prompt
35
+ PASS audit records permission_mode=bypassPermissions
36
+ PASS permission_mode=missing defers to the host without a forced prompt
37
+ PASS audit records permission_mode=missing
38
+ PASS command classification gates destructive action even when router hint says not required
39
+ PASS router actionGate hint is recorded without controlling enforcement
40
+ PASS safe command is not gated solely because prompt router predicted risk
41
+ PASS structured MCP delete is gated before execution
42
+ PASS audit retains normalized structured action identity
43
+ PASS structured action audit binds to exact payload hash
44
+ PASS structured action audit does not persist raw secret arguments
45
+ PASS read-only MCP fixture passes without a false gate
46
+ PASS obvious structured mutation is classified from tool identity
47
+ PASS non-shell local-function destructive fixture uses the same structured gate
48
+ PASS unknown structured action fails closed when workflow requires a gate
49
+ PASS unknown structured action is not fabricated as destructive without a gate requirement
50
+ PASS changed structured payload cannot reuse a prior approval/audit decision
51
+ PASS PowerShell recursive force delete outside scratch is gated
52
+ PASS PowerShell recursive force delete inside session scratch is exempt
53
+ PASS rm -rf outside scratch is gated
54
+ PASS rm -rf inside OS temp is exempt
55
+ PASS git reset --hard HEAD matches git-reset-hard
56
+ PASS git clean -fd matches git-clean-force-delete
57
+ PASS psql -c "DROP TABLE users" matches sql-destructive-ddl
58
+ PASS npm publish matches package-publish
59
+ PASS gh release create v1.2.3 matches github-release-create
60
+ PASS npm run deploy matches production-deploy
61
+ PASS host without verified ask-style decision blocks with exit 2
62
+ PASS non-ask host block reason names the matched rule
63
+ PASS non-ask host block is audited as rejected
64
+ PASS internal action-gate error on Claude defers to the host instead of allowing or forcing a prompt
65
+ PASS internal error is shown to the user as a systemMessage without a permission decision
66
+ PASS internal error on Claude is audited as deferred-to-host
67
+ PASS internal action-gate error under always-ask fails closed to ask
68
+ PASS internal error on host without ask fails closed to block
69
+ PASS missing/invalid rule table visibly falls back to built-in defaults
70
+ PASS built-in fallback still classifies and audits destructive action
71
+ PASS fallback degradation is shown to the user as a systemMessage
72
+ PASS valid empty rule table does not silently activate built-in defaults
73
+ PASS empty-table mutation control disables detection, proving production non-empty assertion is meaningful
74
+ PASS null-prototype serialization preserves an own __proto__ key
75
+ PASS own __proto__ key changes the full-input digest
76
+ PASS PostToolUse closes a deferred payload as executed
77
+ PASS executed audit keeps exact approved payload hash
78
+ PASS PostToolUseFailure records attempted execution without pretending success
79
+ PASS post-tool payload mismatch is never accepted as the approved command
80
+ PASS Stop closes unexecuted deferred and pending payloads
81
+ PASS unexecuted deferred payload is audited as rejected
82
+ PASS unexecuted always-ask approval is audited as rejected
83
+ PASS hook process returns no decision for a matched command under the default policy
84
+ PASS hook process audits the deferred command with its permission mode
85
+ PASS HARNESS_ACTION_GATE_POLICY=always-ask makes the hook process emit ask
86
+ PASS Claude hook manifest wires action-gate to shell and MCP pre-action surfaces
87
+ PASS Claude hook manifest audits successful tool execution
88
+ PASS Claude hook manifest audits failed tool execution
89
+ PASS Claude hook manifest closes unresolved approvals on Stop
90
+ PASS OpenAI plugin preserves the attribution-aware Codex shell action-gate adapter
91
+ PASS OpenAI plugin packages an isolated structured MCP pre-action adapter without widening unrelated hooks
92
+ PASS OpenAI plugin packages an isolated structured MCP post-action audit adapter
93
+ PASS Codex plugin does not declare unsupported PostToolUseFailure lifecycle event
94
+ PASS Codex plugin infers action-gate outcome from supported PostToolUse
95
+ PASS Codex PostToolUse maps zero exit code to success
96
+ PASS Codex PostToolUse maps non-zero exit code to failure
97
+ PASS Codex PostToolUse conservatively recognizes failure stderr without exit code
98
+ PASS OpenAI plugin closes pending approvals at Stop
99
+ PASS canonical and plugin action-gate rule tables are byte-identical
100
+ PASS OpenAI plugin packages action-gate runtime
101
+ PASS update_pull_request body defers without a permission decision
102
+ PASS metadata remains a non-safe mutation
103
+ PASS update_pull_request title defers without a permission decision
104
+ PASS metadata remains a non-safe mutation
105
+ PASS update_pull_request title,body defers without a permission decision
106
+ PASS metadata remains a non-safe mutation
107
+ PASS mcp__github__update_pull_request body defers without a permission decision
108
+ PASS metadata remains a non-safe mutation
109
+ PASS mcp__github__update_pull_request title defers without a permission decision
110
+ PASS metadata remains a non-safe mutation
111
+ PASS mcp__github__update_pull_request title,body defers without a permission decision
112
+ PASS metadata remains a non-safe mutation
113
+ PASS mcp__codex_apps__github__update_pull_request body defers without a permission decision
114
+ PASS metadata remains a non-safe mutation
115
+ PASS mcp__codex_apps__github__update_pull_request title defers without a permission decision
116
+ PASS metadata remains a non-safe mutation
117
+ PASS mcp__codex_apps__github__update_pull_request title,body defers without a permission decision
118
+ PASS metadata remains a non-safe mutation
119
+ PASS mcp__codex_apps__github_update_pull_request body defers without a permission decision
120
+ PASS metadata remains a non-safe mutation
121
+ PASS mcp__codex_apps__github_update_pull_request title defers without a permission decision
122
+ PASS metadata remains a non-safe mutation
123
+ PASS mcp__codex_apps__github_update_pull_request title,body defers without a permission decision
124
+ PASS metadata remains a non-safe mutation
125
+ PASS provider-neutral selectors support metadata updates
126
+ PASS provider-neutral selectors support metadata updates
127
+ PASS own __proto__ field cannot escape the argument allowlist
128
+ PASS explicit higher-risk action cannot inherit metadata deferral
129
+ PASS metadata with {"state":"closed"} remains gated
130
+ PASS metadata with {"state":"open"} remains gated
131
+ PASS metadata with {"state":null} remains gated
132
+ PASS metadata with {"base_branch":"other"} remains gated
133
+ PASS metadata with {"maintainer_can_modify":false} remains gated
134
+ PASS metadata with {"maintainer_can_modify":null} remains gated
135
+ PASS metadata with {"unknown":true} remains gated
136
+ PASS metadata with {"title":"mixed","state":"closed"} remains gated
137
+ PASS metadata with {"draft":true} remains gated
138
+ PASS metadata with {"base":"other"} remains gated
139
+ PASS metadata with {"action_descriptor":{"action":"delete"}} remains gated
140
+ PASS missing or malformed metadata remains gated
141
+ PASS missing or malformed metadata remains gated
142
+ PASS missing or malformed metadata remains gated
143
+ PASS missing or malformed metadata remains gated
144
+ PASS missing or malformed metadata remains gated
145
+ PASS missing or malformed metadata remains gated
146
+ PASS missing or malformed metadata remains gated
147
+ PASS missing or malformed metadata remains gated
148
+ PASS mcp__demo__update_pull_requests receives no metadata exception
149
+ PASS mcp__demo__foo_update_pull_request receives no metadata exception
150
+ PASS mcp__demo__update_pull_request_and_delete receives no metadata exception
151
+ PASS mcp__codex_apps__github_update_pull_request_extra receives no metadata exception
152
+ PASS mcp__demo__merge_pull_request receives no metadata exception
153
+ PASS mcp__demo__close_pull_request receives no metadata exception
154
+ PASS claude retains existing mutation rule
155
+ PASS opencode retains existing mutation rule
156
+ PASS unknown retains existing mutation rule
157
+ PASS explicit required metadata gate cannot be bypassed
158
+ PASS explicit required metadata gate cannot be bypassed
159
+ PASS explicit required metadata gate cannot be bypassed
160
+ PASS explicit required metadata gate cannot be bypassed
161
+ PASS known Codex PR mutation cannot be downgraded to read
162
+ PASS downgrade refusal remains an audited mutation
163
+ PASS known Codex PR mutation cannot be downgraded to read
164
+ PASS downgrade refusal remains an audited mutation
165
+ PASS known Codex PR mutation cannot be downgraded to read
166
+ PASS downgrade refusal remains an audited mutation
167
+ PASS input read descriptor cannot hide a required PR mutation gate
168
+ PASS known Codex PR mutation cannot be downgraded to unknown
169
+ PASS downgrade refusal remains an audited mutation
170
+ PASS known Codex PR mutation cannot be downgraded to unknown
171
+ PASS downgrade refusal remains an audited mutation
172
+ PASS known Codex PR mutation cannot be downgraded to unknown
173
+ PASS downgrade refusal remains an audited mutation
174
+ PASS input unknown descriptor cannot hide a required PR mutation gate
175
+ PASS provider namespace read token cannot downgrade exact PR mutation
176
+ PASS claude explicit descriptor behavior remains unchanged
177
+ PASS opencode explicit descriptor behavior remains unchanged
178
+ PASS unknown explicit descriptor behavior remains unchanged
179
+ FAIL shell family cannot disguise exact Codex PR read
180
+ FAIL known MCP identity is preserved in audit
181
+ FAIL shell family cannot disguise exact Codex PR unknown
182
+ FAIL known MCP identity is preserved in audit
183
+ FAIL shell family cannot disguise exact Codex PR mutate
184
+ FAIL known MCP identity is preserved in audit
185
+ FAIL shell family cannot disguise exact Codex PR delete
186
+ FAIL known MCP identity is preserved in audit
187
+ FAIL shell family cannot disguise exact Codex PR publish
188
+ FAIL known MCP identity is preserved in audit
189
+ FAIL shell family cannot disguise exact Codex PR deploy
190
+ FAIL known MCP identity is preserved in audit
191
+ FAIL shell family cannot disguise exact Codex PR send
192
+ FAIL known MCP identity is preserved in audit
193
+ PASS required hint envelope 0 wins over optional envelopes
194
+ PASS audit retains required hint instead of a conflicting optional hint
195
+ PASS PR creation still honors the documented explicit required gate
196
+ PASS required hint envelope 1 wins over optional envelopes
197
+ PASS audit retains required hint instead of a conflicting optional hint
198
+ PASS PR creation still honors the documented explicit required gate
199
+ PASS required hint envelope 2 wins over optional envelopes
200
+ PASS audit retains required hint instead of a conflicting optional hint
201
+ PASS PR creation still honors the documented explicit required gate
202
+ PASS required hint envelope 3 wins over optional envelopes
203
+ PASS audit retains required hint instead of a conflicting optional hint
204
+ PASS PR creation still honors the documented explicit required gate
205
+
206
+ FAIL: action-gate phase 5 (14 failures)