Skip to content

test(ci): stabilize coverage and image isolation checks - #8612

Merged
ericksoa merged 2 commits into
mainfrom
fix/shields-ci-timeouts
Aug 8, 2026
Merged

test(ci): stabilize coverage and image isolation checks#8612
ericksoa merged 2 commits into
mainfrom
fix/shields-ci-timeouts

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Stabilize the coverage-heavy Shields test and preserve the gateway-isolation helper after the image default changed to USER sandbox. The checks now complete without changing their assertions or product behavior.

Changes

  • Give shieldsDown captures policy, unlocks config, saves state, and skips timer on request the same 30-second bound used by coverage-heavy test setup.
  • Select root explicitly before the gateway-isolation helper uses setpriv for its existing root-to-sandbox transition.
  • Preserve every Shields assertion and runtime path.

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: The change only adjusts a test timeout. Product behavior and user workflows do not change.
  • 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: Nine-category self-review of commit 43cb4744c7eab757f5906c51a4d916c81ea25126 found no changed security control. The same assertions and root-to-sandbox identity transition still run; neither test change skips, weakens, or reorders them.
  • 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: The commit under review changes one Vitest timeout and one E2E test helper invocation. Both changes affect test execution only; no test title, product behavior, user workflow, or documentation surface changes.
  • Agent: Codex Desktop

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 — command/result or justification: npm run test:changed passed 35 tests for the timeout change; bash -n test/e2e-gateway-isolation.sh and shellcheck test/e2e-gateway-isolation.sh passed for the helper change. Protected CI runs the complete image test.
  • 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: Aaron Erickson aerickson@nvidia.com

Summary by CodeRabbit

  • Tests
    • Increased the timeout for the initial shield-flow test to improve reliability in slower environments.
    • Improved end-to-end gateway isolation test setup while preserving sandbox command behavior.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa ericksoa self-assigned this Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 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: e9ed0ea5-f1a4-4915-97bd-7546aa8bc16e

📥 Commits

Reviewing files that changed from the base of the PR and between 44d6a1e and 43cb474.

📒 Files selected for processing (1)
  • test/e2e-gateway-isolation.sh

📝 Walkthrough

Walkthrough

The shieldsDown flow test timeout increases from 15 seconds to 30 seconds. The gateway isolation helper now starts containers as root before switching to the sandbox user. No public declarations change.

Changes

Shield flow test

Layer / File(s) Summary
Increase shieldsDown test timeout
src/lib/shields/flow.test.ts
The timeout increases from 15,000 ms to 30,000 ms.

Gateway isolation execution

Layer / File(s) Summary
Set the container user explicitly
test/e2e-gateway-isolation.sh
run_as_sandbox starts the container as root before setpriv applies the sandbox UID and GID.

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

Possibly related PRs

Suggested reviewers: cjagwani, cv, jyaunches

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two test and CI stability changes in the pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ 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 fix/shields-ci-timeouts

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

@github-code-quality

github-code-quality Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 43cb474 in the fix/shields-ci-timeo... branch remains at 96%, unchanged from commit 02398f3 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 43cb474 in the fix/shields-ci-timeo... branch remains at 81%, unchanged from commit 02398f3 in the main branch.

Show a code coverage summary of the most impacted files.
File main 02398f3 fix/shields-ci-timeo... 43cb474 +/-
src/lib/onboard...flight-ports.ts 67% 33% -34%
src/lib/core/pr...mpt-activity.ts 92% 67% -25%
src/lib/policy/...ateway-state.ts 73% 56% -17%
src/lib/onboard...carryforward.ts 96% 88% -8%
src/lib/policy/index.ts 62% 63% +1%
src/lib/credentials/store.ts 55% 56% +1%
src/lib/policy/...scope-render.ts 94% 97% +3%
src/lib/trace.ts 90% 94% +4%
src/lib/messagi...onfig-parser.ts 93% 100% +7%
src/lib/agent/d...e-base-image.ts 86% 100% +14%

Updated August 08, 2026 05:30 UTC

@github-actions

github-actions Bot commented Aug 8, 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 match; normalized E2E selections differ; severity counts match.
4 additional E2E selections from the second opinion

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

  • network-policy: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • sandbox-operations: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • sandbox-survival: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • shields-config: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

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

E2E guidance

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

Recommended E2E: None

1 optional E2E recommendation
  • security-posture

Workflow run details

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

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa ericksoa changed the title test(shields): allow coverage setup to finish test(ci): stabilize coverage and image isolation checks Aug 8, 2026
@ericksoa
ericksoa merged commit 9f7c278 into main Aug 8, 2026
84 of 86 checks passed
@ericksoa
ericksoa deleted the fix/shields-ci-timeouts branch August 8, 2026 05:40
@github-actions github-actions Bot added the v0.0.105 Release target label Aug 8, 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.

1 participant