Skip to content

Implementation Plan: T5-P1-A1-WP2 Hook Deny Efficacy Probe Harness#4134

Merged
Trecek merged 1 commit into
developfrom
t5-p1-a1-wp2-produce-a-deterministic-merge-blocking-probe-ha/3998
Jun 28, 2026
Merged

Implementation Plan: T5-P1-A1-WP2 Hook Deny Efficacy Probe Harness#4134
Trecek merged 1 commit into
developfrom
t5-p1-a1-wp2-produce-a-deterministic-merge-blocking-probe-ha/3998

Conversation

@Trecek

@Trecek Trecek commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Build a deterministic, merge-blocking probe harness that exercises every PreToolUse deny-mechanism guard script as a subprocess across the full (tool_class x session_mode x backend) matrix. Each combination is classified as deny/allow/advisory and accumulated into a strength matrix JSON artifact. Three meta-tests validate matrix completeness, strength floor for works-as-is hooks, and inert-only appearance for not-applicable hooks.

The deliverables are three files under tests/execution/backends/:

  1. conftest.py — registry-derived count invariants, xdist-safe probe row accumulation via workeroutput IPC
  2. test_hook_deny_efficacy_probe.py — parametrized TestHookDenyEfficacyProbe class + collection-count meta-test
  3. test_hook_strength_matrix.py — three meta-tests consuming the serialized strength matrix

Closes #3998

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260627-231059-975107/.autoskillit/temp/make-plan/t5-p1-a1-wp2-hook-deny-efficacy-probe-harness_plan_2026-06-27_233100.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 1.9k 20.6k 2.5M 123.0k 63 109.9k 31m 8s
verify* sonnet 1 124 14.9k 861.6k 71.9k 37 53.5k 8m 49s
implement* MiniMax-M3 1 76.9k 7.0k 990.2k 0 41 0 4m 55s
audit_impl* sonnet 1 68 5.3k 276.8k 41.6k 16 26.6k 3m 21s
prepare_pr* MiniMax-M3 1 44.2k 2.5k 198.3k 0 16 0 53s
compose_pr* MiniMax-M3 1 35.2k 3.1k 146.4k 38.5k 12 0 50s
review_pr* sonnet 1 142 15.0k 799.1k 58.7k 37 40.9k 4m 11s
Total 158.5k 68.3k 5.8M 123.0k 230.9k 54m 10s

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 9 110023.1 0.0 779.7
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
Total 9 644033.3 25655.3 7586.4

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 1.9k 20.6k 2.5M 109.9k 31m 8s
sonnet 3 334 35.1k 1.9M 121.0k 16m 22s
MiniMax-M3 3 156.3k 12.6k 1.3M 0 6m 39s

…applicable_stems

The PreToolUse deny-efficacy strength matrix meta-tests had two latent bugs:

- works_as_is_stems filtered only by codex_status="works-as-is", so 8
  PostToolUse/SessionStart hooks (pretty_output_hook, token_summary_hook,
  quota_post_hook, pipeline_step_post_hook, recipe_confirmed_post_hook,
  review_gate_post_hook, resume_gate_post_hook, session_start_hook) were
  included in the assertion set. These hooks never appear in the matrix
  because the probe only records PreToolUse+deny combinations, so
  test_works_as_is_hooks_have_soft_or_better would permanently fail once
  the matrix JSON is present.

- not_applicable_stems used hd.scripts[0], indexing only the first script
  per HookDef. Currently all not-applicable hooks are single-script so the
  bug is latent, but a future multi-script not-applicable hook would
  silently leak stems not covered by the assertion.

Both fixes match the plan's Critical implementation notes.
@Trecek Trecek added this pull request to the merge queue Jun 28, 2026
Merged via the queue into develop with commit 8357904 Jun 28, 2026
3 checks passed
@Trecek Trecek deleted the t5-p1-a1-wp2-produce-a-deterministic-merge-blocking-probe-ha/3998 branch June 28, 2026 07:11
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