Skip to content

fix(e2e): accept bot-authored upgrade PRs for admission - #13273

Merged
prekshivyas merged 1 commit into
mainfrom
codex/fix-upgrade-admission-bot-author
Oct 15, 2026
Merged

prekshivyas merged 1 commit into
mainfrom
codex/fix-upgrade-admission-bot-author

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Upgrade admission accepts a same-repository PR authored by a GitHub App bot. It still requires an approval from a different human with current maintain or admin permission, bound to the exact head and base commits.

Reason

The trusted verifier on main rejects #12603 before it reads approvals because its author is nvidia-nemopatch-writer[bot]. This blocks candidate admission and check-hash even though the PR's repository, head, and base match the expected values.

Related issues

Refs #12603.

Changes

  • Accept the GitHub App [bot] suffix only when parsing the PR author's login. Keep the existing human login and account-type checks for approvers.
  • Add regression tests for bot-authored PR admission with and without independent approval, and for a malformed bot login.
  • Clarify the bot-author and human-approval rule in the E2E README.

Verification

  • npx vitest run --project e2e-support test/e2e/support/candidate-upgrade-admission.test.ts — 46 tests passed after rebasing onto current main.
  • npm run checks:repository — all 18 checks passed.
  • npm run docs — 0 errors, 2 warnings.
  • git diff --check — passed.
  • Normal pre-commit, commit-msg, and pre-push hooks — passed. The pre-push hook ran through a credential restricted macOS sandbox while SSH transport stayed outside it.
  • The three-file diff contains no secrets, API keys, or credentials.

Review notes

tools/e2e/candidate-upgrade-admission.mts is a sensitive enforcement path. An independent documentation writer reviewed the code, tests, and README for writing and documentation accuracy: PASS, no findings. The trusted verifier change still awaits independent maintainer review. This draft does not claim approval or successful live E2E.


Signed-off-by: Prekshi Vyas prekshiv@nvidia.com

Summary by CodeRabbit

  • New Features
    • Candidate upgrade pull requests authored by GitHub App bots are accepted when an independent human maintainer approves them.
  • Bug Fixes
    • Bot-authored pull requests are rejected if their author login is malformed or the required approval is removed.

@copy-pr-bot

copy-pr-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: b3b2ab43-01f1-4aa6-ab39-f0f3bff6903b
📥 Commits

Reviewing files that changed from the base of the PR and between f2ed170 and 007befd.

📒 Files selected for processing: 3
  • test/e2e/README.md
  • test/e2e/support/candidate-upgrade-admission.test.ts
  • tools/e2e/candidate-upgrade-admission.mts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Walkthrough

Candidate upgrade admission now accepts PR author logins with an optional [bot] suffix. Tests cover valid bot authors, approval removal, and malformed bot logins. The admission instructions permit repository GitHub App bots and retain the self-approval prohibition.

Changes: Candidate upgrade admission

Layer / File(s) Summary
Validate PR authors and approvals
tools/e2e/candidate-upgrade-admission.mts, test/e2e/support/candidate-upgrade-admission.test.ts, test/e2e/README.md
The author login pattern allows an optional [bot] suffix. Tests cover bot-authored PR approval and rejection cases. The admission instructions permit repository GitHub App bots and retain the self-approval prohibition.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: brandonpelfrey

Merge Risk: 🔵 Low · up to 007be

Bot-authored upgrade PRs are now accepted. The check matches only the login's name format, not the author's GitHub account type, so it is looser than the documented rule. A human maintainer approval is still required, so the practical exposure is small. Consider tightening the check to author type Bot.

Pre-merge checks: Passed 4 · Failed 1

Failed 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 1 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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 and concisely describes the main change: accepting bot-authored upgrade pull requests for E2E admission.
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.
Full details: Docstring Coverage

Explanation

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 1 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-code-quality

github-code-quality Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd codex/fix-upgrade-ad... 007befd +/-
96% 97% +1%
View coverage of the 10 most impacted files.
File main 63002cd codex/fix-upgrade-ad... 007befd +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/ru...time-context.ts 100% 100% 0%
nemoclaw/src/sh...er-boundary.cts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

main 63002cd codex/fix-upgrade-ad... 007befd +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd codex/fix-upgrade-ad... 007befd +/-
src/lib/onboard.ts 62% 47% -15%
src/lib/actions...ess-recovery.ts 65% 78% +13%
src/lib/state/l...diness-lease.ts 66% 83% +17%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 71% +71%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 78% +78%
src/lib/inferen...ovider/index.ts 0% 88% +88%
src/lib/onboard...ternal-image.ts 0% 91% +91%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 15, 2026 16:19 UTC

@prekshivyas
prekshivyas marked this pull request as ready for review October 15, 2026 16:09

@deepujain deepujain left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Resolved: approving below.

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 007befd. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@deepujain deepujain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the narrow fix. The regex accepts only a trailing [bot], the malformed-suffix test covers that, and the approver checks (human User, maintain/admin, exact head and base) are unchanged. Admission still requires a same-repository head branch, so fork PRs stay out. LGTM.

Verified on 007befd39: Core CI, Candidate Upgrade Admission, check-hash, growth limits, DCO, and title lint passed (63 succeeded, 23 skipped, 0 failed). CodeRabbit review completed. PR Review Advisor passed.

@prekshivyas
prekshivyas merged commit 2ec17eb into main Oct 15, 2026
@prekshivyas
prekshivyas deleted the codex/fix-upgrade-admission-bot-author branch October 15, 2026 16:43
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance labels Oct 22, 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 area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants