Skip to content

ci(e2e): select post-reboot recovery for status - #7828

Merged
jyaunches merged 10 commits into
mainfrom
codex/issue-7824-e2e-target-current
Jul 29, 2026
Merged

ci(e2e): select post-reboot recovery for status#7828
jyaunches merged 10 commits into
mainfrom
codex/issue-7824-e2e-target-current

Conversation

@jyaunches

@jyaunches jyaunches commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Status recovery changes cannot currently run the registered post-reboot recovery target on an exact PR SHA because the trusted controller does not allow that typed target. This change adds the existing target to the trusted projection and selects it for the status snapshot runtime that owns post-reboot delivery recovery.

Related Issue

Related to #7824

Changes

  • Add ubuntu-repo-docker-post-reboot-recovery to the trusted PR E2E typed-target allowlist.
  • Select that target when src/lib/actions/sandbox/status-snapshot.ts changes.
  • Pin both allowed target projections to ubuntu-latest, including the combined-target plan, and retain exact equality with the candidate-generated matrix.
  • Validate the complete controller-matrix script so comments, dead duplicate blocks, earlier executable wildcard routing, or post-case matrix overrides cannot change the reviewed runner projection.
  • Advance the deterministic risk-plan version and cover selection, runner pinning, rejection, and evidence identity.
  • Document the internal path-to-target mapping in test/e2e/README.md.

The current consumer is the #7824 status recovery fix. A same-PR self-enable is insufficient because PR controller policy and the dispatch workflow are loaded from trusted main; this prerequisite must land before the fixing PR can produce exact-head evidence.

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:
  • 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 security review passed exact head b70b8648 on current main with no findings. The trusted allowlist, complete controller-script hosted-runner projection through the sole final output, exact head/base/plan binding, pre-checkout controller validation, and candidate-matrix equality remain fail closed.
  • 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: docs-updated
  • Evidence: test/e2e/README.md accurately documents the status-snapshot typed-target selection and host-forwarding recovery coverage. The reviewer verified that the eight-file diff's terminology, structure, voice, and test titles follow the writing guide; no product documentation is needed because this changes internal PR E2E routing.
  • 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 check:diff passed 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: on exact head b70b8648, three focused E2E-support files passed 95 tests, the workflow-plan support file passed 25 tests, and two integration files passed 71 tests, for 191 focused tests total. Normal commit hooks and the normal pre-push CLI type-check passed.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: Pull-request CI will provide the applicable broad gate.
  • 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: Julie Yaunches jyaunches@nvidia.com

@copy-pr-bot

copy-pr-bot Bot commented Jul 29, 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 Jul 29, 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 PR adds a post-reboot recovery typed E2E target, maps matching status runtime changes to it, extends trusted workflow matrix generation and dispatch allowlisting, and strengthens workflow-boundary validation with mutation-based tests.

Changes

Post-reboot E2E target routing

Layer / File(s) Summary
Risk-plan target mapping
tools/advisors/risk-plan.mts, test/pr-risk-plan.test.ts, test/pr-e2e-gate-typed-target.test.ts, test/e2e/README.md
Adds the post-reboot typed target, selects it for matching status runtime changes, updates plan-version expectations, and documents and tests the routing behavior.
Trusted workflow matrix and dispatch
.github/workflows/e2e.yaml, tools/e2e/operations-workflow-boundary.mts
Adds post-reboot and combined target matrices and validates dispatch values against the approved target allowlist.
Workflow boundary validation
tools/e2e/workflow-boundary.mts, test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
Validates the complete target case block and adds negative tests for unsafe routing mutations.

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

Possibly related issues

Possibly related PRs

Suggested labels: area: security, v0.0.98

Suggested reviewers: cv, brandonpelfrey

🚥 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 reflects the main change: routing E2E status handling to post-reboot recovery.
✨ 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 codex/issue-7824-e2e-target-current

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

@github-code-quality

github-code-quality Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit b70b864 in the codex/issue-7824-e2e... branch remains at 96%, unchanged from commit 7b5e0f7 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit b70b864 in the codex/issue-7824-e2e... branch remains at 81%, unchanged from commit 9b1fbd8 in the main branch.

Show a code coverage summary of the most impacted files.
File main 9b1fbd8 codex/issue-7824-e2e... b70b864 +/-
src/lib/onboard...box-prebuild.ts 92% 74% -18%
src/lib/actions...ocker-health.ts 82% 65% -17%
src/lib/actions...confirmation.ts 79% 69% -10%
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/actions...light-guards.ts 90% 86% -4%
src/lib/onboard/preflight.ts 80% 80% 0%
src/lib/onboard...host-anchors.ts 90% 94% +4%
src/lib/onboard...ndbox-create.ts 83% 91% +8%
src/lib/onboard/docker-cdi.ts 70% 80% +10%
src/lib/onboard...ndbox-create.ts 33% 83% +50%

Updated July 29, 2026 19:41 UTC

@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head 833ae4be7

Verdict

PASS. I found no security issues in PR #7828. The change expands the trusted typed-target allowlist by one existing target without changing workflow permissions, secret mappings, target implementation, or PR authorization. Target selection remains deterministic and bound to the exact PR head, base, plan hash, controller check, and fixed hosted-runner projection.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, or secret mapping changes. The existing target's NVIDIA_INFERENCE_API_KEY use is unchanged, and the PR adds no value to logs or artifacts.
  2. Input validation and sanitization — PASS. TARGETS accepts only the empty value, either of two exact target IDs, or their deterministic sorted pair. Every other, duplicated, or reordered value reaches the existing fail-closed error before candidate checkout.
  3. Authentication and authorization — PASS. Existing GitHub Actions actor, controller-check ownership, exact head/base SHA, repository, plan-hash, and live-PR validation remain unchanged. The target can be selected only by the trusted risk plan for the exact status-snapshot.ts path.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, package manifest, or registry change.
  5. Error handling and logging — PASS. Rejection remains generic and does not expose tokens, internal state, or user-controlled content.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. Advancing the risk-plan version causes the existing SHA-256 plan digest to cover the new selector semantics.
  7. Configuration and security headers — PASS. The trusted workflow pins both single-target and combined-target projections to ubuntu-latest; no permissions, environment, port, container, CORS, or security-header change.
  8. Security testing — PASS. Tests cover exact selection, adjacent-file non-selection, unapproved-target rejection, deterministic plan hashing, and both occurrences of each immutable ID/runner/label mapping. Focused boundary suites passed 175 tests on the exact head; the affected suite passed 304 tests before the clean rebase.
  9. System security — PASS. The trusted matrix is still produced before PR checkout, the candidate planner must exactly match it, and existing evidence identity/fail-closed checks remain intact. The change does not weaken least privilege, concurrency, or TOCTOU protections.

Files reviewed

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior labels Jul 29, 2026
@jyaunches jyaunches self-assigned this Jul 29, 2026
@jyaunches
jyaunches marked this pull request as ready for review July 29, 2026 14:33

@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: 2

🤖 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 `@test/e2e/README.md`:
- Around line 580-583: Update the descriptive text associated with the
ubuntu-repo-docker-post-reboot-recovery target to use “host forwarding” instead
of “host forward,” preserving the documented E2E terminology.

In `@tools/e2e/workflow-boundary.mts`:
- Around line 4399-4406: Update the validation around controllerMatrixScript and
trustedTargetMappings to inspect each target’s corresponding case branch rather
than counting raw JSON occurrences. For each trusted target, assert that its
branch emits the exact expected matrix entry and runner, so comments or dead
code cannot satisfy validation; preserve validation for both listed mappings.
🪄 Autofix (Beta)

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: 874cab6f-1629-4b78-a4fc-ecd65bf89d82

📥 Commits

Reviewing files that changed from the base of the PR and between 01598a5 and 833ae4b.

📒 Files selected for processing (7)
  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

Comment thread test/e2e/README.md Outdated
Comment thread tools/e2e/workflow-boundary.mts Outdated
@github-actions

github-actions Bot commented Jul 29, 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 E2E selections match; severity counts match.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

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

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

1 optional E2E recommendation
  • ubuntu-repo-docker-post-reboot-recovery

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: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head 713676e74

Verdict

PASS. I found no security issues in PR #7828 at the current head. The change expands the trusted typed-target allowlist by one existing target without changing workflow permissions, secret mappings, target implementation, or PR authorization. Target selection remains deterministic and bound to the exact PR head, base, plan hash, controller check, and fixed hosted-runner projection.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, or secret mapping changes. The existing target's NVIDIA_INFERENCE_API_KEY use is unchanged, and the PR adds no value to logs or artifacts.
  2. Input validation and sanitization — PASS. TARGETS accepts only the empty value, either of two exact target IDs, or their deterministic sorted pair. Every other, duplicated, or reordered value reaches the existing fail-closed error before candidate checkout.
  3. Authentication and authorization — PASS. Existing GitHub Actions actor, controller-check ownership, exact head/base SHA, repository, plan-hash, and live-PR validation remain unchanged. The target can be selected only by the trusted risk plan for the exact status-snapshot.ts path.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, package manifest, or registry change.
  5. Error handling and logging — PASS. Rejection remains generic and does not expose tokens, internal state, or user-controlled content.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. Advancing the risk-plan version causes the existing SHA-256 plan digest to cover the new selector semantics.
  7. Configuration and security headers — PASS. The trusted workflow pins both single-target and combined-target projections to ubuntu-latest; no permissions, environment, port, container, CORS, or security-header change.
  8. Security testing — PASS. Tests cover exact selection, adjacent-file non-selection, unapproved-target rejection, deterministic plan hashing, and exact case-branch mappings for both immutable ID/runner/label projections. The review follow-up specifically proves that a correct mapping in a comment or outside the target branch cannot mask a changed runner. Five focused suites passed 187 tests on this head, and the normal pre-push CLI type-check passed.
  9. System security — PASS. The trusted matrix is still produced before PR checkout, the candidate planner must exactly match it, and existing evidence identity/fail-closed checks remain intact. Case-branch validation now inspects the command assigned by each exact selector instead of counting raw JSON occurrences. The change does not weaken least privilege, concurrency, or TOCTOU protections.

Files reviewed

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/e2e-workflow.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head 713676e74

Verdict

PASS. I found no security issues in PR #7828 at exact head 713676e74aa51fb9b7ea6ab6d83f7512f4a2b815. The change adds one existing typed E2E target to the trusted controller without changing workflow permissions, secrets, target implementation, or PR authorization. The review follow-up strengthens the boundary validator so every single-target and combined-target case branch must contain only its exact ubuntu-latest matrix assignment; matching text in comments or dead code cannot satisfy the check.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, secret mapping, or artifact-content change.
  2. Input validation and sanitization — PASS. TARGETS remains restricted to the empty value, either exact approved ID, or their deterministic ordered pair. The workflow rejects every other value before candidate checkout. The boundary check now parses the trusted case "${TARGETS}" in block and requires an exact command list for each approved branch.
  3. Authentication and authorization — PASS. Existing actor, controller-check ownership, repository, live-PR, exact head/base SHA, and plan-hash verification remain unchanged. Target selection comes only from the trusted risk plan.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, manifest, registry, or license change.
  5. Error handling and logging — PASS. Rejection remains fail closed and generic; no tokens, internal state, or user-controlled values are added to logs.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. Advancing the plan version keeps the existing SHA-256 digest bound to the new selector semantics.
  7. Configuration and security headers — PASS. All single and combined target branches are fixed to ubuntu-latest. No permissions, environment, port, container, CORS, or header change.
  8. Security testing — PASS. Tests cover exact selection, adjacent-file non-selection, unapproved-target rejection, deterministic hashing, and a regression where a branch is misrouted while the expected mapping remains in a comment. The validator rejects that dead-text bypass. The exact merged head passed the focused controller/risk-plan suite: 4 files, 120 tests.
  9. System security — PASS. The trusted matrix is built before PR checkout, candidate output must exactly match it, and evidence remains bound to the PR head/base and controller plan. The change does not weaken least privilege, concurrency, or TOCTOU protections.

Files reviewed

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/e2e-workflow.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

@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: 2

🤖 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 `@test/e2e/support/e2e-workflow.test.ts`:
- Around line 415-436: Update the test around validateE2eWorkflow to first
assert the unmodified workflow does not contain the trusted-controller runner
error and that trustedMapping is present in controllerMatrix.run before
replacing it. Then retain the mutation and final rejection assertion so the test
proves the altered runner value causes the validation failure.

In `@tools/e2e/workflow-boundary.mts`:
- Around line 607-624: Update shellCaseBranchCommands to validate a unique
controller case structure rather than stopping at the first matching case
"${TARGETS}" block. Detect and reject duplicate or alternate case/esac blocks,
including later executed blocks, so approved mappings cannot hide an unsafe
routing branch; apply the same validation to the related logic around the
alternate location.
🪄 Autofix (Beta)

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: 525b1580-0b58-4e27-bfa6-e331f0477487

📥 Commits

Reviewing files that changed from the base of the PR and between 833ae4b and 713676e.

📒 Files selected for processing (3)
  • test/e2e/README.md
  • test/e2e/support/e2e-workflow.test.ts
  • tools/e2e/workflow-boundary.mts

Comment thread test/e2e/support/e2e-workflow.test.ts Outdated
Comment thread tools/e2e/workflow-boundary.mts Outdated
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head 1f2b89eef

Verdict

PASS. I found no security issues in PR #7828 at exact head 1f2b89eef2483414541184b73e2003d29e9410fe. The trusted controller still adds only one existing typed E2E target without changing permissions, secrets, target implementation, or PR authorization. The latest review fix closes the remaining boundary-validator bypass by requiring one unique trusted case "${TARGETS}" in block and one esac; a dead approved block can no longer hide later unsafe routing.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, secret mapping, or artifact-content change.
  2. Input validation and sanitization — PASS. TARGETS remains restricted to the empty value, either exact approved ID, or their deterministic ordered pair. The boundary validator now requires a unique trusted case structure and exact commands in every approved single and combined branch.
  3. Authentication and authorization — PASS. Existing actor, controller-check ownership, repository, live-PR, exact head/base SHA, and plan-hash verification remain unchanged.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, manifest, registry, or license change.
  5. Error handling and logging — PASS. Rejection remains fail closed and generic; no sensitive or user-controlled values are newly logged.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. The existing SHA-256 plan digest remains bound to the selector semantics.
  7. Configuration and security headers — PASS. Every accepted target branch remains fixed to ubuntu-latest. No permissions, environment, port, container, CORS, or header change.
  8. Security testing — PASS. Tests prove the clean fixture does not already contain the error, require the trusted mapping before mutation, reject a misrouted branch despite matching comment text, and reject a dead approved case block placed before unsafe executed routing. The exact head passed the focused controller/risk-plan suite: 4 files, 121 tests.
  9. System security — PASS. The trusted matrix remains pre-checkout, candidate output must match it exactly, and evidence stays bound to the PR head/base and controller plan. Unique case-structure validation prevents dead-code shadowing without weakening least privilege, concurrency, or TOCTOU protections.

Files reviewed

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/e2e-workflow.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

@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.

♻️ Duplicate comments (1)
test/e2e/support/e2e-workflow.test.ts (1)

443-468: ⚠️ Potential issue | 🟡 Minor

Prove that this mutation causes the rejection.

The test should first assert that the unmodified workflow does not contain the expected error and that run contains trustedMapping. Otherwise, a pre-existing validator failure or no-op .replace() can make the assertion pass without testing unsafe routing.

Suggested adjustment
     const run = controllerMatrix.run!;
+    const expectedError =
+      "trusted controller matrix must pin typed target runner to ubuntu-latest";
+    expect(validateE2eWorkflow(workflow)).not.toContain(expectedError);
+    requireFixture(
+      run.includes(trustedMapping),
+      "trusted target fixture mapping is missing",
+    );
+
     const caseStart = run.indexOf('case "${TARGETS}" in');

Reuse expectedError in the final assertion.

As per path instructions, tests should establish behavioral confidence through the public validator rather than pass on a pre-existing failure or a no-op mutation.

🤖 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/e2e-workflow.test.ts` around lines 443 - 468, Strengthen the
test around controllerMatrix.run by asserting the unmodified workflow passes the
public validator without expectedError and that run contains trustedMapping
before applying the mutation. Ensure the replacement actually changes the
trusted runner to self-hosted, then reuse expectedError in the final validator
assertion to prove the mutated workflow is rejected.

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.

Duplicate comments:
In `@test/e2e/support/e2e-workflow.test.ts`:
- Around line 443-468: Strengthen the test around controllerMatrix.run by
asserting the unmodified workflow passes the public validator without
expectedError and that run contains trustedMapping before applying the mutation.
Ensure the replacement actually changes the trusted runner to self-hosted, then
reuse expectedError in the final validator assertion to prove the mutated
workflow is rejected.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8dea1736-c2a2-4587-9483-026f35a832d8

📥 Commits

Reviewing files that changed from the base of the PR and between 713676e and 1f2b89e.

📒 Files selected for processing (2)
  • test/e2e/support/e2e-workflow.test.ts
  • tools/e2e/workflow-boundary.mts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tools/e2e/workflow-boundary.mts

@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head 3576f3097

Verdict

PASS. I found no security issues in PR #7828 at exact head 3576f30979ba42e61059948769685fe671962f52. The trusted controller adds one existing typed E2E target without changing permissions, secrets, target implementation, or PR authorization. The final review hardening requires the complete unique trusted case "${TARGETS}" in block to match the approved empty, single-target, combined-target, and rejecting default branches exactly, so an earlier executable wildcard or alternate route cannot shadow safe later branches.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, secret mapping, or artifact-content change.
  2. Input validation and sanitization — PASS. TARGETS accepts only the empty value, either exact approved ID, or their deterministic ordered pair. The trusted projection requires the complete case block, fixed matrix assignments, and rejecting default branch; reordered, duplicated, wildcard-shadowed, or otherwise altered routing fails validation.
  3. Authentication and authorization — PASS. Existing actor, controller-check ownership, repository, live-PR, exact head/base SHA, workflow SHA, and plan-hash checks remain unchanged. Target selection comes only from the trusted risk plan for the exact status-snapshot.ts path.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, manifest, registry, or license change.
  5. Error handling and logging — PASS. Rejection remains fail closed and generic; no sensitive or user-controlled values are newly logged.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. Advancing the plan version keeps the existing SHA-256 plan digest bound to the new selector semantics.
  7. Configuration and security headers — PASS. Every accepted single and combined target projection remains fixed to ubuntu-latest. No workflow permission, environment, port, container, CORS, or header change.
  8. Security testing — PASS. Tests prove clean-fixture validity, require the trusted mapping before mutation, reject matching text outside the exact branch, reject a duplicate dead case block, and reject an executable wildcard before approved routing. Six focused files passed 165 tests on the exact head; source-shape and test-file-size guards also passed.
  9. System security — PASS. The trusted matrix remains pre-checkout, candidate output must match it exactly, and evidence stays bound to the PR head/base and controller plan. Complete case-block validation closes executable-order shadowing without weakening least privilege, concurrency, or TOCTOU protections.

Files reviewed

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

@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

🤖 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/workflow-boundary.mts`:
- Around line 4440-4441: Extend the trusted controller matrix validation around
controllerMatrixScript so it rejects any assignment or mutation of matrix after
the trusted case block and before the existing printf output. Ensure validation
reflects the final emitted matrix, and add a regression test covering a
post-esac matrix override to a self-hosted runner.
🪄 Autofix (Beta)

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: 936b604b-69ab-4088-af0c-00ec455f5fd1

📥 Commits

Reviewing files that changed from the base of the PR and between 1f2b89e and 3576f30.

📒 Files selected for processing (2)
  • test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
  • tools/e2e/workflow-boundary.mts

Comment thread tools/e2e/workflow-boundary.mts Outdated
@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head 3576f3097

Verdict

PASS. I found no security issues in PR #7828 at exact head 3576f30979ba42e61059948769685fe671962f52. The trusted controller still adds only one existing typed E2E target without changing permissions, secrets, target implementation, or PR authorization. The final hardening compares the complete unique case "${TARGETS}" in block with the reviewed allowlist, so comments, dead duplicate blocks, extra wildcard commands, and altered runner assignments cannot satisfy the boundary validator.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, secret mapping, or artifact-content change.
  2. Input validation and sanitization — PASS. TARGETS remains restricted to the empty value, either exact approved ID, or their deterministic ordered pair. The boundary validator now requires the complete unique trusted case block, including the empty branch, both single-target branches, the ordered combined branch, and the fail-closed wildcard branch.
  3. Authentication and authorization — PASS. Existing actor, controller-check ownership, repository, live-PR, exact head/base SHA, and plan-hash verification remain unchanged.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, manifest, registry, or license change.
  5. Error handling and logging — PASS. Rejection remains fail closed and generic; no sensitive or user-controlled values are newly logged.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. The existing SHA-256 plan digest remains bound to the selector semantics.
  7. Configuration and security headers — PASS. Every accepted target branch remains fixed to ubuntu-latest. No permissions, environment, port, container, CORS, or header change.
  8. Security testing — PASS. Tests prove the clean fixture is accepted, require the trusted mapping before mutation, reject a misrouted branch despite matching comment text, reject a dead approved block before unsafe routing, and reject executable wildcard injection. The focused exact-tree suite passed 5 files and 122 tests; Biome, diff checks, the exact 1,909-file project-membership check, and the 1,909-file size budget also passed.
  9. System security — PASS. The trusted matrix remains pre-checkout, candidate output must match it exactly, and evidence stays bound to the PR head/base and controller plan. Full case-block equality prevents dead-code shadowing or command injection without weakening least privilege, concurrency, or TOCTOU protections.

Files reviewed

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/e2e-workflow.test.ts
  • test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head e7bb0dfc9

Verdict

PASS. I found no security issues in PR #7828 at exact head e7bb0dfc9b381b99f66b18def1045bfea9d4edad. The trusted controller adds only one existing typed E2E target without changing permissions, secrets, target implementation, or PR authorization. The final validator now compares the entire normalized controller-matrix script—strict shell mode, the complete allowlisted target case, and the sole output command—so comments, dead duplicate blocks, wildcard injection, altered runner assignments, and post-case matrix overrides cannot satisfy the trusted boundary.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, secret mapping, or artifact-content change.
  2. Input validation and sanitization — PASS. TARGETS remains restricted to the empty value, either exact approved ID, or their deterministic ordered pair. Exact full-script comparison permits only the reviewed assignments and fail-closed wildcard.
  3. Authentication and authorization — PASS. Existing actor, controller-check ownership, repository, live-PR, exact head/base SHA, and plan-hash verification remain unchanged.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, manifest, registry, or license change.
  5. Error handling and logging — PASS. Rejection remains fail closed and generic; no sensitive or user-controlled values are newly logged.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. The existing SHA-256 plan digest remains bound to selector semantics.
  7. Configuration and security headers — PASS. Every accepted target remains fixed to ubuntu-latest. No permissions, environment, port, container, CORS, or header change.
  8. Security testing — PASS. Regressions prove the clean fixture is accepted and reject an out-of-branch mapping hidden by a comment, a dead approved block, executable wildcard injection, and a post-esac self-hosted override. The focused exact-head suite passed 5 files and 123 tests; Biome, diff checks, normal hooks, E2E semantic plans, source-shape, and test-size budgets passed.
  9. System security — PASS. The trusted matrix remains pre-checkout, candidate output must match it exactly, and evidence stays bound to the PR head/base and controller plan. Full controller-script equality closes pre-output mutation paths without weakening least privilege, concurrency, or TOCTOU protections.

Files reviewed

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head e7bb0dfc9

Verdict

PASS. I found no security issues in PR #7828 at exact head e7bb0dfc9b381b99f66b18def1045bfea9d4edad. The trusted controller adds one existing typed E2E target without changing permissions, secrets, target implementation, or PR authorization. The final review hardening requires the complete controller-matrix script to match the reviewed strict-mode command, exact target-selection case block, and single final output command, so executable routing before or after the approved block cannot alter the emitted matrix.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, secret mapping, or artifact-content change.
  2. Input validation and sanitization — PASS. TARGETS accepts only the empty value, either exact approved ID, or their deterministic ordered pair. The trusted projection requires the complete script, fixed matrix assignments, rejecting default branch, and direct final output; reordered, duplicated, wildcard-shadowed, post-case-overridden, or otherwise altered routing fails validation.
  3. Authentication and authorization — PASS. Existing actor, controller-check ownership, repository, live-PR, exact head/base SHA, workflow SHA, and plan-hash checks remain unchanged. Target selection comes only from the trusted risk plan for the exact status-snapshot.ts path.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, manifest, registry, or license change.
  5. Error handling and logging — PASS. Rejection remains fail closed and generic; no sensitive or user-controlled values are newly logged.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. Advancing the plan version keeps the existing SHA-256 plan digest bound to the new selector semantics.
  7. Configuration and security headers — PASS. Every accepted single and combined target projection remains fixed to ubuntu-latest. No workflow permission, environment, port, container, CORS, or header change.
  8. Security testing — PASS. Tests prove clean-fixture validity, require the trusted mapping before mutation, reject matching text outside the exact branch, reject a duplicate dead case block, reject an executable wildcard before approved routing, and reject a matrix override after esac before output. Six focused files passed 166 tests on the exact tree; source-shape and test-file-size guards also passed.
  9. System security — PASS. The trusted matrix remains pre-checkout, candidate output must match it exactly, and evidence stays bound to the PR head/base and controller plan. Complete script validation closes both branch-order and post-case mutation paths without weakening least privilege, concurrency, or TOCTOU protections.

Files reviewed

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

@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

🤖 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 `@test/e2e/support/trusted-target-routing-workflow-boundary.test.ts`:
- Around line 79-90: In the test “rejects a matrix override after approved
target routing,” assert that validateE2eWorkflow(workflow) does not contain
EXPECTED_ERROR immediately after fixture creation and before mutating
controllerMatrix.run. Keep the existing post-mutation rejection assertion so the
test verifies the unsafe override causes the failure.
🪄 Autofix (Beta)

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: f845ce19-c748-4d45-a923-fcf7cb802ed6

📥 Commits

Reviewing files that changed from the base of the PR and between 3576f30 and e7bb0df.

📒 Files selected for processing (2)
  • test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
  • tools/e2e/workflow-boundary.mts

Comment thread test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches

Copy link
Copy Markdown
Contributor Author

Security review — exact head 0ba00271c

Verdict

PASS. I found no security issues in PR #7828 at exact head 0ba00271cf9cb260b9a74c5c939afde9ffd64c4a, refreshed onto trusted main 3aea38c4cbc067499a9ac8aa21b665bd11ef7bc2. The controller adds only the existing post-reboot typed target. The current trusted script admits only the empty selection, either exact approved target, or their deterministic ordered pair, routes them to ubuntu-latest, rejects everything else, and emits the matrix once. Exact full-script comparison prevents comments, dead duplicate blocks, wildcard injection, altered assignments, and post-case overrides from satisfying the boundary.

Findings

No findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, key, credential fixture, secret mapping, or artifact-content change. The refreshed trusted workflow retains its established credential boundaries.
  2. Input validation and sanitization — PASS. TARGETS is restricted to the reviewed values and order. The candidate planner matrix must equal the controller projection; malformed or reordered selectors fail closed.
  3. Authentication and authorization — PASS. Current-main actor, controller-check ownership, repository, live-PR, exact head/base SHA, and plan-hash verification remain intact. The change does not expand who can authorize or dispatch.
  4. Dependencies and third-party libraries — PASS. No dependency, action pin, image, manifest, registry, or license change in the PR diff.
  5. Error handling and logging — PASS. Rejection remains fail closed and generic; no sensitive or user-controlled values are newly logged.
  6. Cryptography and data protection — PASS. No cryptographic behavior changes. The SHA-256 plan digest remains bound to selector semantics and the exact head/base.
  7. Configuration and security headers — PASS. Both accepted typed targets are fixed to ubuntu-latest. No permissions, environment, port, container, CORS, or header change. The one-line architecture budget change only ratchets measured fan-in from 27 to 26.
  8. Security testing — PASS. Regressions prove the clean fixture is accepted and reject an out-of-branch mapping hidden by a comment, a dead approved block, executable wildcard injection, and a post-esac self-hosted override. After the main refresh, focused tests passed 5 files/124 tests; repository checks passed 1,395 source files, 4,106 dependency edges, and exact membership for 1,912 tests across 7 projects. Normal hooks passed.
  9. System security — PASS. The trusted matrix remains pre-checkout, candidate output must match it exactly, and evidence stays bound to the PR head/base and plan. Full controller-script equality closes pre-output mutation paths without weakening least privilege, concurrency, or TOCTOU protections. Current main’s retirement of legacy Brev source-install validation does not change this PR’s target authorization.

Files reviewed

  • .github/workflows/e2e.yaml
  • ci/source-architecture-budget.json
  • test/e2e/README.md
  • test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

@jyaunches
jyaunches requested a review from senthilr-nv July 29, 2026 17:10
@senthilr-nv

Copy link
Copy Markdown
Collaborator

Reviewed exact head 0ba00271cf9cb260b9a74c5c939afde9ffd64c4a against current base 3aea38c4cbc067499a9ac8aa21b665bd11ef7bc2.

No actionable findings. The change is in product scope as validation infrastructure for #7824: it enables the existing post-reboot recovery target on an exact PR head without changing production recovery behavior or creating a new supported surface.

Security review passed all nine categories. Focused validation passed:

  • controller, risk-plan, and workflow-boundary suite: 166 tests
  • workflow-output/report boundary suite: 33 tests
  • semantic E2E phase coverage: 115 tests across 73 files
  • Biome checks
  • direct single-target and combined-target matrix execution, including fail-closed rejection of an untrusted target

GitHub currently reports the PR as mergeable with all required checks passing; its blocked status is REVIEW_REQUIRED, separate from the product-scope verdict.

Approved from my code, security, and product-scope review.

@senthilr-nv senthilr-nv 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.

Approved at exact head 0ba00271cf9cb260b9a74c5c939afde9ffd64c4a. No actionable code, security, or product-scope findings.

@copy-pr-bot

copy-pr-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches

Copy link
Copy Markdown
Contributor Author

Sensitive-path security review

Reviewed exact head b70b864822fcd0ce3eaa561e35e6f9bae76d1910 against base 9b1fbd897761dc83028ceda1f06165b3e5c2404e.

Result: PASS — no findings.

  1. Input validation and injection: The typed target is exact-match allowlisted. The controller rejects comments, duplicate/dead/alternate case blocks, wildcard routing, and post-esac matrix mutation.
  2. Authentication and authorization: No authentication, role, permission, or reviewer-routing behavior changes.
  3. Secrets and credentials: No secret, token, credential, environment-export, or log-redaction behavior changes.
  4. Network and SSRF: No URL, host, port, proxy, redirect, DNS, or network-policy behavior changes.
  5. Filesystem and command execution: The new target uses the existing trusted dispatch path; no new shell interpolation or filesystem target is introduced.
  6. Dependencies and supply chain: No dependency, lockfile, action pin, package source, or installer change.
  7. Cryptography: No cryptographic or signature-verification change.
  8. Sandbox and privilege boundaries: Both approved typed targets, including combined plans, are pinned to ubuntu-latest; candidate and trusted matrices must remain exactly equal.
  9. Fail-closed behavior and evidence integrity: Validation covers the complete controller script through its sole final output, runs before checkout, and binds the exact PR head, base, plan, runner, and candidate-generated matrix.

Reviewed files:

  • .github/workflows/e2e.yaml
  • test/e2e/README.md
  • test/e2e/support/trusted-target-routing-workflow-boundary.test.ts
  • test/pr-e2e-gate-typed-target.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

Verification: 95 focused E2E-support tests, 25 workflow-plan tests, and 71 integration tests passed on the exact head (191 total). Normal pre-push CLI type-check also passed.

@jyaunches
jyaunches merged commit cd49b2f into main Jul 29, 2026
66 of 67 checks passed
@jyaunches
jyaunches deleted the codex/issue-7824-e2e-target-current branch July 29, 2026 19:58
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 area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants