Skip to content

test: test_2742 lock-free status control intermittently loses its teeth in CI (sampler misses index.lock) #4256

Closed

Description

@vybe

What happened

tests/unit/test_2742_git_status_lock_free.py::TestStatusReadIsLockFree::test_status_read_is_never_seen_holding_the_index_lock failed once on the merge-train integration PR #4254 (run 41931694084, pytest (head, seed 12345)), as the only new failure against a 0-failure cached dev baseline:

AssertionError: control lost its teeth: the plain argv was never observed holding index.lock, so a zero for the flagged argv proves nothing

The product assertion did not fail (flagged == 0 held). What failed is the test's control: a busy-poll existence sampler thread must SEE .git/index.lock while a plain git status runs, and on a loaded xdist runner the lock window was too short for the sampler to catch it. None of the five train members (#4176, #4203, #4103, #4171, #4243) changes the status argv or git_service status path (#4203 touches git_service/token_scrub.py only), and every member's own regression diff was green on the same tests.

Why it matters

A control that depends on winning a race against git's own lock window is an intermittent by construction. On a merge train it costs a full workflow re-run (~25 min) per occurrence and reads as an interaction failure until attributed. Same shape as #4137 / #4138.

Acceptance

  • The control makes the lock window deterministic (for example, run the plain argv against a repository large enough, or with a pre-seeded index.lock holder, or sample with a lower-level hook) rather than racing a sampler thread against a sub-millisecond window, OR
  • the control is retried/widened in a way that cannot pass vacuously, and the reason is written in the module docstring.
  • The property assertion (flagged == 0, and the before == after index corollary) keeps its teeth.

Evidence

Activity

  1. added
    type-bug
    theme-reliability
    complexity-low
    on Nov 4, 2026
  2. AndriiPasternak31 commented on Nov 4, 2026

    @AndriiPasternak31
    Contributor

    /claim

  3. github-actions commented on Nov 4, 2026

    @github-actions

    @AndriiPasternak31 This issue is already assigned to AndriiPasternak31. Use /unclaim first if you want to take over.

  4. added
    status-in-dev
    and removed
    status-in-progress
    on Nov 6, 2026
  5. removed
    status-in-dev
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

complexity-lowpriority-p2theme-reliabilitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions