Skip to content

chore(e2e): delete deprecated bash entrypoints and orphan helper libs#4996

Merged
jyaunches merged 3 commits into
mainfrom
chore/delete-bash-tombstones-and-orphans
Jun 9, 2026
Merged

chore(e2e): delete deprecated bash entrypoints and orphan helper libs#4996
jyaunches merged 3 commits into
mainfrom
chore/delete-bash-tombstones-and-orphans

Conversation

@jyaunches

@jyaunches jyaunches commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Bash is not the direction the E2E scenario stack is heading, and the vitest-runner migration underway makes that even clearer — none of these bash files have a future role. This PR sweeps out a set of inert tombstones and orphan helpers under test/e2e-scenario/runtime/ that have no production callers, so the migration lands on a smaller surface. Net: 6 file deletions + minor test trimming. ~250 lines removed. No production behavior change.

Changes

Tombstone bash entrypoints (deleted; bodies were just exit 2 stubs):

  • test/e2e-scenario/runtime/run-scenario.sh
  • test/e2e-scenario/runtime/run-suites.sh

Orphan helper libs (deleted; zero callers in production):

  • test/e2e-scenario/runtime/lib/artifacts.sh — only caller was a self-test in e2e-lib-helpers.test.ts.
  • test/e2e-scenario/runtime/lib/cleanup.sh — was a thin re-export of sandbox-teardown.sh.
  • test/e2e-scenario/runtime/lib/negative.sh — superseded by scenarios/orchestrators/negative-matcher.ts.
  • test/e2e-scenario/runtime/lib/port-holder.sh — superseded by typed probes.

Test cleanup in test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts (rides along):

  • Dropped artifact_helper_should_collect_known_logs_without_failing_when_missing — it was the only caller of artifacts.sh.
  • Dropped gateway_helper_should_report_unhealthy_gateway_clearly — it sourced ${RUNTIME_LIB}/gateway.sh, which does not exist on main. The test was passing only by accident: the missing-file stderr happens to match /gateway/i.
  • Dropped the dead E2E_DRY_RUN: "1" env arg in older_base_image_should_emit_dockerfile_pointing_at_tagged_base. PR test(e2e): execute real shell assertions; delete dry-run, --validate-only, and the bash runner #4380 deleted the e2e_env_is_dry_run short-circuit from older-base-image.sh, so the env var is unread test scaffolding now.

Comment hygiene:

  • nemoclaw_scenarios/probes/sandbox-absent.sh — dropped the "Typed replacement for the legacy run-scenario.sh inline check" note now that the legacy file is deleted.

Intentionally untouched:

  • test/e2e-scenario-advisor.test.ts still references test/e2e-scenario/runtime/run-scenario.sh as a string fixture. The advisor never reads the file — it filters changed-file paths by shape — so the fixture continues to validate the same plumbing. Refreshing those fixtures is out of scope.
  • test/e2e-scenario/docs/{README,MIGRATION}.md reference the old bash entrypoints. Doc updates are out of scope; the docs already mark these paths as deprecated.

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 test/e2e-scenario-advisor.test.ts test/e2e-scenario/ — 3 test files, 106 tests, 0 failures.
  • npx prek run --all-files reports the same Test (CLI) flakes that exist on a clean origin/main checkout (timing-sensitive tests in nemoclaw-start.test.ts, doctor-gateway-token.test.ts, e2e-fixture-context.test.ts, runtime-hermes-secret-boundary-behavioural.test.ts). All pass on isolated re-run; none reference any of the deleted bash files. Pre-existing — not caused by this PR. 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

PR #4380 made the TypeScript runner (test/e2e-scenario/scenarios/run.ts)
the canonical scenario executor, collapsed run-scenario.sh and
run-suites.sh to fail-fast deprecation stubs, and deleted the
runtime/resolver/ tree. Several bash files were left behind with no
production callers. This PR removes them.

Tombstone bash entrypoints (no callers; bodies were just exit-2 stubs):
  - test/e2e-scenario/runtime/run-scenario.sh
  - test/e2e-scenario/runtime/run-suites.sh

Orphan helper libs (no production callers):
  - test/e2e-scenario/runtime/lib/artifacts.sh
  - test/e2e-scenario/runtime/lib/cleanup.sh
  - test/e2e-scenario/runtime/lib/negative.sh
  - test/e2e-scenario/runtime/lib/port-holder.sh

