Skip to content

ci(images): retry transient manifest registry reads - #8560

Merged
senthilr-nv merged 1 commit into
mainfrom
codex/fix-ghcr-manifest-auth-retry
Aug 7, 2026
Merged

ci(images): retry transient manifest registry reads#8560
senthilr-nv merged 1 commit into
mainfrom
codex/fix-ghcr-manifest-auth-retry

Conversation

@senthilr-nv

@senthilr-nv senthilr-nv commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Base-image publication can fail immediately after pushing a candidate manifest when GHCR's token endpoint transiently returns 403 Forbidden to the first manifest read. This change gives registry reads five bounded attempts while preserving the existing digest, platform, and provenance verification.

The failure was observed in main E2E run 31184501275, job 92888376997, propagated from Base Images run 31184501811, job 92886728421 (Build and push Hermes base image).

Changes

  • Route base-image manifest reads through one fixed-policy retry helper.
  • Preserve the final Docker exit status after five unsuccessful attempts.
  • Keep all existing source-digest, platform, candidate-manifest, and publication checks unchanged.
  • Add focused helper, workflow-shape, and opaque-input trigger coverage.

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 only internal GitHub Actions registry-read reliability; no user-facing command, configuration, default, or supported product behavior changes.
  • 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: Maintainer nine-category review passed. The retry is bounded, arguments remain quoted, terminal failures propagate, temporary stderr is removed, credential handling is unchanged, and digest/platform/provenance verification remains fail-closed.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: PR exact all-agent managed runtime activation failed in run 31186757641, job 92896129767 on the existing OpenShell v0.0.85 Hermes sandbox-creation path. Accepted issue [Epic] Qualify and pin OpenShell v0.0.99 #8497 owns that v0.0.85 activation failure, and PR feat(openshell): upgrade managed runtime to v0.0.99 #8523's v0.0.99 activation passed in run 31186050945, job 92893723945. The classification is recorded in #8560 and routed to #8523.

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: The change only adds bounded retries to internal GitHub Actions base-image registry reads. It does not change a user-facing command, configuration, default, or supported product behavior.
  • 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: scripts/prepare-dgx-station-host.sh is unchanged.

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 validate:pr passed after refreshing origin/main 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/retry-docker-imagetools-inspect.test.ts test/dcode-base-image-workflow.test.ts test/managed-image-publication-workflow.test.ts test/vitest-watch-triggers.test.ts (4 files, 30 tests passed)
  • 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 narrow internal workflow retry. Normal repository checks 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)

The existing validate-managed-base-index suite requires Bash associative arrays. This macOS host has only Bash 3.2, so that suite could not execute locally; required Linux CI remains authoritative for that integration path.


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

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

copy-pr-bot Bot commented Aug 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 Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request adds a bounded retry wrapper for docker buildx imagetools inspect, integrates it into base-image validation flows, and adds tests for retry behavior and workflow usage.

Changes

Docker image inspection retry

Layer / File(s) Summary
Retry wrapper and contract tests
scripts/checks/retry-docker-imagetools-inspect.sh, test/retry-docker-imagetools-inspect.test.ts, test/helpers/vitest-watch-triggers.ts, test/vitest-watch-triggers.test.ts
The new wrapper validates its argument, retries inspection up to five times, logs diagnostics, and returns the final status. Tests cover recovery, bounded failure, and watch-trigger mappings.
Validation flow integration
.github/workflows/base-image.yaml, scripts/checks/validate-managed-base-index.sh, test/dcode-base-image-workflow.test.ts, test/managed-image-publication-workflow.test.ts
Hermes, Deep Agents Code, OpenClaw, and managed base-index validation use the retry wrapper. Tests require wrapper usage and reject direct inspection calls.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: area: packaging, bug-fix

Suggested reviewers: apurvvkumaria, cv

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding retries for transient container manifest registry reads in CI.
✨ 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-ghcr-manifest-auth-retry

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

@github-code-quality

github-code-quality Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 069dbd4 in the codex/fix-ghcr-manif... branch remains at 96%, unchanged from commit b03abf7 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 069dbd4 in the codex/fix-ghcr-manif... branch remains at 81%, unchanged from commit b03abf7 in the main branch.

Show a code coverage summary of the most impacted files.
File main b03abf7 codex/fix-ghcr-manif... 069dbd4 +/-
src/lib/core/pr...mpt-activity.ts 92% 67% -25%
src/lib/messagi...onfig-parser.ts 75% 50% -25%
src/lib/credentials/store.ts 55% 56% +1%
src/lib/trace.ts 90% 94% +4%
src/lib/messagi...onfig-parser.ts 93% 97% +4%
src/lib/messagi...ate-resolver.ts 95% 100% +5%
src/lib/messagi...ate-resolver.ts 88% 94% +6%
src/lib/messagi...onfig-parser.ts 93% 100% +7%
src/lib/messagi...ink-base-url.ts 90% 100% +10%
src/lib/messagi...onfig-parser.ts 86% 100% +14%

Updated August 07, 2026 14:28 UTC

@senthilr-nv

Copy link
Copy Markdown
Collaborator Author

Queue update: main E2E run 31185766035, job 92890546246, failed by reusing Base Images run 31184501811 from commit 0b19405. This is the same transient GHCR manifest-read authorization root cause owned by this PR, not a separate failure; no duplicate fix or E2E run was created.

@senthilr-nv
senthilr-nv marked this pull request as ready for review August 7, 2026 14:18

@cjagwani cjagwani 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 069dbd4. Security review: PASS across secrets, input handling, auth, dependencies, logging, cryptography, workflow permissions, tests, and holistic posture. The bounded retry preserves immutable digest/provenance validation and fails closed. No actionable findings.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Failed

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

2 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • established — registry read at scripts/checks/retry-docker-imagetools-inspect.sh:30: Keep `registry read` for this operation.
  • justified — bounded attempts at test/retry-docker-imagetools-inspect.test.ts:77: Keep `bounded attempts` because the fixed retry limit affects test evidence.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite against this exact revision.

Recommended E2E: managed-image-multiarch-startup

Workflow run details

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

@senthilr-nv

Copy link
Copy Markdown
Collaborator Author

Merge-gate classification for Managed Images run 31186757641, job 92896129767: the non-required all-agent activation failure is unrelated to this registry-read-only diff. It ran OpenShell v0.0.85, passed the full OpenClaw lifecycle, then Hermes sandbox creation ended at terminal_failure_phase. Accepted issue #8497 explicitly owns the v0.0.85 managed-image activation failure, and PR #8523's current v0.0.99 activation passed in run 31186050945, job 92893723945. Ownership is #8523; no duplicate run or #8560 code change is warranted.

@senthilr-nv
senthilr-nv merged commit 7534577 into main Aug 7, 2026
94 of 100 checks passed
@senthilr-nv
senthilr-nv deleted the codex/fix-ghcr-manifest-auth-retry branch August 7, 2026 14:38
@github-actions github-actions Bot added the v0.0.105 Release target label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.105 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants