fix(cli): telemetry off keeps the person's own commit hook executable - #818
Merged
Merged
Conversation
Removing the commit-trailer delegate rewrote prepare-commit-msg through the atomic temp-and-rename write, which does not carry the mode over: a hook that was executable came back without its bit, and git skips such a hook silently, so the rest of the person's own hook stopped running. The bit is read before the write and restored after it, only when it was set. Two tests on a real temporary repository: the removal keeps the hook executable (red without the fix), and a hook that was not executable stays so (red with the restore made unconditional). The second is POSIX-only. Fixes #817 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
blafourcade
added a commit
that referenced
this pull request
Sep 10, 2026
GitAdapter gets its first test, against a real temporary repository: hook install and removal under this CLI and under lefthook or husky, core.hooksPath, the trailer count and every answer of readCommitTrailerSetup. The auth adapters, the self-updater, the file adapter, the prompter, the HTTP client, the update check, the release resolver, the project-root and git-environment helpers and the composition root (createDeps, wireTools, the build registry) are asserted on their exact commands, messages, headers and shapes. The removal test found a defect rather than a mutant: prepare-commit-msg lost its executable bit. The fix ships on its own in #818, which this branch sits on. Runtime scope, every mutant replayed: 69.8 to 92.2 (killed 1182, timeout 16, survived 88, uncovered 13 of 1299). Floor raised from 67 to 90. Two POSIX-only checks skip where the platform cannot show them: a mode bit on Windows, and a read-only directory on Windows or as root. Refs #799 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
2 tasks
blafourcade
added a commit
that referenced
this pull request
Sep 10, 2026
GitAdapter gets its first test, against a real temporary repository: hook install and removal under this CLI and under lefthook or husky, core.hooksPath, the trailer count and every answer of readCommitTrailerSetup. The auth adapters, the self-updater, the file adapter, the prompter, the HTTP client, the update check, the release resolver, the project-root and git-environment helpers and the composition root (createDeps, wireTools, the build registry) are asserted on their exact commands, messages, headers and shapes. The removal test found a defect rather than a mutant: prepare-commit-msg lost its executable bit. The fix ships on its own in #818, which this branch sits on. Runtime scope, every mutant replayed: 69.8 to 92.2 (killed 1182, timeout 16, survived 88, uncovered 13 of 1299). Floor raised from 67 to 90. Two POSIX-only checks skip where the platform cannot show them: a mode bit on Windows, and a read-only directory on Windows or as root. Refs #799 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
blafourcade
added a commit
that referenced
this pull request
Sep 10, 2026
…819) * test(cli): kill the surviving mutants of the kernel Every error class now has its exact name and message pinned, and the pure kernel helpers that had no test of their own (jsonc stripping, confined file names, the JSON narrowers, describeError, isMergeContentEmpty, removeRedundantGitkeeps) get one. The frontmatter parser, semver precedence, plugin-source messages and the built-cache path parsers are asserted structure by structure, so a dropped anchor, a swapped join or a missing branch turns a test red. Kernel scope, every mutant replayed: 75.2 to 97.1 (killed 1449, timeout 32, survived 45, uncovered 0 of 1526). The 45 left are documented equivalents plus seven stryker records as survived although the hand-applied mutation turns the named test red. Floor raised from 71 to 95. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60 * test(cli): kill the surviving mutants of the runtime GitAdapter gets its first test, against a real temporary repository: hook install and removal under this CLI and under lefthook or husky, core.hooksPath, the trailer count and every answer of readCommitTrailerSetup. The auth adapters, the self-updater, the file adapter, the prompter, the HTTP client, the update check, the release resolver, the project-root and git-environment helpers and the composition root (createDeps, wireTools, the build registry) are asserted on their exact commands, messages, headers and shapes. The removal test found a defect rather than a mutant: prepare-commit-msg lost its executable bit. The fix ships on its own in #818, which this branch sits on. Runtime scope, every mutant replayed: 69.8 to 92.2 (killed 1182, timeout 16, survived 88, uncovered 13 of 1299). Floor raised from 67 to 90. Two POSIX-only checks skip where the platform cannot show them: a mode bit on Windows, and a read-only directory on Windows or as root. Refs #799 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60 * test(cli): skip the trailer setup's mode-bit checks on Windows Windows CI failed two readCommitTrailerSetup tests that expect a hook or a delegate to read as not executable: there `access(X_OK)` answers like `F_OK`, so every existing file reads as executable, and git needs no mode bit to run a hook. They skip on Windows, as the removal test already does. Refs #799 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60 * test(cli): name the mode-bit skip once in the git adapter tests The same Windows explanation sat above three skips. Stacked with the telemetry tests, the repetition pushed tests/ past its comment baseline (2989 against 2987); one named predicate says it once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60 --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 11, 2026
blafourcade
added a commit
that referenced
this pull request
Sep 11, 2026
GitHub closes a pull request whose base branch is deleted, unless the merge itself deletes it. Deleting the base of #819 through the API after #818 merged closed #819 instead of retargeting it. `vcs.md` now says to retarget first, and how to replay a dependent branch after its base was squashed. Fixes #843 Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60 Co-authored-by: Claude Opus 5 <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.
🎯 What & why
aidd telemetry offremoves the commit-trailer delegate's line from the project'sprepare-commit-msghook. It rewrote that hook through the atomic temp-file-and-rename write, which does not keep the file's mode. An executable hook came back without its executable bit. Git skips a non-executable hook without saying so, so the rest of the person's own hook stopped running. This shipped in cli 5.3.0.🛠️ How it works
GitAdapter.stopCallingDelegatereadsisExecutablebefore the write and callschmodExecutableafter it, only when the bit was set. Two lines. A hook that was not executable is left as it was.🧪 How to verify
hookExecutableis falseif (true))Runtime and telemetry suites: 81 files, 1084 tests passed. Typecheck, lint, test:arch, knip and type honesty are clean.
access(X_OK)answers likeF_OK, so a mode bit cannot be observed, and git does not need one.🔗 Linked issue
Fixes #817
✅ I certify
🤖 Generated with Claude Code
https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb