Skip to content

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

Closed

Description

@JacobStephens2

Three unit tests fail every time on a machine whose global git config has tag.gpgsign = true:

  • worktree::synchronization_tests::base_merges_ignore_shadowing_branch_and_tag_names
  • worktree::synchronization_tests::foreign_observation_and_merge_ignore_shadowing_branch_and_tag_names
  • worktree::synchronization_tests::spec_catch_up_ignores_shadowing_branch_and_tag_names
git tag origin/main <sha> failed: fatal: no tag message?

With signing on, git tag <name> <commit> makes an annotated, signed tag and asks for a message. Fixture repositories run through Git::run with the developer's global config. The integration tests in tests/support are isolated (GIT_CONFIG_NOSYSTEM), but these unit-test fixtures aren't. So scripts/affected-tests main fails on such a machine whatever the change, including inside a Ticket run there. This was seen on git 2.55.0 while validating #1379, a docs-only change.

Acceptance criteria

  • These unit-test fixtures don't read the developer's global or system git config. They set what they need themselves, including user identity and tag.gpgsign = false, the way the integration tests do.
  • The three tests pass with tag.gpgsign = true and commit.gpgsign = true in the global config.
  • No other fixture in src/ relies on the global config.

Activity

  1. JacobStephens2 commented on Oct 26, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: Unit-test git fixtures must not read the developer's global or system git config.

    Current behavior:
    Fixture repositories in unit tests run git through Git::run with the developer's own git config. With tag.gpgsign = true (confirmed in triage on macOS, git 2.55.0, with commit.gpgsign = true too), git tag <name> <commit> creates an annotated signed tag and fails with fatal: no tag message?. That makes worktree::synchronization_tests::*_ignore_shadowing_branch_and_tag_names (three tests) fail on every run on such a machine, whatever the change. The integration tests' support harness already isolates git config (GIT_CONFIG_NOSYSTEM and its own identity); unit-test fixtures don't.

    Desired behavior:
    Every git command a unit-test fixture runs sees only configuration the test sets itself: no global or system config. Fixtures set what they need: user identity, tag.gpgsign = false, commit.gpgsign = false. Production Git::run behavior for real users is unchanged.

    Key interfaces:

    • The unit-test fixture helpers that create repositories and run git for worktree synchronization tests, and any other fixture under src/ that shells out to git.
    • The isolation the integration support harness already applies is the model to follow.

    Acceptance criteria:

    • The three *_ignore_shadowing_branch_and_tag_names tests pass with tag.gpgsign = true and commit.gpgsign = true in the global git config.
    • No unit-test fixture under src/ depends on the global or system git config (for example, a global user.name is not needed).
    • cargo test behaves the same on a machine with no global git config.
    • Runtime git invocations outside tests still honour the user's config.

    Out of scope:

    • Changing how thirdshift itself creates tags or commits for users.
    • Other flaky or platform-specific test failures.
  2. added
    bugSomething isn't working
    ready-for-agentFully specified, ready for an AFK agent
    in-progressA Claim: thirdshift has taken this issue
    and removed
    needs-triageMaintainer needs to evaluate this issue
    ready-for-agentFully specified, ready for an AFK agent
    on Oct 26, 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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions