Skip to content

fix(ci): clean up canonical retry reservations - #7465

Merged
prekshivyas merged 2 commits into
mainfrom
codex/7146-canonical-retry-cleanup
Jul 24, 2026
Merged

fix(ci): clean up canonical retry reservations#7465
prekshivyas merged 2 commits into
mainfrom
codex/7146-canonical-retry-cleanup

Conversation

@apurvvkumaria

@apurvvkumaria apurvvkumaria commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes an interrupted runner-loss retry reservation when GitHub exposes the reserved check through its canonical self URL. Before this change, the cleanup path accepted only a missing details URL and could leave the replacement check in progress after a lost create response.

Related Issue

Part of #7146. Parent epic: #7140.

Changes

  • Accept the exact https://github.com/<repository>/runs/<replacement-check-id> self URL for the immediately succeeding reserved replacement.
  • Retain the existing missing-URL compatibility path and the exact source identity, history position, status, title, and summary checks.
  • Cover missing URLs, matching canonical self URLs, unexpected reservation ownership, and mismatched self-link check IDs.

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 is an internal E2E retry-controller compatibility fix. The internal README already documents canonical GitHub check URLs and interrupted post-reservation cleanup.
  • 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: Independent focused review confirmed the replacement match remains exact and fail-closed; no actionable findings.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: Exact head 010d84cc0 changes only the internal PR E2E retry-cleanup controller and its focused tests. test/e2e/README.md already documents GitHub canonical /runs/<check-id> details URLs and that interrupted post-reservation cleanup closes the reserved replacement. No user-facing command, configuration, default, API, policy, or operator procedure changes.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit: Not applicable.
  • Station profile/scenario: Not applicable.
  • Result: Not applicable.
  • Supporting evidence: Not applicable.

Verification

  • PR description includes a Signed-off-by: line 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 — 159/159 focused PR-gate controller tests passed across six files; the exact cleanup suite passed 45/45.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: Not applicable to this bounded two-file cleanup guard. CLI build/typecheck, test-size, title-style, source-shape, project-membership, secret scan, and the full diff-scoped hook suite passed.
  • 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: Apurv Kumaria akumaria@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved retry handling for pull request checks when a replacement check is in progress.
    • Correctly recognizes valid GitHub check URLs during retry recovery.
    • Better handles ambiguous or incomplete retry scenarios without incorrectly abandoning the check.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria apurvvkumaria added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure v0.0.94 labels Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 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: a9d9ee5e-5559-459d-903d-1e2e4f273f78

📥 Commits

Reviewing files that changed from the base of the PR and between 04e6dfa and 010d84c.

📒 Files selected for processing (2)
  • test/pr-e2e-gate-runner-loss-retry.test.ts
  • tools/e2e/pr-e2e-gate.mts

📝 Walkthrough

Walkthrough

The retry-loss handling now recognizes the current GitHub check URL as a canonical replacement. End-to-end tests add shared output expectations and parameterized coverage for self-URL and ambiguous replacement scenarios.

Changes

Retry replacement handling

Layer / File(s) Summary
Canonical replacement detection and test coverage
tools/e2e/pr-e2e-gate.mts, test/pr-e2e-gate-runner-loss-retry.test.ts
abandonRunnerLossRetrySource accepts the current check’s GitHub runs URL, while tests parameterize replacement URLs, reserved output, and ambiguity cases.

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

Suggested reviewers: cv

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the CI retry reservation cleanup and the canonical self-URL behavior added in this change.
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.
✨ 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/7146-canonical-retry-cleanup

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

@github-code-quality

github-code-quality Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 3c4d325 in the codex/7146-canonical... branch remains at 96%, unchanged from commit a63ac38 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 3c4d325 in the codex/7146-canonical... branch remains at 80%, unchanged from commit 5faed2c in the main branch.

Show a code coverage summary of the most impacted files.
File main 5faed2c codex/7146-canonical... 3c4d325 +/-
src/lib/onboard...der-metadata.ts 100% 100% 0%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/domain/.../connect-env.ts 89% 97% +8%

Updated July 24, 2026 17:30 UTC

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions
Status: Canonical ledger: 0 blocker(s), 1 warning(s), 0 suggestion(s).

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 fewer warning, the same number of suggestions.

Nemotron output stays in workflow artifacts and does not change the assessment above.

