Skip to content

Pickup reservation pushes run the repository's git hooks #847

Closed

Description

@JacobStephens2

What happens

`src/pickup/reservation.rs` creates and releases the Pickup reservation (`refs/heads/thirdshift/pickup/`) with `git push --force-with-lease=…`, but without `--no-verify`. Every other thirdshift push (`src/git.rs`, `src/worktree/ownership.rs`) skips hooks, and the guide says so.

When the Launch directory has a pre-push hook, every reservation runs it. On a repo whose pre-push hook runs the full PHPUnit suite, each reservation took minutes and held the Pass lock. When the suite failed, the reservation was refused:

could not reserve refs/heads/thirdshift/pickup/712; check origin by hand before retrying (our token …): git push --force-with-lease=refs/heads/thirdshift/pickup/712: origin …:refs/heads/thirdshift/pickup/712 failed: error: failed to push some refs …
❌ Tests failed or coverage issues detected! Push aborted.

This happened 25 times in one cron log on thirdshift 0.12.2.

Fix

Add `--no-verify` to both pushes in `src/pickup/reservation.rs`: the reserve push (`--force-with-lease={reference}:`) and the release push in `Drop`. Add a test with a pre-push hook that fails, and check that the reservation still succeeds.

Workaround

Launch scheduled passes from a clone that has no hooks installed.

🤖 Generated with Claude Code

Activity

  1. JacobStephens2 commented on Oct 21, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: Pickup reservation pushes skip the repository's git hooks, as every other thirdshift push does

    Current behavior:
    A Pickup run reserves its Ready issue by pushing refs/heads/thirdshift/pickup/<n> to origin with an empty --force-with-lease, and releases it afterwards with a lease on its own token. Neither push passes --no-verify, so the Launch directory's pre-push hook runs on both. Every other push thirdshift makes passes --no-verify: the Issue branch, failed-run preservation and branch deletion. The guide also says thirdshift skips your repo's git hooks.

    Verified during triage with plain git against a bare origin. A pre-push hook that exits 1 rejects both the reserve push and the release push, exactly as the reservation code issues them, and both succeed with --no-verify.

    In production, a repository whose pre-push hook runs its whole test suite made each reservation take minutes while holding the Pass lock. Whenever the suite failed, the reservation was refused: 25 times in one cron log on 0.12.2. A refused release would also leave the reservation on origin, which keeps Pickup off that issue until the Day shift deletes the ref.

    Desired behavior:
    Both the reserve push and the release push skip git hooks. Nothing else about the reservation changes: the empty lease on create, the exact-token lease on release, the unique parentless commit, and the fail-closed handling of an uncertain remote outcome.

    Key interfaces:

    • The Pickup reservation's take (the reserve push) and its release on drop: both git push calls.
    • The test fixture that gives the Launch directory a pre-push hook rejecting every push (launch_has_rejecting_pre_push_hook). The Issue branch and failed-run push tests already use it.

    Acceptance criteria:

    • With a Launch directory pre-push hook that rejects every push, a Pickup run reserves its Ready issue, dispatches it and releases the reservation. Afterwards refs/heads/thirdshift/pickup/<n> is absent on origin.
    • That test fails if --no-verify is removed from either push.
    • Existing Pickup reservation tests (lost race, stale selection, uncertain remote outcome) pass unchanged.

    Out of scope:

    • Expiry or recovery of a crashed owner's reservation (ADR 0017 leaves that to the Day shift).
    • Which hooks other git commands run.
  2. added
    bug
    ready-for-agent
    in-progress
    and removed
    ready-for-agent
    on Oct 21, 2026
  3. removed
    in-progress
    on Oct 22, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions