Skip to content

fix(openshell): restore default gateway qualification - #11601

Merged
prekshivyas merged 6 commits into
mainfrom
codex/fix-11530-e2e-base-regressions
Sep 12, 2026
Merged

fix(openshell): restore default gateway qualification#11601
prekshivyas merged 6 commits into
mainfrom
codex/fix-11530-e2e-base-regressions

Conversation

@jyaunches

@jyaunches jyaunches commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Outcome

Configuration export can read a NemoClaw-managed gateway from the canonical owner-private default state directory even when that directory predates explicit ownership markers. The selected inference-routing E2E also accepts OpenShell's current scope-bound credential placeholder and continues to verify delegated bearer resolution.

Reason

Exact-candidate run 34649953836 and exact-base replay 34651044220 reproduced the same two failures: default-gateway SDK reads stopped before the sandbox inventory RPC, and TC-INF-12 rejected the valid OpenShell 0.0.116 scope-bound placeholder. These inherited failures block deterministic qualification of #11587.

Related issues

Refs #11421

Changes

  • Preserve strict ownership-marker requirements for explicit gateway state overrides while recognizing the canonical owner-private default state used by installations created before markers.
  • Cover both the legacy-default connection path and rejection of an unmarked explicit override.
  • Share the bounded OpenShell placeholder grammar for unscoped, generation-scoped, and scope-bound credentials between TC-INF-12 and its mapped fast test.
  • Integrate current main so trusted E2E compares the candidate against the exact PR base instead of treating intervening main changes as candidate-managed-image inputs.

Verification

  • npx vitest run --project cli src/lib/adapters/openshell/sandbox-command-sdk.test.ts src/lib/adapters/config/live-export-source.test.ts — 93 tests passed.
  • npx vitest run --project e2e-support test/e2e/support/hosted-inference.test.ts — 19 tests passed.
  • npx tsx scripts/checks/e2e-mock-parity.mts --base origin/main --head HEAD — passed.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli — passed.
  • npm run test:changed — the growth-guardrail preflight passed; no additional source tests were selected after base integration.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr — passed at 1f5269c49138fea461d3351f5d5c39c73f5d1ba1 against canonical main 37261efb99c0dcbfcef6551efa0c59357e96fcbe.
  • The pre-repair exact-head hosted CI run 34666334600 passed every selected job, including all 12 CLI shards. Current-head run 34668234877 is qualifying the one-line E2E repair.
  • Trusted manual PR E2E run 34667270786 ran inference-routing,network-policy in mock mode against head 092fdefc472882cd135a4f839d2285da4969b467, with correlation 57e03ed4-c1ad-4a14-9f45-112ad6c8d10a. Network policy passed. TC-INF-12 failed after credential rotation because its second assertion still required only the generation-scoped placeholder. Cleanup and artifact upload passed. Commit 1f5269c49138fea461d3351f5d5c39c73f5d1ba1 reuses the bounded credential-reference matcher for the rotated placeholder.
  • The diff contains no secrets, API keys, or credentials.

Review notes

Alternative review completed for 1f5269c49138fea461d3351f5d5c39c73f5d1ba1. Local Advisor failed before specialist analysis because its OpenShell sandbox never passed supervisor-relay readiness (sandbox is not ready, SSH status 255); cleanup succeeded, but no specialist artifacts were produced. Manual review of the full diff and the one-line E2E repair found no remaining actionable issue. The repair reuses the bounded matcher already exercised by the fast support test. Focused tests and canonical validation passed. The residual limitation is the absence of Advisor specialist artifacts; current-head CodeRabbit and trusted E2E evidence remain pending.

Dependency

  • #11598 merged as 37261efb99c0dcbfcef6551efa0c59357e96fcbe; that fix is integrated into the current head, so qualification has resumed.

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

@jyaunches jyaunches self-assigned this Sep 11, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 11, 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 11, 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: 915dcb58-3ef4-4055-aa21-61608bc25f13

📥 Commits

Reviewing files that changed from the base of the PR and between 092fdef and 1f5269c.

📒 Files selected for processing (1)
  • test/e2e/live/inference-routing.test.ts

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


📝 Walkthrough

Walkthrough

The changes restrict legacy managed gateway-state validation to the canonical default directory and add coverage for explicit overrides. They also add shared hosted inference credential-reference validation and apply it to runtime and support tests.

Changes

Managed gateway state validation

Layer / File(s) Summary
State-directory normalization and ownership policy
src/lib/adapters/config/live-export-source.ts, src/lib/adapters/openshell/sdk.ts
Gateway state-directory values are trimmed. Legacy ownership validation applies only when no explicit directory is configured.
Managed gateway state coverage
src/lib/adapters/openshell/sandbox-command-sdk.test.ts
Tests cover marked temporary state, unmarked canonical default state, and rejection of an unmarked explicit state directory.

Hosted inference credential references

Layer / File(s) Summary
Credential-reference validation helper
test/e2e/fixtures/hosted-inference.ts
The shared helper validates credential environment names and matches direct, versioned, and secret-scoped references.
Credential-reference test integration
test/e2e/live/inference-routing.test.ts, test/e2e/support/hosted-inference.test.ts
Runtime identity checks use the shared matcher. Support tests cover valid revisions, malformed revisions, and invalid names.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: cv, sandl99

Merge Risk: ⚪ Minimal · up to 1f526

The PR is mergeable with no remaining actionable risk identified in the changed gateway validation or hosted-inference reference checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 and concisely describes the primary change: restoring default gateway qualification in OpenShell.
  • 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/fix-11530-e2e-base-regressions

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

@github-code-quality

github-code-quality Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 1f5269c in the codex/fix-11530-e2e-... branch remains at 96%, unchanged from commit e1a0091 in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit 1f5269c in the codex/fix-11530-e2e-... branch remains at 83%, unchanged from commit 37261ef in the main branch.

Show a line coverage summary of the most impacted files.
File main 37261ef codex/fix-11530-e2e-... 1f5269c +/-
src/lib/onboard...uter-command.ts 65% 52% -13%
src/lib/onboard...outer-python.ts 96% 84% -12%
src/lib/onboard...eway-process.ts 90% 89% -1%
src/lib/actions...oy-preflight.ts 84% 83% -1%
src/lib/onboard...uild-context.ts 74% 75% +1%
src/lib/actions...-add-restart.ts 30% 31% +1%
src/lib/domain/...ycle/options.ts 85% 87% +2%
src/lib/actions...dbox/destroy.ts 89% 92% +3%
src/lib/actions...oy-execution.ts 91% 94% +3%
src/lib/adapter...penshell/sdk.ts 78% 85% +7%

Updated September 12, 2026 02:54 UTC

@jyaunches jyaunches added the v0.0.124 Release target label Sep 11, 2026
@jyaunches
jyaunches marked this pull request as ready for review September 11, 2026 23:18
@jyaunches
jyaunches marked this pull request as draft September 11, 2026 23:28
@jyaunches
jyaunches marked this pull request as ready for review September 12, 2026 01:51
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>

@rsliter rsliter 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.

Reviewed the complete six-file diff at 092fdef against 37261ef. The canonical default gateway exception remains bounded by the fixed path, trusted ancestors, owner-only state directory, local loopback endpoint, and no-follow bounded TLS reads; explicit overrides still require the ownership marker. The credential reference grammar is bounded and matches the current vNN and stable-hash forms. Security review passes injection, auth, secrets, input validation, configuration, dependencies, serialization, network, error handling, and race checks. All five commits are GitHub-verified. Local build and focused tests pass (93 CLI, 19 E2E-support), CodeRabbit has no actionable finding, and exact-head self-hosted qualification 34666334897 passed. Ordinary exact-head CI 34666334600 is still running and remains a merge gate.

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 092fdef. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

All previous runs

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@prekshivyas
prekshivyas merged commit 50e777f into main Sep 12, 2026
87 checks passed
@prekshivyas
prekshivyas deleted the codex/fix-11530-e2e-base-regressions branch September 12, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.124 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants