Skip to content

fix(cli): telemetry off leaves the person's own prepare-commit-msg hook non-executable #817

Closed

Description

@blafourcade

Description

aidd telemetry off removes the line that calls the AIDD commit-trailer delegate from the project's prepare-commit-msg hook. It rewrites that hook through the atomic temp-file-and-rename write, and that write does not carry the file's mode over. A hook that was executable before telemetry off is left non-executable. Git then skips it without saying so, so the rest of the person's own hook stops running.

Affected file(s)

cli/src/runtime/git/git-adapter.ts, stopCallingDelegate (on main: line 115, writeFile with no chmodExecutable after it).

Expected

The hook keeps every line but the delegate call, and keeps its executable bit. A hook that was not executable stays as it was.

Observed

The rewritten hook is left without its executable bit. This came up in a new GitAdapter integration test against a real temporary repository (#799).

AI tool

Any. aidd telemetry off is tool-independent.

aidd-cli version

5.3.0 (released 2026-09-09). Also on next.

OS

macOS and Linux, where git needs the executable bit to run a hook.

Additional context

The fix reads isExecutable before the write and calls chmodExecutable after it when the bit was set. Two tests cover it: "drops the one line and deletes the delegate, leaving the rest of the hook" and "leaves a hook that was not executable as it found it".

Activity

  1. added theissue type on Sep 10, 2026
  2. moved this from Ideation to In Progress in AIDD Roadmapon Sep 10, 2026
  3. moved this from In Progress to In review in AIDD Roadmapon Sep 10, 2026
  4. moved this from In review to In Progress in AIDD Roadmapon Sep 10, 2026
  5. added a commit that references this issue on Sep 10, 2026
    62fdd33
  6. moved this from In Progress to In review in AIDD Roadmapon Sep 10, 2026
  7. added a commit that references this issue on Sep 10, 2026
    4146c2c
  8. moved this from In review to Done in AIDD Roadmapon Sep 10, 2026
  9. closed this as completedby moving to Done in AIDD Roadmapon Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    High

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions