Description
Some tools (Husky, lefthook, npm scripts) install their own hook scripts and silently overwrite existing ones during project setup. If this happens while an agent is running and about to commit, Partio's post-commit hook will no longer execute — dropping the checkpoint with no error or warning.
Implementation
partio doctor: Compare current hook file contents against the expected Partio hook template. Report which hooks are intact, missing, or replaced by another tool. Give the user actionable output: partio disable && partio enable to restore.
- Post-commit log warning: If the hook script content doesn't match the expected Partio signature at post-commit time, emit a WARN-level slog message.
Detection doesn't need to run at every commit (too slow). Surfacing it in partio doctor is sufficient.
Context hints
internal/git/hooks/ — hook script generation
cmd/partio/ — doctor command
Why this matters
When another tool replaces Partio's hooks, users silently lose checkpoint coverage with no indication why. The partio doctor command is the natural place to surface this.
Source
Inspired by entireio/cli PR#791: capture scenario where git hooks are overwritten during a running agent prompt.
Description
Some tools (Husky, lefthook, npm scripts) install their own hook scripts and silently overwrite existing ones during project setup. If this happens while an agent is running and about to commit, Partio's post-commit hook will no longer execute — dropping the checkpoint with no error or warning.
Implementation
partio doctor: Compare current hook file contents against the expected Partio hook template. Report which hooks are intact, missing, or replaced by another tool. Give the user actionable output:partio disable && partio enableto restore.Detection doesn't need to run at every commit (too slow). Surfacing it in
partio doctoris sufficient.Context hints
internal/git/hooks/— hook script generationcmd/partio/— doctor commandWhy this matters
When another tool replaces Partio's hooks, users silently lose checkpoint coverage with no indication why. The
partio doctorcommand is the natural place to surface this.Source
Inspired by entireio/cli PR#791: capture scenario where git hooks are overwritten during a running agent prompt.