Skip to content

fix(test): the workspace tripwire fails devops ci from every linked worktree #824

Closed

Description

@dan-petty

Context & Rationale

e8eaf4a (#749, PR #758) added a workspace tripwire to tests/conftest.py. After the test session, it reports each tracked file that tests changed. _is_git_file_modified returns True whenever <root>/.git/index doesn't exist, without asking git.

In a linked worktree, .git is a file that points at the main repository's worktrees/<name> directory, so that path never exists. uv run devops ci regenerates the docs and README while pytest runs. The tripwire then reports every regenerated file as "modified by tests", and the gate fails from any linked worktree even when every test passes. It turned up while delivering #819 from a worktree.

Every agent-built change in this repository is made in a linked worktree, and the pre-push hook runs this gate. e8eaf4a is in no tag (git tag --contains e8eaf4a prints nothing), so v0.2.24 would ship the regression.

Scope & Deliverables

  • Deliverable: _is_git_file_modified leaves finding the index to git diff --quiet. A git error exits non-zero and still counts as a change.
  • Acceptance criteria:
    • A test in tests/test_isolation_tripwire.py uses the existing nested_worktree fixture. A tracked file whose mtime changes but whose content doesn't is not reported. An edited one is reported.
    • The test fails against e8eaf4a's conftest.py.
    • uv run devops ci passes from a linked worktree.
  • Constraint: Tests never touch the network.

Strategic Alignment

Activity

  1. added this to the v0.2.24 milestone on Oct 1, 2026
  2. added
    type/bug
    priority/p0-critical
    scope/ci
    on Oct 1, 2026
  3. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Closed by #826, merged into release/v0.2.24.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  4. added a commit that references this issue on Oct 1, 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

    priority/p0-criticalscope/citype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions