Skip to content

Preserve PR sections when Loop Zero updates them from separate checkouts #1371

Done

Description

@eowca

A loopzero check in one checkout can erase a review summary that loopzero review just wrote from another checkout on the same host. Both commands can succeed and the review remains in the PR timeline, but the PR description loses its Review entry.

  1. Check A takes the lock on its own .loopzero directory, reads the PR description, and prepares a full-body PATCH with new Validation. It pauses before sending the PATCH. src/loopzero/cli.py:351 src/loopzero/cli.py:542 src/loopzero/cli.py:557 src/loopzero/cli.py:503

  2. Review B takes a different directory lock, reads the same description, and PATCHes in its Review entry. A's delayed whole-body PATCH then replaces B's update. src/loopzero/cli.py:854 src/loopzero/github.py:705

This remains reproducible on main after #1230, which serialized updates in a single worktree. Two local clones and a fake GitHub API reproduced the cross-checkout overwrite after Review had been written.

Acceptance

  • A deterministic shared-PR test pauses check before its PATCH, runs a review update from another checkout, and verifies that the final body retains both updates and unrelated prose.

  • Apply the same short repository-and-PR lock around each live-body read, edit, and PATCH in check, review, and pr. Leave the receipt lock scoped to the worktree. Updates to different PRs can run independently.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions