Skip to content

Find unpublished Nightly drafts before publication - #121

Merged
bermanto merged 1 commit into
mainfrom
fix/nightly-draft-lookup
Sep 6, 2026
Merged

Find unpublished Nightly drafts before publication#121
bermanto merged 1 commit into
mainfrom
fix/nightly-draft-lookup

Conversation

@bermanto

@bermanto bermanto commented Sep 6, 2026

Copy link
Copy Markdown
Member

Nightly publication stops after successful signed staging because GitHub's release-by-tag REST endpoint does not return the unpublished draft. The 1.4.0 draft and signed archive remain intact.

Use the draft-aware gh release view lookup before publication and reject a changed or incomplete release identity. Existing Stable releases still stop at the existing guard. Public candidate verification and Stable isolation remain unchanged.

Validation: seven regression cases passed, including draft, prerelease, Stable, invalid identity, and lookup failure. The corrected lookup also read the real 1.4.0 draft without changing it. Full pnpm check and pnpm deploy:dry-run passed.

Recovery preserves the 1.4.0 archive from source 9e1aedccd357875dd1fca56dadb81e27819b6fe0, SHA-256 4495abaa496e7aee0f006cc63a25a9eb2493e27d2388ac165819ec49a7375673. Its signature and bytes were independently verified. Signing and all staging/cleanup checks passed in https://github.com/HQBase/hqbase/actions/runs/34058089481; only publication needs to resume.

Summary by CodeRabbit

  • Bug Fixes

    • Improved release publishing validation by confirming release identity and status before publishing.
    • Preserved accurate handling of missing releases and draft or prerelease states.
  • Tests

    • Added coverage for release lookup, identity validation, status handling, and error propagation.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: af755d69-4701-4a57-b38b-af723ca7c715

📥 Commits

Reviewing files that changed from the base of the PR and between 9e1aedc and 3bb2e87.

📒 Files selected for processing (2)
  • scripts/release/channels.mjs
  • test/unit/scripts/candidate-release.test.mjs

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The release flow now retrieves candidate metadata through gh release view, validates the release identity and status fields, and uses the validated flags during publishing. Unit tests cover valid metadata, invalid identity, missing fields, and lookup errors.

Changes

Release candidate validation

Layer / File(s) Summary
Candidate metadata retrieval and validation
scripts/release/channels.mjs, test/unit/scripts/candidate-release.test.mjs
Adds candidateRelease, which retrieves candidate metadata through the GitHub CLI, validates the tag and boolean status fields, and propagates lookup errors.
Publish candidate integration
scripts/release/channels.mjs
Updates publish to obtain draft and prerelease flags through candidateRelease.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 3bb2e

Nightly publication can now locate unpublished draft releases through the GitHub CLI while rejecting invalid release metadata. Existing publication guards remain in place, and no concrete merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: locating unpublished Nightly drafts before publication. It is concise and specific.
Description check ✅ Passed The description provides a clear summary, verification results, notes about recovery, and relevant validation details. It does not use the template headings or the requested pnpm check checkbox, but t…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/nightly-draft-lookup

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.

@bermanto
bermanto merged commit 31ffd49 into main Sep 6, 2026
7 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.

1 participant