Skip to content

perf(test): speed up e2e support suite - #6880

Merged
cv merged 3 commits into
mainfrom
codex/speed-up-e2e-support-tests
Jul 14, 2026
Merged

perf(test): speed up e2e support suite#6880
cv merged 3 commits into
mainfrom
codex/speed-up-e2e-support-tests

Conversation

@cv

@cv cv commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reduce e2e-support runtime by removing real timer waits, repeated Vitest and shell subprocess startup, and repeated parsing of the E2E workflow. Under the same V8-coverage profile, the project wall time falls from 17.29 seconds to 11.78 seconds (about 32%) without changing tested behavior.

Changes

  • Use fake timers for PID-stability sampling and batch related live-target collection checks into fewer Vitest subprocesses.
  • Exercise the exported workflow-plan helper directly instead of launching the workflow's shell/TSX wrapper four times.
  • Parse the E2E workflow once in the aggregate validator, pass the parsed document to focused validators, and validate host-dependency mutations in memory.

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: test execution and internal workflow-validation behavior only; commands, selectors, workflow inputs, and user-facing behavior are unchanged.
  • 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:
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — full e2e-support V8-coverage profile: 253 suites and 997 tests passed; 17.29s before, 11.78s after
  • Applicable broad gate passed — npm test: 1,506 files passed (3 skipped), 17,150 tests passed (40 skipped)
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

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

Summary by CodeRabbit

  • Refactor
    • Improved end-to-end workflow validation by adding workflow-value (in-memory) checks alongside the existing file-based validation.
    • Refactored Hermes GPU startup workflow validation to operate on already-parsed workflow content.
    • Updated workflow planning validation to assert against the shared workflow plan builder output.
  • Tests
    • Updated E2E host-dependency rules to validate by mutating in-memory workflows directly.
    • Enhanced live-test gating to support multi-file collection with per-file assertions.
    • Made PID stability checks deterministic by using mocked timers.
    • Simplified the E2E workflow test setup by switching to the shared workflow plan builder.

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

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

E2E workflow validators now support parsed workflow objects while retaining path-based wrappers. Related tests migrate to in-memory validation, shared workflow planning, multi-file live-test gating, and fake-timer-controlled PID polling.

Changes

E2E validation and support tests

Layer / File(s) Summary
Workflow value-based validation
tools/e2e/workflow-boundary.mts, tools/e2e/hermes-gpu-startup-workflow-boundary.mts
Extracts workflow-object validation APIs and makes existing boundary functions delegate through parsed workflow records.
Boundary tests use in-memory workflows
test/e2e/support/e2e-host-dependency-workflow-boundary.test.ts
Updates host-dependency tests to mutate workflow objects and call validateE2eWorkflow directly.
Workflow plan boundary coverage
test/e2e/support/e2e-workflow.test.ts
Replaces shell-based matrix generation with buildE2eWorkflowPlan assertions.
Multi-file live target gating
test/e2e/support/e2e-live-target-gating.test.ts
Adds multi-file collection support and per-file assertions for explicit and Linux gates.
Deterministic PID polling tests
test/e2e/support/e2e-recovery-helpers.test.ts
Uses fake timers to flush polling callbacks before checking PID stability outcomes.

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

Possibly related PRs

  • NVIDIA/NemoClaw#6879: Both refactor E2E workflow boundary validation around in-memory workflow objects.

Suggested labels: area: e2e, chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: improving e2e support test suite performance.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/speed-up-e2e-support-tests

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

@github-code-quality

github-code-quality Bot commented Jul 14, 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/speed-up-e2e-s... branch remains at 79%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main 3461d71 codex/speed-up-e2e-s... 66cf5f9 +/-
src/lib/policy/tiers.ts 96% 80% -16%
src/lib/onboard...conciliation.ts 94% 88% -6%
src/lib/state/gateway.ts 91% 93% +2%
src/lib/policy/...t-provenance.ts 95% 100% +5%

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections differ; severity counts match.

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

E2E guidance

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

Recommended E2E: cloud-onboard, credential-sanitization, security-posture

Workflow run details

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@test/e2e/support/e2e-live-target-gating.test.ts`:
- Around line 83-105: The collection test currently validates only all gates
enabled together, so it cannot detect files wired to another target’s gate. Keep
the existing batched assertion and extend the test around gatedFiles and
listLiveTests with an isolated run for each file that enables only its own gate,
then assert that file collects more tests than when its gate is disabled.
🪄 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: 40d8f6d6-8fbe-4627-bb11-1b779ea0863d

📥 Commits

Reviewing files that changed from the base of the PR and between 4683ce4 and a28acad.

📒 Files selected for processing (6)
  • test/e2e/support/e2e-host-dependency-workflow-boundary.test.ts
  • test/e2e/support/e2e-live-target-gating.test.ts
  • test/e2e/support/e2e-recovery-helpers.test.ts
  • test/e2e/support/e2e-workflow.test.ts
  • tools/e2e/hermes-gpu-startup-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts

Comment thread test/e2e/support/e2e-live-target-gating.test.ts Outdated
cv added 2 commits July 14, 2026 11:49
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@jyaunches
jyaunches self-requested a review July 14, 2026 18:52
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: performance Latency, throughput, resource use, benchmarks, or scaling chore Build, CI, dependency, or tooling maintenance labels Jul 14, 2026
@cv
cv merged commit ebb31eb into main Jul 14, 2026
109 checks passed
@cv
cv deleted the codex/speed-up-e2e-support-tests branch July 14, 2026 20:30
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 area: performance Latency, throughput, resource use, benchmarks, or scaling chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants