test(agents-vault): make the suite hermetic against git configuration #127
No Reviewers
Labels
Clear labels
Area/CI
Area/Completions
Area/Components
Area/Config
Area/Docs
Area/Functions
Area/Integrations
Area/Prompt & Theme
Area/Scripts
Area/Tests
Compat/Breaking
Kind/Bug
Kind/Chore
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Refactor
Kind/Security
Kind/Testing
good first issue
help wanted
.github/workflows and repository automation
completions/ - tab-completion scripts
The opinionated-component system (C1-C6)
config.fish and conf.d/ - startup and environment
docs/manual/ and the generated manual, man page, and site
functions/ - user-facing functions and helpers
integrations/ - third-party tool wiring
themes/ and prompt appearance
scripts/ - standalone helper scripts
tests/ - the syntax lint and functional suite
Breaking change that won't be backward compatible
Something is not working
Tooling, dependencies, and housekeeping
Documentation changes
Improve existing functionality
New functionality
Makes existing behavior faster or lighter
Restructures code without changing behavior
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Low
4
The priority is low
Priority
Medium
3
The priority is medium
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Well-scoped and self-contained; a good place to start
Maintainer is looking for someone to pick this up
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
rootiest (Rootiest)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rootiest/fish-config#127
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Unbreaks
main. Run #907 failed thetestjob at 246/317 after #126 merged, which skipped thebuild-docsjob and left the generated docs unregenerated.The vault suite was hermetic against
$HOMEand~/.claude— which is what every review checked — but not against git's own configuration.new_reposetsuser.email/user.nameon the repos the tests create; nothing set one on the repos the tool creates, namely the scaffolded vault and theAGENTS/sub-repo. On a developer machine those inherited a global identity and committed fine, so the gap was invisible to every local run. On a runner with no gitconfig they died withAuthor identity unknown, and the suite reportedagents-vault's own correct "nothing recorded" handling as 71 failures.Nothing is wrong with the tool. It behaved exactly as designed — a commit that cannot be made is reported as a failed commit, and the tests asserting that behavior are the ones that passed.
Root cause
Three separate ways the suite read the ambient git config, all fixed by exporting overrides that reach the tool's own git invocations, not just the tests':
GIT_AUTHOR_*/GIT_COMMITTER_*— the actual failure. Environment rather thangit configso it reaches thegit commitcalls insideagents-vaultandagents-init.commit.gpgsign=false— the mirror-image hazard, in the other direction. A developer with signing enabled has tool-created repos reach for a key partway through the run; on a hardware token that means a touch prompt mid-suite. A runner with no key fails the commit outright.init.defaultBranch=main— the rebase fixtures build an upstream and a clone and need the two to agree on a branch name. A global sayingmainand git's bare default ofmasterdisagree, so the fixture failed to create the very rebase the test was about, reporting a tool failure that never happened. This accounted for the last 5 of the 71.Notes
The commit's
--no-verify-style hazard does not apply here:core.hooksPathwas already pinned to/dev/nullinnew_repo. Only the three settings above were ambient.Worth a follow-up, not fixed here: when a commit fails for lack of an identity,
_agents_repo_syncreports(hook rejected it?). That guess is wrong in this case, and it is the same misdiagnosis pattern as the "rebase conflict" message that was corrected in #126 — a message naming a cause the code never checked.Verification
GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null fish tests/test-agents-vault.fish— reproduces CI exactly: 267/317 before, 317/317 after.fish tests/test-agents-vault.fishwith a normal config — 317/317, unchanged, so the fix does not mask anything locally.fish tests/run-tests.fishunder both conditions — lint 226/226, functional 13/13, vault 317/317, exit 0 each time.build-docsjob now runs and auto-commits the regenerateddocs/fish-config.md,docs/fish-config.1, and component registry that run #907 skipped.