Skip to content

Fix auto-release recovery workflow - #44

Merged
flyingrobots merged 2 commits into
mainfrom
fix/auto-release-recovery
Jun 25, 2026
Merged

Fix auto-release recovery workflow#44
flyingrobots merged 2 commits into
mainfrom
fix/auto-release-recovery

Conversation

@flyingrobots

Copy link
Copy Markdown
Owner

Summary

Fixes the release automation failure observed after PR #43 merged by making the Auto Release Tag workflow manually recoverable and idempotent for a verified tag + sha.

Changes:

  • Add workflow_dispatch inputs to .github/workflows/auto-release-tag.yml for explicit tag and verified main sha recovery.
  • Validate manual recovery SHA shape, SemVer tag shape, release notes presence, and reachability from origin/main before tag creation.
  • Replace the failed Git extraheader auth path with an explicit authenticated remote used only for ls-remote, fetch, and push.
  • Keep existing idempotent behavior: existing same-target tags are accepted; different-target tags still fail without mutation.
  • Update release-process policy and runbook to document the preferred idempotent workflow-dispatch recovery path.

RED

  • cargo test -p xtask auto_release_tag_manual_dispatch_checks_verified_main_sha failed before workflow_dispatch recovery existed.
  • cargo test -p xtask auto_release_tag_uses_ephemeral_push_credentials failed before the workflow used an authenticated remote for Git network operations.
  • cargo test -p xtask auto_release_tag_workflow_is_guarded failed before manual recovery was represented in the workflow/policy contract.

GREEN / VERIFY

  • cargo test -p xtask auto_release_tag_manual_dispatch_checks_verified_main_sha
  • cargo test -p xtask auto_release_tag_uses_ephemeral_push_credentials
  • cargo test -p xtask auto_release_tag_workflow_is_guarded
  • cargo test -p xtask release_
  • actionlint .github/workflows/auto-release-tag.yml
  • npx markdownlint-cli2 docs/topics/release-process/runbook.md
  • cargo xtask verify

Release Recovery

After this PR lands, run:

gh workflow run auto-release-tag.yml \
  -f tag=v0.5.0-alpha.1 \
  -f sha=e680adf0a3ccc72559d1c4710e81010738918532

Then watch Auto Release Tag and Release workflows.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@flyingrobots, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 28 minutes and 31 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 684743d7-f5bc-43ab-85f2-c90f6cde8cee

📥 Commits

Reviewing files that changed from the base of the PR and between f5e0c10 and 855f60f.

📒 Files selected for processing (5)
  • .github/workflows/auto-release-tag.yml
  • docs/topics/release-process/policy.toml
  • docs/topics/release-process/runbook.md
  • docs/topics/release-process/test-plan.md
  • xtask/src/main.rs

Walkthrough

The release-tag workflow now supports manual dispatch alongside the existing CI-triggered path, validates the supplied commit against main, and publishes tags through an authenticated Git remote. Related policy, runbook, and test updates describe and verify the manual recovery path.

Changes

Manual release tag recovery

Layer / File(s) Summary
Manual dispatch contract
.github/workflows/auto-release-tag.yml, docs/topics/release-process/*, xtask/src/main.rs
workflow_dispatch adds tag and SHA inputs, release-policy settings record the manual recovery trigger and SHA rule, the runbook describes the dispatch fallback, and the workflow-guard test checks the new trigger and inputs.
Manual recovery validation
.github/workflows/auto-release-tag.yml, xtask/src/main.rs
The identify-release-pr job now branches on manual dispatch, validates tag and SHA formats, checks SHA reachability from origin/main, verifies the release notes file, and emits release=true, tag, pr=manual, and sha; the new test asserts that contract.
Authenticated tag publishing
.github/workflows/auto-release-tag.yml, xtask/src/main.rs
create-release-tag now builds AUTHENTICATED_ORIGIN and uses it for tag lookup, fetch, and push, replacing the extraheader-based Git setup; the credential test was updated to match the new command flow.

Sequence Diagram(s)

sequenceDiagram
  participant workflow_dispatch as "workflow_dispatch"
  participant identify_release_pr as "identify-release-pr"
  participant create_release_tag as "create-release-tag"
  participant origin_main as "origin/main"

  workflow_dispatch->>identify_release_pr: tag, sha inputs
  identify_release_pr->>origin_main: fetch tags and verify SHA ancestry
  identify_release_pr-->>create_release_tag: release=true, tag, pr=manual, sha
  create_release_tag->>origin_main: ls-remote, fetch, push tag via AUTHENTICATED_ORIGIN
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • flyingrobots/edict#43: Introduced the auto-release-tag workflow and xtask checks that this PR extends with manual dispatch recovery and authenticated tag publishing.

Poem

A tag woke up with SHA in hand ✨
It walked main’s path and stayed on land.
It fetched, it checked, it would not stray,
Then pushed its crown the proper way.
Release notes smiled: “All clear today.”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing the auto-release recovery workflow.
Description check ✅ Passed The description clearly matches the changeset and explains the manual recovery and idempotency updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5e0c10d5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/auto-release-tag.yml
Comment thread .github/workflows/auto-release-tag.yml
Comment thread docs/topics/release-process/policy.toml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/auto-release-tag.yml:
- Around line 57-89: The manual dispatch path in the auto-release workflow is
too permissive because it trusts INPUT_TAG after only a SemVer check, allowing
arbitrary release tags to be minted for any origin/main-reachable SHA. Update
the workflow logic around the workflow_dispatch branch to reuse the existing
commit-to-PR lookup used elsewhere in this job, derive the expected release-prep
tag from that PR, and require it to match INPUT_TAG (or set TAG directly from
the PR data). Keep the release notes file check, but ensure the TAG/sha pairing
cannot be manually mismatched before writing to GITHUB_OUTPUT.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5120a2b7-38e3-4b7f-b967-67baff0eb34f

📥 Commits

Reviewing files that changed from the base of the PR and between e680adf and f5e0c10.

📒 Files selected for processing (4)
  • .github/workflows/auto-release-tag.yml
  • docs/topics/release-process/policy.toml
  • docs/topics/release-process/runbook.md
  • xtask/src/main.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

**: # AGENTS

Git Rules

NEVER amend git commits. Make a new commit instead.

NEVER use git rebase unless the user explicitly approves a rare exception.
Use regular merge commits.

NEVER force any git operation. If a force operation appears necessary, stop and
explain what happened and what options remain.

NEVER create draft pull requests.

NEVER use a codex prefix in branch names, PR titles, or commit messages.

Pull request bodies for issue work MUST include GitHub auto-close text such as
Closes #123`` for every issue the PR is intended to close.

Think

Think is durable memory for cross-session coordination.

  • Use codex-think --remember --json when starting a new session, changing into
    this repository, or regaining context after a context shift.
  • Use codex-think "..." --json when a cycle closes or a significant event
    should survive across turns.
  • Treat Think as memory, not repo truth. Anchor strong claims back to files,
    commits, commands, issues, or pull requests.
  • Claude memories are read-only. Use claude-think --remember --json only for
    additional context.

Topic Shelves

docs/topics/ contains the living contract graph for landed behavior. Topic
shelves are not proposals, retrospectives, or design archaeology.

Each shelf may contain:

  • README.md: what is true in HEAD.
  • test-plan.md: how those truths are verified, including requirements, cases,
    fixtures, oracles, implemented evidence, planned cases, and known gaps.
  • architecture.md: optional structure or dataflow notes when the machinery
    earns a separate page.
  • rationale.md: optional still-relevant tradeoffs and rejected approaches.

When To Update Topic Shelves

For every nontrivial behavior, contract, workflow, release, schema, validation,
or public-surface change:

  1. Identify the owning topic shelf before editing code.
  2. If no shelf owns durable behavior, create one.
  3. Update test-plan.md before or alongside tests with requirement IDs, case
    IDs,...

Files:

  • docs/topics/release-process/policy.toml
  • docs/topics/release-process/runbook.md
  • xtask/src/main.rs

Comment thread .github/workflows/auto-release-tag.yml
@flyingrobots

Copy link
Copy Markdown
Owner Author

@codex please confirm this review-response pass.

Activity Summary

Source Severity File Commit Outcome
Codex P2 .github/workflows/auto-release-tag.yml 855f60f Manual recovery now requires a successful main CI run for the requested SHA before release outputs are written.
Codex P2 .github/workflows/auto-release-tag.yml 855f60f Manual recovery now requires exactly one merged release/*-prep PR for the SHA and derives the release tag from that PR.
Codex P1 docs/topics/release-process/test-plan.md 855f60f Added RELEASE-REQ-015 and RELEASE-TP-010 for the manual recovery contract.
CodeRabbit Major .github/workflows/auto-release-tag.yml 855f60f Operator INPUT_TAG must match the tag derived from the merged release-prep PR before the workflow can create or reuse a release tag.

RED/GREEN Evidence

RED observed before the fix:

  • cargo test -p xtask auto_release_tag_manual_dispatch_checks_verified_main_sha
  • cargo test -p xtask auto_release_tag_workflow_is_guarded
  • cargo test -p xtask auto_release_tag_workflow_scopes_job_permissions

GREEN after the fix:

  • cargo test -p xtask auto_release_tag_manual_dispatch_checks_verified_main_sha
  • cargo test -p xtask auto_release_tag_workflow_is_guarded
  • cargo test -p xtask auto_release_tag_workflow_scopes_job_permissions
  • actionlint .github/workflows/auto-release-tag.yml
  • npx markdownlint-cli2 docs/topics/release-process/runbook.md docs/topics/release-process/test-plan.md
  • cargo test -p xtask release_
  • cargo xtask verify

The actual recovery inputs were also probed against GitHub: merge commit e680adf0a3ccc72559d1c4710e81010738918532 has a successful main CI run and maps to merged PR #43 from release/v0.5.0-alpha.1-prep.

@flyingrobots
flyingrobots merged commit 2a224c5 into main Jun 25, 2026
3 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

Review-response confirmation

Confirmed: the review-response pass is valid on the current branch. I did not make any code changes, so I did not create a commit or PR.

Findings checked

Testing

  • cargo test -p xtask auto_release_tag_manual_dispatch_checks_verified_main_sha
  • cargo test -p xtask auto_release_tag_workflow_is_guarded
  • cargo test -p xtask auto_release_tag_workflow_scopes_job_permissions
  • ⚠️ actionlint .github/workflows/auto-release-tag.ymlactionlint is not installed in this environment.
  • ⚠️ npx markdownlint-cli2 docs/topics/release-process/runbook.md docs/topics/release-process/test-plan.md — npm registry access returned 403 Forbidden.
  • cargo test -p xtask release_
  • cargo xtask verify

View task →

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.

1 participant