You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): diagnose and safely repair commit-trailer hook integration #746
The AIDD commit trailer depends on a call from prepare-commit-msg to the AIDD delegate. If that call is overwritten, commit-to-session attribution is lost silently while commits and telemetry records continue.
Observed
The delegate is owned by AIDD. The fragile part is its caller: a hook manager can regenerate prepare-commit-msg, or the file can be replaced manually or moved through core.hooksPath.
Behaviour
At the next eligible session-start, AIDD verifies the resolved hooks directory and repairs a regular prepare-commit-msg hook when its delegate call has disappeared. It runs at most once per session and does nothing when telemetry is off or the delegate is absent.
Lefthook and Husky are manager-owned cases. Their hook files and configuration may be committed and regenerated, so AIDD does not append directly to them. aidd telemetry check detects that ownership, verifies whether the manager calls the delegate, and prints the integration snippet when it does not.
Done when
A regular prepare-commit-msg overwritten between two commits calls the delegate again after the next session start.
The repair does not run when telemetry is off or the delegate is absent, and it runs at most once per session.
aidd telemetry check reports the effective hooks directory, delegate availability and executability, caller wiring, shared or manager-owned integration, and a count of recent commits carrying AIDD-Session-Id.
Lefthook and Husky are diagnosed without AIDD rewriting manager-owned configuration; the required wiring is shown when missing.
A commit still succeeds when the delegate is deleted, non-executable, or fails; the delegate reaches no Node process or network and exits 0.
Bounds
An erased call loses commit-level attribution, not the telemetry record itself. The safe automatic repair applies to regular hooks. Manager-owned integration remains owned by that manager and is made explicit by the diagnostic.
changed the title [-]fix(cli): the commit trailer survives a hook another tool regenerates, and check says whether it did[/-][+]fix(cli): diagnose and safely repair commit-trailer hook integration[/+]on Sep 14, 2026
Implemented in #749, with one deliberate boundary to the original repair approach.
For a regular prepare-commit-msg hook, AIDD repairs the delegate caller at the next eligible session start and telemetry check reports the effective wiring and recent trailer coverage.
Lefthook and Husky are treated differently: their hooks and configuration are manager-owned, often committed and regenerated. AIDD therefore does not append directly to them. telemetry check detects that ownership, reports whether the manager already calls the AIDD delegate, and prints the exact wiring snippet when it does not.
This keeps the integration safe and avoids silently rewriting shared third-party configuration. The generic hook-repair path, manager-owned path, disabled telemetry, missing delegates, permissions, symlinks, and diagnostic output are covered by the merged tests.
I propose closing this as completed with that manager-aware boundary, rather than adding automation that mutates Lefthook or Husky configuration.
Activity
fix(cli): the commit trailer survives a hook another tool regenerates…
fix(telemetry): a backlog declaration the report can actually read (#780
[-]fix(cli): the commit trailer survives a hook another tool regenerates, and check says whether it did[/-][+]fix(cli): diagnose and safely repair commit-trailer hook integration[/+]blafourcade commentedon Sep 14, 2026
Implemented in #749, with one deliberate boundary to the original repair approach.
For a regular
prepare-commit-msghook, AIDD repairs the delegate caller at the next eligible session start andtelemetry checkreports the effective wiring and recent trailer coverage.Lefthook and Husky are treated differently: their hooks and configuration are manager-owned, often committed and regenerated. AIDD therefore does not append directly to them.
telemetry checkdetects that ownership, reports whether the manager already calls the AIDD delegate, and prints the exact wiring snippet when it does not.This keeps the integration safe and avoids silently rewriting shared third-party configuration. The generic hook-repair path, manager-owned path, disabled telemetry, missing delegates, permissions, symlinks, and diagnostic output are covered by the merged tests.
I propose closing this as completed with that manager-aware boundary, rather than adding automation that mutates Lefthook or Husky configuration.