Skip to content

[codex] Resolve stale auto-release blockers after scheduled publish - #392

Merged
unbraind merged 3 commits into
mainfrom
codex/auto-release-issue-resolution
Jun 27, 2026
Merged

unbraind merged 3 commits into
mainfrom
codex/auto-release-issue-resolution

Conversation

@unbraind

@unbraind unbraind commented Jun 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Close the stale Auto Release blocked: scheduled run failed issue after a scheduled Auto Release publishes a tag and the downstream Release workflow succeeds.
  • Preserve the existing failure alert path for genuinely blocked scheduled runs, including the external RELEASE_PAT blocker tracked by issue Auto Release blocked: scheduled run failed #374.
  • Document the scheduled-success issue cleanup and extend the workflow contract test so the release automation behavior remains covered.
  • Record pm-7zs0 evidence and refresh the managed pm-changelog@2026.6.27 metadata from the latest package-owned changelog check.

Validation

  • node scripts/run-tests.mjs test -- tests/integration/ci-workflow-contract.spec.ts
  • PM_AUTHOR=claude-code-agent pm test pm-7zs0 --run --progress (7/7)
  • pnpm build
  • pnpm typecheck
  • pnpm lint
  • pnpm quality:static
  • pnpm contracts:check
  • pnpm security:scan
  • pnpm audit --audit-level moderate
  • pnpm changelog:pm:check (pm-changelog@2026.6.27, CHANGELOG.md unchanged)
  • pm health --check-only --summary --json
  • pm validate --check-resolution --check-history-drift --json (history drift ok; existing resolution metadata backlog remains)
  • node scripts/run-tests.mjs coverage (100/100/100/100)
  • node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode best-effort (critical=0 high=0; telemetry finish_error_rate_pct=0.76)
  • isolated temp-directory smoke with sandboxed PM_PATH and PM_GLOBAL_PATH

Tracker


Summary by cubic

Stops stale "Auto Release blocked" issues from lingering by auto-closing them after a scheduled publish succeeds and the downstream Release workflow completes. Hardens the guard so cleanup runs only when a tag was actually published.

  • Bug Fixes
    • Close the open "Auto Release blocked: scheduled run failed" only after a tag is published and the Release workflow succeeds; comment includes the run URL, tag, and exported published_sha.
    • Harden the success guard to run cleanup only when published_tag exists so skipped/no-publish runs never enter cleanup.
    • Make the cleanup best‑effort: log and exit 0 if GitHub issue query/close fails so a successful publish cannot trigger a false blocked‑release alert.
    • Update docs and the workflow contract test to cover the new step, outputs, and guard; preserve existing failure alerts and keep the external RELEASE_PAT blocker in Auto Release blocked: scheduled run failed #374 unchanged.

Written for commit 3643418. Summary will update on new commits.

Review in cubic

Add a scheduled-success cleanup step to the Auto Release workflow so a stale blocked-release GitHub issue is closed only after the scheduled path publishes a tag and the downstream Release workflow completes successfully.

Document the release-health behavior, extend the workflow contract test, refresh managed pm-changelog metadata from the latest package check, and record pm-7zs0 evidence for linked tests, coverage, telemetry, changelog, health, validation, and temp-directory smoke results.
@coderabbitai

coderabbitai Bot commented Jun 27, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new step in the auto-release workflow that, on successful scheduled runs where a tag was published, finds and closes any open "Auto Release blocked" GitHub issue with a comment. The pipeline step receives an id and exports published_tag to GITHUB_OUTPUT. A contract test assertion and a RELEASING.md bullet document the behavior.

Changes

Auto-release blocked issue cleanup

Layer / File(s) Summary
Workflow: published_tag output and issue resolution step
.github/workflows/auto-release.yml
Assigns id: auto_release to the pipeline step, writes published_tag to GITHUB_OUTPUT, and adds a conditional "Resolve blocked scheduled auto-release issue" step that closes the stale blocker issue with a tag/run/SHA comment on successful scheduled runs.
Contract test and release docs
tests/integration/ci-workflow-contract.spec.ts, docs/RELEASING.md
Extends autoReleaseWorkflow contract assertions to require the auto_release step emitting published_tag and closing the blocked issue with reason completed. Adds a RELEASING.md bullet describing the post-release issue closure.
Agent task metadata
.agents/pm/extensions/.managed-extensions.json, .agents/pm/history/pm-7zs0.jsonl, .agents/pm/reminders/pm-7zs0.toon
Updates PM agent task history, reminder assignee/metadata, and extension timestamp to record implementation evidence, expanded test coverage, and verification results.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • unbraind/pm-cli#364: Adds issues: write permission so the failure alert step can create the "Auto Release blocked" issue — directly related infrastructure for the blocker issue this PR closes.
  • unbraind/pm-cli#375: Modifies the same workflow and ci-workflow-contract.spec.ts around the "Auto Release blocked" scheduled-run issue handling, adding preflight/failure-cause details — directly complementary to this PR's success-path closure.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: closing stale auto-release blockers after a successful scheduled publish.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description check ✅ Passed The description matches the workflow cleanup, docs, test, evidence, and metadata updates in the changeset.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@unbraind
unbraind marked this pull request as ready for review June 27, 2026 23:33
@unbraind

Copy link
Copy Markdown
Owner Author

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@sourcery-ai sourcery-ai 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.

Sorry @unbraind, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026 •

Copy link
Copy Markdown

@unbraind Re-running a full review of this PR, with attention to the scheduled auto-release cleanup path, preservation of the genuine blocker flow for #374, and the workflow contract/doc updates.

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request implements a cleanup mechanism for scheduled Auto Release runs, ensuring that any open "Auto Release blocked" GitHub issues are closed automatically after a successful release. It updates the relevant documentation, PM agent metadata, and the CI workflow contract integration tests. The reviewer identified a potential issue in the GitHub Actions workflow conditional expression where comparing a skipped step's output to an empty string can evaluate to true unexpectedly, and suggested a more robust truthiness check.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

"id: auto_release",
"echo \"published_tag=${NEW_TAG}\" >> \"${GITHUB_OUTPUT}\"",
"name: Resolve blocked scheduled auto-release issue",
"if: success() && github.event_name == 'schedule' && steps.auto_release.outputs.published_tag != ''",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

In GitHub Actions, comparing a step output to an empty string using != '' can lead to unexpected behavior if the step is skipped or does not run. In such cases, steps.auto_release.outputs.published_tag evaluates to null, and since null != '' is true in GitHub Actions expressions, the condition will evaluate to true unexpectedly.

To make this check robust against null or undefined outputs, it is safer and more idiomatic to check the truthiness of the output directly:
steps.auto_release.outputs.published_tag

Suggested change
"if: success() && github.event_name == 'schedule' && steps.auto_release.outputs.published_tag != ''",
"if: success() && github.event_name == 'schedule' && steps.auto_release.outputs.published_tag",

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request implements an automated lifecycle cleanup for scheduled Auto Release issues. When a scheduled auto-release run successfully publishes a tag and the downstream release workflow succeeds, any open "Auto Release blocked" issue is automatically closed. This behavior is documented in docs/RELEASING.md and verified in the integration tests (tests/integration/ci-workflow-contract.spec.ts). Project management metadata and history files have also been updated. There are no review comments provided, so I have no feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@greptile-apps

greptile-apps Bot commented Jun 27, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR closes stale "Auto Release blocked: scheduled run failed" GitHub issues automatically after a successful scheduled publish completes the downstream Release workflow. It adds output exports (published_tag, published_sha) to the existing release step, inserts a best-effort cleanup step that runs only when a tag was actually published, and updates docs and contract tests to match.

  • Adds id: auto_release to the pipeline step and captures published_tag/published_sha outputs after gh run watch confirms the Release workflow succeeded; outputs are only written when a tag was pushed.
  • Introduces "Resolve blocked scheduled auto-release issue" with two if !-guarded API calls that each fall back to exit 0, ensuring a transient GitHub API hiccup can never flip the job to failure() and trigger the downstream alert step.
  • Extends the CI workflow contract test with string-presence assertions covering the new step's key identifiers, guard expression, env vars, and all four log messages.

Confidence Score: 5/5

Safe to merge — the cleanup step is fully best-effort and cannot affect the job success/failure signal for either the publishing outcome or the downstream alert path.

Both GitHub API calls are wrapped in if-not/exit-0 guards so transient failures leave the job successful. The published_tag truthiness check prevents cleanup from running on dry-run or no-publish executions. The success()/failure() guards on the cleanup and alert steps are mutually exclusive. Contract test coverage matches the new step structure.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/auto-release.yml Adds published_tag/published_sha outputs and a best-effort cleanup step that closes stale blocker issues only after a real scheduled publish; both critical API calls are guarded with if-not/exit-0 patterns to prevent false failure alerts.
tests/integration/ci-workflow-contract.spec.ts Extends workflow contract test with string-presence checks covering the new step name, guard expression, output references, env vars, and all four user-visible log messages in the cleanup path.
docs/RELEASING.md Single-bullet addition documenting the new scheduled-success issue cleanup behavior; accurate and consistent with the workflow change.

Reviews (3): Last reviewed commit: "Harden auto-release cleanup output guard" | Re-trigger Greptile

Comment thread .github/workflows/auto-release.yml Resolved

@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.yml:
- Around line 177-193: The close-body currently uses github.sha, which points to
the scheduled trigger commit instead of the commit actually tagged by
auto_release. Update the auto-release workflow step that builds the blocker
comment to use the tagged release commit SHA exported from the auto_release job
(for example via the new tag’s commit lookup), and wire that value into the
Commit field alongside RELEASE_TAG and RUN_URL, or remove the Commit line if you
cannot provide the correct tagged commit.
🪄 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: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: b902f038-d8c0-4a93-ab08-bc038ece27da

📥 Commits

Reviewing files that changed from the base of the PR and between e67617f and 03d5bbc.

📒 Files selected for processing (6)
  • .agents/pm/extensions/.managed-extensions.json
  • .agents/pm/history/pm-7zs0.jsonl
  • .agents/pm/reminders/pm-7zs0.toon
  • .github/workflows/auto-release.yml
  • docs/RELEASING.md
  • tests/integration/ci-workflow-contract.spec.ts

Comment thread .github/workflows/auto-release.yml Resolved
@codecov

codecov Bot commented Jun 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 6 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread .github/workflows/auto-release.yml Resolved
Comment thread .github/workflows/auto-release.yml Resolved
Export the tagged release commit SHA for the stale-blocker close comment and make the success-path issue cleanup best-effort so a GitHub issue API failure cannot turn a successful scheduled publish into a false blocked-release alert.

Extend the workflow contract assertions and record post-review pm-7zs0 validation evidence.
@unbraind

Copy link
Copy Markdown
Owner Author

Post-review fixes pushed in 56d0bb1. Please review the current head again.

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026 •

Copy link
Copy Markdown

@unbraind Re-running a full review of the current head, with attention to the post-review fixes in 56d0bb15, the scheduled auto-release cleanup path, preservation of the genuine blocker flow for #374, and the workflow contract/doc updates.

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request implements an automatic resolution mechanism for blocked scheduled auto-releases. When a scheduled run successfully publishes a tag and the downstream release workflow succeeds, any open 'Auto Release blocked' issue is automatically closed. These changes are documented in docs/RELEASING.md and verified in tests/integration/ci-workflow-contract.spec.ts. There are no review comments to evaluate, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Use a direct published_tag truthiness check for the scheduled-success cleanup guard so skipped or no-publish runs with absent outputs cannot enter stale issue cleanup.

Record the final PR review fix evidence in pm-7zs0 and keep the workflow contract aligned.
@unbraind

Copy link
Copy Markdown
Owner Author

Final guard fix pushed in 3643418 for the unresolved Gemini thread. Please review the current head again.

@codex review
/gemini review
@gemini-code-assist
@coderabbitai full review

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026 •

Copy link
Copy Markdown

@unbraind Re-running a full review of the current head, with attention to the final guard fix in 36434181 and the previously unresolved Gemini thread.

✅ Action performed

Full review finished.

@unbraind
unbraind merged commit 488ed7a into main Jun 27, 2026
19 checks passed
@unbraind
unbraind deleted the codex/auto-release-issue-resolution branch June 27, 2026 23:59
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