refactor(hooks): remove maintainer-internal live-probe gate from the shipped plugin (v4.4.32)#998
Merged
michael-wojcik merged 3 commits intoJun 20, 2026
Conversation
Adds TestRealSeamIntegrationNonMocked — the reference example for the non-mocked seam-integration-test convention. A positive case writes a genuine stale awaiting_lead_completion task to a real on-disk task dir and runs the surfacer over the unstubbed task-dir resolution (the real seam a fully-mocked suite would miss); a negative twin (the same task under a different team dir, where the real resolution finds nothing and the surfacer stays silent) proves the test keys on the real resolved dir, not a handed-in dict. Existing mocked cases unchanged.
…shipped plugin The live-probe gate ran as a PreToolUse(Bash) hook in every consumer session but only ever acted inside the PACT-plugin's own dev repo (it gated on the plugin's dev-repo marker), silently no-opping everywhere else — maintainer dev-tooling that shipped to consumers for zero benefit. Removes the gate, its hooks.json registration, behavior tests, and dogfood runbook. Keeps the seam-verification discipline the gate was part of (the SEAM_DEPENDENT_HOOKS classifier SSOT and the reusable probe template, which other hooks' runbooks depend on), and replaces the gate's workflow reminder with a non-mocked seam-integration-test gate: peer-review and wrap-up now require a hook-infra change to a seam-dependent hook to carry a test that exercises the real integration seam, with the rationale in the testing-strategies skill. The classifier's structure meta-test is renamed accordingly. PATCH bump 4.4.31 to 4.4.32.
…ndant exemplar Peer review found the added missed_wake_scan exemplar duplicated the pre-existing, more comprehensive test_missed_wake_scan_integration.py (the seam-test convention's canonical home). Removes the redundant unit-file copy (the test file returns to its prior content) and points the testing-strategies skill's non-mocked-seam section at the canonical integration test as the worked reference example.
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.
Summary
Removes the maintainer-internal
live_probe_gatefrom the shipped plugin and replaces its runtime-verification role with a non-mocked seam-integration-test requirement. Closes #997; supersedes #932 / #924 (the gate's efficacy fix + its codification, both closed) and the closed PR #996.Why
A 25-hook audit (this session) found
live_probe_gate.pyis the only maintainer-internal hook that leaked into consumer runtime: it ships as aPreToolUse(Bash)hook — a subprocess on every Bash call in every consumer session — but only ever acts inside the PACT-plugin's own dev repo (it gates on the plugin's dev-repo marker); for any consumer it silently no-ops. Zero consumer value; dev-tooling baked into the product. The other 24 shipped hooks are genuinely consumer-facing.What changed
Removed — gate runtime only (the consumer leak):
live_probe_gate.py+ itshooks.jsonregistration (surgical — the keptgit_commit_check+merge_guard_preBash-block siblings are untouched)test_live_probe_gate_dogfood.py,924-locus-b-dogfood-probe.md, the 924/locus-bRUNBOOK_RUN_DATESrows (+ a one-line retirement tombstone)Kept — the seam-verification discipline (NOT shipped as runtime; never leaked):
hook_infra_classifier.py(theSEAM_DEPENDENT_HOOKSSSOT) — minimal-touch (docstrings de-gated;classify_diffpreserved because the meta-test exercises it)live-probe-template.md+ the 923 / 926 / 961 runbooks (other kept hooks depend on them)test_live_probe_gate_structure.py→test_hook_infra_classifier.pyReplaced the need — non-mocked seam-integration-test requirement:
peer-review.md+wrap-up.md(a hook-infra change to a seam-dependent hook must carry a test exercising the real seam), referencing the classifier SSOTpact-testing-strategiesskillmissed_wake_scanthat drives the surfacer over the real on-disk task-dir resolution (the seam every existing test mocked), with a negative twin + an in-process neuter proving non-vacuityVerification
Adversarial design review caught and corrected an over-broad deletion list (the audit's "overloaded-tokens" finding —
live-probe-template.md+hook_infra_classifier.pyserve a kept discipline and must NOT be deleted). Auditor GREEN against the diff (keep/delete boundary, surgicalhooks.json, byte-identical prose mirrors, zero planning artifacts). Full hook suite 9187 passed, 0 failed, 0 errors (three independent runs). Exhaustive clean-grep: no dangling gate refs. PATCH bump 4.4.31 → 4.4.32.