Skip to content

fix(credentials): recover from wrapped attachment errors#7232

Merged
senthilr-nv merged 11 commits into
mainfrom
fix/e2e-provider-attachment
Jul 20, 2026
Merged

fix(credentials): recover from wrapped attachment errors#7232
senthilr-nv merged 11 commits into
mainfrom
fix/e2e-provider-attachment

Conversation

@sandl99

@sandl99 sandl99 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Restore automatic credential-reset recovery when OpenShell wraps an attached-provider error across decorated lines. Also align the Bedrock E2E leak scan with provider attachment by allowing the non-secret managed credential name while continuing to reject credential values.

Changes

  • Parse OpenShell's │ sandbox(es): ... continuation line so credentials reset can detach the sandbox and retry provider deletion.
  • Add the exact wrapped diagnostic as a parser regression test.
  • Move Bedrock leak matching into a focused fixture and keep the adapter token, user key, AWS bearer name, and raw hostname forbidden.
  • Add E2E-support coverage proving the managed adapter credential name is allowed but its value is not.

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)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: automatic detach-and-retry remains the existing user-facing contract; the parser and leak-scan changes are internal
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: the recovery parser still validates every extracted sandbox name before detach, and focused tests preserve both the credential and sandbox-name boundaries
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run --project integration --project e2e-support test/sandbox-provider-cleanup.test.ts test/e2e/support/bedrock-runtime-leak-scan.test.ts (2 files, 31 passed); npm run test:projects:check (exact membership)
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • 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: San Dang sdang@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved provider deletion recovery when diagnostics use wrapped or multi-line formatting.
    • Attached sandbox names are now recognized more reliably, enabling successful force-detach and deletion retries.

@sandl99 sandl99 self-assigned this Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 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: 1721527b-e66b-44c7-a811-fd9c950faaa2

📥 Commits

Reviewing files that changed from the base of the PR and between 8512073 and ff04499.

📒 Files selected for processing (1)
  • test/sandbox-provider-cleanup.test.ts

📝 Walkthrough

Walkthrough

The attached-sandbox diagnostic parser now accepts additional separators in wrapped OpenShell output. Tests cover multiline sandbox extraction and provider deletion recovery that force-detaches the parsed sandbox before retrying deletion.

Changes

Sandbox cleanup parsing

Layer / File(s) Summary
Attached sandbox diagnostic parsing and recovery tests
src/lib/onboard/sandbox-provider-cleanup.ts, test/sandbox-provider-cleanup.test.ts
The parser accepts wrapped diagnostic separators, and tests validate multiline extraction plus force-detach recovery during provider deletion.

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

Suggested labels: area: sandbox

Suggested reviewers: cv, dongni-yang

🚥 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 title clearly summarizes the main change: credential recovery from wrapped attachment errors.
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.
✨ 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 fix/e2e-provider-attachment

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

@github-actions

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit c4a9b21 in the fix/e2e-provider-att... branch remains at 96%, unchanged from commit ac120c8 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit c4a9b21 in the fix/e2e-provider-att... branch remains at 80%, unchanged from commit ad26c30 in the main branch.

Show a code coverage summary of the most impacted files.
File main ad26c30 fix/e2e-provider-att... c4a9b21 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/platform.ts 89% 84% -5%
src/lib/actions...annel-status.ts 93% 91% -2%
src/lib/actions...test-helpers.ts 65% 63% -2%
src/lib/actions...tatus-config.ts 96% 96% 0%
src/lib/messagi...nnels/policy.ts 100% 100% 0%
src/lib/messagi...onfig-parser.ts 50% 100% +50%
src/lib/messagi...-health-eval.ts 0% 88% +88%
src/lib/messagi...tatus-health.ts 0% 92% +92%
src/lib/messagi.../hooks/index.ts 0% 100% +100%

Updated July 20, 2026 20:42 UTC

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/support/bedrock-runtime-leak-scan.test.ts`:
- Around line 4-8: Add the required `// `@module-tag` e2e/credential-free`
annotation at the top of the `bedrock-runtime-leak-scan.test.ts` suite so
discovery classifies this credential-free E2E test in the appropriate matrix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b009480a-58a1-4187-833b-2e4e8479612a

📥 Commits

Reviewing files that changed from the base of the PR and between 3c4ea5a and f61cd50.

📒 Files selected for processing (6)
  • docs/reference/commands.mdx
  • docs/security/credential-rotation.mdx
  • test/e2e/fixtures/bedrock-runtime-leak-scan.ts
  • test/e2e/live/bedrock-runtime-compatible-anthropic.test.ts
  • test/e2e/live/diagnostics.test.ts
  • test/e2e/support/bedrock-runtime-leak-scan.test.ts

Comment thread test/e2e/support/bedrock-runtime-leak-scan.test.ts Outdated
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections differ; severity counts match.

Nemotron output stays in workflow artifacts and does not change the assessment above.

Since last review: 0 prior items resolved · 0 still apply · 0 new items found

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: onboard-repair, onboard-resume, cloud-onboard

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@sandl99 sandl99 changed the title test(e2e): align provider attachment checks fix(credentials): recover from wrapped attachment errors Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All selected tests passed

Run: 29733063311
Workflow ref: fix/e2e-provider-attachment
Requested targets: cloud-onboard,credential-sanitization,security-posture,bedrock-runtime-compatible-anthropic,onboard-repair,onboard-resume
Requested test IDs: (default — all default-enabled tests; explicit-only tests openshell-gateway-auth-contract, mcp-bridge-dev, hermes-gpu-startup, sandbox-rlimits-connect, and jetson-nvmap-gpu are skipped unless selected)
Summary: 6 passed, 0 failed, 0 cancelled, 0 skipped, 0 unknown

Test Result Total wall clock time
bedrock-runtime-compatible-anthropic ✅ success 6m 28s
cloud-onboard ✅ success 5m 18s
credential-sanitization ✅ success 5m 10s
onboard-repair ✅ success 4m 42s
onboard-resume ✅ success 6m 4s
security-posture ✅ success 8m 6s

@sandl99 sandl99 added nightly-e2e Nightly E2E test failures bug-fix PR fixes a bug or regression v0.0.89 labels Jul 20, 2026
@sandl99
sandl99 requested a review from cv July 20, 2026 10:20
cjagwani and others added 2 commits July 20, 2026 09:33
@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All requested tests passed

Run: 29753394331
Workflow ref: fix/e2e-provider-attachment
Requested targets: (default — all supported)
Requested test IDs: cloud-onboard,credential-sanitization,security-posture,bedrock-runtime-compatible-anthropic,onboard-repair,onboard-resume
Summary: 6 passed, 0 failed, 0 cancelled, 0 skipped, 0 unknown

Test Result Total wall clock time
bedrock-runtime-compatible-anthropic ✅ success 15m 15s
cloud-onboard ✅ success 5m 15s
credential-sanitization ✅ success 4m 37s
onboard-repair ✅ success 4m 48s
onboard-resume ✅ success 6m 12s
security-posture ✅ success 16m 53s

@NVIDIA NVIDIA deleted a comment from github-actions Bot Jul 20, 2026
@sandl99
sandl99 requested a review from cjagwani July 20, 2026 15:22
cjagwani
cjagwani previously approved these changes Jul 20, 2026

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer review: exact current-base gates pass (54 checks), all commits are Verified with DCO, and the narrow wrapped-attachment parser change preserves bounded name validation plus the fail-closed allowed-sandbox authorization boundary. Focused regression coverage includes wrapped diagnostics, invalid names, foreign-sandbox rejection, detach/retry behavior, and selected E2E. No unresolved correctness, security, or product-scope issue found.

@cjagwani

cjagwani commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Update: the author refreshed once, and exact head 6950310dc6427250f1d7637bc0d8db901f7745b3 was approved on main 5b547cdfe77adce599806261e57236645e22c45f. Main has since advanced again to 70d7d287f03f82355eafccfc8084de3741069281 through #7242, #7241, #7225, and #7214. Those commits do not edit this PR’s two files, but they do change adjacent onboarding and recovery paths, so the maintainer gate still requires fresh exact-base evidence.

Maintainer edits remain disabled for this branch. Please merge current main into fix/e2e-provider-attachment without rewriting the verified history. I dismissed only the now-stale approval; after the refresh and CI complete, I will rerun the exact gate and renew approval if the patch remains clean.

@cjagwani
cjagwani dismissed their stale review July 20, 2026 16:17

Approval was exact to base a5ccdca; main advanced to 5b547cd. Please refresh the branch for fresh exact-revision gates, then the approval can be renewed.

cjagwani
cjagwani previously approved these changes Jul 20, 2026

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved exact head 6950310 on current main 5b547cd. The patch is unchanged from the reviewed credential-recovery fix, all 52 current checks are green, the selected onboard-repair and onboard-resume E2E targets passed, CodeRabbit and both Advisor lanes are clean, and all commits are GitHub Verified.

@jyaunches jyaunches added v0.0.90 and removed v0.0.89 labels Jul 20, 2026
@cjagwani
cjagwani dismissed their stale review July 20, 2026 18:02

Current main advanced from 5b547cd to 70d7d28 after this approval. Exact-base evidence is stale; refresh the branch and rerun gates. No code finding is asserted.

@senthilr-nv senthilr-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer review complete: product-scope gate passes because this restores existing credential-reset behavior without adding a supported surface. Exact-current-base gate is green, selected E2E passed, CodeRabbit has no blocking findings, DCO is present, and all commits are Verified.

@senthilr-nv
senthilr-nv merged commit 9fae0d4 into main Jul 20, 2026
53 checks passed
@senthilr-nv
senthilr-nv deleted the fix/e2e-provider-attachment branch July 20, 2026 20:56
@jyaunches jyaunches mentioned this pull request Jul 20, 2026
22 tasks
jyaunches added a commit that referenced this pull request Jul 20, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical `## v0.0.90` entry to `docs/changelog/2026-07-20.mdx`
before the release tag is planned.
The update also corrects the documented custom-image migration window so
the compatibility fallback that first ships in v0.0.90 remains available
until v0.0.91.

## Changes

- Add the v0.0.90 summary and detailed release bullets for managed-image
routing, provider-reset recovery, WhatsApp health reporting, and DGX
Station guidance.
- Keep the newest release first in the shared dated changelog and use
root-absolute links to the canonical OpenClaw routes.
- Correct `docs/reference/commands.mdx` to state that the legacy image
route selector remains supported through v0.0.90 and is removed in
v0.0.91.
- Release source summary:
- [#7264](#7264) ->
`docs/resources/prompt-assets/dgx-station.md`,
`docs/changelog/2026-07-20.mdx`: Record the versioned Station installer
path, Nemotron 3 Ultra 550B default, and explicit DeepSeek override.
- [#7261](#7261) ->
`docs/get-started/dgx-station-preparation.mdx`,
`docs/manage-sandboxes/recover-rebuild-sandboxes.mdx`,
`docs/changelog/2026-07-20.mdx`: Include the OpenIB, legacy recovery,
and Additional Setup documentation follow-ups.
- [#7232](#7232) ->
`docs/changelog/2026-07-20.mdx`: Document provider-reset recovery for
wrapped OpenShell attachment diagnostics.
- [#7189](#7189) ->
`docs/reference/commands.mdx`, `docs/changelog/2026-07-20.mdx`: Document
the managed-image route-selector rename and correct its one-release
migration window.
- [#7015](#7015) ->
`docs/changelog/2026-07-20.mdx`: Document corrected OpenClaw WhatsApp
health reporting.
- No additional user-facing page update is needed for
[#7193](#7193),
[#7110](#7110),
[#6783](#6783), or
[#7263](#7263) because they
change contributor governance, internal CI or release automation, or
editorial style without changing supported user behavior.
- [#7242](#7242) and
[#7225](#7225) are already
ancestors of and documented in v0.0.89, so this entry does not duplicate
them despite their stale v0.0.90 labels.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification:
`test/changelog-docs.test.ts` validates the dated changelog heading,
SPDX form, version order, and published links.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable; this PR does not change
`scripts/prepare-dgx-station-host.sh` or runtime behavior.
- Station profile/scenario: Not applicable.
- Result: Not applicable.
- Supporting evidence: Not applicable.

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts` (6 passed).
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: Not run; this is a focused
documentation-only change.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — passed
with 0 errors and two unrelated baseline warnings for unauthenticated
redirect checks and the existing light-mode contrast ratio.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Added release notes for v0.0.90 covering inference routing, credential
reset behavior, WhatsApp status detection, and DGX Station coding-agent
guidance.
- Updated custom Dockerfile guidance to document continued support for
the legacy provider argument through v0.0.90.
- Clarified that legacy declarations must be renamed to
`NEMOCLAW_INFERENCE_PROVIDER_ID` before v0.0.91.
  - Added and refreshed related documentation links.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression nightly-e2e Nightly E2E test failures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants