Skip to content

fix(release): handle empty label search output - #6727

Merged
cv merged 1 commit into
mainfrom
codex/fix-empty-gh-label-list
Jul 12, 2026
Merged

fix(release): handle empty label search output#6727
cv merged 1 commit into
mainfrom
codex/fix-empty-gh-label-list

Conversation

@cv

@cv cv commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Post-tag carry-forward aborted before changing labels because gh label list --search exited successfully with no output and the release helper tried to parse that output as JSON. A successful empty label search now means no matching label, while PR and issue inventory remain fail-closed.

Changes

  • Accept successful empty output only for the target-label lookup so the helper can create a missing release label.
  • Keep empty, malformed, non-array, and failed PR or issue inventory queries from reporting false housekeeping success.
  • Add regression coverage that proves the empty label lookup reaches label creation and that empty PR or issue inventory still fails visibly.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: This changes an internal maintainer release-housekeeping helper and does not change user-facing commands, configuration, runtime behavior, or documentation.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification:
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run --project integration test/bump-stragglers.test.ts passed 10/10 after the hook formatter update.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: not run for this focused maintainer-helper fix.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved release housekeeping when label searches return no results, allowing missing labels to be created successfully.
    • Preserved clear error reporting when pull request or issue lookups return invalid or empty data.
  • Tests

    • Added coverage for successful label creation and lookup failure scenarios.

@cv cv added the v0.0.82 label Jul 12, 2026
@cv cv self-assigned this Jul 12, 2026
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f350b356-c57b-45d9-9dfb-59f42b8feecc

📥 Commits

Reviewing files that changed from the base of the PR and between 82aa4c2 and add2e6d.

📒 Files selected for processing (2)
  • .agents/skills/nemoclaw-maintainer-day/scripts/bump-stragglers.ts
  • test/bump-stragglers.test.ts

📝 Walkthrough

Walkthrough

The release housekeeping script now optionally converts empty GitHub CLI output to an empty array for label lookup. Tests cover successful label creation with empty output and parsing failures for empty PR or issue listings.

Changes

Release housekeeping

Layer / File(s) Summary
Empty-output parsing and label lookup
.agents/skills/nemoclaw-maintainer-day/scripts/bump-stragglers.ts
ghJsonArray accepts an empty-output option, and ensureReleaseLabel uses it for label searches.
Empty-output behavior tests
test/bump-stragglers.test.ts
Tests verify empty label output succeeds while empty PR or issue output produces parsing errors.

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

🚥 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main fix: handling empty label search output in release housekeeping.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-empty-gh-label-list

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

@github-code-quality

github-code-quality Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the codex/fix-empty-gh-l... branch remains at 79%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main 82aa4c2 codex/fix-empty-gh-l... add2e6d +/-
src/lib/platform.ts 86% 80% -6%
src/lib/shields/index.ts 70% 70% 0%

Updated July 12, 2026 21:58 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. This is isolated release-housekeeping tooling, not NemoClaw runtime, installer/onboarding, sandbox, credentials, policy, inference, deployment, or assistant user-flow code. The changed behavior is covered by focused unit-style tests that mock the gh CLI, so no live E2E job is warranted.

Optional E2E

  • None.

New E2E recommendations

  • None.

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: No advisor follow-up required beyond maintainer review.
Findings: 0 required · 0 warnings · 0 optional suggestions

Workflow run details

This is an automated review. Required findings need action before merge. Warnings and optional suggestions do not require a response or follow-up. A human maintainer makes the final merge decision.

@cv
cv merged commit 13bece6 into main Jul 12, 2026
54 checks passed
@cv
cv deleted the codex/fix-empty-gh-label-list branch July 12, 2026 22:00
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions bug-fix PR fixes a bug or regression labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants