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

Merged
UN
4mo ago
+86-6

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 #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

  • pm item: pm-7zs0
  • GitHub issue context: #374 remains open until the release environment has RELEASE_PAT configured and a scheduled publish succeeds.

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 #374 unchanged.