fix(D-1): robust git-hook registration + lefthook support (2.3.0)#57
Merged
Conversation
Git hooks could silently stop firing after a plugin update or under lefthook — most visibly the post-commit local_evidence.py emitter, so contribution evidence stopped landing on items. install_hooks now marks hooks with an EDPA-MANAGED-HOOK sentinel and decides per slot (install / refresh / never-clobber-foreign), detects lefthook and prints a paste-ready snippet (use_stdin:true on pre-push), and update_engine.sh self-heals registration after a version bump. Adds --check-hooks and --refresh-hooks, reconciles the stale core.hooksPath installer into a thin delegator, removes the dead generic pre-commit, and makes ANSI TTY-aware. Docs + web (CZ/EN) updated; new test_project_setup_hooks.py + self-heal tests (618 passed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ontribution evidence stops firing
Both workflows called `python3 .claude/edpa/scripts/sync.py` — a stale path to a script removed with the V1 GitHub-Projects flow in 2.0.0. They have failed on every release since (v2.1.8–2.2.1) and only added red noise; my D-1 backlog item re-triggered them via the .edpa/backlog/** path filter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Fixes D-1 — git hooks could silently stop firing after a plugin update or under lefthook, so the
post-commitlocal_evidence.pyemitter never ran and contribution evidence stopped landing on items.Root causes
install_hooksused a bluntnot dst.exists()guard → if a slot was already held (typically by lefthook, which owns.git/hooks/), EDPA silently skipped its hook.update_engine.shre-vendored the engine on update but never re-registered hooks.Fix
install_hooks—EDPA-MANAGED-HOOKsentinel; per slot: install if missing, refresh if EDPA-owned, never clobber a foreign hook (warns + prints the chain-in line).lefthook.yml, prints a paste-ready snippet (use_stdin: trueonpre-push, or lefthook hangs) instead of touching.git/hooks/.update_engine.shre-registers EDPA hooks after a version bump when the project already uses them.--check-hooks(read-only doctor) +--refresh-hooks(register-only);install.sh→ thin delegator (dropscore.hooksPath); removed dead genericpre-commit; TTY-aware ANSI.Docs / web
RUNBOOK §1+§6, quick-start,
skills/setup/SKILL.md, playbook.md, README ×2, E2E-TEST-PLAN; website setup/guide/playbook/methodology (CZ + EN).Tests
New
tests/test_project_setup_hooks.py+ self-heal cases intests/test_update_engine_hook.py. Full suite: 618 passed.Release
Version 2.3.0 (plugin.json + web/package.json + CHANGELOG). Web deploy +
gh releaseafter merge.🤖 Generated with Claude Code