Test cleanup riding along with the deletions:
  - Drop the 'artifact_helper_should_collect_known_logs_*' test in
    e2e-lib-helpers.test.ts: it was the only caller of artifacts.sh.
  - Drop 'gateway_helper_should_report_unhealthy_gateway_clearly' in
    e2e-lib-helpers.test.ts: it sourced ${RUNTIME_LIB}/gateway.sh,
    which does not exist on main and was passing only by accident
    (the missing-file stderr happens to match /gateway/i).
  - Drop the dead E2E_DRY_RUN: '1' env arg in
    'older_base_image_should_emit_dockerfile_pointing_at_tagged_base'
    in e2e-lib-helpers.test.ts: PR #4380 deleted the dry-run
    short-circuit from older-base-image.sh, so the env var is now
    unread test scaffolding.

Comment hygiene:
  - sandbox-absent.sh: drop the 'Typed replacement for the legacy
    run-scenario.sh inline check' note now that the legacy file is
    deleted.

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

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR removes deprecated Bash E2E runtime helpers (artifact collection, cleanup, negative output validation, port management, and script runners) and adjusts corresponding test fixtures to no longer depend on those utilities.

Changes

E2E Test Infrastructure Modernization

Layer / File(s) Summary
Test fixture environment variable removal
test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts
The "older_base_image_should_emit_dockerfile_pointing_at_tagged_base" test is adjusted to call runBash without the E2E_DRY_RUN: "1" environment variable, eliminating reliance on that legacy execution mode.
Probe script comment clarification
test/e2e-scenario/nemoclaw_scenarios/probes/sandbox-absent.sh
Comment updated to document the "preflight failure, onboarding failures" typed replacement for the deprecated inline run-scenario.sh check, clarifying the new validation approach.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4965: Introduces new TypeScript fixture framework modules for artifacts, cleanup, and shell probing that directly replace the legacy Bash runtime helpers being removed in this PR.

Suggested labels

area: e2e, v0.0.62

Suggested reviewers

  • cv

Poem

🐰 Old bash scripts retire with grace,
E2E tests find their new place,
No more DRY_RUN, no more tar—
TypeScript helpers raise the bar! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore(e2e): delete deprecated bash entrypoints and orphan helper libs' accurately and specifically summarizes the main change: removing six deprecated/orphan files from the e2e test infrastructure.
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.

✏️ 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/delete-bash-tombstones-and-orphans

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

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: ubuntu-no-docker-preflight-negative, ubuntu-invalid-nvidia-key-negative, ubuntu-gateway-port-conflict-negative

Dispatch hint: scenarios=ubuntu-no-docker-preflight-negative,ubuntu-invalid-nvidia-key-negative,ubuntu-gateway-port-conflict-negative

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: medium

Required E2E

  • None. No merge-blocking live E2E is recommended. This PR only changes E2E scenario framework/tests and removes deprecated bash harness files; it does not change runtime product behavior, installer/onboarding logic, credentials, network policy, inference routing, deployment, or assistant user flows. Normal CI/framework Vitest coverage should validate the harness changes, with negative scenarios available as optional confidence checks.

Optional E2E

  • ubuntu-no-docker-preflight-negative (medium): Optional confidence check for the negative preflight path and sandbox-absent/no-side-effect validation adjacent to the touched probe and deleted legacy helpers.
  • ubuntu-invalid-nvidia-key-negative (medium): Optional confidence check that onboarding expected-failure handling still verifies no sandbox was created when credentials are invalid.
  • ubuntu-gateway-port-conflict-negative (medium): Optional confidence check for gateway port-conflict negative lifecycle behavior, adjacent to the removed legacy port-holder helper.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/e2e-scenarios.yaml
  • jobs input: scenarios=ubuntu-no-docker-preflight-negative,ubuntu-invalid-nvidia-key-negative,ubuntu-gateway-port-conflict-negative

@github-actions

github-actions Bot commented Jun 8, 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-scenarios-all.yaml --ref <pr-head-ref>

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required scenario E2E

  • e2e-scenarios-all: Changes delete or modify shared scenario runtime/runner helper code under test/e2e-scenario/runtime/, which can affect all scenario execution paths. Per policy this requires the all-scenarios fan-out.
    • Dispatch: gh workflow run e2e-scenarios-all.yaml --ref <pr-head-ref>

Optional scenario E2E

  • None.

Relevant changed files

  • test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts
  • test/e2e-scenario/nemoclaw_scenarios/probes/sandbox-absent.sh
  • test/e2e-scenario/runtime/lib/artifacts.sh
  • test/e2e-scenario/runtime/lib/cleanup.sh
  • test/e2e-scenario/runtime/lib/negative.sh
  • test/e2e-scenario/runtime/lib/port-holder.sh
  • test/e2e-scenario/runtime/run-scenario.sh
  • test/e2e-scenario/runtime/run-suites.sh

@github-actions

github-actions Bot commented Jun 8, 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, 3 still apply, 0 new items found

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

  • Source-of-truth review needed: E2E scenario runtime entrypoint deletion: 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: Diff deletes `runtime/run-scenario.sh` and `runtime/run-suites.sh`. `README.md:131-137` and `README.md:179-180` still reference them; `MIGRATION.md:107` says to leave legacy executable scripts in place until Phase 11: Final Audit Reconciliation (E2E audit-coverage) #4357 records deletion readiness, and `MIGRATION.md:115-117` still lists `run-scenario.sh` commands.
  • Deleted E2E runner scripts are still documented as runnable commands (test/e2e-scenario/docs/README.md:131): This PR deletes `test/e2e-scenario/runtime/run-scenario.sh` and `test/e2e-scenario/runtime/run-suites.sh`, but the E2E README still lists both paths under `How to run` and in the repository layout. The migration guide also still says to leave legacy executable scripts in place until Phase 11: Final Audit Reconciliation (E2E audit-coverage) #4357 records deletion readiness and still lists `run-scenario.sh` as the YAML/shell live runner path. After this change, contributors following the repo docs get `No such file or directory` instead of the previous fail-fast tombstone guidance.
    • Recommendation: Update `test/e2e-scenario/docs/README.md` and `test/e2e-scenario/docs/MIGRATION.md` in the same change so `test/e2e-scenario/scenarios/run.ts` is the documented source of truth, or keep the fail-fast tombstone scripts until the documented deletion-readiness/source-of-truth is updated.
    • Evidence: Diff deletes `runtime/run-scenario.sh` and `runtime/run-suites.sh`. `test/e2e-scenario/docs/README.md:131-137` still shows `bash test/e2e-scenario/runtime/run-scenario.sh ...` and `bash test/e2e-scenario/runtime/run-suites.sh ...`; `README.md:179-180` still lists both files in layout. `test/e2e-scenario/docs/MIGRATION.md:107` says to leave legacy executable scripts in place until Phase 11: Final Audit Reconciliation (E2E audit-coverage) #4357 records deletion readiness, and `MIGRATION.md:115-117` still lists deleted `run-scenario.sh` commands.
  • Gateway health helper loses negative-path coverage (test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts:324): The removed `gateway_helper_should_report_unhealthy_gateway_clearly` test was flawed because it sourced nonexistent `${RUNTIME_LIB}/gateway.sh`, but the supported gateway assertion still exists in `validation_suites/assert/gateway-alive.sh`. Removing the only nearby negative-path check without replacing it leaves no evidence that the supported helper fails closed and emits a clear diagnostic for an unreachable gateway URL, which is security-relevant E2E validation for sandbox/runtime readiness.
    • Recommendation: Add or move a targeted test named `gateway_alive_helper_should_fail_clearly_for_unreachable_gateway_url` that sources `test/e2e-scenario/validation_suites/assert/gateway-alive.sh`, calls `e2e_gateway_assert_healthy http://127.0.0.1:&lt;closed-port&gt;\`, and asserts nonzero status plus stderr mentioning the gateway URL or last HTTP code.
    • Evidence: The diff removes `gateway_helper_should_report_unhealthy_gateway_clearly`. `test/e2e-scenario/validation_suites/assert/gateway-alive.sh` still defines `e2e_gateway_assert_healthy` and emits `gateway at ${url} is unreachable or unhealthy (last http_code=...)` on failure. Repository search found implementation/uses but no replacement negative-path test for an unreachable gateway URL.

🌱 Nice ideas

  • None.
Consider writing more tests for
  • **Gateway health helper loses negative-path coverage** — Add or move a targeted test named `gateway_alive_helper_should_fail_clearly_for_unreachable_gateway_url` that sources `test/e2e-scenario/validation_suites/assert/gateway-alive.sh`, calls `e2e_gateway_assert_healthy http://127.0.0.1:&lt;closed-port&gt;\`, and asserts nonzero status plus stderr mentioning the gateway URL or last HTTP code.
  • **Acceptance clause:** No linked issue acceptance clauses were provided in deterministic context. — add test evidence or identify existing coverage. `linkedIssues` is empty, so there were no issue/comment acceptance clauses to quote literally or map to diff evidence.
  • **Acceptance clause:** Dropped `gateway_helper_should_report_unhealthy_gateway_clearly` — it sourced `${RUNTIME_LIB}/gateway.sh`, which does not exist on main. — add test evidence or identify existing coverage. The flawed test is removed, but the supported helper `validation_suites/assert/gateway-alive.sh::e2e_gateway_assert_healthy` still exists and no replacement negative-path coverage was found for unreachable gateway behavior.
  • **Acceptance clause:** Docs updated for user-facing behavior changes — add test evidence or identify existing coverage. The PR verification checklist leaves this unchecked, and repo docs still advertise the deleted runner paths as runnable commands. This is covered by the docs/source-of-truth finding.
  • **E2E scenario runtime entrypoint deletion** — Missing. Add `docs_should_not_reference_deleted_e2e_runtime_entrypoints` or equivalent doc/convention coverage that rejects references to deleted `runtime/run-scenario.sh` and `runtime/run-suites.sh`, or verifies docs point to `scenarios/run.ts` after deletion.. Diff deletes `runtime/run-scenario.sh` and `runtime/run-suites.sh`. `README.md:131-137` and `README.md:179-180` still reference them; `MIGRATION.md:107` says to leave legacy executable scripts in place until Phase 11: Final Audit Reconciliation (E2E audit-coverage) #4357 records deletion readiness, and `MIGRATION.md:115-117` still lists `run-scenario.sh` commands.
Since last review details

Current findings:

  • Source-of-truth review needed: E2E scenario runtime entrypoint deletion: 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: Diff deletes `runtime/run-scenario.sh` and `runtime/run-suites.sh`. `README.md:131-137` and `README.md:179-180` still reference them; `MIGRATION.md:107` says to leave legacy executable scripts in place until Phase 11: Final Audit Reconciliation (E2E audit-coverage) #4357 records deletion readiness, and `MIGRATION.md:115-117` still lists `run-scenario.sh` commands.
  • Deleted E2E runner scripts are still documented as runnable commands (test/e2e-scenario/docs/README.md:131): This PR deletes `test/e2e-scenario/runtime/run-scenario.sh` and `test/e2e-scenario/runtime/run-suites.sh`, but the E2E README still lists both paths under `How to run` and in the repository layout. The migration guide also still says to leave legacy executable scripts in place until Phase 11: Final Audit Reconciliation (E2E audit-coverage) #4357 records deletion readiness and still lists `run-scenario.sh` as the YAML/shell live runner path. After this change, contributors following the repo docs get `No such file or directory` instead of the previous fail-fast tombstone guidance.
    • Recommendation: Update `test/e2e-scenario/docs/README.md` and `test/e2e-scenario/docs/MIGRATION.md` in the same change so `test/e2e-scenario/scenarios/run.ts` is the documented source of truth, or keep the fail-fast tombstone scripts until the documented deletion-readiness/source-of-truth is updated.
    • Evidence: Diff deletes `runtime/run-scenario.sh` and `runtime/run-suites.sh`. `test/e2e-scenario/docs/README.md:131-137` still shows `bash test/e2e-scenario/runtime/run-scenario.sh ...` and `bash test/e2e-scenario/runtime/run-suites.sh ...`; `README.md:179-180` still lists both files in layout. `test/e2e-scenario/docs/MIGRATION.md:107` says to leave legacy executable scripts in place until Phase 11: Final Audit Reconciliation (E2E audit-coverage) #4357 records deletion readiness, and `MIGRATION.md:115-117` still lists deleted `run-scenario.sh` commands.
  • Gateway health helper loses negative-path coverage (test/e2e-scenario/framework-tests/e2e-lib-helpers.test.ts:324): The removed `gateway_helper_should_report_unhealthy_gateway_clearly` test was flawed because it sourced nonexistent `${RUNTIME_LIB}/gateway.sh`, but the supported gateway assertion still exists in `validation_suites/assert/gateway-alive.sh`. Removing the only nearby negative-path check without replacing it leaves no evidence that the supported helper fails closed and emits a clear diagnostic for an unreachable gateway URL, which is security-relevant E2E validation for sandbox/runtime readiness.
    • Recommendation: Add or move a targeted test named `gateway_alive_helper_should_fail_clearly_for_unreachable_gateway_url` that sources `test/e2e-scenario/validation_suites/assert/gateway-alive.sh`, calls `e2e_gateway_assert_healthy http://127.0.0.1:&lt;closed-port&gt;\`, and asserts nonzero status plus stderr mentioning the gateway URL or last HTTP code.
    • Evidence: The diff removes `gateway_helper_should_report_unhealthy_gateway_clearly`. `test/e2e-scenario/validation_suites/assert/gateway-alive.sh` still defines `e2e_gateway_assert_healthy` and emits `gateway at ${url} is unreachable or unhealthy (last http_code=...)` on failure. Repository search found implementation/uses but no replacement negative-path test for an unreachable gateway URL.

Workflow run details

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

@jyaunches jyaunches enabled auto-merge (squash) June 8, 2026 23:43
@wscurran wscurran added the chore Build, CI, dependency, or tooling maintenance label Jun 8, 2026
@jyaunches jyaunches merged commit 9a43787 into main Jun 9, 2026
33 checks passed
@jyaunches jyaunches deleted the chore/delete-bash-tombstones-and-orphans branch June 9, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants