Repository navigation
refactor(hooks): name the check modules by responsibility - #118
Merged
Merged
Conversation
furedea
force-pushed
the
refactor/unify-check-module-names
branch
from
September 17, 2026 03:08
7557327 to
ed8e231
Compare
Base automatically changed from
chore/remove-legacy-verification-runner
to
main
September 17, 2026 03:10
The Stop gate mixed session_* state modules with verification_* helpers left from the old runner. Name the helpers by what they do: check_selection, check_evidence, and check_execution. session_checks.py never depended on session state, so it joins the check family. Co-Authored-By: Claude Fable 5.1 <[email protected]>
furedea
force-pushed
the
refactor/unify-check-module-names
branch
from
September 17, 2026 03:10
ed8e231 to
f93ac8d
Compare
furedea
added a commit
that referenced
this pull request
Sep 17, 2026
## Summary Stacked on #118. Behavior-preserving renames that finish the vocabulary cleanup of the hooks. | Before | After | Why | | --- | --- | --- | | `agents/hooks/guard_dangerous_git.py` | `guard_git.py` | every guard is `guard_<target>`, like `guard_command` and `guard_file`; the danger judgement stays in `git_safety.py` | | `agents/codex/hooks/hook_translation.py` | `hook_adapter.py` | the README calls these files Codex hook adapters | | `tests/agents/hooks/test_dangerous_git_contract.py` | `test_guard_git.py` | | | `tests/agents/codex/test_hook_translation_cli.py` | `test_hook_adapter_cli.py` | | | `tests/agents/hooks/test_quality_cli.py` | `test_lint_format_cli.py` | one word for the lint hook | `lint_format.py` used three words for one concept (`lint_format` in the file name and `hooks.json`, `lint/format` in the Codex status message, `Quality check` in its output and in one test file). Its messages now read `Lint/format failed` / `Lint/format unavailable`, and the tests alias the module as `lint_format`. Audit log identifiers such as `guard_dangerous_git.sh` are historical labels and stay unchanged. Follow-ups: `hooks.json` (11 hook commands), the adapter import and usage text, `related_test_extensions.json` keys and targets, `test_verification_rule.py`, `agent_hook.bats`, and the deptry first-party list. The fake `hook_translation.py` filename inside the `install_server` bats fixtures is left for a later PR because #116 edits those files. ## Verification - `uv run --frozen pytest`: 961 passed - `bats tests/agents/agent_hook.bats`: rendered harness exposes `.codex/hooks/hook_adapter.py` - `deptry`, `vulture`, ruff format/check, ty, dprint via lefthook ## Rollout Mac: rebuild (hook commands change names). Server: `git pull` and re-run `install_server.sh`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.1 <[email protected]>
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
Stacked on #117. Behavior-preserving rename so the Stop gate uses one vocabulary:
session_*for session state,check_*for the helpers that plan, run, and interpret one check.agents/hooks/lib/verification_selection.pycheck_selection.pyInvocations from changed pathsagents/hooks/lib/verification_output.pycheck_evidence.pyEvidenceagents/hooks/lib/session_checks.pycheck_execution.pytests/agents/hooks/test_verification_selection.pytest_check_selection.pytests/agents/hooks/test_verification_output.pytest_check_evidence.pyverification_*was the prefix of the standalone runner removed in #117;session_checks.pynever depended on session state. Follow-ups: imports insession_gate.pyandcheck_execution.py, therelated_test_extensions.jsonkey (check_*.py, now also mapping to the gate tests that exercise execution),test_verification_rule.py, and the deptry first-party list.verification_session.py(provider-facing entry point) and therelated_test_*.json/RUN_RELATED_TESTS_*names stay: they are documented, deployed names.Verification
uv run --frozen pytest: 961 passeddeptry,vulture, ruff format/check, ty, dprint via lefthookRollout
Mac: rebuild. Server:
git pulland re-runinstall_server.sh.🤖 Generated with Claude Code