Skip to content

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

Open
cv wants to merge 3 commits into
mainfrom
fix/hermes-secret-boundary-base-reuse
Open

fix(ci): reuse Hermes base image in boundary test#8221
cv wants to merge 3 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 a negative regression test that removes the resolver and verifies the workflow is rejected.

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: The consumer uses the existing immutable-digest Hermes resolver, adds no credentials, and retains workflow checks that prohibit registry authentication and production-image rebuilds.
  • 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: Pi CLI reviewed commit 818de95. This changes internal GitHub Actions E2E sequencing and its boundary validator without changing a user-facing API, CLI, configuration, default, procedure, supported behavior, or agent variant.
  • Agent: Pi CLI

DGX Station Hardware Evidence

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

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 e2e-support test/e2e/support/sandbox-images-workflow-boundary.test.ts test/e2e/support/hermes-secret-boundary-workflow.test.ts — 35 tests passed. npm run checks:repository and focused Biome checks also passed.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • 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 of Hermes sandbox image workflows.
    • Ensured the required base image is resolved exactly once before security boundary checks.
    • Added end-to-end coverage to detect missing 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

📝 Walkthrough

Walkthrough

The Hermes sandbox-image workflow resolves its base image before E2E tests. Validation requires exactly one canonical resolver before the secret-boundary probe. Tests cover missing, renamed, and misplaced resolver steps.

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 and requires exactly one correctly named resolver before the secret-boundary test.
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. Regression tests cover missing, renamed, and misplaced resolver steps.

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

Possibly related PRs

Suggested labels: integration: hermes, area: ci, area: e2e, bug-fix

🚥 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 and concisely describes 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 818de95 in the fix/hermes-secret-bo... branch remains at 96%, unchanged from commit 0abd14a in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 818de95 in the fix/hermes-secret-bo... branch remains at 81%, unchanged from commit 0abd14a in the main branch.

Show a code coverage summary of the most impacted files.
File main 0abd14a fix/hermes-secret-bo... 818de95 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/shields/index.ts 69% 69% 0%
src/lib/sandbox...rce-identity.ts 88% 88% 0%

Updated August 04, 2026 12:02 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 · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized terminology decisions differ; normalized E2E selections differ; severity counts match.
1 terminology difference from the second opinion

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

  • Hermes base-image resolver at test/e2e/support/sandbox-images-workflow-boundary.test.ts:184: selected only by the second-opinion lane as justified.
5 additional E2E selections from the second opinion

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

  • hermes-e2e: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • rebuild-hermes: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • rebuild-hermes-stale-base: 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.
  • mcp-bridge: 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.

2 semantic terminology decisions

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

  • established — Hermes base image at .github/workflows/sandbox-images-and-e2e.yaml:323: Keep using "Hermes base image" for the Hermes-specific base image.
  • justified — secret-boundary probe at test/e2e/support/sandbox-images-workflow-boundary.test.ts:184: Keep the modifier because it identifies the specific ordered test step.

E2E guidance

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

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

Workflow run details

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant