Skip to content

feat: verify agent changes through native hooks - #106

Merged
furedea merged 5 commits into
mainfrom
fix/align-agent-skill-guidance
Sep 16, 2026
Merged

furedea merged 5 commits into
mainfrom
fix/align-agent-skill-guidance

Conversation

@furedea

@furedea furedea commented Sep 15, 2026 •

Copy link
Copy Markdown
Owner

Verification now records each worktree's starting state through native Codex and Claude Code SessionStart hooks, checks registration before tools run, and verifies session changes at Stop. Identical inputs reuse prior results, including unresolved failures. Session IDs preserve evidence across restarts, and retention and log limits bound stored state. This removes the verification launcher and its CLI restrictions; provider hook delivery and timeout semantics remain the enforcement limit.

Skill entry points use task-specific references. Operator instructions live in the README, with the native-hook decision recorded in ADR-0029.

Validation: 77 related Python tests passed, including generated provider hooks; both Nix/Bats checks passed; pre-commit formatting, lint, and type checks passed.

Copilot AI lite review requested due to automatic review settings September 15, 2026 15:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@furedea furedea changed the title fix/align agent skill guidance feat(hooks): register verification before agent launch Sep 15, 2026
@furedea furedea changed the title feat(hooks): register verification before agent launch feat: verify agent changes through native hooks Sep 16, 2026
@furedea
furedea merged commit 5ca9267 into main Sep 16, 2026
11 checks passed
@furedea
furedea deleted the fix/align-agent-skill-guidance branch September 16, 2026 04:12
furedea added a commit that referenced this pull request Sep 16, 2026
The codex wrapper calls `exec -a codex <path> "$@"`, so the intercepted
exec receives three fixed tokens before the user arguments; measured
directly against the installed wrapper (argc=6 for three user args,
argc=8 with the Herdr `-c tui.notifications=false` prefix). #106 changed
the test from `shift 3` to `shift 6` without touching the wrapper, which
dropped the user arguments and failed all three cases. CI only runs
tests/esa/zsh.bats, so the regression was never caught there.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
furedea added a commit that referenced this pull request Sep 17, 2026
## Summary

Audit of files no longer referenced anywhere in the repository.

- Remove the legacy standalone verification runner and everything only
it used: `agents/hooks/run_verification.py`,
`agents/hooks/lib/verification_reuse.py`,
`agents/hooks/lib/verification_log.py`, the
`.agents/hooks/rules/verification_reuse.json` opt-in, their four test
modules, and the `~/.config/agent-harness/bin/timeout` link in
`nix/home/default.nix`. The native Stop gate from #106
(`verification_session.py` -> `session_gate` -> `session_checks`) never
called them and carries its own receipt reuse and log limits.
- Remove the reference copies `atuin/config.toml`, `gh/config.yml`,
`git/.gitconfig`, `yazi/keymap.toml`, and `yazi/yazi.toml`;
`nix/home/default.nix` is the single source for those programs.
- Prune `related_test_extensions.json` mappings that pointed at the
removed tests and the `agents/claude/statusline/*.json` key that matched
no tracked file; drop the `RUN_RELATED_TESTS_REUSE` /
`RUN_RELATED_TESTS_FORCE` exclusions in `session_gate.py` and the deptry
first-party entries; align the README timeout note with the native gate
(300 seconds per check).

`verification_selection.py` and `verification_output.py` stay:
`session_gate` and `session_checks` import them.

## Verification

- `uv run --frozen pytest`: 961 passed
- `deptry`, `vulture`, ruff format/check, ty, dprint, autocorrect,
nixfmt, statix, deadnix via lefthook

## Rollout

Mac: rebuild (the timeout link disappears and the hooks directory loses
the removed modules). 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]>
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.

2 participants