Skip to content

Disable background git maintenance in isolated release tests #732

Closed

Description

@JacobStephens2

From the Oct 11–16 2026 Run retrospective, finding 12. Tracking issue: #721.

The evidence below is historical and attributed to the supplied report (repository snapshot 5504c97); it has not all been independently reproduced. Limited current-checkout checks were made at 53bb9c6. This is filed for maintainer triage, not automatic Pickup.

Requested outcome and validation

Ensure git invocations under tests/release.rs::isolated() disable automatic maintenance and automatic garbage collection even when GIT_CONFIG_GLOBAL=/dev/null bypasses the shared harness gitconfig. Consider command-scope GIT_CONFIG_COUNT / GIT_CONFIG_KEY_n / GIT_CONFIG_VALUE_n, preserving any existing entries and the intended global-config isolation.

Add a guard that exercises the actual isolated environment and shows maintenance.auto=false and gc.auto=0 reach child git commands. Validate release scenarios on a newer git where feasible, and state whether the original DirectoryNotEmpty race was reproduced or remains inferred. Do not hide cleanup failures or weaken tests.

This is the remaining release-test gap in the completed #263 fix, not a request to reopen its broader shared-harness implementation. Coordinate with the independent release-script issue #671 where useful.

The report also proposes allowing CI-fix Repairs to file a needs-triage issue when they diagnose an unrelated failure. Triage that publication behavior explicitly, including duplicate avoidance and trusted publication rules; it must not waive checks or broaden the automatic fix scope. The release-test fix can ship independently.

Current checkout check: isolated() still sets GIT_CONFIG_GLOBAL to /dev/null.

Original finding, including evidence, proposed fixes, and confidence

12. A gap in #263's fix still makes release tests flaky (Repo)

  • Evidence:
    • tests/release.rs isolated() sets GIT_CONFIG_GLOBAL=/dev/null, which bypasses the maintenance-off gitconfig from tests/support/mod.rs. CI's newer git then runs automatic maintenance in the background, and the fake gh's remove_dir_all hit "DirectoryNotEmpty". This was agy sessions fail on agy 1.3.3: pass the prompt as -p's value #658's CI red, after a 21.5-min CI-fix Repair and 3.4M tokens.
    • The Repair named the cause but filed nothing, because the CI-fix prompt allows only a "CI notes" line.
  • Fix:
    • Repo: set maintenance.auto=false and gc.auto=0 through GIT_CONFIG_COUNT/GIT_CONFIG_KEY_n/GIT_CONFIG_VALUE_n in isolated(), plus a guard test.
    • Factory: let the CI-fix Repair file a needs-triage issue for an unrelated failure whose cause it found.
  • Confidence: high.

Activity

  1. added
    bug
    needs-triage
    on Oct 17, 2026
  2. JacobStephens2 commented on Oct 17, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: Ensure isolated release-test git commands cannot start automatic maintenance or garbage collection.

    Current behavior:
    The release tests' isolated() helper sets GIT_CONFIG_GLOBAL=/dev/null, excluding the maintenance-off settings in the shared Scenario gitconfig. Its git child commands therefore lack that protection. The retro attributes a newer-git temporary-clone cleanup failure to this gap in #263's fix. Code inspection confirmed the configuration gap; the DirectoryNotEmpty race itself remains unverified in this triage.

    Desired behavior:
    Every git command launched through the release-test isolation environment, including descendants of the release script and fake gh, must see effective maintenance.auto=false and gc.auto=0. Keep user/system configuration excluded and retain the helper's existing identity and isolation behavior. Use inherited command-scope configuration or an equivalent test-owned mechanism; preserve unrelated configuration entries and make the maintenance-off values authoritative within the test environment.

    Key interfaces:

    • The release-test isolated(&mut Command) helper and its command builders: apply the protection consistently to direct commands and their descendants.
    • Git's effective command-scope settings: both maintenance and automatic garbage collection must be disabled without modifying host configuration.
    • Release fixtures and fake gh cleanup: retain actual cleanup failures rather than hiding or retrying them.

    Acceptance criteria:

    • A deterministic guard runs real git through the actual isolation helper and confirms effective maintenance.auto=false and gc.auto=0, even with global configuration excluded.
    • A child process launched in that environment inherits both settings; unrelated preexisting command-scope entries remain effective.
    • Conflicting inherited maintenance settings cannot re-enable automatic maintenance or garbage collection in the isolated environment.
    • Existing configuration exclusion and git identity settings remain effective, and the applicable release tests pass.
    • Cleanup errors are neither ignored nor retried as a substitute for removing the background writer.
    • The implementation records whether the original race was reproduced on newer git or remains inferred; the deterministic configuration guard is required regardless.

    Out of scope:

    • Allowing CI-fix Repairs to publish issues. That separate proposal in the original body remains for later triage and is not authorized by this brief.
    • Production git behavior, host/global git configuration changes, broad test-harness refactoring, or changes to release-script branch selection (release.sh resumes only its own bump PR from this repository #671).
    • Weakening, skipping, or adding blanket retries to release tests.

    Source and historical evidence: #721, finding 12; related completed fix: #263. This brief narrows this issue to the release-test configuration gap.

  3. added
    ready-for-agent
    in-progress
    and removed
    needs-triage
    ready-for-agent
    on Oct 17, 2026
  4. removed
    in-progress
    on Oct 17, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions