Skip to content

One Architect run per repository at a time, with a skipped outcome #247

Closed

Description

@JacobStephens2

Parent

#237

What to build

Only one Architect run per repository runs at a time on a machine. A thirdshift architect started while another on the same repository is still running, the Spec run or Run it dispatched included, is skipped: it prints an Architect run is already running on <owner>/<repo>, does nothing else, and exits 0. This holds for every Architect run, however it was started; there is no scheduled mode.

This Ticket introduces the skipped outcome of an Architect run and its Run notification. Skipped is not a failure, and a skipped run still sends its one notification when one was asked for.

The rule is held by an operating-system advisory lock, keyed by the repository, that the Architect run's process takes without waiting and holds until it exits. The operating system releases it when the process ends for any reason, so thirdshift never deletes or times out a lock. Runs and Spec runs started by hand on an Issue URL don't take it.

Acceptance criteria

  • With one Architect run held mid-review, a second on the same repository exits 0, prints the skip line as a progress line on stderr, prints nothing on stdout, and starts no agent session.
  • The same happens while the first Architect run's dispatched Spec run or Run is still going.
  • A skipped run does no launch pull, creates no worktree, and files or labels no issue.
  • After the first run ends, or is killed, a new Architect run on that repository runs normally, with no cleanup by the user.
  • An Architect run on a different repository at the same time is not skipped.
  • A skipped run that asked for a Run notification sends exactly one, with the outcome skipped in its subject and the reason in its body.
  • The Run notification's checks are made before the lock is tried, so a skip is always notified when one was asked for.
  • thirdshift help and the README describe the rule, and the README's advice to run only one Architect run per repository at a time is replaced by it.
  • End-to-end cases in the Architect run tests cover the above.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions