Skip to content

fix: verify failed release rollback head - #10684

Merged
chubes4 merged 2 commits into
mainfrom
fix-10676-release-rollback-head
Jul 28, 2026
Merged

fix: verify failed release rollback head#10684
chubes4 merged 2 commits into
mainfrom
fix-10676-release-rollback-head

Conversation

@chubes4

@chubes4 chubes4 commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • restore a failed pre-publication release only when the checkout still points at the captured release commit or original HEAD
  • independently read and verify the final checkout HEAD before reporting rollback success
  • report interrupted rollback evidence and a supported recovery action when cleanup fails, verification mismatches, or concurrent movement is detected

Root cause

The checkout guard ran its cleanup commands and returned the final rev-parse value as evidence, but it never compared that observed SHA with the captured original HEAD. Orchestration treated any returned evidence as successful rollback and rendered Release commit rolled back, so a cleanup mismatch could be presented as restored even when the primary remained on the temporary release commit.

Rollback state transitions

  • captured: record the original ref, original HEAD, and original untracked set before release mutation
  • restoring: record the release commit, abort in-progress Git operations, clean generated state, and return to the captured ref
  • restored: move to the original HEAD only when the ref still points at the release commit or original HEAD, then independently verify git rev-parse HEAD == original_head
  • interrupted: preserve an unexpected concurrently moved HEAD, or report any cleanup/read/verification failure without claiming rollback success

Evidence

run.result.rollback now reports:

  • status: restored or interrupted
  • original_head
  • temporary_head (retained compatibility field)
  • release_commit
  • final_head, populated only by the independent post-cleanup read
  • tag_state
  • error when cleanup or verification is incomplete
  • recovery_action for interrupted releases

An interrupted result is forced to failed status and the human summary says Release commit recovery interrupted with actual HEAD instead of rolled back.

Concurrent movement

The transaction compares HEAD immediately before the destructive restore. If another actor moved the branch away from both the captured release commit and original HEAD, Homeboy does not overwrite that movement. It records the independently observed final HEAD and reports an interrupted, recoverable release.

Verification

  • cargo test -p homeboy-release checkout_guard::tests --lib (4 passed)
  • cargo test -p homeboy-release release_summary_ --lib (4 passed)
  • homeboy review lint homeboy --path . --changed-since origin/main --placement local --summary (passed, zero findings, zero formatting drift)
  • homeboy review test homeboy --path . --changed-since origin/main --placement local --json-summary (passed; differential selector found no additional impacted tests)
  • git diff --check (passed)

Closes #10676

@homeboy-ci

homeboy-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — homeboy

Lint

⚠️ review lint — baseline red

Deep dive: homeboy review lint homeboy --changed-since c71ae5a

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-homeboy-review-lint-homeboy-Linux contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-homeboy-review-lint-homeboy-Linux contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/homeboy/actions/runs/30404682236

Audit

review audit — passed

  • core_boundary_leak:core-agnostic-source — 173 finding(s)
  • core_boundary_leak:detector-agnostic-source — 31 finding(s)
  • structural — 29 finding(s)
  • constant_bypass_literal — 11 finding(s)
  • dead_code — 9 finding(s)
  • intra-method-duplication — 9 finding(s)
  • skeleton-duplication — 6 finding(s)
  • near-duplication — 2 finding(s)
  • command_status_contracts — 1 finding(s)
  • direct_aggregate_construction — 1 finding(s)
  • Total: 276 finding(s)

Deep dive: homeboy review audit homeboy --changed-since c71ae5a

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-homeboy-review-audit-homeboy-Linux contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-homeboy-review-audit-homeboy-Linux contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/homeboy/actions/runs/30404682236
Tooling versions
  • Homeboy CLI: homeboy 0.321.1+2ed500ec21ba-dirty+2ed500ec2
  • Extension: rust from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: c75e1822
  • Action: unknown@unknown

@chubes4
chubes4 merged commit c4335bb into main Jul 28, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: restore primary HEAD after failed release packaging

1 participant