Skip to content

Isolate unit-test Git fixtures from host configuration - #1410

Merged
JacobStephens2 merged 4 commits into
mainfrom
issue-1392
Oct 26, 2026
Merged

JacobStephens2 merged 4 commits into
mainfrom
issue-1392

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Unit-test Git commands inherited host configuration after repository setup, so enabling tag signing broke three synchronization tests. Apply one isolation policy to direct Git commands and fixture processes whose shell scripts invoke Git; set fixture identities and disable commit/tag signing locally.

 unit-test fixture
-  isolated setup → Git::run / shell Git reads host config
+  isolated setup → Git::run / shell Git keeps isolated config
 runtime Git
   continues to honour user configuration

Closes #1392

Evidence

  • Before: all three reported tests failed with fatal: no tag message? on Git 2.43.0. After: all three pass with the same command and both signing settings enabled:

    config=$(mktemp)
    printf '[tag]\n gpgsign = true\n[commit]\n gpgsign = true\n' > "$config"
    GIT_CONFIG_GLOBAL="$config" GIT_EDITOR=true cargo test --bin thirdshift shadowing_branch_and_tag_names -- --nocapture
    rm "$config"

    A tag-signing-only probe failed; a commit-signing-only probe passed. The confirmed cause was configuration leaking into commands after initialization.

  • Before: each retained regression failed for its reported reason: Worktree tag creation required a message; Session shell Git read a supplied invalid core.ignoreCase. After: cargo test --bin thirdshift git_fixtures_ignore_global_and_system_config -- --nocapture passes both tests. These supply global and system configuration, exercise fresh/completion Git views and all Harness report fixtures, and check that local config remains readable.

  • The Spec reviewer's exact hostile-global-config reproduction now passes. cargo check --bin thirdshift and formatting checks passed.

  • /usr/bin/time -p scripts/affected-tests main passed on c6c82632, selecting the full Rust suite via the cargo test fallback (nextest unavailable). Wall time: 1634.31s (27m 14s), including 1m 39s compilation; unit result: 1516 passed, 3 ignored; all integration binaries passed. All applicable GitHub CI checks are green, including Linux, macOS, site, Console and release builds.

Test seams

  • Worktree synchronization through real local Git repositories and a bare origin, including the three shadowing branch/tag patterns.
  • Fixture Git commands reading explicit local configuration while ignoring supplied global/system configuration, including Git invoked from fake Harness shell scripts.

Review

  • Standards: 1 maintenance finding, addressed by sharing the isolation policy.
  • Spec: 1 behavior finding, reproduced with its exact command and fixed with a retained regression.
  • Both axes read all six changed files. Unread changed files: none. Generated-output exclusions: none.
  • Reports and historical counts are saved in .thirdshift-review-46mAE6/{standards.md,spec.md,summary.json} in the Session worktree.

Unaddressed findings

  • Standards: none.
  • Spec: none.
  • Security: none.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Blast Radius: tests

The runtime command construction is unchanged outside cfg(test); the rest of the changes are fixture configuration and regressions.

Built with codex codex-cli 0.164.0 · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 7b406d1 into main Oct 26, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1392 branch October 26, 2026 22:18
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit-test git fixtures read the global git config, so tag.gpgsign breaks three tests

1 participant