Skip to content

fix(config): isolate tests and complete export E2E selection - #11303

Merged
cv merged 1 commit into
mainfrom
codex/config-export-review-followup
Sep 9, 2026
Merged

cv merged 1 commit into
mainfrom
codex/config-export-review-followup

Conversation

@cv

@cv cv commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Configuration-export tests no longer depend on an absent host API key, and export command, serialization, publisher, and SDK-schema changes select the existing network-policy live target. The compiled version-format test uses an explicit gateway port instead of automatic port discovery.

Reason

These repairs address review findings from #11065. The environment assertion failed with a host API key set, and publisher/schema changes did not select their live coverage. Automatic port discovery also failed locally before the version probe reached the CLI.

Related issues

Refs #10938. Follow-up to #11065.

Changes

  • Set a dummy API key in the snapshot test and retain assertions that exported evidence omits credential material.
  • Add missing E2E owning paths and four deterministic selection cases. Keep the live target and assertion budget unchanged.
  • Import the managed SDK connector directly from its owner and clarify that callers supply read deadlines.
  • Give the version-format test an explicit gateway port. Preserve its existing timeouts and assertions.

Verification

373 selected tests passed on the follow-up branch:

  • npx vitest run --project cli src/lib/adapters/config/live-export-source.test.ts src/lib/adapters/openshell/sandbox-command-sdk.test.ts src/lib/adapters/openshell/providers.test.ts — 72 passed.
  • npx vitest run --project e2e-support test/e2e/support/workflow-plan.test.ts — 103 passed.
  • npx vitest run --project integration test/automation/pull-requests/pr-risk-plan.test.ts test/automation/pull-requests/growth-guardrails.test.ts — 197 passed.
  • npx vitest run --project package-contract test/package-contract/cli/public-cli-contracts.test.ts -t 'prints the public NemoClaw version prefix' — 1 passed.
  • npm run build:cli, npm run typecheck:cli, npx oxlint . .dsh/tools, and git diff --check — passed.

The missing publisher/schema selections and ambient-key failure were reproduced before repair. The diff contains no secrets, API keys, or credentials. No live E2E run was performed.

Review notes

tools/e2e/target-catalogue.mts is a sensitive enforcement path. Local self-review of NVIDIA/NemoClaw commit 52c7c37fc268bb13d6e906385254eae32d9fef08 checked that selection expands only to the existing export owner and adds no runtime target or assertion budget. The originating CodeRabbit review identified the selection and environment issues; this follow-up candidate awaits independent review. Validation uses the listed local checks and normal Git hooks; npm run validate:pr was not run.

The earlier CI failure reported a five-second version-test timeout. Removing port-discovery dependence passed locally; GitHub CI must confirm the result for this candidate.


Signed-off-by: Carlos Villela [email protected]

Summary by CodeRabbit

  • Documentation

    • Clarified that OpenShell read operations honor caller cancellation and deadlines while keeping transport and response details private.
  • Tests

    • Expanded end-to-end coverage for configuration exports and schema changes.
    • Updated credential-handling tests to continue verifying that sensitive values are excluded from results and serialized output.
    • Improved CLI contract coverage for version checks in configured gateway environments.
    • Refined OpenShell SDK and sandbox integration tests.

@cv cv self-assigned this Sep 9, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 9, 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 Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview 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: 2617d788-1626-495a-ad8e-43f37e63672b

📥 Commits

Reviewing files that changed from the base of the PR and between f72e8ff and 52c7c37.

📒 Files selected for processing (7)
  • src/lib/adapters/config/live-export-source.test.ts
  • src/lib/adapters/openshell/sandbox-command-sdk.test.ts
  • src/lib/adapters/openshell/sandbox-command-sdk.ts
  • src/lib/adapters/openshell/sdk-read.ts
  • test/e2e/support/workflow-plan.test.ts
  • test/package-contract/cli/public-cli-contracts.test.ts
  • tools/e2e/target-catalogue.mts
💤 Files with no reviewable changes (1)
  • src/lib/adapters/openshell/sandbox-command-sdk.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The changes update network-policy coverage ownership, remove an OpenShell SDK re-export, clarify readOpenShell behavior, and isolate configuration and CLI contract tests from ambient environment state.

Changes

Configuration and contract updates

Layer / File(s) Summary
Network-policy coverage routing
tools/e2e/target-catalogue.mts, test/e2e/support/workflow-plan.test.ts
The network-policy target now owns additional configuration and schema paths. Parameterized tests verify the routing.
OpenShell module boundary
src/lib/adapters/openshell/sandbox-command-sdk.ts, src/lib/adapters/openshell/sandbox-command-sdk.test.ts, src/lib/adapters/openshell/sdk-read.ts
The sandbox command module no longer re-exports connectManagedOpenShellSdk. Tests import it from ./sdk. readOpenShell documentation describes signal handling and suppressed transport details.
Isolated contract test environments
src/lib/adapters/config/live-export-source.test.ts, test/package-contract/cli/public-cli-contracts.test.ts
The snapshot test stubs NVIDIA_API_KEY, and the CLI version test sets NEMOCLAW_GATEWAY_PORT to 8080. Existing assertions remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 52c7c

This change makes configuration-export and CLI contract tests deterministic, routes relevant changes to existing network-policy E2E coverage, and aligns OpenShell test imports with the SDK module boundary. No current merge-blocking production risk is identified.

Suggested reviewers: ericksoa, cjagwani, prekshivyas

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 6 files. 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 clearly summarizes the main changes: test isolation and completion of export-related E2E selection.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/config-export-review-followup

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

@cv
cv marked this pull request as ready for review September 9, 2026 16:18
@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 52c7c37 in the codex/config-export-... branch remains at 96%, unchanged from commit f72e8ff in the main branch.

@cv
cv merged commit f1afb87 into main Sep 9, 2026
69 of 71 checks passed
@cv
cv deleted the codex/config-export-review-followup branch September 9, 2026 16:28
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: e2e End-to-end tests, nightly failures, or validation infrastructure area: policy Network policy, egress rules, presets, or sandbox policy bug-fix PR fixes a bug or regression labels Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: e2e End-to-end tests, nightly failures, or validation infrastructure area: policy Network policy, egress rules, presets, or sandbox policy bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants