Skip to content

Resume, targeted Fix recovery, unpublished-tag recovery, --with-experiment, and --review #2159

Closed

Description

@JacobStephens2

Parent

#2054

What to build

Complete thirdshift release's resilience and operator controls by adding unfinished-release resume and unpublished-tag recovery, single-attempt targeted Fix run recovery on bump pull requests, optional --with-experiment release gating, and interactive --review summary editing.

  • Unfinished release discovery, resume, and unpublished-tag recovery: After acquiring the release lock and reservation, thirdshift release checks origin for an unfinished release-<X.Y.Z> branch, open Release <X.Y.Z> pull request, or unpublished v<X.Y.Z> tag newer than the latest published GitHub Release (never moving an already-published GitHub Release, and refusing if GitHub Release publication state cannot be verified):
    • In Pass mode, machine-recoverable states (a pushed exact-bump branch without a pull request, an open non-draft exact-bump pull request waiting on CI, or a completed failed release workflow run whose GitHub Release was never published) are automatically adopted and resumed/recovered (honouring any higher requested bump flag when re-cutting from newer main), whereas human-blocked states (a draft bump pull request left after a failed Fix run, non-bump commits on release-<X.Y.Z>, or an unverifiable publication check) cause the Pass to skip quietly naming the blocked release rather than repeatedly failing into Needs you.
    • In direct <version> mode, thirdshift release <version> resumes or recovers that exact version and refuses with clear recovery instructions if a different unfinished version is live or if <version> is closed or human-blocked.
  • Targeted Fix run recovery on bump PRs: While waiting on Release <version> checks and mergeability, if the pull request hits a Merge conflict or a completed failing check run, thirdshift release runs at most one in-process targeted Fix run (--no-merge --no-base-fix), verifies the resulting head still has a Git tree identical to its origin/main merge-base plus only the exact Cargo manifest/lockfile version bump, refreshes any requested Experiment and release summary if the content base moved, and stops before pushing v<version> if the pull request was converted to draft or remains failing/conflicted.
  • Optional --with-experiment gating: Off by default; when passed (via CLI or admin-scoped POST /api/v1/start and Console Start controls), thirdshift release pins the selected content commit in a local candidate ref so interrupted runs resume cleanly, runs or resumes the release Experiment in-process against the last release tag on touched Eval suites (polling pending rechecks or leak decisions with periodic progress lines), prompts release anyway? [y/N] on fail or inconclusive only when standard input is a terminal, and fails cleanly when unattended.
  • Interactive --review: Validated before expensive work; refuses immediately when standard input is not a terminal, and on a terminal prints the summary and lets the maintainer accept, edit in $EDITOR, or cancel. Register release --review as a reasoned CLI-only exclusion in Console parity checks.

Acceptance criteria

  • Pass mode auto-resumes machine-recoverable unfinished release-<X.Y.Z> states (branch without PR, open non-draft exact-bump PR waiting on CI, and failed release workflow with no published GitHub Release) and skips quietly with a deduplicated Activity log entry when an unfinished release is human-blocked (draft bump PR, foreign commits on release-<X.Y.Z>, or unverifiable publication lookup).
  • Direct thirdshift release <version> resumes/recovers matching recoverable states, never moves an already-published GitHub Release, and fails with actionable recovery instructions when another unfinished version exists or <version> is closed or human-blocked.
  • On a bump PR Merge conflict or completed failing workflow, thirdshift release runs at most one in-process targeted Fix run (--no-merge --no-base-fix), re-validates the exact origin/main version-bump tree, refreshes --with-experiment and summary when the content base moved, and aborts before tagging if the PR becomes draft or stays failing.
  • --with-experiment runs/resumes the release Experiment in-process from the running binary (without cargo run on the Launch directory), pins the content commit across interruptions, allows interactive terminal override on fail/inconclusive, fails unattended on fail/inconclusive, and is exposed on admin-scoped POST /api/v1/start and Console Start controls.
  • --review fails fast before expensive work when stdin is not a terminal, supports accept / $EDITOR edit / cancel on a terminal, and passes Console CLI parity checks as a documented CLI-only flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-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