Skip to content

fix(e2e): avoid workflow run pagination cap - #12790

Merged
cv merged 2 commits into
mainfrom
codex/base-image-pagination-fix
Oct 7, 2026
Merged

cv merged 2 commits into
mainfrom
codex/base-image-pagination-fix

Conversation

@rsliter

@rsliter rsliter commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Full-main E2E can resolve the nearest eligible base-image publication when the workflow has more than 1,000 historical runs. The existing bounded broad lookup remains unchanged for normal history sizes; only the pagination-cap case falls back to exact eligible-commit queries.

Reason

Full E2E runs 37691085420 and 37694295327 failed before matrix generation because the unfiltered base-image workflow history exceeded the 10-page safety cap. Removing the cap would weaken the bounded GitHub API contract, so this keeps the cap and narrows the overflow lookup by trusted first-parent commit SHA.

Changes

  • Classify pagination-cap exhaustion separately from malformed or unstable API responses.
  • Query each eligible first-parent commit with head_sha only after the broad listing reaches the cap.
  • Reject any exact-query result whose returned head SHA does not match the requested commit.
  • Add focused regression coverage for the overflow fallback and its fail-closed provenance check.

The consumer is the full-main E2E base-image publication gate. A direct cap increase is insufficient because it would only postpone the same failure and expand unfiltered API work.

Verification

  • npx vitest run --project e2e-support test/e2e/support/base-image-publication.test.ts test/e2e/support/base-image-publication-pagination.test.ts — 2 files and 79 tests passed after integrating current main.
  • npm run test:changed — growth guardrails passed; before base integration, 5 affected files and 142 tests passed.
  • npm run test:projects:check — exact membership confirmed for 2,705 candidates across 7 projects.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli — passed.
  • Repository-managed pre-push validation — publication validation plus plugin, checked-JavaScript, and CLI TypeScript checks passed.
  • git diff --check origin/main...HEAD and manual diff inspection — passed; no secrets, API keys, or credentials are present.

Review notes

This changes the sensitive tools/e2e/** enforcement path. Pre-publication review was self-review only, so the PR remains draft until required CI and automated review are terminal with no actionable findings.


Signed-off-by: Rebecca Sliter [email protected]

Summary by CodeRabbit

  • Bug Fixes
    • Improved base image publication tracking for repositories with extensive workflow histories. Publication runs are now checked against the relevant commit, helping prevent mismatched runs from being accepted.

@rsliter rsliter self-assigned this Oct 7, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 7, 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 7, 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: 899b4a21-6531-4ab5-86c4-73ed2ecf01e7
📥 Commits

Reviewing files that changed from the base of the PR and between 1f37cf8 and 70084ea.

📒 Files selected for processing (2)
  • test/e2e/support/base-image-publication-pagination.test.ts
  • tools/e2e/base-image-publication.mts

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


📝 Walkthrough

Walkthrough

Workflow-run collection now falls back to per-SHA queries when broad pagination exceeds its page cap. It validates each returned run’s head_sha. New end-to-end tests cover the fallback queries and mismatched SHA rejection.

Changes

Publication-run pagination

Layer / File(s) Summary
Cap-specific fallback and integration
tools/e2e/base-image-publication.mts
Pagination cap exhaustion now raises a dedicated error. collectPublicationRuns catches that error, queries runs for each SHA in history.distanceBySha, validates returned SHAs, and combines the runs. Other errors propagate. waitForBaseImagePublication now uses this collector.
Fallback behavior tests
test/e2e/support/base-image-publication-pagination.test.ts
Tests simulate 1,001 runs and check per-SHA queries and matching-run selection. A separate test checks rejection when a returned run’s head_sha does not match the queried SHA.

Priority: ➖ Normal

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant WaitForBaseImagePublication
  participant CollectPublicationRuns
  participant GitHubWorkflowRunsAPI
  WaitForBaseImagePublication->>CollectPublicationRuns: collect runs with history
  CollectPublicationRuns->>GitHubWorkflowRunsAPI: paginate workflow runs
  GitHubWorkflowRunsAPI-->>CollectPublicationRuns: pagination cap exceeded
  CollectPublicationRuns->>GitHubWorkflowRunsAPI: query runs for each history SHA
  GitHubWorkflowRunsAPI-->>CollectPublicationRuns: runs for queried SHAs
  CollectPublicationRuns-->>WaitForBaseImagePublication: combined validated runs
Loading

Suggested reviewers: cv, apurvvkumaria

Merge Risk: ⚪ Minimal · up to 70084

No actionable merge-blocking risk remains from the reviewed pagination fallback after normal checks.

🚥 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 10 functions across 2 files. 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 and concisely describes the main change: preventing the E2E workflow run pagination cap from causing failures.
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 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@rsliter
rsliter marked this pull request as ready for review October 7, 2026 23:08
@github-code-quality

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

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 70084ea in the codex/base-image-pag... branch is 97%. The line coverage in commit 63002cd in the main branch is 96%.

Show a line coverage summary of the most impacted files.
File main 63002cd codex/base-image-pag... 70084ea +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
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/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

The overall line coverage in commit 70084ea in the codex/base-image-pag... branch is 85%. The line coverage in commit 63002cd in the main branch is 84%.

Show a line coverage summary of the most impacted files.
File main 63002cd codex/base-image-pag... 70084ea +/-
src/lib/actions.../status-text.ts 84% 46% -38%
src/lib/state/sandbox.ts 92% 82% -10%
src/lib/onboard...al-inference.ts 84% 90% +6%
src/lib/policy/index.ts 71% 80% +9%
src/lib/state/p...l-retirement.ts 79% 92% +13%
src/lib/onboard.../application.ts 55% 72% +17%
src/lib/inferen...nvidia/index.ts 0% 85% +85%
src/lib/adapter...gnostics-cli.ts 0% 87% +87%
src/lib/onboard...ternal-image.ts 0% 91% +91%
src/lib/securit...ig-structure.ts 0% 98% +98%

Updated October 07, 2026 23:23 UTC

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 70084ea. 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

@rsliter

rsliter commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

Advisor disposition for exact head 70084eaf66a904a04b51de0266d228937e7cbf5a: false positive; no code change warranted.

The verification specialist reported that collectPaginated would retry the capped broad listing three times, making the test's ten-request oracle incorrect. The implementation does not do that:

  1. collectPaginationAttempt throws PaginationCapExceededError immediately after page 10.
  2. collectPaginated does not catch that error, so its retry loop is exited on the first capped attempt.
  3. collectPublicationRuns catches that typed error and immediately starts the exact head_sha fallback.

The existing oracle therefore correctly expects ten broad requests followed by the three eligible-commit queries. I reverified the published head with:

npx vitest run --project e2e-support test/e2e/support/base-image-publication-pagination.test.ts -t 'queries eligible commits directly when workflow history exceeds 1,000 runs'

Result: 1 passed, 1 skipped. The worktree remained clean at the exact published head.

Evidence: Advisor blocker job, cap throw and fallback, request oracle.

@cv
cv merged commit bdace1e into main Oct 7, 2026
81 checks passed
@cv
cv deleted the codex/base-image-pagination-fix branch October 7, 2026 23:34
prekshivyas added a commit that referenced this pull request Oct 8, 2026
<!--
nemopatch:action=sha256:3d286db0269406f5d7f4ca1498088b786bfdbdfcb2b7a5c5b7160f9284b9dd2a
-->
<!--
nemopatch:manifest=sha256:aefb923570aafcfac1dbcdf63668265d81ce9b7edbc337468c1e7deb9ca18ff8
-->
<!-- nemopatch:dependency=OpenClaw -->
<!-- nemopatch:target=2026.9.5 -->

## Outcome

Adds reviewed OpenClaw 2026.9.5 archive and replacement-graph identities
while preserving the selected 2026.9.2 runtime and its existing trust
entries.

## Reason

The runtime migration in #12382 needs verified package identities and a
reviewed replacement graph before selecting 2026.9.5. This PR stages
that policy without changing the production runtime.

## Changes

- Preserve current runtime identities and security overrides; add the
2026.9.5 runtime, official channels (including Google Chat), Brave,
Tavily, and diagnostics archives.
- Bind the replacement runtime graph to the actual 2026.9.5 lockfile
digest and exercise the checked-in policy with that lock fixture.
- Document the staged transition, its removal condition, and the
existing candidate-owned audit boundary accurately.
- Record genuine AMD64 and ARM64 Pi receipts from run 37676667241, with
exact artifact digests bound by the existing authority check.

## Verification

- Current candidate: `791f72b6d902eb7bc7d99fe988705024ce750b29`,
including the merged SDK prerequisite #12765.
- [Core CI](https://github.com/NVIDIA/NemoClaw/actions/runs/37693760568)
and [managed-image
publication](https://github.com/NVIDIA/NemoClaw/actions/runs/37693760852)
passed on this candidate. Docker and rootless Podman activation each
completed 28 agent turns, all 13 phases and all 13 cleanup checks.
- Genuine AMD64 and ARM64 Pi receipts from source
`9abef33ddf73105c8f3f952ced9ce4eb53252126` remain valid: all Pi
Dockerfile and COPY inputs are unchanged. Signed commit and publication
hooks passed with every normal gate enabled.
- The staged 2026.9.5 lock also matches the retained genuine [CI audit
artifact](https://github.com/NVIDIA/NemoClaw/actions/runs/37714665179/artifacts/11522954535),
produced from runtime source `52a0fb1b8e25c3317f5ae62819b4f53420e7d908`.
Its lock hash matches the trust policy and decompressed fixture:
`b73ebd8bb5e15cfcf080a21beaca0dce50cbca903988b20be74d49c9498baeb7`. It
reports zero high or critical advisories and three moderate advisories;
the audit completed signature verification. This receipt expires on
2026-10-08 at 13:49:29 UTC.
- [Full manual E2E
37704093648](https://github.com/NVIDIA/NemoClaw/actions/runs/37704093648),
attempt 1, completed against trusted controller
`1828f2ab1d4685c876261e2ec812d91bcfbe2df0` and this exact candidate:
**73 successful jobs, nine leaf failures, one dependent aggregate
failure, and 15 skipped jobs**. It included all default jobs and the
authorized staging Brev Launchable job. The prior base-image lookup
blocker was fixed by merged #12790.
- 32 focused SDK and dependency-preparation tests passed during the
preceding integration; that is historical supporting evidence.
- The diff contains no secrets, API keys, or credentials.

## Full E2E findings

The GPU/local-inference lane passed all nine OpenClaw, Hermes, and Deep
Agents Code combinations across Ollama, vLLM, and NIM, plus three
rollback scenarios and cleanup. Its retained artifact matches the
published digest.

Five failed jobs also fail on [main baseline run
37701046910](https://github.com/NVIDIA/NemoClaw/actions/runs/37701046910):
Pi reports native-inference connection errors; OpenClaw native switching
rejects the fixture credential/endpoint combination with HTTP 401;
Hermes deferred onboarding, Hermes native switching, and Launchable fail
native sandbox inference with status 56. Launchable image selection,
source provenance, build, and gateway startup passed in both runs. The
owned Brev workspaces were deleted and independently verified absent.

The OpenClaw and Hermes Anthropic-switch jobs fail during test-module
loading because their fixture sandbox names exceed the existing
19-character limit. Both failures also occur on main baseline run
37701046910. The fixtures and validation source are identical to this
PR's base.

The two remaining lifecycle cases passed on this unchanged candidate in
[focused E2E run
37725448726](https://github.com/NVIDIA/NemoClaw/actions/runs/37725448726),
using trusted controller `b95c0be84e061ba781fedca55e3c1e47af8dcfe1`.
OpenClaw and Hermes double onboarding each passed all eight phases and
all cleanup actions. The credential-generation window passed all ten
phases, nine credential rotations, rebuild, and all six cleanup actions.
All three authentic artifact digests and the dispatch identity were
verified.

All nine original failed leaf-job logs and their available artifacts
were inspected. Seven failures are supported as shared issues on the
main baseline; the other two cases passed the authorized focused retry.
No unresolved candidate-owned E2E failure remains identified. The
historical full run remains failed, and the focused run is supplemental
evidence rather than a full-suite pass. The successful retry does not
establish the original intermittent root causes or repair the historical
cleanup evidence. Skipped jobs supply no pass evidence.

## Review notes

All nine specialists completed [Advisor run
37697027151](https://github.com/NVIDIA/NemoClaw/actions/runs/37697027151)
with no blocking findings on this candidate. All findings, summaries and
E2E recommendations were read. Required validation includes full E2E,
Hermes E2E and Pi qualification.

CI, managed images and all nine Advisor specialists are clear. The
full-run findings have the dispositions above, including successful
focused evidence for both previously unresolved lifecycle cases. Human
review remains required. CodeRabbit is deferred at the user's direction;
no merge is authorized.

---
Signed-off-by: Prekshi Vyas <[email protected]>

---------

Signed-off-by: Prekshi Vyas <[email protected]>
Co-authored-by: Prekshi Vyas <[email protected]>
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance labels Oct 14, 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: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants