Skip to content

refactor(hooks): name session events, the verify command, and the record - #121

Merged
furedea merged 2 commits into
mainfrom
refactor/name-verification-session-events
Sep 17, 2026
Merged

furedea merged 2 commits into
mainfrom
refactor/name-verification-session-events

Conversation

@furedea

@furedea furedea commented Sep 16, 2026

Copy link
Copy Markdown
Owner

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

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

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 added this pull request to stack #122 September 16, 2026 15:56
@furedea
furedea force-pushed the refactor/name-verification-session-events branch from f0349bb to 79c083c Compare September 17, 2026 03:08
@furedea
furedea force-pushed the refactor/name-verification-session-events branch from 79c083c to 9dd6522 Compare September 17, 2026 03:10
@furedea
furedea force-pushed the refactor/name-verification-session-events branch from 9dd6522 to c186e80 Compare September 17, 2026 03:12
Base automatically changed from refactor/align-hook-vocabulary to main September 17, 2026 03:13
furedea and others added 2 commits September 17, 2026 12:13
The lifecycle words mixed full event names with the truncated pre; use the native event names.

check and retry collided with the check vocabulary of the gate; the manual command is now verify.

verify --force replaces retry, which implied a failure rather than a forced rerun.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The registered session was a Run in code, a record in JSON helpers, and a session record in docs.

SessionRecord is now the type and record the variable; JSON receipts and baselines say so too.

session_gate.stop was named after the event it serves; gate names what it does.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@furedea
furedea force-pushed the refactor/name-verification-session-events branch from c186e80 to 2805a8d Compare September 17, 2026 03:13
@furedea
furedea merged commit f77c5dd into main Sep 17, 2026
11 checks passed
@furedea
furedea deleted the refactor/name-verification-session-events branch September 17, 2026 03:15
furedea added a commit that referenced this pull request Nov 10, 2026
## 概要

agent-config を最新にして,編集のたびに共通の ast-grep
規則(agent-config#117,#121)が動くようにする.`ast-grep` は #427 で PATH に入っている.

| 項目 | 前 | 後 |
| --- | --- | --- |
| agent-config | eae1408(共通の規則なし) | #117 まで |
| 編集後の hook | ast-grep を動かさない | 共通の規則で ast-grep を動かし,指摘を返す(止めない) |

## 検証

- [x] `darwin-rebuild switch` で適用済み(ユーザー)
- [x] 配られた `hooks/lint/sgconfig.yml` で,`@staticmethod` を含む試しのファイルに
`py_no_staticmethod` が出ることを確認

Refs furedea/agent-config#74

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Opus 5.5 <[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