Repository navigation
refactor(hooks): align guard, adapter, and lint names - #119
Merged
Merged
Conversation
This was referenced Sep 16, 2026
furedea
added a commit
that referenced
this pull request
Sep 17, 2026
## Summary Stacked on #116. `install_server.sh` read as "install a server"; ADR-0030 and the README call it the server bootstrap, so the script and everything named after it now say `bootstrap_server`. | Before | After | | --- | --- | | `scripts/agents/install_server.sh` | `scripts/agents/bootstrap_server.sh` | | `tests/agents/install_server.bats` | `tests/agents/bootstrap_server.bats` | | `INSTALL_SERVER_MACHINE`, `INSTALL_SERVER_ENV` | `BOOTSTRAP_SERVER_MACHINE`, `BOOTSTRAP_SERVER_ENV` | | `~/.config/dotfiles/install_server.env` | `~/.config/dotfiles/bootstrap_server.env` | Follow-ups: README, the CI bats path, the helper functions in `tests/agents/test-helper/setup.bash`, and the fake rendered file name in the bats fixtures (`hook_translation.py` -> `hook_adapter.py`, matching #119). ADR-0030 keeps its original wording as a point-in-time record. No host has created `install_server.env` yet, so the settings file rename has no migration. ## Verification - `bats tests/agents/bootstrap_server.bats`: 13 passed - shellcheck, shfmt, actionlint, autocorrect via lefthook 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.1 <[email protected]>
furedea
force-pushed
the
refactor/align-hook-vocabulary
branch
from
September 17, 2026 03:08
eaa33af to
270db3a
Compare
furedea
force-pushed
the
refactor/align-hook-vocabulary
branch
from
September 17, 2026 03:10
270db3a to
fcbb1e5
Compare
guard_dangerous_git.py becomes guard_git.py so every guard is named after its target. The Codex adapter becomes hook_adapter.py, matching the README vocabulary. The lint hook, its tests, and its messages now say lint/format instead of quality. Audit log identifiers keep their historical names. Co-Authored-By: Claude Fable 5.1 <[email protected]>
furedea
force-pushed
the
refactor/align-hook-vocabulary
branch
from
September 17, 2026 03:12
fcbb1e5 to
c4ae059
Compare
furedea
added a commit
that referenced
this pull request
Sep 17, 2026
…ord (#121) ## Summary Stacked on #119. Two commits that finish the vocabulary of `verification_session.py` and the `session_*` modules; behavior is unchanged apart from the CLI words. ### CLI (`90dbf51`) | Before | After | Why | | --- | --- | --- | | `claude\|codex start` | `claude\|codex session-start` | native event names throughout; `pre` was the only truncated one | | `claude\|codex pre` | `claude\|codex pre-tool-use` | | | `claude\|codex stop` | `claude\|codex stop` | unchanged | | `claude\|codex end` | `claude\|codex session-end` | | | `check <record>` | `verify <record>` | `check` now means one runner invocation (`check_*`, receipts); this command runs the whole gate | | `retry <record>` | `verify --force <record>` | a forced rerun, not a retry of a failure | `hooks.json` (8 commands) and the README follow. Retired and malformed invocations print usage and exit 1 (covered by a new parametrized test). ### Internals (`f0349bb`) - `session_store.Run` -> `SessionRecord`, variables `run` -> `record`; the JSON dicts that shared the word are now `baseline` and `receipt`; `prune_run` / `run_directories` -> `prune_record` / `record_directories` - `session_gate.stop` -> `gate` (it was named after the event it serves); `record_skip` -> `save_skip` - `verification_session.registered_run` -> `registered_record` `verification_session.py` itself keeps its name: every subcommand is a lifecycle operation on a registered verification session, and the ADR, README, and state directory already use that word. ## Verification - `uv run --frozen pytest`: 967 passed - ruff format/check, ty, dprint, autocorrect via lefthook ## Rollout Mac: rebuild (`hooks.json` commands change). Server: `git pull` and re-run the bootstrap script. Anyone calling `verification_session.py check` by hand switches to `verify`. 🤖 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 #118. Behavior-preserving renames that finish the vocabulary cleanup of the hooks.
agents/hooks/guard_dangerous_git.pyguard_git.pyguard_<target>, likeguard_commandandguard_file; the danger judgement stays ingit_safety.pyagents/codex/hooks/hook_translation.pyhook_adapter.pytests/agents/hooks/test_dangerous_git_contract.pytest_guard_git.pytests/agents/codex/test_hook_translation_cli.pytest_hook_adapter_cli.pytests/agents/hooks/test_quality_cli.pytest_lint_format_cli.pylint_format.pyused three words for one concept (lint_formatin the file name andhooks.json,lint/formatin the Codex status message,Quality checkin its output and in one test file). Its messages now readLint/format failed/Lint/format unavailable, and the tests alias the module aslint_format. Audit log identifiers such asguard_dangerous_git.share historical labels and stay unchanged.Follow-ups:
hooks.json(11 hook commands), the adapter import and usage text,related_test_extensions.jsonkeys and targets,test_verification_rule.py,agent_hook.bats, and the deptry first-party list. The fakehook_translation.pyfilename inside theinstall_serverbats fixtures is left for a later PR because #116 edits those files.Verification
uv run --frozen pytest: 961 passedbats tests/agents/agent_hook.bats: rendered harness exposes.codex/hooks/hook_adapter.pydeptry,vulture, ruff format/check, ty, dprint via lefthookRollout
Mac: rebuild (hook commands change names). Server:
git pulland re-runinstall_server.sh.🤖 Generated with Claude Code