Skip to content

fix(ci): reuse Hermes base image in boundary test - #8221

Merged
cv merged 14 commits into
mainfrom
fix/hermes-secret-boundary-base-reuse
Aug 5, 2026
Merged

fix(ci): reuse Hermes base image in boundary test#8221
cv merged 14 commits into
mainfrom
fix/hermes-secret-boundary-base-reuse

Conversation

@cv

@cv cv commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Hermes secret-boundary consumer rebuilt the full Hermes base image when it prepared the managed variant. The repeated build exceeded the probe's 10-minute process limit on main, so the consumer now resolves the verified base image before the live probe.

Changes

  • Resolve the canonical Hermes base image in the image-consumer job before the secret-boundary probe.
  • Require that resolver and ordering in the sandbox-image workflow validator.
  • Add negative regression tests for a substituted, conditional, failure-tolerant, or path-equivalent resolver.

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 internal GitHub Actions orchestration and its repository validator without changing user-facing product behavior.
  • 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 nine-category security review passed for PR commit SHA 8f595637ec0ae9ba437eb825b39172af2a598fab against base SHA 962f1c3bf3a1354a8cfdc2056e04a27828be0dc0; no findings. The three changed files match the previously reviewed patch (SHA-256 d5c45bb3da1403b5f4a4ac5453d92a907f869dbd). Workflow permissions remain unchanged, checkout credentials remain disabled, and the existing canonical local resolver receives no secrets. It runs once, unconditionally, before the secret-boundary probe; failure stops the job. The resolver retains immutable-digest preference and validates image layout, glibc, imports, and environment writes. Path normalization and negative tests cover omission, substitution, conditions, failure tolerance, duplicates, aliases, and ordering. No injection, dependency, endpoint-authentication, cryptography, permission, logging, secret-handling, network-policy, or resource-control regression was introduced. All nine security categories pass.
  • 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: Review of the three-file diff for PR commit SHA 8f595637ec0ae9ba437eb825b39172af2a598fab against base SHA 962f1c3bf3a1354a8cfdc2056e04a27828be0dc0 confirmed that the change affects only internal Hermes image and E2E workflow control. It resolves the Hermes base image before the secret-boundary probe and enforces that invariant through boundary validation and behavior tests. It changes no supported product or user-facing documentation surface. The changed workflow labels, diagnostics, and test titles comply with the repository writing rules.
  • Agent: Codex Desktop documentation writer subagent

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 — npm run validate:pr and the normal push hooks passed for PR commit SHA 8f595637ec0ae9ba437eb825b39172af2a598fab.
  • Targeted behavior tests pass for the current change set — test/e2e/support/sandbox-images-workflow-boundary.test.ts passed 37/37 for PR commit SHA 8f595637ec0ae9ba437eb825b39172af2a598fab; git diff --check passed.
  • Applicable broad gate passed — not run locally. Required GitHub CI and E2E checks pass for PR commit SHA 8f595637ec0ae9ba437eb825b39172af2a598fab; no non-success check is accepted or waived.
  • 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: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation and reliability of Hermes sandbox image workflows.
    • Resolved the Hermes base image before the managed secret-boundary probe.
    • Enforced consistent handling of image-resolution failures to prevent unsafe workflow execution.
    • Added end-to-end coverage for missing, duplicated, misplaced, conditional, or incorrect image-resolution steps.

@cv cv self-assigned this Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Hermes sandbox-image workflow resolves its base image before E2E tests. Validation requires one canonical, unconditional, fail-closed resolver before the secret-boundary probe. Tests cover invalid resolver configurations.

Changes

Hermes image validation

Layer / File(s) Summary
Canonical resolver validation
tools/e2e/sandbox-images-workflow-boundary.mts
The validator defines the canonical Hermes resolver action. It requires one correctly named resolver before the secret-boundary probe. The resolver must run unconditionally and fail closed.
Workflow wiring and regression coverage
.github/workflows/sandbox-images-and-e2e.yaml, test/e2e/support/sandbox-images-workflow-boundary.test.ts
The Hermes test job runs the resolver before live tests. Regression tests reject omission, non-canonical actions, conditional execution, tolerated failure, renamed duplicates, and late placement.

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

🚥 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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: reusing the Hermes base image in the CI boundary test.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hermes-secret-boundary-base-reuse

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

@github-code-quality

github-code-quality Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 8f59563 in the fix/hermes-secret-bo... branch remains at 96%, unchanged from commit 962f1c3 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 8f59563 in the fix/hermes-secret-bo... branch remains at 81%, unchanged from commit 962f1c3 in the main branch.

Show a code coverage summary of the most impacted files.
File main 962f1c3 fix/hermes-secret-bo... 8f59563 +/-
src/lib/onboard...e-patch-flow.ts 76% 71% -5%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/tunnel/services.ts 76% 76% 0%
src/lib/credentials/store.ts 55% 56% +1%
src/lib/domain/.../connect-env.ts 89% 97% +8%

Updated August 05, 2026 05:14 UTC

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
test/e2e/support/sandbox-images-workflow-boundary.test.ts (1)

184-193: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cover each resolver invariant in the regression tests.

This case only covers a missing named step. Add behavior cases for:

  • a non-canonical uses value;
  • a resolver placed after the secret-boundary step;
  • more than one resolver invocation, including a duplicate with another step name.

As per path instructions, targeted checks should validate required action identity, ordering, and exact invocation count.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e/support/sandbox-images-workflow-boundary.test.ts` around lines 184 -
193, Extend the regression tests around validateSandboxImagesWorkflow to cover
every Hermes base-image resolver invariant: reject a resolver with a
non-canonical uses value, reject one placed after the secret-boundary probe, and
reject multiple invocations including a duplicate under another step name.
Ensure each case asserts the expected validation error for canonical action
identity, ordering, and exactly one invocation.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tools/e2e/sandbox-images-workflow-boundary.mts`:
- Around line 907-920: Update the validation around baseImageResolvers to count
every workflow step whose uses value equals HERMES_BASE_IMAGE_RESOLVER_ACTION,
regardless of step name. Require exactly one such action step, and ensure that
step is named "Resolve Hermes base image" and runs before secretBoundary;
preserve the existing validation error behavior.

---

Nitpick comments:
In `@test/e2e/support/sandbox-images-workflow-boundary.test.ts`:
- Around line 184-193: Extend the regression tests around
validateSandboxImagesWorkflow to cover every Hermes base-image resolver
invariant: reject a resolver with a non-canonical uses value, reject one placed
after the secret-boundary probe, and reject multiple invocations including a
duplicate under another step name. Ensure each case asserts the expected
validation error for canonical action identity, ordering, and exactly one
invocation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d2b5ed72-4a4e-46ce-8e77-80f395798d2b

📥 Commits

Reviewing files that changed from the base of the PR and between 2fa1d22 and fd19bbd.

📒 Files selected for processing (3)
  • .github/workflows/sandbox-images-and-e2e.yaml
  • test/e2e/support/sandbox-images-workflow-boundary.test.ts
  • tools/e2e/sandbox-images-workflow-boundary.mts

Comment thread tools/e2e/sandbox-images-workflow-boundary.mts Outdated
@github-actions

github-actions Bot commented Aug 4, 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): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 more warning, the same number of suggestions.
4 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • canonical action at test/e2e/support/sandbox-images-workflow-boundary.test.ts:190: selected only by the second-opinion lane as established.
  • secret-boundary probe at test/e2e/support/sandbox-images-workflow-boundary.test.ts:184: selected only by the second-opinion lane as established.
  • Hermes base-image resolver at test/e2e/support/sandbox-images-workflow-boundary.test.ts:184: selected only by the second-opinion lane as established.
  • dot-segment alias at test/e2e/support/sandbox-images-workflow-boundary.test.ts:257: selected only by the second-opinion lane as define.
6 additional E2E selections from the second opinion

Advisory only. The primary lane did not select these E2E jobs or targets.

  • hermes-slack: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • hermes-discord: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • hermes-gpu-startup: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • hermes-inference-switch: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • hermes-shields-config: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • ubuntu-repo-cloud-openclaw: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

3 semantic terminology decisions

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

  • established — base image at .github/workflows/sandbox-images-and-e2e.yaml:323: Keep `Hermes base image`; it uses the established controlled term with a necessary runtime qualifier.
  • established — fail closed at tools/e2e/sandbox-images-workflow-boundary.mts:937: Keep `fail closed`; it matches the controlled term and names the required failure behavior.
  • justified — secret-boundary probe at tools/e2e/sandbox-images-workflow-boundary.mts:930: Keep `secret-boundary probe`; the modifier identifies the ordered test step whose position affects test evidence.

E2E guidance

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

Recommended E2E: cloud-inference, cloud-onboard, security-posture

1 optional E2E recommendation
  • hermes-e2e

Workflow run details

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

@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior labels Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@cv
cv merged commit 514e027 into main Aug 5, 2026
97 checks passed
@cv
cv deleted the fix/hermes-secret-boundary-base-reuse branch August 5, 2026 06:33
@github-actions github-actions Bot added the v0.0.103 Release target label Aug 5, 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 bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior v0.0.103 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants