Skip to content

chore(e2e): refresh docs and add real gateway negative-path test#5042

Merged
cv merged 2 commits into
mainfrom
chore/e2e-doc-refresh-and-gateway-test
Jun 9, 2026
Merged

chore(e2e): refresh docs and add real gateway negative-path test#5042
cv merged 2 commits into
mainfrom
chore/e2e-doc-refresh-and-gateway-test

Conversation

@jyaunches

@jyaunches jyaunches commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #4996 addressing the PR review advisor's findings. Two items: (1) the e2e scenario docs still pointed users at runner paths that #4996 deleted, and (2) the gateway helper had no real negative-path test coverage after the accidentally-passing test in #4996 was removed. Both are fixed here.

Related Issue

Follow-up to #4996.

Changes

Docs no longer point at deleted runner paths

Replaced the accidentally-passing gateway test with a real negative-path test

  • test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts — added gateway helper should fail clearly when URL is unreachable. It sources the supported helper at validation_suites/assert/gateway-alive.sh, calls e2e_gateway_assert_healthy against an unbound port, and asserts the helper exits non-zero with stderr that names the gateway and the URL/port so on-call engineers can grep for it. The test deleted in chore(e2e): delete deprecated bash entrypoints and orphan helper libs #4996 was sourcing a nonexistent runtime/lib/gateway.sh and was passing only because the missing-file stderr happened to match /gateway/i.

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)

Notes on verification:

  • Targeted vitest run is green: npx vitest run test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts -t "gateway helper should fail" passes; npx vitest run test/e2e-scenario/ passes except the same e2e-fixture-context.test.ts timing flake that fails on a clean origin/main checkout under parallel load and passes on isolated re-run. Pre-existing — not caused by this PR.
  • Local npx prek run --all-files reports the same Test (CLI) flakes that exist on a clean origin/main. Leaving the verification box unchecked because the local prek run wasn't fully clean even though the issue is unrelated.

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

Summary by CodeRabbit

  • Documentation

    • Updated E2E scenario runner documentation to reflect TypeScript as the canonical entrypoint and primary execution workflow.
    • Removed legacy bash and YAML resolver runner command examples and guidance.
    • Clarified runtime context configuration and command examples.
  • Tests

    • Added test coverage for gateway health check helper to validate failure handling on unreachable gateways.

Address PR review advisor follow-ups on the bash cleanup:

1. Docs still pointed users at deleted runner paths.
   - test/e2e-scenario/docs/README.md 'How to run' listed the deleted
     run-scenario.sh and run-suites.sh entrypoints with --plan-only,
     --dry-run, and --validate-only flags. Replaced with the
     TypeScript runner usage that survives on main: --list,
     --emit-matrix, --scenarios <id[,id...]>, and --plan-only as a
     local-debug-only mode.
   - Repository-layout block under runtime/ no longer claims to
     contain run-scenario.sh, run-suites.sh, coverage-report.sh, or
     resolver/. It now just lists lib/ for the shared helper libs
     that validation_suites/ source.
   - test/e2e-scenario/docs/MIGRATION.md 'Useful commands' dropped
     the YAML/shell resolver block (paths deleted) and the
     coverage-report.sh reference (deleted in #4380), and stopped
     advertising --dry-run on the typed runner. The 'leave legacy
     executable scripts in place' line was reworded so it no longer
     implies the bash entrypoints still exist.

2. Replace the accidentally-passing gateway helper test with a real
   negative-path test that sources the supported helper.
   The test deleted in the prior commit
   (gateway_helper_should_report_unhealthy_gateway_clearly) sourced a
   nonexistent runtime/lib/gateway.sh and was passing only because
   the missing-file stderr happened to match /gateway/i.
   validation_suites/assert/gateway-alive.sh is the real, supported
   helper and had no negative-path coverage. The new test
   gateway_helper_should_fail_clearly_when_url_is_unreachable sources
   that file, points e2e_gateway_assert_healthy at an unbound port,
   and asserts the helper exits non-zero with a stderr that names
   the gateway and the URL/port so on-call engineers can grep for
   it.

Verification:
  - npx vitest run test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts
    test/e2e-scenario-advisor.test.ts test/e2e-scenario/ -> all green
    except the same e2e-fixture-context.test.ts timing flake that
    fails on a clean origin/main checkout under parallel load and
    passes on isolated re-run.

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches jyaunches self-assigned this Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. No E2E jobs are recommended. This PR is limited to documentation updates and a tests-only addition under the e2e scenario framework tests; it does not alter installer/onboarding, sandbox lifecycle, credentials, security boundaries, network policy, inference routing, deployment, or live assistant user flows.

Optional E2E

  • None.

New E2E recommendations

  • None.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

E2E Scenario Advisor Recommendation

Required scenario E2E: None
Optional scenario E2E: None

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required scenario E2E

  • None. Only scenario documentation and framework test coverage changed; no scenario runtime, metadata, suite scripts, workflows, or install/onboarding helpers changed, so scenario E2E behavior is unaffected.

Optional scenario E2E

  • None.

Relevant changed files

  • test/e2e-scenario/docs/MIGRATION.md
  • test/e2e-scenario/docs/README.md
  • test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5aa43585-f1e3-4acb-b5c1-8c7bcb5a7687

📥 Commits

Reviewing files that changed from the base of the PR and between 784f573 and 0c63342.

📒 Files selected for processing (3)
  • test/e2e-scenario/docs/MIGRATION.md
  • test/e2e-scenario/docs/README.md
  • test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts

📝 Walkthrough

Walkthrough

This PR consolidates E2E scenario runner documentation to reflect the completed migration to TypeScript as the sole canonical executor. Migration and usage docs are updated to remove legacy bash/YAML runner references, and a new test validates shell helper failure handling on unreachable gateways.

Changes

E2E Scenario Runner Consolidation

Layer / File(s) Summary
Migration & usage documentation updates
test/e2e-scenario/docs/MIGRATION.md, test/e2e-scenario/docs/README.md
MIGRATION.md clarifies that legacy scripts remain until deletion is recorded, while bash scenario entrypoints and YAML resolver are already removed; TypeScript runner is canonical. README.md updates "How to run" section to emphasize TypeScript runner as the entrypoint and removes legacy shell runner commands while retaining typed registry and Vitest live scenario guidance. Repository layout description for test/e2e-scenario/runtime/ is narrowed to shared shell helper libraries.
Gateway helper failure validation test
test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts
New test case validates that gateway-alive.sh helper exits non-zero and reports diagnostics when the gateway URL is unreachable (port 65531), with proper temp directory cleanup in a finally block.

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4654: Both PRs modify E2E scenario migration documentation to reconcile scenario runner and migration model guidance.
  • NVIDIA/NemoClaw#4996: This PR adds a new Vitest E2E shell-helper test for gateway health failure reporting that was previously removed in the referenced PR.
  • NVIDIA/NemoClaw#4939: Both PRs update E2E migration docs to consolidate on a single TypeScript scenario runner and remove legacy YAML/bash runner instructions.

Suggested labels

chore, area: e2e, area: docs

Suggested reviewers

  • cv
  • prekshivyas

Poem

🐰 The runners are unified at last,
With TypeScript steering true and fast,
Old shell scripts fade into the past,
While gateway helpers fail so vast—
Our E2E tests now hold steadfast!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main changes: documentation refresh and addition of a gateway negative-path test.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 chore/e2e-doc-refresh-and-gateway-test

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

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

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

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

  • Source-of-truth review needed: test/e2e-scenario/docs/README.md and test/e2e-scenario/docs/MIGRATION.md runner-model prose: The advisor marked localized patch analysis as needs_followup.
    • Recommendation: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
    • Evidence: `README.md:82`, `README.md:91`, `README.md:182-184`, `MIGRATION.md:15`, and `MIGRATION.md:18-19` conflict with `MIGRATION.md:122-125` and `.github/workflows/e2e-scenarios.yaml`.
  • Docs still describe removed dry-run/YAML shell-runner behavior as current (test/e2e-scenario/docs/README.md:182): The PR removes the deleted command examples, but touched docs still say the scenario workflows run typed scenario dry-runs and that a current YAML shell runner expresses or drives live behavior. That contradicts the new TypeScript-runner guidance and the current workflow implementation, which invokes `run.ts --scenarios` without `--plan-only`.
    • Recommendation: Update the remaining README and MIGRATION prose to consistently describe the current source of truth: the TypeScript runner/workflows run live scenarios, `--plan-only` is local debug only, and any remaining YAML metadata should not be described as driving a deleted shell runner or live suite resolution unless a specific surviving path still does that.
    • Evidence: `README.md:82` says “The current YAML shell runner expresses this through”; `README.md:91` refers to “dry-run plan artifacts”; `README.md:182-184` says `.github/workflows/e2e-scenarios*.yaml` run typed scenario dry-runs. `MIGRATION.md:15` says typed builders drive “dry-run plans” and `MIGRATION.md:18-19` says YAML metadata still drives the shell scenario runner and live suite resolution, while `MIGRATION.md:122-125` says the bash entrypoints and YAML resolver are already gone and the TypeScript runner is the sole canonical executor. `.github/workflows/e2e-scenarios.yaml` runs `npx tsx test/e2e-scenario/scenarios/run.ts --scenarios "${SCENARIOS}"` live.
  • Gateway negative-path test depends on port 65531 being unused (test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts:595): The new test points the real helper at `http://127.0.0.1:65531\` because that port is “very unlikely” to be bound. That is not deterministic: a local or CI process could listen on that port and return a healthy status, causing the test to fail for environmental reasons rather than helper behavior.
    • Recommendation: Make the negative path deterministic by controlling the boundary, for example by putting a fake `curl` earlier on `PATH` that returns connection failures for both `/health` and the base URL, or by using a controlled local server that always returns a non-healthy response and asserting the helper reports that failure.
    • Evidence: The test calls `e2e_gateway_assert_healthy "http://127.0.0.1:65531"\` and asserts nonzero status plus stderr containing “gateway” and “65531”; the comment states the port is “very unlikely to be bound on the runner,” not guaranteed.

🌱 Nice ideas

  • None.
Consider writing more tests for
  • **Gateway negative-path test depends on port 65531 being unused** — Make the negative path deterministic by controlling the boundary, for example by putting a fake `curl` earlier on `PATH` that returns connection failures for both `/health` and the base URL, or by using a controlled local server that always returns a non-healthy response and asserting the helper reports that failure.
  • **Acceptance clause:** Follow-up to chore(e2e): delete deprecated bash entrypoints and orphan helper libs #4996. — add test evidence or identify existing coverage. No linked issue clauses or comments for chore(e2e): delete deprecated bash entrypoints and orphan helper libs #4996 were provided in the deterministic context, so coverage can only be mapped to the PR body's stated follow-up goals. The patch addresses the touched docs/test areas, but leaves some stale runner-model prose.
  • **Acceptance clause:** the e2e scenario docs still pointed users at runner paths that chore(e2e): delete deprecated bash entrypoints and orphan helper libs #4996 deleted — add test evidence or identify existing coverage. The explicit command/layout references to `runtime/run-scenario.sh`, `runtime/run-suites.sh`, `coverage-report.sh`, `--dry-run`, and `--validate-only` were removed, and those runner files are absent under `test/e2e-scenario/runtime/`. However, nearby touched prose still describes current YAML shell-runner behavior and workflow dry-runs.
  • **Acceptance clause:** Docs no longer point at deleted runner paths — add test evidence or identify existing coverage. Deleted runner command examples and the runtime layout entries were removed, but `README.md` and `MIGRATION.md` still include stale dry-run/YAML shell-runner source-of-truth wording.
  • **test/e2e-scenario/docs/README.md and test/e2e-scenario/docs/MIGRATION.md runner-model prose** — No doc lint currently enforces this wording; grep evidence shows remaining stale terms in the touched docs. Existing workflow code demonstrates the correct behavior.. `README.md:82`, `README.md:91`, `README.md:182-184`, `MIGRATION.md:15`, and `MIGRATION.md:18-19` conflict with `MIGRATION.md:122-125` and `.github/workflows/e2e-scenarios.yaml`.
Since last review details

Current findings:

  • Source-of-truth review needed: test/e2e-scenario/docs/README.md and test/e2e-scenario/docs/MIGRATION.md runner-model prose: The advisor marked localized patch analysis as needs_followup.
    • Recommendation: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
    • Evidence: `README.md:82`, `README.md:91`, `README.md:182-184`, `MIGRATION.md:15`, and `MIGRATION.md:18-19` conflict with `MIGRATION.md:122-125` and `.github/workflows/e2e-scenarios.yaml`.
  • Docs still describe removed dry-run/YAML shell-runner behavior as current (test/e2e-scenario/docs/README.md:182): The PR removes the deleted command examples, but touched docs still say the scenario workflows run typed scenario dry-runs and that a current YAML shell runner expresses or drives live behavior. That contradicts the new TypeScript-runner guidance and the current workflow implementation, which invokes `run.ts --scenarios` without `--plan-only`.
    • Recommendation: Update the remaining README and MIGRATION prose to consistently describe the current source of truth: the TypeScript runner/workflows run live scenarios, `--plan-only` is local debug only, and any remaining YAML metadata should not be described as driving a deleted shell runner or live suite resolution unless a specific surviving path still does that.
    • Evidence: `README.md:82` says “The current YAML shell runner expresses this through”; `README.md:91` refers to “dry-run plan artifacts”; `README.md:182-184` says `.github/workflows/e2e-scenarios*.yaml` run typed scenario dry-runs. `MIGRATION.md:15` says typed builders drive “dry-run plans” and `MIGRATION.md:18-19` says YAML metadata still drives the shell scenario runner and live suite resolution, while `MIGRATION.md:122-125` says the bash entrypoints and YAML resolver are already gone and the TypeScript runner is the sole canonical executor. `.github/workflows/e2e-scenarios.yaml` runs `npx tsx test/e2e-scenario/scenarios/run.ts --scenarios "${SCENARIOS}"` live.
  • Gateway negative-path test depends on port 65531 being unused (test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts:595): The new test points the real helper at `http://127.0.0.1:65531\` because that port is “very unlikely” to be bound. That is not deterministic: a local or CI process could listen on that port and return a healthy status, causing the test to fail for environmental reasons rather than helper behavior.
    • Recommendation: Make the negative path deterministic by controlling the boundary, for example by putting a fake `curl` earlier on `PATH` that returns connection failures for both `/health` and the base URL, or by using a controlled local server that always returns a non-healthy response and asserting the helper reports that failure.
    • Evidence: The test calls `e2e_gateway_assert_healthy "http://127.0.0.1:65531"\` and asserts nonzero status plus stderr containing “gateway” and “65531”; the comment states the port is “very unlikely to be bound on the runner,” not guaranteed.

Workflow run details

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

@wscurran wscurran added area: docs Documentation, examples, guides, or docs build area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance labels Jun 9, 2026
@wscurran

wscurran commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@cv cv merged commit 2edd531 into main Jun 9, 2026
39 checks passed
@cv cv deleted the chore/e2e-doc-refresh-and-gateway-test branch June 9, 2026 16:26
@cv cv added the v0.0.62 Release target label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation, examples, guides, or docs build area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance v0.0.62 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants