Repository navigation
fix: restore global as the default git scope; guard core.hooksPath - #370
Merged
Merged
Conversation
I over-corrected in 3c21e0c, and two suites said so before I listened. Reverting the default and fixing the thing that was actually harmful. `auths init`'s own description is "Create your signing identity and configure Git", and its *interactive* default is already "All repositories". Making --non-interactive default to something else made the scripted path disagree with the prompted one, and broke two real flows: the golden-path smoke test inits from a home directory (where `git config --local` is an error), and the E2E suite inits in one repo and commits in another (so repo-scoped signing left commits unsigned — "No signature found", 3 tests, which I merged in #369 before noticing). Setting up signing for one repo and silently not the next is its own surprise. The default is global again. What was genuinely wrong in W4 was never the default — it was that the scope was **unchooseable**: `--non-interactive` hard-returned Global with no override, so a scripted, CI or agent init had no way to keep its hands off ~/.gitconfig. `--git-scope local|global|skip` closes that, and stays. And the actual harm — clobbering `core.hooksPath` — is now guarded. It replaces .git/hooks entirely, so pointing it at ours when husky/pre-commit/prek already own it silently disables every hook they installed; the user experiences that as "my pre-commit checks stopped running" with nothing tying it to `auths init`. `enable_commit_trailers` refuses, naming the occupying path and the two ways out. Needed a `get` on GitConfigProvider — a port that could only write was how this went unnoticed. Tests: the two I "fixed" in bbc5b88 to match the over-correction are restored, plus new coverage for the capability that is actually new (`--git-scope local` leaves ~/.gitconfig byte-identical; `skip` touches nothing but still pins the root), and two SDK tests for the clobber guard including its message being actionable rather than merely a refusal. Verified: golden-path smoke 60/60 · e2e git-signing + key-rotation 9/9 · cli integration 69 · cli lib 157 · sdk lib 180 · clippy 0 errors.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Auths Commit Verification
Result: ❌ 0/1 commits verified How to fixCommit 1. Install auths macOS: 2. One-time setup (creates your identity and configures Git) auths init3. Sign this branch and push auths sign origin/main..HEAD
git push --force-with-leaseFor CI to verify the signer, commit an identity bundle: auths id export-bundle --alias main --output .auths/ci-bundle.json --max-age-secs 31536000 |
`in_git_repository` and its import became unused when the git-scope default went back to global. CI builds with `-D warnings`, so dead code is an error there and merely a warning locally — which is why this passed my `cargo build` and failed Clippy, MSRV, smoke and KERI conformance all at once.
Auths Commit Verification
Result: ❌ 0/2 commits verified How to fixCommit 1. Install auths macOS: 2. One-time setup (creates your identity and configures Git) auths init3. Sign this branch and push auths sign origin/main..HEAD
git push --force-with-leaseFor CI to verify the signer, commit an identity bundle: auths id export-bundle --alias main --output .auths/ci-bundle.json --max-age-secs 31536000 |
This branch was successfully deployed
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.
Owning a mistake
I merged #369 while its E2E checks were red. The wait loop settled and I merged unconditionally without re-reading the result. 3 E2E tests were failing on main (
No signature found). This fixes them.What I got wrong
Epic 4 flipped
auths init --non-interactiveto scope git signing locally, reasoning that a scripted init shouldn't rewrite~/.gitconfig. That was an over-correction, and two suites told me before I listened:end_to_end.py:241inits from a home directory —git config --localthere is an error.conftest.py:99inits in one repo and commits in another — repo-scoped signing left those commits unsigned.The deeper error:
auths init's own description is "Create your signing identity and configure Git", and its interactive default is already "All repositories". I made the scripted path disagree with the prompted one. Setting up signing for one repo and silently not the next is its own surprise.The default is global again.
What was actually wrong in W4
Not the default — that the scope was unchooseable.
--non-interactivehard-returnedGlobalwith no override, so a scripted, CI or agent init had no way to keep its hands off~/.gitconfig.--git-scope local|global|skipcloses that, and stays.The harm I hadn't fixed, now fixed
core.hooksPathreplaces.git/hooksentirely. Pointing it at ours when husky/pre-commit/prek already own it silently disables every hook they installed — experienced as "my pre-commit checks stopped running", with nothing tying it toauths init.enable_commit_trailersnow refuses, naming the occupying path and both ways out:This needed a
getonGitConfigProvider. A port that could only write is how this went unnoticed — there was no way to ask what was already there.(This repo is itself living with the bug: its prek pre-commit and pre-commit pre-push hooks are currently bypassed by a global
core.hooksPath.)Tests
The two I "fixed" in
bbc5b889to match the over-correction are restored — they were right the first time. Added coverage for what's genuinely new:test_init_git_scope_local_leaves_global_config_alone—~/.gitconfigbyte-identicaltest_init_git_scope_skip_touches_no_git_config— and still pins the rootenable_refuses_to_clobber_a_hook_managers_hooks_path— incl. the message being actionable, not just a refusalenable_is_idempotent_when_hooks_path_is_already_oursVerification