Skip to content

Review Pass: name pull requests held by retained Review worktrees in the skip reason and Needs you #1962

Open

Description

@JacobStephens2

This was generated by AI during triage.

Problem

A review --author <login> Pass that skips every waiting pull request for a local branch or worktree conflict logs the same reason as one that found nothing to do:

Review run skipped: no waiting pull request by <login> on <owner>/<repo>

(src/processes/review.rs, where selected is None.) The per-pull-request skipping <url>: local branch/worktree conflict (unchanged; notification suppressed) line from conflicts::eligible goes only to stderr. With activity.quiet_skips = true, which the guide recommends for frequent schedules, it reaches no log at all. status, the Console Inbox and cronjobs show only that the Review Pass last fired seconds ago.

On 2026-11-10 this hid two pull requests that had been held for hours (one since 2026-11-05) by retained Review worktrees (#1961). The cron line looked healthy, the Activity log said there was nothing to review, and the Day shift saw nothing under Needs you. Finding the cause took an SSH session on the host and a manual comparison of reviewed_head markers against the pull requests' heads.

Proposed behavior (for triage to decide)

The Review Pass counterpart of #959 for Pickup:

  1. Name what is held in the skip reason. For example: no waiting pull request by <login> on <owner>/<repo>: #41, #42 held by retained Review worktrees. The reason then changes when the held set changes, so quiet_skips still records it once in the Activity log.
  2. Show it to the Day shift. Give status and the Console a Needs you row for each held pull request, with the retained worktree's path, its captured head, the pull request's current head, and the cleanup or recovery command.

Decisions needed

  • Should the Needs you row come from the conflict suppression files in ~/.thirdshift/review-conflicts/ (already written, cheap), or from a fresh check?
  • Should the reason also distinguish pull requests skipped because their head is already reviewed, waiting on a stacked base, or labelled in-progress, or only the conflict case, which is the one that needs a human?

Activity

  1. added
    enhancement
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 10, 2026
  2. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Investigation summary

    Confirmed against selected Base branch main at 60b1ca6. Recommend shaping this into a Spec with the Tickets proposed in the questionnaire.

    Evidence:

    • src/processes/review.rs:39-56 discards why candidates were rejected and always reports no waiting pull request by <author> on <repo> when none is selected.
    • src/processes/review/conflicts.rs saves only repository, PR number, branch and fingerprint. It returns false for conflicts and suppresses repeated notifications. It clears a saved file only when that candidate reaches admission again and has no conflict.
    • src/worktree/skill.rs exposes ReviewConflict as a fingerprint and error. Structured path and captured-head details would require extending the observation interface. The durable ownership record in src/worktree/review_recovery.rs contains the captured head and directory identities; unavailable or invalid evidence must remain distinguishable from verified ownership.
    • A scratch reproduction using real local Git and the existing fake GitHub confirmed that two conflicting local branches produce one generic Activity line across repeated quiet Passes, empty stderr, zero active runs and no status Command rows. Closing one PR leaves its conflict file present and adds no Activity line despite the changed held set.
    • Correction to the Report: status and the Console already expose idle Pass reasons through src/logs/reading.rs and src/console/inbox.html. Their Review reason is generic; the missing capability is actionable per-PR detail and Needs you rows. Cron jobs currently records only when the Pass fired.
    • The existing conflict case also includes unowned local branches and occupied worktrees. Calling every such conflict a retained Review worktree would be inaccurate.

    Recommended direction: persist structured, timestamped conflict observations from Review Pass admission; expose them through the shared status/Console read model; collect a stable, ordered held-PR set for the skip reason. Preserve notification deduplication and existing eligibility rules. Diagnostics must grant no cleanup authority; reuse preservation-first advice from src/worktree/advice.rs.

    Related issues are distinct: #1961 concerns recovering stranded fixes after a PR changes; #1960 concerns general Pass skip history. Keep recovery changes with #1961 and coordinate shared Pass presentation with #1960. No duplicate open issue was found.

    Validation: cargo test --test review_pass passed 14 tests, including retained-worktree recovery and conflict notification suppression; one subprocess entry point was ignored as intended. The scratch reproduction passed. scripts/affected-tests main reported no changed files and no affected tests. Repository source and Git history remain unchanged; nothing was written to GitHub.

    Questionnaire

    For the Day shift shaping #1962:

    The visibility gap is confirmed locally. Existing conflict files lack the requested details and can remain after a PR closes. The Inbox currently groups Commands, so per-PR holds also need an explicit lifecycle.

    1. Approve this proposed Spec split, or identify the boundary to change: Ticket A adds structured conflict observations with repository/PR/branch, conflict kind, observed time, worktree path, captured head, local head, observed PR head and preservation advice, with explicit unavailable values and legacy-file handling. Ticket B consumes those observations to name the sorted held PRs in the final skip reason, preserving unchanged-reason suppression and continuing past conflicts to eligible work. Ticket C adds the shared status text/JSON and Console Needs you presentation, including resolution, dismissal and duplicate-row behavior. B and C depend on A. This establishes the implementation boundaries.
    2. Should readers use durable last-observed facts, clearly timestamped, or must status and the Console freshly verify conflicts? Recommend producer-owned observations read through the shared Snapshot, with a defined refresh path for local cleanup and PR eligibility changes. This determines freshness guarantees and whether readers need repository access or additional GitHub reads.
    3. Should this cover every local branch/worktree conflict, distinguishing verified retained Review worktrees from other conflicts? Recommend yes, while leaving already-reviewed heads, stacked-base waits and in-progress PRs under their existing eligibility behavior. This avoids mislabelling conflicts and keeps the scope focused on actionable holds.
    4. What ends or hides a Needs you hold? Recommend clearing it after verified conflict-free admission, showing stale or unavailable observations explicitly, and supporting dismissal for the observed conflict state with changed conflicts returning. Decide whether closing/merging the PR also ends the row when preserved local work remains, and whether an existing failed Review Command row absorbs the hold details or remains separate. This establishes acceptance criteria for stale files, cleanup without another eligible Pass, and duplicate rows.
  3. added
    ready-for-human
    and removed
    in-progress
    on Nov 11, 2026
  4. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    More evidence: a Review worktree a Review run left in /tmp/thirdshift-review-* (thirdshift 0.27.2) kept holding its pull request's head branch. The scheduled Fix Pass on that host took the same pull request every pass and failed at git worktree add … is already used by worktree at /tmp/thirdshift-review-…. That made 47 failed Commands with the same cause, each in Needs you, until the Day shift removed the worktree (its head matched origin; it held only Node/Playwright/Chrome caches).

    So besides naming held pull requests in the skip reason, the Fix Pass should skip a pull request whose branch is held by a retained worktree, as the Review Pass would, instead of failing on it every pass. Related: #1961 (why the worktree was retained).

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

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions