Skip to content

ci(e2e): discover credential-free tests from source - #6670

Merged
cv merged 9 commits into
mainfrom
codex/discover-live-e2e-tests
Jul 11, 2026
Merged

ci(e2e): discover credential-free tests from source#6670
cv merged 9 commits into
mainfrom
codex/discover-live-e2e-tests

Conversation

@cv

@cv cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #6662, this replaces repeated credential-free E2E jobs with source discovery and one shared Ubuntu E2E job. Tests opt in beside their code with e2e/credential-free; the E2E workflow owns the runner, setup, permissions, secrets, timeout, and artifact policy.

Changes

  • Discover tagged tests from their real Vitest projects and derive test IDs from unique filenames, with no separate test catalog or manually maintained matrix.
  • Run five credential-free tests in the shared-e2e matrix job, including the previously unwired Ubuntu repository CLI smoke test.
  • Move selector and matrix planning from inline workflow Bash into tested TypeScript while preserving jobs/targets selectors, PR reporting, scorecard inputs, and controller evidence.
  • Keep the temporary four-key shell output required by the current base E2E workflow. It discovers that workflow's actual job IDs, excludes selectors the base cannot run, and can be deleted once this workflow is on main.
  • Reduce .github/workflows/e2e.yaml from 5,430 to 5,334 lines and document the contributor contract in test/e2e/README.md.

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: independent diff and workflow-contract reviews found no credential exposure, path injection, untrusted runner selection, or unresolved Actions contract mismatch; boundary tests pin the credential-free shared job's no-secret setup and artifact contracts.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration 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 — npx vitest run --project e2e-support (113 files, 910 tests); PR gate/advisor/mock-parity integration suites (52 tests); npm run test:projects:check; npm run typecheck:cli; real origin/main...HEAD mock-parity check; exact current-base shell/matrix compatibility simulation
  • Applicable broad gate passed — earlier PR head: env -u SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY npm test (1,388 files, 15,964 tests passed; 39 skipped; 1 todo); current terminology change set reran the complete E2E-support project
  • 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) — passed with 0 errors and 2 existing Fern warnings
  • Doc pages follow the style guide (doc changes only) — no docs/ pages changed
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • New Features

    • Added discovery and execution of “credential-free” E2E tests via a shared workflow job.
    • Added a dedicated workflow planner that builds a live test matrix plus a credential-free test matrix from typed selectors.
    • Improved PR reporting to include per-test results (including handling for unavailable/unknown results).
  • Bug Fixes

    • Improved selector parsing/selection behavior for shared E2E routing and dispatch targeting.
    • Prevented metadata-only changes from being treated as relevant for mock-parity checks.
  • Documentation

    • Added documentation for credential-free tests, tagging, discovery rules, and local inspection commands.
  • Tests

    • Extended E2E coverage for selector normalization, credential-free discovery, workflow boundaries, and PR reporting scenarios (including unknown/missing results).

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Jul 11, 2026
@coderabbitai

coderabbitai Bot commented Jul 11, 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 E2E workflow discovers credential-free tests from module tags, plans live and shared matrices with validated selectors, executes shared rows, validates workflow contracts, and reports per-test conclusions. Advisor normalization and mock-parity filtering also recognize credential-free test metadata.

Changes

Credential-free E2E workflow

Layer / File(s) Summary
Credential-free test discovery
tools/e2e/credential-free-tests.mts, vitest.config.ts, test/e2e/live/*, test/e2e/support/credential-free-tests.test.ts, test/e2e/README.md
Tagged test modules are validated, discovered through Vitest, converted into sorted { id, file, project } rows, and documented.
Inventory and workflow boundary contracts
tools/e2e/workflow-boundary.mts, tools/e2e/workflow-inventory.mts, tools/e2e/prepare-e2e-workflow-boundary.mts, tools/e2e/upload-e2e-artifacts-workflow-boundary.mts, tools/e2e/pr-e2e-gate.mts, test/e2e/support/*workflow-boundary.test.ts
Inventory mappings, shared-job requirements, selector semantics, shard routing, preparation, upload, image, permission, and boundary validation are updated for shared execution.
Workflow planning and matrix generation
tools/e2e/workflow-plan.mts, .github/workflows/e2e.yaml, test/e2e/support/workflow-plan.test.ts
Selectors are mutually exclusive and format-checked; planner output separates live and credential-free matrices and is schema-validated before workflow outputs are emitted.
Shared execution and PR reporting
.github/workflows/e2e.yaml, test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts
The shared job runs per-test Vitest rows, and reporting queries child jobs, represents unavailable conclusions as unknown, and renders test-focused PR status.
Advisor profile-aware normalization
tools/e2e-advisor/targets.mts, test/e2e-advisor-targets.test.ts
Changed-file credential-free tags and sources influence target normalization, recommendations, and missing-wiring explanations.
Mock parity source filtering
scripts/checks/e2e-mock-parity.ts, test/e2e-mock-parity.test.ts
Live test parity checks compare tokenized source content so module-tag-only changes are excluded from relevance checks.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WorkflowDispatch
  participant GenerateMatrix
  participant SharedE2E
  participant WorkflowJobsAPI
  participant ReportToPR
  WorkflowDispatch->>GenerateMatrix: pass jobs or targets selectors
  GenerateMatrix->>SharedE2E: provide test_matrix rows
  SharedE2E->>WorkflowJobsAPI: publish per-test job conclusions
  ReportToPR->>WorkflowJobsAPI: query Shared E2E (id) jobs
  ReportToPR->>ReportToPR: merge conclusions and render PR status
Loading
🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is clear, concise, and accurately reflects the source-discovery focus of the changeset, even though it omits some workflow plumbing.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/discover-live-e2e-tests

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

@github-code-quality

github-code-quality Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the codex/discover-live-... branch remains at 78%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main e4d2e91 codex/discover-live-... 780d06e +/-
src/lib/inference/config.ts 96% 98% +2%

Updated July 11, 2026 14:50 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: cloud-onboard, credential-sanitization, security-posture
Optional E2E: openshell-version-pin, onboard-negative-paths, docs-validation, gateway-drift-preflight, ubuntu-repo-cli-smoke

Dispatch hint: cloud-onboard,credential-sanitization,security-posture

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • cloud-onboard (high): Required by the deterministic risk plan for E2E workflow/platform-install changes; validates that a clean hosted onboarding path still works through the updated workflow planner and dispatch wiring.
  • credential-sanitization (medium): Required by the deterministic risk plan for credential-free/shared E2E and artifact-boundary changes; validates that credentials do not leak through logs, traces, or artifacts.
  • security-posture (medium): Required by the deterministic risk plan for security-boundary changes; validates fail-closed behavior and preserved security posture after shared E2E workflow changes.

Optional E2E

  • openshell-version-pin (low): Useful adjacent confidence because this formerly standalone credential-free E2E was migrated to shared-e2e and still covers installer/OpenShell version-pin behavior.
  • onboard-negative-paths (low): Useful adjacent confidence that the shared-e2e matrix still runs the invalid-key onboarding negative path with the expected CLI exit/output contract.
  • docs-validation (low): Useful adjacent confidence that the shared-e2e migration preserves checkout-local CLI/docs parity and local Markdown link validation.
  • gateway-drift-preflight (low): Useful adjacent confidence because the integration-project credential-free test is now discovered and reported through shared-e2e rather than a dedicated workflow job.
  • ubuntu-repo-cli-smoke (low): Useful smoke coverage for the new credential-free test discovery path and shared job execution of a repo-local CLI check.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: e2e.yaml
  • jobs input: cloud-onboard,credential-sanitization,security-posture

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

E2E Target Recommendation

Required E2E targets: cloud-onboard, credential-sanitization, security-posture, e2e-all
Optional E2E targets: None

Dispatch required E2E targets:

  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=cloud-onboard
  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=credential-sanitization
  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=security-posture
  • gh workflow run e2e.yaml --ref <pr-head-ref>

Workflow run

Full E2E target advisor summary

E2E Target Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E targets

  • cloud-onboard: Installer and platform changes must work on a clean supported host with the pinned runtime dependencies.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=cloud-onboard
  • credential-sanitization: Credential and security-boundary changes must preserve secrecy, sanitization, and fail-closed policy behavior.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=credential-sanitization
  • security-posture: Credential and security-boundary changes must preserve secrecy, sanitization, and fail-closed policy behavior.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=security-posture
  • e2e-all: Changes touch the shared E2E workflow machinery, matrix/planner emission, credential-free shared E2E discovery, and shared workflow-boundary support. Policy requires the full E2E fan-out.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref>

Optional E2E targets

  • None.

Relevant changed files

  • .github/workflows/e2e.yaml
  • scripts/checks/e2e-mock-parity.ts
  • test/e2e-advisor-targets.test.ts
  • test/e2e-mock-parity.test.ts
  • test/e2e/README.md
  • test/e2e/live/docs-validation.test.ts
  • test/e2e/live/onboard-negative-paths.test.ts
  • test/e2e/live/openshell-version-pin.test.ts
  • test/e2e/live/ubuntu-repo-cli-smoke.test.ts
  • test/e2e/support/credential-free-tests.test.ts
  • test/e2e/support/dockerhub-auth-workflow-boundary.test.ts
  • test/e2e/support/docs-validation-workflow-boundary.test.ts
  • test/e2e/support/e2e-operations-workflow-boundary.test.ts
  • test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts
  • test/e2e/support/e2e-workflow.test.ts
  • test/e2e/support/jetson-workflow-boundary.test.ts
  • test/e2e/support/prepare-e2e-workflow-boundary.test.ts
  • test/e2e/support/shared-e2e-workflow-boundary.test.ts
  • test/e2e/support/upload-e2e-artifacts-workflow-boundary.test.ts
  • test/e2e/support/workflow-plan.test.ts
  • test/gateway-drift-preflight.test.ts
  • test/pr-e2e-gate.test.ts
  • test/pr-risk-plan.test.ts
  • tools/e2e-advisor/targets.mts
  • tools/e2e/credential-free-tests.mts
  • tools/e2e/docs-validation-workflow-boundary.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/pr-e2e-gate.mts
  • tools/e2e/prepare-e2e-workflow-boundary.mts
  • tools/e2e/upload-e2e-artifacts-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts
  • tools/e2e/workflow-inventory.mts
  • tools/e2e/workflow-plan.mts
  • vitest.config.ts

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — Changes requested

Merge posture: Do not merge yet
Primary next action: Fix PRA-1: shared-e2e job consolidates 4 free-standing jobs without completeness verification; then add or justify PRA-T1.
Open items: 3 required · 3 warnings · 0 suggestions · 6 test follow-ups
Since last review: 0 prior items resolved · 2 still apply · 4 new items found

Action checklist

  • PRA-1 Fix: shared-e2e job consolidates 4 free-standing jobs without completeness verification in .github/workflows/e2e.yaml:367
  • PRA-2 Fix: TypeScript AST parsing adds CI-critical dependency for simple tag detection in tools/e2e/credential-free-tests.mts:4
  • PRA-3 Fix: Quality gate claims sensitive-path review completed but provides no reviewer link or approval reference in .github/workflows/e2e.yaml:1
  • PRA-4 Resolve or justify: Missing migration guide for converting free-standing jobs to credential-free tags in test/e2e/README.md:35
  • PRA-5 Resolve or justify: report-to-pr job concentrates trusted Actions API logic in 397-line inline script in .github/workflows/e2e.yaml:4877
  • PRA-6 Resolve or justify: Dependent workflow pr-e2e-gate.yaml coordinate job lacks workflow-level fork guard in .github/workflows/pr-e2e-gate.yaml:30
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Runtime validation
  • PRA-T6 Add or justify test follow-up: Acceptance clause

Findings index

ID Severity Category Location Required action
PRA-1 Required architecture .github/workflows/e2e.yaml:367 Add a generate-matrix preflight step that cross-references discovered credential-free tests against source files with the e2e/credential-free tag, failing if any tagged file is missing from discovery or any discovered test lacks the tag.
PRA-2 Required architecture tools/e2e/credential-free-tests.mts:4 Replace TypeScript AST parsing with a simple regex-based tag detection (e.g., /\/\/ @module-tag e2e\/credential-free/). Pin typescript version if AST approach is justified with documented rationale.
PRA-3 Required acceptance .github/workflows/e2e.yaml:1 Provide a link to the independent review, maintainer approval, or waiver record; or uncheck the quality gate until review is completed and documented.
PRA-4 Resolve/justify docs test/e2e/README.md:35 Add a 'Migrating existing free-standing jobs' subsection to test/e2e/README.md explaining: when to convert a free-standing job to credential-free tag, the env var differences (CHECK_DOC_LINKS_REMOTE, NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE), and the capabilities that still require a dedicated job (credentials, custom runner, different timeout, additional setup).
PRA-5 Resolve/justify security .github/workflows/e2e.yaml:4877 Extract the reporting logic into a separate TypeScript module (e.g., tools/e2e/report-to-pr.mts) with narrow exported functions and focused tests for each trust boundary: fetchPerTestResults, classifyChildResults, validateAggregateConsistency, formatCommentBody. Keep the workflow step as a thin wrapper.
PRA-6 Resolve/justify security .github/workflows/pr-e2e-gate.yaml:30 Add workflow-level fork guard to pr-e2e-gate.yaml coordinate job as defense-in-depth: if: github.event.pull_request.head.repo.full_name == github.repository. This is a prerequisite for the secure operation of this PR's report-to-pr dependency chain.

🚨 Required before merge

Address these before merging unless a maintainer explicitly overrides the advisor with rationale.

PRA-1 Required — shared-e2e job consolidates 4 free-standing jobs without completeness verification

  • Location: .github/workflows/e2e.yaml:367
  • Category: architecture
  • Problem: The new shared-e2e matrix job replaces openshell-version-pin, onboard-negative-paths, docs-validation, and gateway-drift-preflight free-standing jobs. No cross-reference test verifies that every @module-tag e2e/credential-free file is discovered and every discovered test has the tag.
  • Impact: Tagged tests can silently drop from CI coverage or untagged tests can be included without detection. Regression risk for credential-free test infrastructure changes.
  • Required action: Add a generate-matrix preflight step that cross-references discovered credential-free tests against source files with the e2e/credential-free tag, failing if any tagged file is missing from discovery or any discovered test lacks the tag.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check .github/workflows/e2e.yaml generate-matrix step for a cross-reference validation; check test/e2e/support/shared-e2e-workflow-boundary.test.ts for completeness test.
  • Missing regression test: A test in shared-e2e-workflow-boundary.test.ts that asserts discovered credential-free tests == source files with @module-tag e2e/credential-free (both directions).
  • Done when: The required change is committed and verification passes: Check .github/workflows/e2e.yaml generate-matrix step for a cross-reference validation; check test/e2e/support/shared-e2e-workflow-boundary.test.ts for completeness test.
  • Evidence: .github/workflows/e2e.yaml:367-400 (shared-e2e job definition) test/e2e/support/shared-e2e-workflow-boundary.test.ts (new file, 107 lines, no completeness cross-reference test)

PRA-2 Required — TypeScript AST parsing adds CI-critical dependency for simple tag detection

  • Location: tools/e2e/credential-free-tests.mts:4
  • Category: architecture
  • Problem: credential-free-tests.mts (297 lines) imports TypeScript compiler API to parse source files and detect // @module-tag e2e/credential-free comments. A regex-based approach would eliminate the ~50MB typescript dependency in the CI-critical test discovery path.
  • Impact: Increases attack surface for supply-chain compromise; adds build-time dependency on TypeScript compiler internals; complicates CI debugging; over-engineered for literal comment detection.
  • Required action: Replace TypeScript AST parsing with a simple regex-based tag detection (e.g., /\/\/ @module-tag e2e\/credential-free/). Pin typescript version if AST approach is justified with documented rationale.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check tools/e2e/credential-free-tests.mts for typescript import and AST parsing logic; verify no regex alternative exists.
  • Missing regression test: Behavior-equivalence test in test/e2e/support/credential-free-tests.test.ts comparing AST parser output vs regex reference implementation across comment formats (single-line, multi-line, block comment, edge cases).
  • Done when: The required change is committed and verification passes: Check tools/e2e/credential-free-tests.mts for typescript import and AST parsing logic; verify no regex alternative exists.
  • Evidence: tools/e2e/credential-free-tests.mts:4 (import ts from 'typescript') tools/e2e/credential-free-tests.mts:10-40 (sourceTokens function using ts.createSourceFile) test/e2e/support/credential-free-tests.test.ts:50-70 (tests for tag detection but no AST vs regex equivalence test)

PRA-3 Required — Quality gate claims sensitive-path review completed but provides no reviewer link or approval reference

  • Location: .github/workflows/e2e.yaml:1
  • Category: acceptance
  • Problem: PR body claims 'Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: independent diff and workflow-contract reviews found no credential exposure...' but no actual reviewer link, approval reference, or maintainer waiver is provided. This quality gate checkbox is checked without supporting evidence.
  • Impact: Security-sensitive changes to E2E workflow (credential handling, runner selection, artifact boundaries) merge without documented independent review, violating the project's quality gate process.
  • Required action: Provide a link to the independent review, maintainer approval, or waiver record; or uncheck the quality gate until review is completed and documented.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check PR description Quality Gates section for reviewer/approval link; search PR comments for security review sign-off.
  • Missing regression test: N/A — process gap, not code behavior. Add a CI check that validates quality gate references when sensitive-paths checkbox is checked.
  • Done when: The required change is committed and verification passes: Check PR description Quality Gates section for reviewer/approval link; search PR comments for security review sign-off.
  • Evidence: PR ci(e2e): discover credential-free tests from source #6670 body: 'Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: independent diff and workflow-contract reviews found no credential exposure...' No reviewer link, approval reference, or maintainer waiver URL in PR description or comments
Review findings by urgency: 3 required fixes, 3 items to resolve/justify, 0 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-4 Resolve/justify — Missing migration guide for converting free-standing jobs to credential-free tags

  • Location: test/e2e/README.md:35
  • Category: docs
  • Problem: README documents the new credential-free tag syntax and discovery mechanism but does not explain how to migrate existing free-standing E2E jobs (like the 4 consolidated in this PR) to the shared-e2e model. Contributors adding new credential-free tests lack guidance on when to use a dedicated job vs. the shared job.
  • Impact: Inconsistent adoption of the credential-free pattern; new tests may incorrectly use dedicated jobs when shared-e2e is appropriate, or vice versa, leading to workflow fragmentation.
  • Recommended action: Add a 'Migrating existing free-standing jobs' subsection to test/e2e/README.md explaining: when to convert a free-standing job to credential-free tag, the env var differences (CHECK_DOC_LINKS_REMOTE, NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE), and the capabilities that still require a dedicated job (credentials, custom runner, different timeout, additional setup).
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read test/e2e/README.md Credential-free tests section; verify migration guidance exists.
  • Missing regression test: N/A — documentation gap. Could add a test that greps for free-standing job patterns and suggests credential-free tag where applicable.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read test/e2e/README.md Credential-free tests section; verify migration guidance exists.
  • Evidence: test/e2e/README.md lines 18-45: Credential-free tests section describes tag syntax and discovery but no migration guidance 4 free-standing jobs (openshell-version-pin, onboard-negative-paths, docs-validation, gateway-drift-preflight) converted to shared-e2e in this PR with no documented migration pattern

PRA-5 Resolve/justify — report-to-pr job concentrates trusted Actions API logic in 397-line inline script

  • Location: .github/workflows/e2e.yaml:4877
  • Category: security
  • Problem: The report-to-pr job contains a 397-line inline GitHub Script that uses github.paginate(actions.listJobsForWorkflowRun) to fetch per-test matrix child results, with complex fallback logic for missing children, aggregate/child contradiction detection, and unknown result handling. This concentrates trusted-code boundary logic (Actions API calls with actions:read permission) in a single unmodularized script, making boundary review and targeted regression testing harder.
  • Impact: A defect or future edit in the reporting logic could misclassify test results, hide failures, or expose the GITHUB_TOKEN to unintended API calls. The monolithic script lacks focused unit tests for each boundary (API pagination, result attribution, aggregate validation).
  • Recommended action: Extract the reporting logic into a separate TypeScript module (e.g., tools/e2e/report-to-pr.mts) with narrow exported functions and focused tests for each trust boundary: fetchPerTestResults, classifyChildResults, validateAggregateConsistency, formatCommentBody. Keep the workflow step as a thin wrapper.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read .github/workflows/e2e.yaml report-to-pr step script; verify no focused module exists for the reporting logic; check test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts for boundary tests (currently only execution tests).
  • Missing regression test: Focused tests for each extracted boundary: API pagination error handling, missing child result classification, aggregate/child contradiction detection, fork PR validation.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read .github/workflows/e2e.yaml report-to-pr step script; verify no focused module exists for the reporting logic; check test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts for boundary tests (currently only execution tests).
  • Evidence: .github/workflows/e2e.yaml:4877-5274 (report-to-pr step script, 397 lines) test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts: execution tests only, no focused boundary unit tests

PRA-6 Resolve/justify — Dependent workflow pr-e2e-gate.yaml coordinate job lacks workflow-level fork guard

  • Location: .github/workflows/pr-e2e-gate.yaml:30
  • Category: security
  • Problem: This PR's e2e.yaml report-to-pr job adds needs: [pr-e2e-gate.yaml jobs...] but the parent pr-e2e-gate.yaml coordinate job has actions:write, checks:write permissions without a workflow-level fork guard (if: github.event.pull_request.head.repo.full_name == github.repository). Fork rejection exists only in controller code (tools/e2e/pr-e2e-gate.mts). This is a carry-over from PR ci(e2e): add risk-based PR gate #6662 (Nemotron Ultra PRA-2, Required).
  • Impact: A malicious fork PR could trigger the coordinate job; if controller fork rejection is bypassed (prototype pollution, logic error, future refactor), the controller would have GITHUB_TOKEN with write permissions before the check executes.
  • Recommended action: Add workflow-level fork guard to pr-e2e-gate.yaml coordinate job as defense-in-depth: if: github.event.pull_request.head.repo.full_name == github.repository. This is a prerequisite for the secure operation of this PR's report-to-pr dependency chain.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check .github/workflows/pr-e2e-gate.yaml coordinate job for if condition checking github.event.pull_request.head.repo.full_name == github.repository.
  • Missing regression test: Test in test/pr-e2e-gate-workflow.test.ts simulating fork PR dispatch verifying coordinate job evaluates to skipped due to workflow-level fork guard.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check .github/workflows/pr-e2e-gate.yaml coordinate job for if condition checking github.event.pull_request.head.repo.full_name == github.repository.
  • Evidence: .github/workflows/pr-e2e-gate.yaml:30 (coordinate job permissions actions:write, checks:write) tools/e2e/pr-e2e-gate.mts startPrGate throws 'PR branch must be in the base repository' before fetch No if condition on coordinate job checking github.event.pull_request.head.repo.full_name

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

  • None.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Run the `cloud-onboard` E2E job for Installer and platform changes must work on a clean supported host with the pinned runtime dependencies. Matched files: `.github/workflows/e2e.yaml`.. Deterministic regression risks require live validation: platform-install, credentials-security. Two tier-3 risk families (platform-install, credentials-security) with 3 required E2E jobs (cloud-onboard, credential-sanitization, security-posture) have invariants that cannot be validated by unit/mocked tests. Static coverage is strong for new discovery/planning/reporting logic (12+7+10+20+7+5+9+13+5+8+10+2+17+8 test blocks across changed test files).
  • PRA-T2 Runtime validation — Run the cloud-onboard E2E job for Installer and platform changes must work on a clean supported host with the pinned runtime dependencies. Matched files: .github/workflows/e2e.yaml.. Deterministic regression risks require live validation: platform-install, credentials-security. Two tier-3 risk families (platform-install, credentials-security) with 3 required E2E jobs (cloud-onboard, credential-sanitization, security-posture) have invariants that cannot be validated by unit/mocked tests. Static coverage is strong for new discovery/planning/reporting logic (12+7+10+20+7+5+9+13+5+8+10+2+17+8 test blocks across changed test files).
  • PRA-T3 Runtime validation — Run the `credential-sanitization` E2E job for Credential and security-boundary changes must preserve secrecy, sanitization, and fail-closed policy behavior. Matched files: `tools/e2e/credential-free-tests.mts`.. Deterministic regression risks require live validation: platform-install, credentials-security. Two tier-3 risk families (platform-install, credentials-security) with 3 required E2E jobs (cloud-onboard, credential-sanitization, security-posture) have invariants that cannot be validated by unit/mocked tests. Static coverage is strong for new discovery/planning/reporting logic (12+7+10+20+7+5+9+13+5+8+10+2+17+8 test blocks across changed test files).
  • PRA-T4 Runtime validation — Run the credential-sanitization E2E job for Credential and security-boundary changes must preserve secrecy, sanitization, and fail-closed policy behavior. Matched files: tools/e2e/credential-free-tests.mts.. Deterministic regression risks require live validation: platform-install, credentials-security. Two tier-3 risk families (platform-install, credentials-security) with 3 required E2E jobs (cloud-onboard, credential-sanitization, security-posture) have invariants that cannot be validated by unit/mocked tests. Static coverage is strong for new discovery/planning/reporting logic (12+7+10+20+7+5+9+13+5+8+10+2+17+8 test blocks across changed test files).
  • PRA-T5 Runtime validation — Run the `security-posture` E2E job for Credential and security-boundary changes must preserve secrecy, sanitization, and fail-closed policy behavior. Matched files: `tools/e2e/credential-free-tests.mts`.. Deterministic regression risks require live validation: platform-install, credentials-security. Two tier-3 risk families (platform-install, credentials-security) with 3 required E2E jobs (cloud-onboard, credential-sanitization, security-posture) have invariants that cannot be validated by unit/mocked tests. Static coverage is strong for new discovery/planning/reporting logic (12+7+10+20+7+5+9+13+5+8+10+2+17+8 test blocks across changed test files).
  • PRA-T6 Acceptance clause — Sensitive-path review completed or maintainer-approved waiver recorded — add test evidence or identify existing coverage. PR body claims review completed but provides no reviewer link, approval reference, or maintainer waiver URL
Since last review details

Current findings, using the urgency labels above:

PRA-1 Required — shared-e2e job consolidates 4 free-standing jobs without completeness verification

  • Location: .github/workflows/e2e.yaml:367
  • Category: architecture
  • Problem: The new shared-e2e matrix job replaces openshell-version-pin, onboard-negative-paths, docs-validation, and gateway-drift-preflight free-standing jobs. No cross-reference test verifies that every @module-tag e2e/credential-free file is discovered and every discovered test has the tag.
  • Impact: Tagged tests can silently drop from CI coverage or untagged tests can be included without detection. Regression risk for credential-free test infrastructure changes.
  • Required action: Add a generate-matrix preflight step that cross-references discovered credential-free tests against source files with the e2e/credential-free tag, failing if any tagged file is missing from discovery or any discovered test lacks the tag.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check .github/workflows/e2e.yaml generate-matrix step for a cross-reference validation; check test/e2e/support/shared-e2e-workflow-boundary.test.ts for completeness test.
  • Missing regression test: A test in shared-e2e-workflow-boundary.test.ts that asserts discovered credential-free tests == source files with @module-tag e2e/credential-free (both directions).
  • Done when: The required change is committed and verification passes: Check .github/workflows/e2e.yaml generate-matrix step for a cross-reference validation; check test/e2e/support/shared-e2e-workflow-boundary.test.ts for completeness test.
  • Evidence: .github/workflows/e2e.yaml:367-400 (shared-e2e job definition) test/e2e/support/shared-e2e-workflow-boundary.test.ts (new file, 107 lines, no completeness cross-reference test)

PRA-2 Required — TypeScript AST parsing adds CI-critical dependency for simple tag detection

  • Location: tools/e2e/credential-free-tests.mts:4
  • Category: architecture
  • Problem: credential-free-tests.mts (297 lines) imports TypeScript compiler API to parse source files and detect // @module-tag e2e/credential-free comments. A regex-based approach would eliminate the ~50MB typescript dependency in the CI-critical test discovery path.
  • Impact: Increases attack surface for supply-chain compromise; adds build-time dependency on TypeScript compiler internals; complicates CI debugging; over-engineered for literal comment detection.
  • Required action: Replace TypeScript AST parsing with a simple regex-based tag detection (e.g., /\/\/ @module-tag e2e\/credential-free/). Pin typescript version if AST approach is justified with documented rationale.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check tools/e2e/credential-free-tests.mts for typescript import and AST parsing logic; verify no regex alternative exists.
  • Missing regression test: Behavior-equivalence test in test/e2e/support/credential-free-tests.test.ts comparing AST parser output vs regex reference implementation across comment formats (single-line, multi-line, block comment, edge cases).
  • Done when: The required change is committed and verification passes: Check tools/e2e/credential-free-tests.mts for typescript import and AST parsing logic; verify no regex alternative exists.
  • Evidence: tools/e2e/credential-free-tests.mts:4 (import ts from 'typescript') tools/e2e/credential-free-tests.mts:10-40 (sourceTokens function using ts.createSourceFile) test/e2e/support/credential-free-tests.test.ts:50-70 (tests for tag detection but no AST vs regex equivalence test)

PRA-3 Required — Quality gate claims sensitive-path review completed but provides no reviewer link or approval reference

  • Location: .github/workflows/e2e.yaml:1
  • Category: acceptance
  • Problem: PR body claims 'Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: independent diff and workflow-contract reviews found no credential exposure...' but no actual reviewer link, approval reference, or maintainer waiver is provided. This quality gate checkbox is checked without supporting evidence.
  • Impact: Security-sensitive changes to E2E workflow (credential handling, runner selection, artifact boundaries) merge without documented independent review, violating the project's quality gate process.
  • Required action: Provide a link to the independent review, maintainer approval, or waiver record; or uncheck the quality gate until review is completed and documented.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check PR description Quality Gates section for reviewer/approval link; search PR comments for security review sign-off.
  • Missing regression test: N/A — process gap, not code behavior. Add a CI check that validates quality gate references when sensitive-paths checkbox is checked.
  • Done when: The required change is committed and verification passes: Check PR description Quality Gates section for reviewer/approval link; search PR comments for security review sign-off.
  • Evidence: PR ci(e2e): discover credential-free tests from source #6670 body: 'Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: independent diff and workflow-contract reviews found no credential exposure...' No reviewer link, approval reference, or maintainer waiver URL in PR description or comments

PRA-4 Resolve/justify — Missing migration guide for converting free-standing jobs to credential-free tags

  • Location: test/e2e/README.md:35
  • Category: docs
  • Problem: README documents the new credential-free tag syntax and discovery mechanism but does not explain how to migrate existing free-standing E2E jobs (like the 4 consolidated in this PR) to the shared-e2e model. Contributors adding new credential-free tests lack guidance on when to use a dedicated job vs. the shared job.
  • Impact: Inconsistent adoption of the credential-free pattern; new tests may incorrectly use dedicated jobs when shared-e2e is appropriate, or vice versa, leading to workflow fragmentation.
  • Recommended action: Add a 'Migrating existing free-standing jobs' subsection to test/e2e/README.md explaining: when to convert a free-standing job to credential-free tag, the env var differences (CHECK_DOC_LINKS_REMOTE, NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE), and the capabilities that still require a dedicated job (credentials, custom runner, different timeout, additional setup).
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read test/e2e/README.md Credential-free tests section; verify migration guidance exists.
  • Missing regression test: N/A — documentation gap. Could add a test that greps for free-standing job patterns and suggests credential-free tag where applicable.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read test/e2e/README.md Credential-free tests section; verify migration guidance exists.
  • Evidence: test/e2e/README.md lines 18-45: Credential-free tests section describes tag syntax and discovery but no migration guidance 4 free-standing jobs (openshell-version-pin, onboard-negative-paths, docs-validation, gateway-drift-preflight) converted to shared-e2e in this PR with no documented migration pattern

PRA-5 Resolve/justify — report-to-pr job concentrates trusted Actions API logic in 397-line inline script

  • Location: .github/workflows/e2e.yaml:4877
  • Category: security
  • Problem: The report-to-pr job contains a 397-line inline GitHub Script that uses github.paginate(actions.listJobsForWorkflowRun) to fetch per-test matrix child results, with complex fallback logic for missing children, aggregate/child contradiction detection, and unknown result handling. This concentrates trusted-code boundary logic (Actions API calls with actions:read permission) in a single unmodularized script, making boundary review and targeted regression testing harder.
  • Impact: A defect or future edit in the reporting logic could misclassify test results, hide failures, or expose the GITHUB_TOKEN to unintended API calls. The monolithic script lacks focused unit tests for each boundary (API pagination, result attribution, aggregate validation).
  • Recommended action: Extract the reporting logic into a separate TypeScript module (e.g., tools/e2e/report-to-pr.mts) with narrow exported functions and focused tests for each trust boundary: fetchPerTestResults, classifyChildResults, validateAggregateConsistency, formatCommentBody. Keep the workflow step as a thin wrapper.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read .github/workflows/e2e.yaml report-to-pr step script; verify no focused module exists for the reporting logic; check test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts for boundary tests (currently only execution tests).
  • Missing regression test: Focused tests for each extracted boundary: API pagination error handling, missing child result classification, aggregate/child contradiction detection, fork PR validation.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read .github/workflows/e2e.yaml report-to-pr step script; verify no focused module exists for the reporting logic; check test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts for boundary tests (currently only execution tests).
  • Evidence: .github/workflows/e2e.yaml:4877-5274 (report-to-pr step script, 397 lines) test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts: execution tests only, no focused boundary unit tests

PRA-6 Resolve/justify — Dependent workflow pr-e2e-gate.yaml coordinate job lacks workflow-level fork guard

  • Location: .github/workflows/pr-e2e-gate.yaml:30
  • Category: security
  • Problem: This PR's e2e.yaml report-to-pr job adds needs: [pr-e2e-gate.yaml jobs...] but the parent pr-e2e-gate.yaml coordinate job has actions:write, checks:write permissions without a workflow-level fork guard (if: github.event.pull_request.head.repo.full_name == github.repository). Fork rejection exists only in controller code (tools/e2e/pr-e2e-gate.mts). This is a carry-over from PR ci(e2e): add risk-based PR gate #6662 (Nemotron Ultra PRA-2, Required).
  • Impact: A malicious fork PR could trigger the coordinate job; if controller fork rejection is bypassed (prototype pollution, logic error, future refactor), the controller would have GITHUB_TOKEN with write permissions before the check executes.
  • Recommended action: Add workflow-level fork guard to pr-e2e-gate.yaml coordinate job as defense-in-depth: if: github.event.pull_request.head.repo.full_name == github.repository. This is a prerequisite for the secure operation of this PR's report-to-pr dependency chain.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check .github/workflows/pr-e2e-gate.yaml coordinate job for if condition checking github.event.pull_request.head.repo.full_name == github.repository.
  • Missing regression test: Test in test/pr-e2e-gate-workflow.test.ts simulating fork PR dispatch verifying coordinate job evaluates to skipped due to workflow-level fork guard.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check .github/workflows/pr-e2e-gate.yaml coordinate job for if condition checking github.event.pull_request.head.repo.full_name == github.repository.
  • Evidence: .github/workflows/pr-e2e-gate.yaml:30 (coordinate job permissions actions:write, checks:write) tools/e2e/pr-e2e-gate.mts startPrGate throws 'PR branch must be in the base repository' before fetch No if condition on coordinate job checking github.event.pull_request.head.repo.full_name

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Changes requested

Merge posture: Do not merge yet
Primary next action: Resolve or justify PRA-1: Justify or shrink the credential-free E2E discovery/planning layer.
Open items: 0 required · 1 warning · 0 suggestions · 5 test follow-ups
Since last review: 0 prior items resolved · 1 still applies · 0 new items found

Action checklist

  • PRA-1 Resolve or justify: Justify or shrink the credential-free E2E discovery/planning layer in tools/e2e/workflow-plan.mts:48
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Runtime validation

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture tools/e2e/workflow-plan.mts:48 Either shrink this to direct workflow jobs or a compact static helper for the small credential-free set, or add concise in-repo justification explaining why source discovery and planning are necessary and ensure boundary tests cover every trusted workflow invariant.
Review findings by urgency: 0 required fixes, 1 item to resolve/justify, 0 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-1 Resolve/justify — Justify or shrink the credential-free E2E discovery/planning layer

  • Location: tools/e2e/workflow-plan.mts:48
  • Category: architecture
  • Problem: The PR continues to route credential-free E2E tests through a custom discovery/planning layer at a trusted CI boundary. Although the workflow validates the planner output schema, default inclusion and selector routing still depend on source tags and planner behavior rather than explicit workflow job entries, making future E2E coverage changes less reviewable.
  • Impact: Future CI changes could silently add, drop, or misroute default-enabled E2E coverage, reporting attribution, or trusted workflow assumptions through local source tags or planner logic instead of a reviewed workflow job change.
  • Recommended action: Either shrink this to direct workflow jobs or a compact static helper for the small credential-free set, or add concise in-repo justification explaining why source discovery and planning are necessary and ensure boundary tests cover every trusted workflow invariant.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read tools/e2e/credential-free-tests.mts, tools/e2e/workflow-plan.mts, and .github/workflows/e2e.yaml's generate-matrix/shared-e2e jobs; compare them with the removed direct credential-free job stanzas.
  • Missing regression test: If keeping the abstraction, add or cite checked-in tests that prove tagged and untagged credential-free tests cannot alter runner, permissions, secrets, timeout, setup, artifact upload, default inclusion/exclusion, selector behavior, or PR-report attribution; if shrinking to direct/static workflow wiring, keep focused tests for those preserved invariants.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read tools/e2e/credential-free-tests.mts, tools/e2e/workflow-plan.mts, and .github/workflows/e2e.yaml's generate-matrix/shared-e2e jobs; compare them with the removed direct credential-free job stanzas.
  • Evidence: .github/workflows/e2e.yaml removes discrete credential-free jobs such as docs-validation, onboard-negative-paths, openshell-version-pin, and gateway-drift-preflight and adds shared-e2e fed by needs.generate-matrix.outputs.test_matrix. tools/e2e/credential-free-tests.mts discovers tagged tests from Vitest projects using @module-tag e2e/credential-free and derives matrix rows from filenames. tools/e2e/workflow-plan.mts combines discovered credential-free tests, free-standing workflow inventory, registry targets, and selector filtering into the workflow plan. The previous advisor review carried the same warning at tools/e2e/workflow-plan.mts:48, and the current scope review found the abstraction still present.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

  • None.
Simplification opportunities: 1 possible cut

These are safe simplification checks only. Do not remove validation, security controls, data-loss prevention, or required tests.

  • PRA-1 shrink (tools/e2e/workflow-plan.mts:48): Avoid a generalized Vitest discovery/profile planner for a small credential-free E2E set unless it is demonstrably reused and necessary.
    • Replacement: Use direct workflow jobs or a compact static map from explicit test IDs to files while keeping runner, setup, secret, timeout, artifact, and reporting policy in the workflow.
    • Net: 250 lines
    • Safety boundary: Do not remove trusted workflow validation, selector allowlisting, credential redaction, SSRF/sandbox/network-policy defenses, artifact path safeguards, or required regression tests.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Run the `cloud-onboard` E2E job for Installer and platform changes must work on a clean supported host with the pinned runtime dependencies. Matched files: `.github/workflows/e2e.yaml`.. Deterministic regression risks require live validation: platform-install, credentials-security. Checked-in static tests cover changed planner, discovery, workflow-boundary, reporting, schema rejection, and error paths. The deterministic risk plan is tier 3 for platform-install and credentials-security, so runtime validation remains recommended for clean-host install and credential-boundary invariants.
  • PRA-T2 Runtime validation — Run or explicitly justify the `cloud-onboard` E2E job for `.github/workflows/e2e.yaml` to validate clean-host pinned dependency installation, usable agent reachability, and no silent downgrade of platform runtime validation.. Deterministic regression risks require live validation: platform-install, credentials-security. Checked-in static tests cover changed planner, discovery, workflow-boundary, reporting, schema rejection, and error paths. The deterministic risk plan is tier 3 for platform-install and credentials-security, so runtime validation remains recommended for clean-host install and credential-boundary invariants.
  • PRA-T3 Runtime validation — Run the `credential-sanitization` E2E job for Credential and security-boundary changes must preserve secrecy, sanitization, and fail-closed policy behavior. Matched files: `tools/e2e/credential-free-tests.mts`.. Deterministic regression risks require live validation: platform-install, credentials-security. Checked-in static tests cover changed planner, discovery, workflow-boundary, reporting, schema rejection, and error paths. The deterministic risk plan is tier 3 for platform-install and credentials-security, so runtime validation remains recommended for clean-host install and credential-boundary invariants.
  • PRA-T4 Runtime validation — Run or explicitly justify the `credential-sanitization` E2E job for `tools/e2e/credential-free-tests.mts` to validate that plaintext credentials do not cross logs, snapshots, artifacts, or sandbox boundaries.. Deterministic regression risks require live validation: platform-install, credentials-security. Checked-in static tests cover changed planner, discovery, workflow-boundary, reporting, schema rejection, and error paths. The deterministic risk plan is tier 3 for platform-install and credentials-security, so runtime validation remains recommended for clean-host install and credential-boundary invariants.
  • PRA-T5 Runtime validation — Run the `security-posture` E2E job for Credential and security-boundary changes must preserve secrecy, sanitization, and fail-closed policy behavior. Matched files: `tools/e2e/credential-free-tests.mts`.. Deterministic regression risks require live validation: platform-install, credentials-security. Checked-in static tests cover changed planner, discovery, workflow-boundary, reporting, schema rejection, and error paths. The deterministic risk plan is tier 3 for platform-install and credentials-security, so runtime validation remains recommended for clean-host install and credential-boundary invariants.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Justify or shrink the credential-free E2E discovery/planning layer

  • Location: tools/e2e/workflow-plan.mts:48
  • Category: architecture
  • Problem: The PR continues to route credential-free E2E tests through a custom discovery/planning layer at a trusted CI boundary. Although the workflow validates the planner output schema, default inclusion and selector routing still depend on source tags and planner behavior rather than explicit workflow job entries, making future E2E coverage changes less reviewable.
  • Impact: Future CI changes could silently add, drop, or misroute default-enabled E2E coverage, reporting attribution, or trusted workflow assumptions through local source tags or planner logic instead of a reviewed workflow job change.
  • Recommended action: Either shrink this to direct workflow jobs or a compact static helper for the small credential-free set, or add concise in-repo justification explaining why source discovery and planning are necessary and ensure boundary tests cover every trusted workflow invariant.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read tools/e2e/credential-free-tests.mts, tools/e2e/workflow-plan.mts, and .github/workflows/e2e.yaml's generate-matrix/shared-e2e jobs; compare them with the removed direct credential-free job stanzas.
  • Missing regression test: If keeping the abstraction, add or cite checked-in tests that prove tagged and untagged credential-free tests cannot alter runner, permissions, secrets, timeout, setup, artifact upload, default inclusion/exclusion, selector behavior, or PR-report attribution; if shrinking to direct/static workflow wiring, keep focused tests for those preserved invariants.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read tools/e2e/credential-free-tests.mts, tools/e2e/workflow-plan.mts, and .github/workflows/e2e.yaml's generate-matrix/shared-e2e jobs; compare them with the removed direct credential-free job stanzas.
  • Evidence: .github/workflows/e2e.yaml removes discrete credential-free jobs such as docs-validation, onboard-negative-paths, openshell-version-pin, and gateway-drift-preflight and adds shared-e2e fed by needs.generate-matrix.outputs.test_matrix. tools/e2e/credential-free-tests.mts discovers tagged tests from Vitest projects using @module-tag e2e/credential-free and derives matrix rows from filenames. tools/e2e/workflow-plan.mts combines discovered credential-free tests, free-standing workflow inventory, registry targets, and selector filtering into the workflow plan. The previous advisor review carried the same warning at tools/e2e/workflow-plan.mts:48, and the current scope review found the abstraction still present.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>

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

🧹 Nitpick comments (3)
tools/e2e-advisor/targets.mts (1)

61-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated path-classification rules risk drifting from execution-profile.mts.

E2E_LIVE_PROFILE_TEST_PATTERN/INTEGRATION_PROFILE_TEST_PATTERN re-implement the same "e2e-live under test/e2e/live/, integration not under test/e2e/" shape rules enforced by validateTestFile in tools/e2e/execution-profile.mts. Since that function isn't exported, the advisor can't reuse it directly, but any future change to the canonical path rules won't automatically propagate here, silently misclassifying changed files.

As per path instructions for tools/{pr-review-advisor,e2e-advisor}/**: "Derive inventories and limits from a canonical source where possible; flag duplicated lists that can silently drift."

♻️ Suggested direction
-export function executionProfileRowFromModule(
+function validateTestFilePublic(file: string, project: ExecutionProfileProject): void {
+  validateTestFile(file, project);
+}

Export a thin validation helper (or the pattern constants themselves) from execution-profile.mts and import it here instead of re-declaring the regexes.

🤖 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 `@tools/e2e-advisor/targets.mts` around lines 61 - 64, Eliminate duplicated
test-path rules between targets.mts and execution-profile.mts by exporting the
canonical validation helper or pattern constants from execution-profile.mts,
then importing and using them in E2E_LIVE_PROFILE_TEST_PATTERN and
INTEGRATION_PROFILE_TEST_PATTERN logic. Preserve the existing classification
behavior while ensuring future rule changes in validateTestFile remain
synchronized.
test/e2e-advisor-targets.test.ts (1)

437-497: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a test for the changedFileSources-omitted fallback path.

Both new cases always supply changedFileSources for the changed file, so the fs.readFileSync(path.join(root, file), ...) fallback branch in buildE2eTargetNormalizationContext (targets.mts lines ~551-560) is never exercised. Given the suspected undefined-root issue flagged in targets.mts, a test that omits changedFileSources for a profile-pattern-matching changed file would catch this at the unit level rather than only in production.

As per path instructions for **/*.test.{ts,js,mts,mjs,cts,cjs}: "Flag copied production algorithms, broad mocks that bypass the behavior under test, and conditionals that make a test pass without exercising its claim."

🤖 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-advisor-targets.test.ts` around lines 437 - 497, Add a unit test
covering the changedFileSources-omitted fallback in
buildE2eTargetNormalizationContext: use a changed file whose repository source
contains the hermetic profile tag, omit changedFileSources, and provide the
appropriate root/context so the implementation reads the file via
fs.readFileSync. Assert the profile target is selected and e2e-all is removed,
ensuring the test exercises the real fallback path and catches an undefined-root
failure.
test/e2e/support/dockerhub-auth-workflow-boundary.test.ts (1)

16-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Prefer the shared executor-job constant here. This duplicates HERMETIC_EXECUTION_PROFILE.executorJob; importing it keeps this boundary test aligned with tools/e2e/workflow-boundary.mts and avoids drift if the job id changes.

🤖 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/dockerhub-auth-workflow-boundary.test.ts` at line 16, The
NO_IMAGE_E2E_JOBS declaration duplicates the hermetic executor job identifier.
Import HERMETIC_EXECUTION_PROFILE from the shared workflow-boundary module and
reference its executorJob property when defining NO_IMAGE_E2E_JOBS, preserving
the existing gateway-health-honest entry.
🤖 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/execution-profile.test.ts`:
- Around line 156-167: Replace the conditional guard in the “prints one compact
JSON matrix line from the CLI” test with an expect assertion verifying that
selected is defined, then use a non-null assertion when passing selected.id and
serializing selected; preserve the existing test behavior without adding a
branch.

In `@test/e2e/support/workflow-plan.test.ts`:
- Around line 18-22: Update the firstId function to remove the added if
statement while preserving its missing-row error behavior, using a
nullish-coalescing expression that throws when rows[0]?.id is absent.

In `@tools/e2e/execution-profile.mts`:
- Around line 146-203: Relax the validation in listVitestExecutionProfileModules
so entries only require a string file field; treat projectName as optional and
let normalizeVitestFile derive or handle the project when absent. Update the
VitestFile typing or downstream logic as needed so valid entries without
projectName are processed.

---

Nitpick comments:
In `@test/e2e-advisor-targets.test.ts`:
- Around line 437-497: Add a unit test covering the changedFileSources-omitted
fallback in buildE2eTargetNormalizationContext: use a changed file whose
repository source contains the hermetic profile tag, omit changedFileSources,
and provide the appropriate root/context so the implementation reads the file
via fs.readFileSync. Assert the profile target is selected and e2e-all is
removed, ensuring the test exercises the real fallback path and catches an
undefined-root failure.

In `@test/e2e/support/dockerhub-auth-workflow-boundary.test.ts`:
- Line 16: The NO_IMAGE_E2E_JOBS declaration duplicates the hermetic executor
job identifier. Import HERMETIC_EXECUTION_PROFILE from the shared
workflow-boundary module and reference its executorJob property when defining
NO_IMAGE_E2E_JOBS, preserving the existing gateway-health-honest entry.

In `@tools/e2e-advisor/targets.mts`:
- Around line 61-64: Eliminate duplicated test-path rules between targets.mts
and execution-profile.mts by exporting the canonical validation helper or
pattern constants from execution-profile.mts, then importing and using them in
E2E_LIVE_PROFILE_TEST_PATTERN and INTEGRATION_PROFILE_TEST_PATTERN logic.
Preserve the existing classification behavior while ensuring future rule changes
in validateTestFile remain synchronized.
🪄 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: ca66e0fe-cd20-48f7-b4bd-9811523daaa6

📥 Commits

Reviewing files that changed from the base of the PR and between e4d2e91 and 1d47ee1.

📒 Files selected for processing (31)
  • .github/workflows/e2e.yaml
  • test/e2e-advisor-targets.test.ts
  • test/e2e/README.md
  • test/e2e/live/docs-validation.test.ts
  • test/e2e/live/onboard-negative-paths.test.ts
  • test/e2e/live/openshell-version-pin.test.ts
  • test/e2e/live/ubuntu-repo-cli-smoke.test.ts
  • test/e2e/support/dockerhub-auth-workflow-boundary.test.ts
  • test/e2e/support/docs-validation-workflow-boundary.test.ts
  • test/e2e/support/e2e-operations-workflow-boundary.test.ts
  • test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts
  • test/e2e/support/e2e-workflow.test.ts
  • test/e2e/support/execution-profile.test.ts
  • test/e2e/support/hermetic-workflow-boundary.test.ts
  • test/e2e/support/prepare-e2e-workflow-boundary.test.ts
  • test/e2e/support/upload-e2e-artifacts-workflow-boundary.test.ts
  • test/e2e/support/workflow-plan.test.ts
  • test/gateway-drift-preflight.test.ts
  • test/pr-e2e-gate.test.ts
  • test/pr-risk-plan.test.ts
  • tools/e2e-advisor/targets.mts
  • tools/e2e/docs-validation-workflow-boundary.mts
  • tools/e2e/execution-profile.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/pr-e2e-gate.mts
  • tools/e2e/prepare-e2e-workflow-boundary.mts
  • tools/e2e/upload-e2e-artifacts-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts
  • tools/e2e/workflow-inventory.mts
  • tools/e2e/workflow-plan.mts
  • vitest.config.ts
💤 Files with no reviewable changes (2)
  • test/e2e/support/docs-validation-workflow-boundary.test.ts
  • tools/e2e/docs-validation-workflow-boundary.mts

Comment thread test/e2e/support/execution-profile.test.ts Outdated
Comment thread test/e2e/support/workflow-plan.test.ts
Comment thread tools/e2e/execution-profile.mts Outdated
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

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

🧹 Nitpick comments (2)
test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts (2)

93-96: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace only the workflow expression, not the whole source line.

This helper is unnecessarily coupled to the exact formatting of the extracted workflow. Injecting the serialized needs value by replacing ${{ toJSON(needs) }} preserves the boundary test while tolerating harmless line or spacing changes.

Suggested adjustment
 const script = reportScript().replace(
-  "const needs = ${{ toJSON(needs) }};",
-  `const needs = ${JSON.stringify(needs)};`,
+  "${{ toJSON(needs) }}",
+  JSON.stringify(needs),
 );
🤖 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-report-to-pr-workflow-boundary.test.ts` around lines 93
- 96, Update the script transformation in reportScript() usage to replace only
the `${{ toJSON(needs) }}` workflow expression with JSON.stringify(needs),
preserving the surrounding source line and avoiding dependence on exact
formatting.

Source: Path instructions


198-285: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for terminal failure, cancellation, and skip results.

These tests cover success and unknown paths, but not the other terminal conclusions explicitly accepted by the report logic. Add table-driven cases for failure, cancelled, and skipped, asserting their rendered child rows and aggregate status through the PR comment boundary.

🤖 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-report-to-pr-workflow-boundary.test.ts` around lines 198
- 285, Add table-driven coverage alongside the existing executeReport tests for
terminal API conclusions failure, cancelled, and skipped. For each case, provide
a completed Hermetic E2E child job with the matching conclusion, then assert the
rendered child row uses the corresponding status and the PR body reports the
expected aggregate status, exercising the report boundary through executeReport.

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.

Nitpick comments:
In `@test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts`:
- Around line 93-96: Update the script transformation in reportScript() usage to
replace only the `${{ toJSON(needs) }}` workflow expression with
JSON.stringify(needs), preserving the surrounding source line and avoiding
dependence on exact formatting.
- Around line 198-285: Add table-driven coverage alongside the existing
executeReport tests for terminal API conclusions failure, cancelled, and
skipped. For each case, provide a completed Hermetic E2E child job with the
matching conclusion, then assert the rendered child row uses the corresponding
status and the PR body reports the expected aggregate status, exercising the
report boundary through executeReport.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7a96d054-ae1e-4a5c-9daa-9d843f873354

📥 Commits

Reviewing files that changed from the base of the PR and between 1d47ee1 and 9f1a750.

📒 Files selected for processing (7)
  • .github/workflows/e2e.yaml
  • scripts/checks/e2e-mock-parity.ts
  • test/e2e-mock-parity.test.ts
  • test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts
  • test/e2e/support/execution-profile.test.ts
  • test/e2e/support/workflow-plan.test.ts
  • tools/e2e/execution-profile.mts
🚧 Files skipped from review as they are similar to previous changes (4)
  • test/e2e/support/workflow-plan.test.ts
  • tools/e2e/execution-profile.mts
  • .github/workflows/e2e.yaml
  • test/e2e/support/execution-profile.test.ts

@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ⚠️ Run cancelled — no signal

Run: 29139010711
Workflow ref: codex/discover-live-e2e-tests
Requested targets: (default — all supported)
Requested jobs: cloud-onboard
Summary: 0 passed, 0 failed, 1 cancelled, 0 skipped, 0 unknown

Job Result
cloud-onboard ⚠️ cancelled

@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ⚠️ Some jobs cancelled — partial pass

Run: 29139012765
Workflow ref: codex/discover-live-e2e-tests
Requested targets: (default — all supported)
Requested jobs: (default — all default-enabled free-standing tests; explicit-only tests openshell-gateway-auth-contract, mcp-bridge-dev, hermes-gpu-startup, sandbox-rlimits-connect, and jetson-nvmap-gpu are skipped unless selected)
Summary: 9 passed, 0 failed, 63 cancelled, 5 skipped, 0 unknown

Job Result
agent-turn-latency ⚠️ cancelled
bedrock-runtime-compatible-anthropic ⚠️ cancelled
brave-search ✅ success
channels-add-remove ⚠️ cancelled
channels-stop-start ⚠️ cancelled
cloud-inference ⚠️ cancelled
cloud-onboard ⚠️ cancelled
common-egress-agent ⚠️ cancelled
concurrent-gateway-ports ⚠️ cancelled
credential-migration ⚠️ cancelled
credential-sanitization ⚠️ cancelled
cron-preflight-inference-local ⚠️ cancelled
device-auth-health ⚠️ cancelled
diagnostics ⚠️ cancelled
docs-validation ⚠️ cancelled
double-onboard ⚠️ cancelled
full-e2e ⚠️ cancelled
gateway-drift-preflight ✅ success
gateway-guard-recovery ⚠️ cancelled
gateway-health-honest ✅ success
generate-matrix ✅ success
gpu-double-onboard ⚠️ cancelled
gpu-e2e ⚠️ cancelled
hermes-dashboard ⚠️ cancelled
hermes-discord ⚠️ cancelled
hermes-e2e ⚠️ cancelled
hermes-gpu-startup ⏭️ skipped
hermes-inference-switch ⚠️ cancelled
hermes-shields-config ⚠️ cancelled
hermes-slack ⚠️ cancelled
inference-routing ⚠️ cancelled
issue-2478-crash-loop-recovery ⚠️ cancelled
issue-4434-tui-unreachable-inference ✅ success
issue-4462-scope-upgrade-approval ⚠️ cancelled
jetson-nvmap-gpu ⏭️ skipped
kimi-inference-compat ⚠️ cancelled
launchable-smoke ⚠️ cancelled
live ⚠️ cancelled
mcp-bridge ⚠️ cancelled
mcp-bridge-dev ⏭️ skipped
messaging-compatible-endpoint ⚠️ cancelled
messaging-providers ⚠️ cancelled
model-router-provider-routed-inference ⚠️ cancelled
network-policy ⚠️ cancelled
ollama-auth-proxy ⚠️ cancelled
onboard-negative-paths ✅ success
onboard-repair ⚠️ cancelled
onboard-resume ⚠️ cancelled
openclaw-discord-pairing ⚠️ cancelled
openclaw-inference-switch ⚠️ cancelled
openclaw-plugin-runtime-exdev ⚠️ cancelled
openclaw-skill-cli ⚠️ cancelled
openclaw-slack-pairing ⚠️ cancelled
openclaw-tui-chat-correlation ⚠️ cancelled
openshell-gateway-auth-contract ⏭️ skipped
openshell-gateway-upgrade ⚠️ cancelled
openshell-version-pin ✅ success
overlayfs-autofix ✅ success
rebuild-hermes ⚠️ cancelled
rebuild-hermes-stale-base ⚠️ cancelled
rebuild-openclaw ⚠️ cancelled
sandbox-operations ⚠️ cancelled
sandbox-rebuild ⚠️ cancelled
sandbox-rlimits-connect ⏭️ skipped
sandbox-survival ⚠️ cancelled
security-posture ⚠️ cancelled
sessions-agents-cli ⚠️ cancelled
shields-config ⚠️ cancelled
skill-agent ⚠️ cancelled
snapshot-commands ⚠️ cancelled
spark-install ⚠️ cancelled
state-backup-restore ⚠️ cancelled
telegram-injection ⚠️ cancelled
token-rotation ⚠️ cancelled
tunnel-lifecycle ⚠️ cancelled
ubuntu-repo-cli-smoke ✅ success
upgrade-stale-sandbox ⚠️ cancelled

Explicit-only jobs skipped: openshell-gateway-auth-contract (default dispatch excludes the resource-heavy OpenShell auth-contract probe unless selected; validate with jobs=openshell-gateway-auth-contract or targets=openshell-gateway-auth-contract), mcp-bridge-dev (default dispatch excludes moving OpenShell dev artifacts unless explicitly selected; validate with jobs=mcp-bridge-dev or targets=mcp-bridge-dev), hermes-gpu-startup (default dispatch excludes this explicit-only job unless selected; validate with jobs=hermes-gpu-startup or targets=hermes-gpu-startup), sandbox-rlimits-connect (default dispatch excludes the destructive rlimit fork/connect probe unless selected; validate with jobs=sandbox-rlimits-connect or targets=sandbox-rlimits-connect), jetson-nvmap-gpu (default dispatch excludes Jetson; explicit dispatch requires allow_jetson_runner_queue=true after confirming an online Jetson runner because queued jobs do not honor timeout-minutes before assignment; validate with jobs=jetson-nvmap-gpu or targets=jetson-nvmap-gpu).

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All requested jobs passed

Run: 29139271972
Workflow ref: codex/discover-live-e2e-tests
Requested targets: (default — all supported)
Requested jobs: cloud-onboard
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped, 0 unknown

Job Result
cloud-onboard ✅ success

@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

PRA-1 architecture justification:

A compact static ID-to-file helper would be a second test catalog, which is the drift source this PR intentionally removes. The authoritative inputs are the test file and its real Vitest project; the source tag declares membership only. Discovery emits only id, file, and project, requires a known project, safe repository path, exact supported tag, and globally unique filename-derived ID. It cannot select a runner, permission, secret, timeout, setup step, or artifact policy.

Those capabilities remain fixed in the single trusted hermetic workflow job. validateHermeticJob in tools/e2e/workflow-boundary.mts ratchets ubuntu-latest, the 15-minute timeout, the discovered matrix source, no job- or step-level secret exposure, pinned checkout with persisted credentials disabled, and the exact test command. hermetic-workflow-boundary.test.ts, prepare-e2e-workflow-boundary.test.ts, and upload-e2e-artifacts-workflow-boundary.test.ts exercise those boundaries, while e2e-report-to-pr-workflow-boundary.test.ts runs the actual planner shell step through reporting. The README documents when a test must retain a dedicated job instead.

After this warning, the duplicate selector API was removed from discovery: workflow-plan.mts is now the only selector owner, cutting another 74 net lines and making obsolete discovery CLI arguments fail closed. Local E2E-support now passes 113 files / 909 tests. The final test-only commit also proves every repository source declaration is visible through Vitest discovery and runs malformed planner data through the actual workflow shell and jq boundary without publishing partial outputs. All five discovered hermetic children passed on the runtime-identical preceding head, and required cloud-onboard passed on the current head through the trusted PR controller: https://github.com/NVIDIA/NemoClaw/actions/runs/29140773816. The later 4b9b5e3e6 commit only preserves the legacy shell inventory consumed by the trusted base workflow and adds its boundary ratchet; it does not alter the hermetic executor or test runtime. The exact origin/main generate-matrix script now accepts the branch inventory and selects cloud-onboard successfully.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>

@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

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

52-55: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Avoid using the production normalizer to define the expected result.

Because stripExecutionProfileDeclarations determines which files are expected to be discovered, a regression in declaration parsing can cause both the expected set and discovery result to omit the same file. Use independent fixtures or a separately owned predicate so this test verifies behavior rather than reusing implementation logic.

As per path instructions, tests should favor behavioral confidence over implementation lock-in.

🤖 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/hermetic-workflow-boundary.test.ts` around lines 52 - 55,
The test currently derives its expected file set using the production normalizer
stripExecutionProfileDeclarations, allowing parsing regressions to make both
sides agree incorrectly. Replace that filter with independently defined fixtures
or a separately owned predicate that identifies expected execution-profile
declaration files, while continuing to compare against the discovery result.

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 `@test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts`:
- Line 74: Replace path.delimiter with the literal POSIX ":" separator when
constructing PATH in the test environment, preserving the existing binDirectory
and process.env.PATH values.

In `@test/e2e/support/hermetic-workflow-boundary.test.ts`:
- Around line 46-55: Update the test’s declared-file collection in “keeps every
source-declared execution profile visible to Vitest discovery” to use the same
e2e-live and integration project-scoped module set as Vitest discovery, rather
than globbing all repository test files; derive both expected and discovered
files from that shared scope without adding a separate catalog.

---

Nitpick comments:
In `@test/e2e/support/hermetic-workflow-boundary.test.ts`:
- Around line 52-55: The test currently derives its expected file set using the
production normalizer stripExecutionProfileDeclarations, allowing parsing
regressions to make both sides agree incorrectly. Replace that filter with
independently defined fixtures or a separately owned predicate that identifies
expected execution-profile declaration files, while continuing to compare
against the discovery result.
🪄 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: 67f8e576-d204-4cb7-9034-466836b6a17d

📥 Commits

Reviewing files that changed from the base of the PR and between a81c0f1 and 18b400e.

📒 Files selected for processing (2)
  • test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts
  • test/e2e/support/hermetic-workflow-boundary.test.ts

Comment thread test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts
Comment thread test/e2e/support/hermetic-workflow-boundary.test.ts Outdated
@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

Nemotron current-head triage:

  • PRA-1: Implemented in commit 18b400e45. hermetic-workflow-boundary.test.ts scans every repository test source for real execution-profile declarations and compares that set bidirectionally with Vitest-backed discovery. This catches tagged-but-undiscoverable and discovered-without-declaration drift without adding an ID/file catalog. A wholly absent declaration cannot reveal author intent without a second source of truth; that is the deliberate no-catalog tradeoff, with eligibility documented in the README.
  • PRA-2: Implemented in the same commit. fails closed when planner output violates the workflow schema executes the YAML-extracted generate-matrix Bash and jq contract against a missing field, duplicate matrix ID, invalid hermetic ID, and non-boolean selection; every case exits 1 and publishes no workflow output. The report later acknowledges this test under PRA-7, so the required finding is internally stale. Its location is intentional because this boundary file already carries the generated matrix through the real workflow output into PR reporting.
  • PRA-3: The architecture rationale and fixed-capability boundary evidence are recorded in ci(e2e): discover credential-free tests from source #6670 (comment). A static ID-to-file helper would recreate the catalog this PR removes.
  • PRA-4: Not applicable. coordinate runs on workflow_run, not pull_request, and already has the event-appropriate workflow-level same-repository guard: github.event.workflow_run.head_repository.full_name == github.repository. The suggested github.event.pull_request... field is absent for this event and would skip legitimate coordination.
  • PRA-5: The proposed global audit is both outside this PR and event-incorrect: write-capable push, schedule, workflow-run, and issue workflows do not all have a pull-request head field. Existing E2E operation boundary tests ratchet the changed permission set.
  • PRA-6: The trusted PR coordinator dispatches only after CI / Pull Request completes successfully; e2e-support, including the completeness check, is therefore already a precondition of automated PR dispatch. Scheduled/main runs use merged code that passed that gate. Repeating a repository-wide source scan inside matrix generation would duplicate the same invariant.
  • PRA-8 / runtime follow-ups: Required cloud-onboard passed on the current head through the trusted PR controller in https://github.com/NVIDIA/NemoClaw/actions/runs/29140773816. The runtime-identical full fan-out is https://github.com/NVIDIA/NemoClaw/actions/runs/29139274144; all five discovered hermetic children passed. The runtime lane is unchanged from that evidence: 18b400e45 adds only boundary tests, and 4b9b5e3e6 only restores the legacy shell inventory contract used by the trusted base workflow. The exact origin/main generate-matrix script now accepts the branch output and selects cloud-onboard.

Final-head addendum for the newly surfaced Nemotron items:

  • PRA-6: The workflow boundary now derives report dependencies from execution jobs, so the removed discrete jobs cannot remain in report-to-pr.needs; the hermetic aggregation ratchet and API attribution tests cover the replacement behavior. Adding the four removed names as a second negative list would be another catalog.
  • PRA-7 / PRA-13: sourceAtRef deliberately maps every missing or unreadable snapshot to null, and isMockParityRelevantSourceChange treats both null/null and null/new-source as relevant. Those behavioral cases are already tested and fail closed. Mocking the private execFileSync call would only duplicate implementation detail; tag-only metadata handling also has direct string/template/comment coverage.
  • PRA-8: The Jobs API lookup is an internal reporting workaround with a documented removal condition and unknown-on-failure tests, not part of the contributor profile contract. Keeping it out of the contributor README avoids freezing that workaround as architecture.
  • PRA-10: The generate job has read-only repository permissions and no secrets. Hermetic rows are exact-schema id/file/project data and cannot choose runner, permissions, setup, timeout, secrets, or artifact policy; malformed planner output is tested through the actual shell/jq gate. PR-controlled matrix generation for the pre-existing live registry predates this change.
  • PRA-11 / PRA-12: As noted above, coordinate is a workflow_run job and already has the event-correct same-repository guard. A universal pull-request-field permissions audit would be invalid for workflow-run, push, schedule, and issue events.
  • PRA-9: Current-head trusted cloud-onboard completed successfully in https://github.com/NVIDIA/NemoClaw/actions/runs/29140773816, and the PR gate verified its evidence successfully.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ❌ Some jobs failed

Run: 29139274144
Workflow ref: codex/discover-live-e2e-tests
Requested targets: (default — all supported)
Requested jobs: (default — all default-enabled free-standing tests; explicit-only tests openshell-gateway-auth-contract, mcp-bridge-dev, hermes-gpu-startup, sandbox-rlimits-connect, and jetson-nvmap-gpu are skipped unless selected)
Summary: 68 passed, 4 failed, 0 cancelled, 5 skipped, 0 unknown

Job Result
agent-turn-latency ✅ success
bedrock-runtime-compatible-anthropic ✅ success
brave-search ✅ success
channels-add-remove ✅ success
channels-stop-start ✅ success
cloud-inference ✅ success
cloud-onboard ✅ success
common-egress-agent ✅ success
concurrent-gateway-ports ✅ success
credential-migration ✅ success
credential-sanitization ✅ success
cron-preflight-inference-local ✅ success
device-auth-health ✅ success
diagnostics ✅ success
docs-validation ✅ success
double-onboard ✅ success
full-e2e ✅ success
gateway-drift-preflight ✅ success
gateway-guard-recovery ✅ success
gateway-health-honest ✅ success
generate-matrix ✅ success
gpu-double-onboard ✅ success
gpu-e2e ✅ success
hermes-dashboard ✅ success
hermes-discord ✅ success
hermes-e2e ✅ success
hermes-gpu-startup ⏭️ skipped
hermes-inference-switch ✅ success
hermes-shields-config ✅ success
hermes-slack ✅ success
inference-routing ✅ success
issue-2478-crash-loop-recovery ✅ success
issue-4434-tui-unreachable-inference ✅ success
issue-4462-scope-upgrade-approval ✅ success
jetson-nvmap-gpu ⏭️ skipped
kimi-inference-compat ✅ success
launchable-smoke ✅ success
live ✅ success
mcp-bridge ✅ success
mcp-bridge-dev ⏭️ skipped
messaging-compatible-endpoint ✅ success
messaging-providers ✅ success
model-router-provider-routed-inference ✅ success
network-policy ✅ success
ollama-auth-proxy ✅ success
onboard-negative-paths ✅ success
onboard-repair ✅ success
onboard-resume ✅ success
openclaw-discord-pairing ✅ success
openclaw-inference-switch ❌ failure
openclaw-plugin-runtime-exdev ✅ success
openclaw-skill-cli ✅ success
openclaw-slack-pairing ✅ success
openclaw-tui-chat-correlation ✅ success
openshell-gateway-auth-contract ⏭️ skipped
openshell-gateway-upgrade ✅ success
openshell-version-pin ✅ success
overlayfs-autofix ✅ success
rebuild-hermes ❌ failure
rebuild-hermes-stale-base ❌ failure
rebuild-openclaw ✅ success
sandbox-operations ✅ success
sandbox-rebuild ✅ success
sandbox-rlimits-connect ⏭️ skipped
sandbox-survival ✅ success
security-posture ✅ success
sessions-agents-cli ✅ success
shields-config ❌ failure
skill-agent ✅ success
snapshot-commands ✅ success
spark-install ✅ success
state-backup-restore ✅ success
telegram-injection ✅ success
token-rotation ✅ success
tunnel-lifecycle ✅ success
ubuntu-repo-cli-smoke ✅ success
upgrade-stale-sandbox ✅ success

Explicit-only jobs skipped: openshell-gateway-auth-contract (default dispatch excludes the resource-heavy OpenShell auth-contract probe unless selected; validate with jobs=openshell-gateway-auth-contract or targets=openshell-gateway-auth-contract), mcp-bridge-dev (default dispatch excludes moving OpenShell dev artifacts unless explicitly selected; validate with jobs=mcp-bridge-dev or targets=mcp-bridge-dev), hermes-gpu-startup (default dispatch excludes this explicit-only job unless selected; validate with jobs=hermes-gpu-startup or targets=hermes-gpu-startup), sandbox-rlimits-connect (default dispatch excludes the destructive rlimit fork/connect probe unless selected; validate with jobs=sandbox-rlimits-connect or targets=sandbox-rlimits-connect), jetson-nvmap-gpu (default dispatch excludes Jetson; explicit dispatch requires allow_jetson_runner_queue=true after confirming an online Jetson runner because queued jobs do not honor timeout-minutes before assignment; validate with jobs=jetson-nvmap-gpu or targets=jetson-nvmap-gpu).

Failed jobs: openclaw-inference-switch, rebuild-hermes, rebuild-hermes-stale-base, shields-config. Check run artifacts for logs.

@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

Following the terminology cleanup in #6662, I think this PR still has too many names for one behavior.

The concrete contract in the README and workflow seems straightforward: a tagged test that needs no credentials or custom runner, setup, or timeout runs in one shared Ubuntu E2E job. We currently describe that as a “hermetic execution profile,” “trusted hermetic E2E executor,” “source-declared trusted execution profile,” “logical test ID,” and “free-standing live E2E test ID.”

Could we name the concrete things directly throughout?

  • credential-free test
  • shared E2E job
  • tagged test
  • test ID
  • test matrix
  • E2E workflow, or base E2E workflow where the trust origin matters

hermetic promises more isolation and determinism than this contract enforces, while live is inaccurate for tagged integration-project tests. A contributor should be able to understand the whole model as: tag a credential-free test; the workflow finds it and runs it in the shared job. This is naming feedback, not a request to replace source discovery.

One adjacent cleanup: the shell formatter explicitly preserves an older --shell format for the base workflow. That is a compatibility path, not merely wording. If it can be removed by sequencing the workflow and tooling changes, I would remove it and update the remaining tests. If the trust model requires it as an ongoing version-skew boundary, call it the current base-workflow contract and name the consumer directly rather than retaining “legacy” vocabulary and legacyShellInventory in the new design.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All default jobs passed

Run: 29139274144
Workflow ref: codex/discover-live-e2e-tests
Requested targets: (default — all supported)
Requested jobs: (default — all default-enabled free-standing tests; explicit-only tests openshell-gateway-auth-contract, mcp-bridge-dev, hermes-gpu-startup, sandbox-rlimits-connect, and jetson-nvmap-gpu are skipped unless selected)
Summary: 72 passed, 0 failed, 0 cancelled, 5 skipped, 0 unknown

Job Result
agent-turn-latency ✅ success
bedrock-runtime-compatible-anthropic ✅ success
brave-search ✅ success
channels-add-remove ✅ success
channels-stop-start ✅ success
cloud-inference ✅ success
cloud-onboard ✅ success
common-egress-agent ✅ success
concurrent-gateway-ports ✅ success
credential-migration ✅ success
credential-sanitization ✅ success
cron-preflight-inference-local ✅ success
device-auth-health ✅ success
diagnostics ✅ success
docs-validation ✅ success
double-onboard ✅ success
full-e2e ✅ success
gateway-drift-preflight ✅ success
gateway-guard-recovery ✅ success
gateway-health-honest ✅ success
generate-matrix ✅ success
gpu-double-onboard ✅ success
gpu-e2e ✅ success
hermes-dashboard ✅ success
hermes-discord ✅ success
hermes-e2e ✅ success
hermes-gpu-startup ⏭️ skipped
hermes-inference-switch ✅ success
hermes-shields-config ✅ success
hermes-slack ✅ success
inference-routing ✅ success
issue-2478-crash-loop-recovery ✅ success
issue-4434-tui-unreachable-inference ✅ success
issue-4462-scope-upgrade-approval ✅ success
jetson-nvmap-gpu ⏭️ skipped
kimi-inference-compat ✅ success
launchable-smoke ✅ success
live ✅ success
mcp-bridge ✅ success
mcp-bridge-dev ⏭️ skipped
messaging-compatible-endpoint ✅ success
messaging-providers ✅ success
model-router-provider-routed-inference ✅ success
network-policy ✅ success
ollama-auth-proxy ✅ success
onboard-negative-paths ✅ success
onboard-repair ✅ success
onboard-resume ✅ success
openclaw-discord-pairing ✅ success
openclaw-inference-switch ✅ success
openclaw-plugin-runtime-exdev ✅ success
openclaw-skill-cli ✅ success
openclaw-slack-pairing ✅ success
openclaw-tui-chat-correlation ✅ success
openshell-gateway-auth-contract ⏭️ skipped
openshell-gateway-upgrade ✅ success
openshell-version-pin ✅ success
overlayfs-autofix ✅ success
rebuild-hermes ✅ success
rebuild-hermes-stale-base ✅ success
rebuild-openclaw ✅ success
sandbox-operations ✅ success
sandbox-rebuild ✅ success
sandbox-rlimits-connect ⏭️ skipped
sandbox-survival ✅ success
security-posture ✅ success
sessions-agents-cli ✅ success
shields-config ✅ success
skill-agent ✅ success
snapshot-commands ✅ success
spark-install ✅ success
state-backup-restore ✅ success
telegram-injection ✅ success
token-rotation ✅ success
tunnel-lifecycle ✅ success
ubuntu-repo-cli-smoke ✅ success
upgrade-stale-sandbox ✅ success

Explicit-only jobs skipped: openshell-gateway-auth-contract (default dispatch excludes the resource-heavy OpenShell auth-contract probe unless selected; validate with jobs=openshell-gateway-auth-contract or targets=openshell-gateway-auth-contract), mcp-bridge-dev (default dispatch excludes moving OpenShell dev artifacts unless explicitly selected; validate with jobs=mcp-bridge-dev or targets=mcp-bridge-dev), hermes-gpu-startup (default dispatch excludes this explicit-only job unless selected; validate with jobs=hermes-gpu-startup or targets=hermes-gpu-startup), sandbox-rlimits-connect (default dispatch excludes the destructive rlimit fork/connect probe unless selected; validate with jobs=sandbox-rlimits-connect or targets=sandbox-rlimits-connect), jetson-nvmap-gpu (default dispatch excludes Jetson; explicit dispatch requires allow_jetson_runner_queue=true after confirming an online Jetson runner because queued jobs do not honor timeout-minutes before assignment; validate with jobs=jetson-nvmap-gpu or targets=jetson-nvmap-gpu).

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv changed the title ci(e2e): discover hermetic tests from source ci(e2e): discover credential-free tests from source Jul 11, 2026
@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the terminology and rollout feedback in 87444e763:

  • The source concept is now credential-free test, declared with e2e/credential-free and discovered from the real Vitest projects. There is no test catalog or hand-maintained test matrix.
  • The execution concept is one shared E2E job, shared-e2e. Planner/reporting names are simply test ID, test matrix, and E2E workflow.
  • The execution-profile taxonomy and E2E_EXECUTION_PROFILE marker are gone; unknown e2e/* tags fail closed.
  • The temporary --shell path is now explicitly the current base E2E workflow contract. It discovers the base workflow's actual job IDs, retains only selectors that base can execute, and excludes ubuntu-repo-cli-smoke rather than accepting a no-op selector. The CLI is marked for deletion once the planner-based workflow reaches main.

Verification: full E2E-support project (113 files / 910 tests), PR gate/advisor/mock-parity integration suites (52 tests), docs, project-overlap check, CLI typecheck, real base-to-head mock-parity, and current-base compatibility simulation all pass. Two independent follow-up reviews found no unresolved findings.

@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

PR Review Advisor current-head triage:

  • PRA-1 — justified with checked-in boundaries. A compact ID-to-file helper is the second test catalog this PR removes, and directly conflicts with the maintainer feedback in this thread. workflow-plan.mts is the sole selector owner; the discovery CLI rejects selector arguments. A source tag can contribute only the exact {id,file,project} row shape. Discovery rejects unsafe paths, unsupported Vitest projects, duplicate IDs, duplicate tags, and unknown e2e/* tags. The workflow's jq schema independently rejects extra/malformed fields.
  • The tag cannot choose capabilities. shared-e2e-workflow-boundary.test.ts and workflow-boundary.mts pin the shared job's ubuntu-latest runner, 15-minute timeout, matrix source, no-secret environment, pinned checkout, disabled persisted credentials, and exact Vitest command. The prepare/upload boundary suites pin setup and artifact policy. The workflow-plan/shared-job tests cover default inclusion and both selectors; the PR-report suite covers per-test child attribution and fail-closed unknown results. This is why source discovery is safer than a synchronized catalog without granting source files workflow authority.
  • PRA-T1–PRA-T5 — passed on the current head. The trusted gate run 29144358402 passed cloud-onboard, credential-sanitization, and both OpenClaw/Hermes security-posture children. The E2E / PR Gate check is green.
  • PRA-T6 — stale acceptance text. The PR title, description, source, workflow, tests, and README no longer use the quoted hermetic/profile terminology. The current contract is the tagged credential-free test plus one shared E2E job, with the evidence above.

No advisor-required defect remains; PRA-1 is the documented no-catalog design decision requested by the maintainer, and all runtime follow-ups passed.

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

🧹 Nitpick comments (2)
tools/e2e-advisor/targets.mts (1)

61-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Share the credential-free test path classifier credentialFreeTestProjectForChangedFile duplicates the e2e-live/integration path rules already enforced in tools/e2e/credential-free-tests.mts; exporting a shared helper there would keep changed-file classification aligned if those Vitest project boundaries move.

🤖 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 `@tools/e2e-advisor/targets.mts` around lines 61 - 64, Share the
credential-free test path classification instead of duplicating its regex rules
in credentialFreeTestProjectForChangedFile. Export a reusable helper from
credential-free-tests.mts and use it in targets.mts for e2e-live and integration
detection, preserving the existing project mapping while keeping both
classifiers aligned.

Source: Path instructions

test/e2e/support/jetson-workflow-boundary.test.ts (1)

51-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid coupling this Jetson-scoped test to the full global explicit-only-jobs list.

Asserting an exact, ordered array pulls in unrelated jobs (openshell-gateway-auth-contract, mcp-bridge-dev, hermes-gpu-startup, sandbox-rlimits-connect) into a test whose stated purpose is Jetson selectability. Any future unrelated explicit-only job addition/reorder will break this test.

♻️ Narrow the assertion to what this test claims
-    expect(inventory.explicitOnlyJobs).toEqual([
-      "openshell-gateway-auth-contract",
-      "mcp-bridge-dev",
-      "hermes-gpu-startup",
-      "sandbox-rlimits-connect",
-      "jetson-nvmap-gpu",
-    ]);
+    expect(inventory.explicitOnlyJobs).toContain("jetson-nvmap-gpu");
🤖 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/jetson-workflow-boundary.test.ts` around lines 51 - 57,
Update the assertion in the Jetson workflow boundary test to avoid comparing the
full ordered explicit-only-jobs list. Assert only that the Jetson-specific job
“jetson-nvmap-gpu” is present/selectable, using a containment or focused-filter
assertion rather than exact array equality.
🤖 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.

Nitpick comments:
In `@test/e2e/support/jetson-workflow-boundary.test.ts`:
- Around line 51-57: Update the assertion in the Jetson workflow boundary test
to avoid comparing the full ordered explicit-only-jobs list. Assert only that
the Jetson-specific job “jetson-nvmap-gpu” is present/selectable, using a
containment or focused-filter assertion rather than exact array equality.

In `@tools/e2e-advisor/targets.mts`:
- Around line 61-64: Share the credential-free test path classification instead
of duplicating its regex rules in credentialFreeTestProjectForChangedFile.
Export a reusable helper from credential-free-tests.mts and use it in
targets.mts for e2e-live and integration detection, preserving the existing
project mapping while keeping both classifiers aligned.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 645ed18b-0107-4fd3-94d0-9bed2482cfdd

📥 Commits

Reviewing files that changed from the base of the PR and between 18b400e and 87444e7.

📒 Files selected for processing (28)
  • .github/workflows/e2e.yaml
  • scripts/checks/e2e-mock-parity.ts
  • test/e2e-advisor-targets.test.ts
  • test/e2e-mock-parity.test.ts
  • test/e2e/README.md
  • test/e2e/live/docs-validation.test.ts
  • test/e2e/live/onboard-negative-paths.test.ts
  • test/e2e/live/openshell-version-pin.test.ts
  • test/e2e/live/ubuntu-repo-cli-smoke.test.ts
  • test/e2e/support/credential-free-tests.test.ts
  • test/e2e/support/dockerhub-auth-workflow-boundary.test.ts
  • test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts
  • test/e2e/support/e2e-workflow.test.ts
  • test/e2e/support/jetson-workflow-boundary.test.ts
  • test/e2e/support/prepare-e2e-workflow-boundary.test.ts
  • test/e2e/support/shared-e2e-workflow-boundary.test.ts
  • test/e2e/support/upload-e2e-artifacts-workflow-boundary.test.ts
  • test/e2e/support/workflow-plan.test.ts
  • test/gateway-drift-preflight.test.ts
  • tools/e2e-advisor/targets.mts
  • tools/e2e/credential-free-tests.mts
  • tools/e2e/pr-e2e-gate.mts
  • tools/e2e/prepare-e2e-workflow-boundary.mts
  • tools/e2e/upload-e2e-artifacts-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts
  • tools/e2e/workflow-inventory.mts
  • tools/e2e/workflow-plan.mts
  • vitest.config.ts
✅ Files skipped from review due to trivial changes (6)
  • test/e2e/live/onboard-negative-paths.test.ts
  • test/e2e/live/ubuntu-repo-cli-smoke.test.ts
  • test/e2e/live/docs-validation.test.ts
  • test/gateway-drift-preflight.test.ts
  • test/e2e/live/openshell-version-pin.test.ts
  • test/e2e/README.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • vitest.config.ts
  • test/e2e-advisor-targets.test.ts
  • test/e2e-mock-parity.test.ts
  • tools/e2e/workflow-plan.mts
  • test/e2e/support/e2e-report-to-pr-workflow-boundary.test.ts

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed both current-head CodeRabbit nitpicks in 51e84610e:

  • credentialFreeTestProjectForFile now owns the e2e-live/integration path rules and is shared by discovery validation and advisor changed-file normalization.
  • The Jetson boundary test now asserts only that jetson-nvmap-gpu is explicit-only, avoiding coupling to unrelated jobs or ordering.

Focused verification passed: credential-free/shared/Jetson E2E-support tests (32), advisor/mock-parity integration tests (34), Biome, repository hooks, pre-push typecheck, and the real base-to-head mock-parity check.

@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewed the current-head Nemotron findings against the checked-in contracts:

  • PRA-1 is already covered bidirectionally. shared-e2e-workflow-boundary.test.ts globs every real test-file declaration of @module-tag e2e/credential-free and asserts exact equality with discoverCredentialFreeTests(). That fails for either a tagged file missing from Vitest discovery or a discovered row without the declaration. The current-head e2e-support check passed this contract.
  • PRA-2 would weaken parsing and does not remove a dependency. TypeScript is already exactly pinned to 6.0.3 in package.json and the lockfile. The scanner intentionally recognizes standalone line/block-comment declarations while rejecting identical text inside strings and template literals; credential-free-tests.test.ts covers those false-positive cases. A regex would lose that distinction. The separate AST leaf-token comparison mentioned by the advisor lives in scripts/checks/e2e-mock-parity.ts, not the discovery module.
  • PRA-T1–PRA-T3 passed on this exact head. Trusted E2E run 29144973763 passed generate-matrix, credential-sanitization, cloud-onboard, and both Hermes/OpenClaw security-posture jobs.

The Nemotron job itself ended with ANALYSIS_OUTCOME=failure during its atomic-terminal repair, after preserving these findings. No code change is warranted for them; the source-discovery and parser invariants are already pinned by tests and current-head runtime evidence.

@cv
cv merged commit e8a1b01 into main Jul 11, 2026
48 of 50 checks passed
@cv
cv deleted the codex/discover-live-e2e-tests branch July 11, 2026 14:54
@cv cv mentioned this pull request Jul 11, 2026
21 tasks
cv added a commit that referenced this pull request Jul 11, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Prevents `cancel-superseded` from failing once completed E2E workflow
history exceeds GitHub's 1,000-result search cap. The controller now
lists only non-terminal runs, retains fail-closed pagination, and
cancels each matching run at most once. It also removes the temporary
base-workflow inventory bridge after #6670 landed on `main`.

## Changes
- Query the five documented non-terminal workflow-run statuses instead
of traversing all historical `workflow_dispatch` runs.
- Paginate and validate every status-specific result set before issuing
cancellations, retaining the 1,000-result completeness guard per status.
- Deduplicate run IDs observed across status transitions and keep
completed runs excluded.
- Reproduce the escaped completed-history failure and cover multi-page
active results, forward status transitions, and no partial cancellation
when an active-status search reaches its limit.
- Delete the obsolete `workflow-inventory.mts --shell` compatibility CLI
and exercise malformed workflow metadata directly through the production
inventory reader.

## 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
<!-- Check exactly one tests line and one docs line. Check other lines
when applicable. Add every requested justification or approval
reference. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: the documented PR
cancellation contract is unchanged, and the deleted temporary CLI had no
documented or tracked consumer; final documentation-writer audits
confirmed no user-facing update is needed.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: independent controller
and cleanup reviews confirmed fixed status constants, PR-title and
run-ID validation, benign completion races, validation before
cancellation, and no remaining consumer of the deleted bridge.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — controller integration (1 file, 20
tests); focused E2E workflow boundary (1 file, 17 tests); full
`e2e-support` project (115 files, 926 tests)
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved pull request gate cancellation to target only eligible
“active” workflow runs across multiple run states, avoiding queued or
unrelated runs.
- Refined pagination handling for active-run discovery and ensured
cancellation happens only when the correct run becomes eligible.
  - Deduplicates discovered runs before issuing any cancellations.

- **Tests**
- Expanded end-to-end coverage to verify the exact sequence of
active-status pagination queries and the cancellation/rejection behavior
at page limits.

- **Chores**
- Removed the `workflow-inventory` CLI used by end-to-end tests,
switching validation to direct assertions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Follow-up to NVIDIA#6662, this replaces repeated credential-free E2E jobs with
source discovery and one shared Ubuntu E2E job. Tests opt in beside
their code with `e2e/credential-free`; the E2E workflow owns the runner,
setup, permissions, secrets, timeout, and artifact policy.

## Changes

- Discover tagged tests from their real Vitest projects and derive test
IDs from unique filenames, with no separate test catalog or manually
maintained matrix.
- Run five credential-free tests in the `shared-e2e` matrix job,
including the previously unwired Ubuntu repository CLI smoke test.
- Move selector and matrix planning from inline workflow Bash into
tested TypeScript while preserving `jobs`/`targets` selectors, PR
reporting, scorecard inputs, and controller evidence.
- Keep the temporary four-key shell output required by the current base
E2E workflow. It discovers that workflow's actual job IDs, excludes
selectors the base cannot run, and can be deleted once this workflow is
on `main`.
- Reduce `.github/workflows/e2e.yaml` from 5,430 to 5,334 lines and
document the contributor contract in `test/e2e/README.md`.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] 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] Docs updated for user-facing behavior changes
- [ ] Docs 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 — reviewer/approval link/justification: independent diff and
workflow-contract reviews found no credential exposure, path injection,
untrusted runner selection, or unresolved Actions contract mismatch;
boundary tests pin the credential-free shared job's no-secret setup and
artifact contracts.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run --project e2e-support`
(113 files, 910 tests); PR gate/advisor/mock-parity integration suites
(52 tests); `npm run test:projects:check`; `npm run typecheck:cli`; real
`origin/main...HEAD` mock-parity check; exact current-base shell/matrix
compatibility simulation
- [x] Applicable broad gate passed — earlier PR head: `env -u
SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY npm test` (1,388 files, 15,964
tests passed; 39 skipped; 1 todo); current terminology change set reran
the complete E2E-support project
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — passed
with 0 errors and 2 existing Fern warnings
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only) — no `docs/` pages changed
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

* **New Features**
* Added discovery and execution of “credential-free” E2E tests via a
shared workflow job.
* Added a dedicated workflow planner that builds a live test matrix plus
a credential-free test matrix from typed selectors.
* Improved PR reporting to include per-test results (including handling
for unavailable/unknown results).

* **Bug Fixes**
* Improved selector parsing/selection behavior for shared E2E routing
and dispatch targeting.
* Prevented metadata-only changes from being treated as relevant for
mock-parity checks.

* **Documentation**
* Added documentation for credential-free tests, tagging, discovery
rules, and local inspection commands.

* **Tests**
* Extended E2E coverage for selector normalization, credential-free
discovery, workflow boundaries, and PR reporting scenarios (including
unknown/missing results).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Prevents `cancel-superseded` from failing once completed E2E workflow
history exceeds GitHub's 1,000-result search cap. The controller now
lists only non-terminal runs, retains fail-closed pagination, and
cancels each matching run at most once. It also removes the temporary
base-workflow inventory bridge after NVIDIA#6670 landed on `main`.

## Changes
- Query the five documented non-terminal workflow-run statuses instead
of traversing all historical `workflow_dispatch` runs.
- Paginate and validate every status-specific result set before issuing
cancellations, retaining the 1,000-result completeness guard per status.
- Deduplicate run IDs observed across status transitions and keep
completed runs excluded.
- Reproduce the escaped completed-history failure and cover multi-page
active results, forward status transitions, and no partial cancellation
when an active-status search reaches its limit.
- Delete the obsolete `workflow-inventory.mts --shell` compatibility CLI
and exercise malformed workflow metadata directly through the production
inventory reader.

## 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
<!-- Check exactly one tests line and one docs line. Check other lines
when applicable. Add every requested justification or approval
reference. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: the documented PR
cancellation contract is unchanged, and the deleted temporary CLI had no
documented or tracked consumer; final documentation-writer audits
confirmed no user-facing update is needed.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: independent controller
and cleanup reviews confirmed fixed status constants, PR-title and
run-ID validation, benign completion races, validation before
cancellation, and no remaining consumer of the deleted bridge.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — controller integration (1 file, 20
tests); focused E2E workflow boundary (1 file, 17 tests); full
`e2e-support` project (115 files, 926 tests)
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved pull request gate cancellation to target only eligible
“active” workflow runs across multiple run states, avoiding queued or
unrelated runs.
- Refined pagination handling for active-run discovery and ensured
cancellation happens only when the correct run becomes eligible.
  - Deduplicates discovered runs before issuing any cancellations.

- **Tests**
- Expanded end-to-end coverage to verify the exact sequence of
active-status pagination queries and the cancellation/rejection behavior
at page limits.

- **Chores**
- Removed the `workflow-inventory` CLI used by end-to-end tests,
switching validation to direct assertions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@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 labels Aug 1, 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 area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants