Skip to content

fix(hermes): keep Portable builds compatible with Podman - #10006

Merged
senthilr-nv merged 5 commits into
mainfrom
codex/hermes-podman-wheel-add
Aug 23, 2026
Merged

senthilr-nv merged 5 commits into
mainfrom
codex/hermes-podman-wheel-add

Conversation

@senthilr-nv

@senthilr-nv senthilr-nv commented Aug 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Hermes Portable image creation now keeps the managed wheel stages compatible with the supported rootless Podman 5.7 builder. The change preserves checksum-pinned wheel acquisition, removes the BuildKit-only remote ADD permission option, and supplies an amd64 default for the automatic TARGETARCH argument that Podman does not provide.

Related Issue

Fixes #10007

Changes

  • Remove --chmod=0444 from the 27 checksum-pinned Python wheel ADD instructions while preserving every immutable URL and SHA-256 digest.
  • Require the staged-context parser to accept only the exact checksum option on remote ADD instructions.
  • Declare ARG TARGETARCH=amd64 before the first FROM so the supported Portable x86_64 Podman path resolves the amd64 wheel stage.
  • Retain variable-based architecture selection so multi-platform builders can continue overriding TARGETARCH for arm64.
  • Add fail-closed regressions for remote ADD options and the global TARGETARCH default.

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:
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — focused security review confirms remote origins remain restricted to files.pythonhosted.org, every artifact remains SHA-256 pinned, unreviewed options fail before reservation, the amd64 default precedes the first FROM while arm64 override remains available, and no runtime, socket, policy, or credential authority changes.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

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 validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Focused Hermes build-context and sandbox build-context tests pass
  • NEMOCLAW_GROWTH_BASE_REF=upstream/main npm run test:changed passes, including all 32 growth guard tests and the affected suite
  • npm run validate:pr passes from an isolated regular clone
  • Independent documentation writer review passed with no documentation change required
  • Independent focused security and code review passed with no finding
  • 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)

Live reproduction

Two fresh Ubuntu 22.04, rootless Podman 5.7, L40S Brev attempts established the complete failure sequence without retry or cleanup:

  1. Revision ede33e2 crossed strict host preparation and then stopped at Hermes onboarding step 6/8 because remote ADD --chmod requires BuildKit.
  2. Revision 0f41e83 crossed that boundary and then stopped when Podman expanded an unset TARGETARCH into hermes-managed-teams--wheels.

The published replacement revision is 0b18fd6. A fresh full Portable qualification is running against this revision.


Signed-off-by: Senthil Ravichandran [email protected]

@github-code-quality

github-code-quality Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 0b18fd6 in the codex/hermes-podman-... branch remains at 96%, unchanged from commit a16693d in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit 0b18fd6 in the codex/hermes-podman-... branch remains at 83%, unchanged from commit a16693d in the main branch.

Show a line coverage summary of the most impacted files.
File main a16693d codex/hermes-podman-... 0b18fd6 +/-
src/lib/platform.ts 98% 96% -2%
src/lib/inferen...ed-selection.ts 91% 90% -1%
src/lib/security/redact.ts 100% 99% -1%
src/lib/runner.ts 75% 74% -1%
src/lib/onboard...uild-context.ts 73% 73% 0%
src/lib/messagi...solver-utils.ts 96% 96% 0%
src/lib/sandbox...rce-identity.ts 82% 82% 0%
src/lib/security/redact-url.ts 98% 100% +2%
src/lib/onboard...host-forward.ts 61% 84% +23%

Updated August 23, 2026 17:12 UTC

@coderabbitai

coderabbitai Bot commented Aug 23, 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: 0bfafe6f-876b-47a9-a6eb-647a2b78b273

📥 Commits

Reviewing files that changed from the base of the PR and between 5ee38b5 and 7052003.

📒 Files selected for processing (3)
  • agents/hermes/Dockerfile
  • src/lib/onboard/experimental/hermes-portable-build-context.test.ts
  • src/lib/onboard/experimental/hermes-portable-build-context.ts

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


📝 Walkthrough

Walkthrough

Hermes wheel ADD instructions no longer use --chmod=0444. Portable build-context validation now requires checksum-only remote ADD options and rejects unsupported combinations before reservation creation.

Changes

Hermes Portable ADD compatibility

Layer / File(s) Summary
Remove unsupported wheel ADD options
agents/hermes/Dockerfile
Managed Teams, Google Chat, amd64, and arm64 wheel downloads retain checksum-pinned sources while removing --chmod=0444.
Enforce checksum-only ADD validation
src/lib/onboard/experimental/hermes-portable-build-context.ts, src/lib/onboard/experimental/hermes-portable-build-context.test.ts
Validation requires exactly one SHA-256 checksum option. Tests verify checksum-pinned staged ADD instructions and rejection before reservation creation.

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

Merge Risk: ⚪ Minimal · up to 70520

The change removes unsupported remote wheel permissions while preserving checksum-pinned downloads and adds fail-closed parsing coverage; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: hunglp6d, prekshivyas

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The changes target remote wheel ADD options, but [#9921] requires local COPY compatibility, CA mode normalization, and local COPY validation. Update the local COPY and final-stage CA handling, add local COPY validation, and provide evidence for rootless Podman 5.7 onboarding.
Out of Scope Changes check ⚠️ Warning The remote wheel ADD changes and related tests are outside [#9921], which concerns local COPY compatibility and corporate-CA handling. Move the remote wheel ADD portability work to a separate issue or link an issue that explicitly requires it.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the Hermes Portable build compatibility fix for Podman, which is the main change in the pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/hermes-podman-wheel-add

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

@senthilr-nv senthilr-nv added bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow labels Aug 23, 2026
@senthilr-nv senthilr-nv self-assigned this Aug 23, 2026
@senthilr-nv senthilr-nv added area: packaging Packages, images, registries, installers, or distribution platform: container Affects Docker, containerd, Podman, or images security v0.0.114 labels Aug 23, 2026
@senthilr-nv
senthilr-nv requested review from cv and prekshivyas August 23, 2026 15:12
@senthilr-nv

Copy link
Copy Markdown
Collaborator Author

The scope warning is addressed. The remote wheel ADD --chmod failure reached after #9921's local COPY fix now has dedicated defect #10007, and this PR's Related Issue section now uses Fixes #10007. Product bytes and verification evidence are unchanged.

@senthilr-nv
senthilr-nv enabled auto-merge (squash) August 23, 2026 15:22
@senthilr-nv senthilr-nv changed the title fix(hermes): keep remote wheel ADD portable fix(hermes): keep Portable builds compatible with Podman Aug 23, 2026
@senthilr-nv

Copy link
Copy Markdown
Collaborator Author

Published revision 0b18fd677d58c5a1c95b2886ce59d04991373172 now covers both Podman 5.7 blockers from the retained Brev sequence: BuildKit-only remote ADD --chmod, and the missing automatic TARGETARCH that resolved the managed wheel stage as hermes-managed-teams--wheels. The correction defaults the pre-FROM architecture to amd64 while retaining the variable override for arm64 builders. Focused build-context tests, affected tests/growth guards, npm run validate:pr, pre-push hooks, documentation review, and focused security review all pass. A fresh full Hermes Portable Brev qualification is starting against this published revision.

@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 the latest PR commit 0b18fd677d58c5a1c95b2886ce59d04991373172.

The code change preserves the checksum-pinned wheel sources, rejects unsupported remote ADD options before reservation, defaults Portable builds to amd64, and retains the managed architecture override. The focused build-context suite passed all 18 tests and required checks pass.

One acceptance blocker remains: issue #10007 and this PR require a fresh Hermes Portable onboarding to cross both image-build boundaries on rootless Podman 5.7. The latest contributor update says that exact-candidate qualification is starting, but no successful result is attached yet. Please publish the credential-free successful qualification for this commit; I found no other blocker.

@senthilr-nv

Copy link
Copy Markdown
Collaborator Author

Review follow-up for latest PR commit 0b18fd677d58c5a1c95b2886ce59d04991373172:

  • Review findings: CodeRabbit produced no actionable code comment. There are no inline comments or review threads. The submitted human review found no code blocker; it requests fresh, credential-free Hermes Portable onboarding evidence on rootless Podman 5.7.
  • Advisor status: the five optional specialist jobs failed during workspace initialization with ENOENT. Advisor analysis did not complete, and the jobs produced no findings.
  • Supply chain and builder compatibility: a normalized base-to-PR comparison matched all 27 remote wheel ADD lines after removal of only --chmod=0444; every URL and SHA-256 digest is unchanged. Validation accepts exactly one SHA-256 checksum option and rejects unsupported remote ADD options before reservation. ARG TARGETARCH=amd64 supplies the Podman default before the first FROM, while ${TARGETARCH} retains the arm64 override.
  • Validation: the focused Hermes build-context suite passed 18/18 tests. NEMOCLAW_GROWTH_BASE_REF=upstream/main npm run test:changed and npm run validate:pr passed. All required checks pass. Natural managed-image CI passed direct startup for Hermes and OpenClaw; three non-required downstream image jobs remain in progress.
  • Remaining gates: GitHub reports CHANGES_REQUESTED until the fresh Portable qualification evidence is attached and the human review is resolved. Normal merge policy still applies; no merge action was taken.

@senthilr-nv
senthilr-nv merged commit 7d29d30 into main Aug 23, 2026
81 of 86 checks passed
@senthilr-nv
senthilr-nv deleted the codex/hermes-podman-wheel-add branch August 23, 2026 17:40
senthilr-nv added a commit that referenced this pull request Aug 24, 2026
## Summary

Hermes Portable image creation now avoids every remaining BuildKit-only
`RUN` option in the staged Dockerfile used by the supported rootless
Podman 5.7 path. The change preserves checksum-pinned wheel acquisition
and offline package resolution while using classic multi-stage `COPY`.

## Related Issue

Fixes #10007

## Changes

- Replace the managed-wheel `RUN --mount` input with a selected
cross-stage `COPY`.
- Keep the disabled wheel stage non-empty with a reviewed public marker
so classic builders can copy either selected stage.
- Retain `UV_OFFLINE=true` and exact installed-version validation, then
remove staged wheel inputs.
- Remove `RUN --network=none` from both the wheel installation and
bundled `ensurepip` check; neither path performs an external package
lookup.
- Reject every Dockerfile `RUN` option before Hermes Portable context
reservation.
- Add fail-first `--network` and `--mount` regressions and a positive
staged-Dockerfile compatibility assertion.

## Type of Change

- [x] 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

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — focused review confirms wheel URLs and SHA-256 pins are
unchanged, package resolution remains offline, the copied marker is an
existing reviewed public JSON artifact, staged wheel inputs are removed
after validation, and unsupported `RUN` options fail before reservation.
No credential, policy, socket, runtime-authority, or provider behavior
changes.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## 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

- [x] PR description includes a `Signed-off-by:` line and the commit is
signed and DCO-trailed
- [x] Normal pre-commit, commit-msg, and pre-push hooks passed
- [x] `npm test --
src/lib/onboard/experimental/hermes-portable-build-context.test.ts` —
20/20 passed
- [x] `npm run typecheck:cli` passed
- [x] `npm run test:changed` — growth guardrails 32/32 and affected
tests 204/204 passed
- [x] `npm run lint` passed, including formatting and repository checks
- [x] `hadolint agents/hermes/Dockerfile` passed
- [x] Full staged Hermes Dockerfile scan found no remaining `RUN` option
or non-Portable local `COPY` option
- [x] Focused security review passed with no finding
- [x] Documentation review found no user-facing documentation change
- [x] 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)

### Live reproduction

A fresh Ubuntu 22.04, rootless Podman 5.7, L40S qualification at the
merged #10006 revision crossed the remote `ADD` and `TARGETARCH`
boundaries, reached step 208/251, and stopped after 346.4 seconds with
`Docker stream error: the --network option requires BuildKit`. No retry,
resume, or cleanup followed; the failed VM is retained.

The tested follow-up revision is
`b715f1f5a08ab901a20d95eff1cddd517cdb4d6f`. A new fresh full Hermes
Portable qualification will run after review.

---

Signed-off-by: Senthil Ravichandran <[email protected]>

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

* **Bug Fixes**
  * Improved portable container builds across supported environments.
* Increased reliability of offline dependency installation and sandbox
readiness handling.
* Added bounded command timeouts and deadline-aware sandbox observation.
* Strengthened Dockerfile validation for parser directives, comments,
and continued instructions.

* **Tests**
* Expanded coverage for portable builds, onboarding timeouts, and
readiness polling.
* Added end-to-end validation for rootless builds, image creation, and
cleanup.
  * Updated workflow checks to detect relevant portable-build changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Senthil Ravichandran <[email protected]>
@wscurran wscurran added area: security Security controls, permissions, secrets, or hardening and removed security labels Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior platform: container Affects Docker, containerd, Podman, or images

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hermes Portable Dockerfile requires BuildKit-only features on Podman

3 participants