Since last review: 0 prior items resolved · 0 still apply · 1 new item found

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-onboard, credential-sanitization, security-posture

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Document the GitHub self-URL recovery exception

  • Location: tools/e2e/pr-e2e-gate.mts:4480
  • Category: docs
  • Problem: The retry cleanup now accepts a reservation whose details URL is GitHub's self check URL. The code does not record the API behavior that creates this state, why the reservation creator cannot prevent it, or when this exception can be removed.
  • Impact: A future change can remove or broaden this fail-closed exception without knowing the external contract it preserves, which can misclassify a noncanonical replacement as a canonical reservation.
  • Recommendation: Add a concise code comment beside the self-URL condition. Name GitHub's check-run URL behavior, the lost-create recovery state, and the condition that permits removal.
  • Verification: Read the reservation creation path and the GitHub Check Runs API evidence used to establish whether GitHub can replace an absent details URL with `https://github.com/&lt;repository&gt;/runs/&lt;check-id&gt;\`.
  • Test coverage: The existing parameterized test covers the accepted self URL and a wrong self URL. Retain those cases and add a contract-focused test only if the documented upstream behavior has a distinct observable API response.
  • Evidence: `tools/e2e/pr-e2e-gate.mts:4480-4484` adds the self-URL alternative without an explanatory comment. `test/pr-e2e-gate-runner-loss-retry.test.ts:1055-1060` calls this case "GitHub's self check URL" but does not record the API contract or removal boundary. The retry cleanup is a recovery path for a lost create response, so the accepted representation is an external-system assumption.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@prekshivyas prekshivyas 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.

Reviewed exact head 3c4d325d7 against base 5faed2cbc. The canonical reserved replacement remains fail-closed: it accepts only the immediately succeeding in-progress check with the exact GitHub self URL, canonical identity/output, and matching check ID; mismatched self URLs remain rejected. The focused 45/45 tests, all required CI checks, selected E2E jobs, DCO, commit verification, and security scans pass. No blocking correctness or security findings.

@prekshivyas
prekshivyas merged commit 8fcd69c into main Jul 24, 2026
54 checks passed
@prekshivyas
prekshivyas deleted the codex/7146-canonical-retry-cleanup branch July 24, 2026 18:20
@senthilr-nv senthilr-nv mentioned this pull request Jul 25, 2026
23 tasks
senthilr-nv added a commit that referenced this pull request Jul 25, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Adds the canonical pre-tag `## v0.0.95` release entry to
`docs/changelog/2026-07-24.mdx`, before the existing v0.0.94 entry. The
entry summarizes approved user-visible changes merged since v0.0.94 and
excludes internal-only prerequisites.

## Changes

- Adds the v0.0.95 summary and detailed bullets for gateway lifecycle,
recovery, state transfer, inference compatibility, sandbox security,
Discord policy, and E2E evidence.
- Links each user-facing theme to the most specific published
documentation.
- Records the release entry in the shared native changelog used by the
OpenClaw, Hermes, and Deep Agents guides.

Source summary:

- [#7246](#7246),
[#7228](#7228),
[#7267](#7267),
[#7489](#7489),
[#7509](#7509),
[#7351](#7351), and
[#7290](#7290) ->
`docs/changelog/2026-07-24.mdx`: Gateway authority, forward teardown and
retry, managed recovery, Hermes restart recovery, scoped uninstall, and
orphan-aware backup behavior.
- [#7344](#7344) and
[#7416](#7416) ->
`docs/changelog/2026-07-24.mdx`: Atomic SQLite restore and host download
verification.
- [#7476](#7476),
[#7347](#7347),
[#7281](#7281),
[#7485](#7485),
[#7491](#7491), and
[#7422](#7422) ->
`docs/changelog/2026-07-24.mdx`: Windows Ollama reuse, CDI fallback,
bounded OpenRouter connection setup, Nemotron-3 request compatibility,
and managed Deep Agents retry and provider-error behavior.
- [#6884](#6884),
[#7481](#7481),
[#6878](#6878),
[#7467](#7467),
[#7502](#7502),
[#7503](#7503),
[#7504](#7504), and
[#7486](#7486) ->
`docs/changelog/2026-07-24.mdx`: Trusted base-image overrides, local
rebuild images, runtime validation, config preservation, reviewed
package updates, and fewer final-image payload layers.
- [#7303](#7303) ->
`docs/changelog/2026-07-24.mdx`: Scoped Discord application-command
management.
- [#7488](#7488),
[#7465](#7465),
[#7497](#7497),
[#7464](#7464),
[#7501](#7501),
[#7494](#7494), and
[#7493](#7493) ->
`docs/changelog/2026-07-24.mdx`: Selected-test risk signals, retry
cleanup, full root-image validation, direct-main Hermes setup, executed
PR-gate evidence, nightly history, and runner wait reporting.
- [#7447](#7447) is an internal
pinned-runtime prerequisite and is intentionally excluded from canonical
supported-integration documentation.
- [#7370](#7370) adds
maintainer-only advisory reconciliation tooling and does not change
supported user behavior.
- [#7495](#7495) updates existing
documentation and does not add a new v0.0.95 behavior claim.

## Type of Change

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

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification:
`test/changelog-docs.test.ts` validates the dated changelog structure,
heading uniqueness, and published links.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] 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:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: `docs/changelog/2026-07-24.mdx`; writing rules,
documentation style, factual release meaning, and published links
reviewed at exact head `58b02f2bf`.
- Agent: Codex documentation writer reviewer
<!-- docs-review-head-sha: 58b02f2 -->
<!-- docs-review-agents-blob-sha: 9c9b36d -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: `npx
vitest run test/changelog-docs.test.ts` passed 6 tests.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — the
build passed with 0 errors and 2 Fern warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
  * Added a new v0.0.95 changelog entry above v0.0.94.
* Documented improved externally supervised gateway lifecycle ownership.
  * Improved snapshot restore reliability and SQLite state handling.
  * Tightened CLI `backup-all` behavior and host artifact verification.
* Updated Windows onboarding guidance (including Ollama service reuse
and CDI directory fallback).
* Noted inference compatibility fixes, deeper agent failure
classification, stricter base-image validation, updated Discord bot
command permissions, and refined E2E release automation evidence
handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
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: e2e End-to-end tests, nightly failures, or validation infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants