Skip to content

test(e2e): migrate onboard inference smoke to Vitest#5149

Closed
cv wants to merge 18 commits into
mainfrom
codex/e2e-migrate-onboard-inference-smoke
Closed

test(e2e): migrate onboard inference smoke to Vitest#5149
cv wants to merge 18 commits into
mainfrom
codex/e2e-migrate-onboard-inference-smoke

Conversation

@cv

@cv cv commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrates the onboard inference smoke regression from the legacy shell script into a Vitest live scenario. The scenario builds the CLI, runs a host-side setupInference() probe with the child process forced out of Vitest mode, and verifies runtime-broken configured routes are rejected by the real chat/completions smoke path.

Related Issue

Refs #4941
Refs #3253

Changes

  • Add test/e2e-scenario/live/onboard-inference-smoke.test.ts with the compatible-endpoint HTTP 503 regression probe.
  • Replace test/e2e/test-onboard-inference-smoke.sh in regression-e2e.yaml with direct Vitest execution and artifact upload.
  • Extend test/regression-e2e-workflow.test.ts to lock the direct Vitest workflow contract.

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)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • 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

@cv cv self-assigned this Jun 10, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c3e04bb8-8060-4935-9701-ed03e5d0b362

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/e2e-migrate-onboard-inference-smoke

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

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: onboard-inference-smoke-e2e
Optional E2E: model-router-provider-routed-inference-e2e

Dispatch hint: onboard-inference-smoke-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/codex/e2e-simplify-migration-tracking
Head: HEAD
Confidence: high

Required E2E

Optional E2E

  • model-router-provider-routed-inference-e2e (medium): Adjacent inference-routing confidence check: validates provider-routed inference through Model Router, but product routing code was not changed so this is not merge-blocking for this test/workflow migration.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: regression-e2e.yaml
  • jobs input: onboard-inference-smoke-e2e

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

E2E Scenario Advisor Recommendation

Required scenario E2E: e2e-scenarios-all
Optional scenario E2E: None

Dispatch required scenario E2E:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref>

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/codex/e2e-simplify-migration-tracking
Head: HEAD
Confidence: high

Required scenario E2E

  • e2e-scenarios-all: PR adds a new free-standing Vitest live scenario test under test/e2e-scenario/live/. It is not a trusted-main live-supported typed registry scenario ID that can be targeted safely, so run the scenario fan-out via the canonical Vitest scenario workflow.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref>

Optional scenario E2E

  • None.

Relevant changed files

  • test/e2e-scenario/live/onboard-inference-smoke.test.ts

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 1 worth checking, 0 nice ideas
Since last review: 0 prior items resolved, 1 still applies, 0 new items found

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

  • Add job-local read-only permissions for the migrated E2E lane (.github/workflows/regression-e2e.yaml:223): The migrated `onboard-inference-smoke-e2e` job runs repository code through `npm run build:cli` and Vitest, but it does not declare job-local permissions. Because the workflow has top-level `checks: write` and `pull-requests: write`, this lane inherits write scopes even though the changed job only needs to read the repository and upload artifacts. This keeps a wider trusted-code boundary than necessary.
    • Recommendation: Add `permissions: { contents: read }` under `onboard-inference-smoke-e2e` unless this job specifically needs check or pull-request write access.
    • Evidence: Workflow top-level permissions include `contents: read`, `checks: write`, and `pull-requests: write`; the changed job starts at `.github/workflows/regression-e2e.yaml:223` and has no job-local `permissions`, while neighboring `strict-tool-call-probe-e2e` declares `permissions: contents: read`.

🌱 Nice ideas

  • None.
Consider writing more tests for
  • **Runtime validation** — Dispatch `onboard-inference-smoke-e2e` and confirm the workflow invokes `test/e2e-scenario/live/onboard-inference-smoke.test.ts` rather than `test/e2e/test-onboard-inference-smoke.sh`.. Deterministic tests cover migration parity and workflow contract, but the changed surface includes a GitHub Actions lane with dependency install, Vitest project selection, child-process probe execution, fixture artifact upload, and workflow permissions.
  • **Runtime validation** — Confirm the Vitest probe fails if `setupInference()` resolves after the mocked `/chat/completions` HTTP 503.. Deterministic tests cover migration parity and workflow contract, but the changed surface includes a GitHub Actions lane with dependency install, Vitest project selection, child-process probe execution, fixture artifact upload, and workflow permissions.
  • **Runtime validation** — Confirm uploaded `onboard-inference-smoke-artifacts` include probe stdout/stderr/result files without exposing real secret values.. Deterministic tests cover migration parity and workflow contract, but the changed surface includes a GitHub Actions lane with dependency install, Vitest project selection, child-process probe execution, fixture artifact upload, and workflow permissions.
  • **Runtime validation** — Add a deterministic assertion that the child probe's `__CALLS__` includes a command containing `/chat/completions`, so an earlier unrelated rejection cannot satisfy the [Brev][Onboard] Onboard reports SUCCESS without exercising inference path — config bugs reach end users instead of being caught #3253 guard.. Deterministic tests cover migration parity and workflow contract, but the changed surface includes a GitHub Actions lane with dependency install, Vitest project selection, child-process probe execution, fixture artifact upload, and workflow permissions.
Since last review details

Current findings:

  • Add job-local read-only permissions for the migrated E2E lane (.github/workflows/regression-e2e.yaml:223): The migrated `onboard-inference-smoke-e2e` job runs repository code through `npm run build:cli` and Vitest, but it does not declare job-local permissions. Because the workflow has top-level `checks: write` and `pull-requests: write`, this lane inherits write scopes even though the changed job only needs to read the repository and upload artifacts. This keeps a wider trusted-code boundary than necessary.
    • Recommendation: Add `permissions: { contents: read }` under `onboard-inference-smoke-e2e` unless this job specifically needs check or pull-request write access.
    • Evidence: Workflow top-level permissions include `contents: read`, `checks: write`, and `pull-requests: write`; the changed job starts at `.github/workflows/regression-e2e.yaml:223` and has no job-local `permissions`, while neighboring `strict-tool-call-probe-e2e` declares `permissions: contents: read`.

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

@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: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow refactor PR restructures code without intended behavior change labels Jun 10, 2026
@wscurran

Copy link
Copy Markdown
Contributor

@copy-pr-bot

copy-pr-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

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

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Base automatically changed from codex/e2e-simplify-migration-tracking to main June 10, 2026 20:53
@jyaunches

Copy link
Copy Markdown
Contributor

Closing as superseded by merged PR #5155, which retired test-onboard-inference-smoke.sh under the simplified #5098 migration rules.

@jyaunches jyaunches closed this Jun 11, 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 area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants