Skip to content

ci: GitDirtyTests intermittently reports clean temp repo on Ubuntu #352

Description

@SUaDtL

Observed behavior

On PR #351, the first Ubuntu hook-suite attempt failed in:

test_gitlib.GitDirtyTests.test_tracked_and_untracked_changes_remain_dirty

The test created tracked and untracked changes in its temporary repository, then _gitlib.git_dirty(root) unexpectedly returned False.

The failed-job rerun passed unchanged:

Scope evidence

PR #351 changes documentation, generated markdown surfaces, a structural prose test, and task-board state. It does not touch _gitlib.py, test_gitlib.py, subprocess helpers, or Git environment handling. The same 967-test hook suite passed locally on Windows and in the PR's macOS and Windows jobs. A preceding PR also passed the Ubuntu lane.

This establishes an intermittent test or environment race, not a confirmed product defect. Do not weaken git_dirty behavior based on this single occurrence.

Investigation targets

  • capture git status --porcelain stdout, stderr, return code, and temp-repo path on assertion failure
  • check whether repository setup, file flush/close, index refresh, or subprocess timing can race on hosted Ubuntu
  • run the focused test repeatedly on Ubuntu and compare Python/Git versions
  • determine whether this is the same failure family as any other dirty-state timeout or process-lifecycle flakes

Done when

Either reproduce and fix the underlying race with a regression test, or collect enough repeated clean runs and diagnostic output to classify the event as runner-only. Preserve the fail-safe expectation: tracked or untracked changes must report dirty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sev:lowTribunal/triage: low severity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions