Skip to content

fix(installer): accept the current mode-bound Station Express resume receipt (#8205) - #8208

Merged
senthilr-nv merged 5 commits into
mainfrom
fix/8205-station-express-mode-receipt
Aug 4, 2026
Merged

fix(installer): accept the current mode-bound Station Express resume receipt (#8205)#8208
senthilr-nv merged 5 commits into
mainfrom
fix/8205-station-express-mode-receipt

Conversation

@jason-ma-nv

@jason-ma-nv jason-ma-nv commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

DGX Station Express writes a mode-bound resume receipt before host preparation, but the onboarding completion parser rejected that same receipt after a reboot/relogin continuation. The deployment could become fully healthy and print OpenClaw is ready, then exit nonzero while completing the session with:

Error: DGX Station Express installer resume state is malformed.

Cause: scripts/install.sh save_station_express_resume writes a ten-field receipt ending in mode=%s (install.sh:3975), but readStationExpressInstallerResumeGeneration() only accepted the legacy three-field, agent-bound six-field, and port-bound nine-field formats. The ten-field mode-bound receipt (split("\n") → 11 elements) matched no branch, so completeSession() could not validate and retire the receipt the installer itself wrote.

Fixes #8205.

Changes

  • src/lib/onboard/station-express-resume.ts: add a modeFormat branch to readStationExpressInstallerResumeGeneration() that accepts the exact ten-field receipt—the nine port-bound fields plus mode=<express|provider>, with STATION_EXPRESS_RECEIPT_MODES mirroring validate_station_install_mode() in install.sh. Legacy formats stay accepted; an unknown or expanded mode is still rejected.
  • src/lib/onboard/station-express-resume.test.ts: retain focused parser rejection coverage for an unknown mode without duplicating the installer's accepted receipt format.
  • test/install-station-resume-cleanup.test.ts: exercise the real save_station_express_resume writer and production parser together for both express and provider, and verify that writer/parser field drift is rejected.

Verification

Run on the Ubuntu host (npm ci + plugin build, Node 22), against a clean clone of this branch:

  • npm run typecheck:cli → exit 0.
  • New tests with the fix: npx vitest run --project cli src/lib/onboard/station-express-resume.test.ts -t "mode-bound"2 passed (accept current receipt; reject unknown mode).
  • Full suite with the fix: npx vitest run --project cli src/lib/onboard/station-express-resume.test.ts63 passed.
  • Reverting only the source fix, keeping the tests: the acceptance test fails with Error: DGX Station Express installer resume state is malformed.—the exact reported failure.

Additional contract validation for the Advisor finding:

  • The focused CLI and installer-integration run passed 117 tests across the parser and real writer/parser contract suites.
  • Biome, test-title validation, and git diff --check passed.
  • Normal pre-commit and pre-push hooks passed, including repository checks and CLI type-checking.

Documentation

No user-visible surface change. This is an internal installer-resume receipt contract, and the behavior is corrected so a healthy Station Express deployment no longer fails at session completion. No documentation update is required.

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: Test-only change replaces a handwritten receipt fixture with installer-writer/parser contract coverage. No user-visible behavior or documentation changed. The review covered terminology, structure, voice, and embedded Bash presentation; no findings.
  • Agent: Codex Desktop

Signed-off-by: Jason Ma jama@nvidia.com

Summary by CodeRabbit

  • New Features

    • Added support for installer receipts that specify express or provider modes.
    • Continued support for existing receipt formats, including legacy and port-only formats.
  • Bug Fixes

    • Invalid or unknown receipt modes are now rejected as malformed.

…receipt (#8205)

scripts/install.sh save_station_express_resume writes a ten-field receipt
ending in `mode=`, but readStationExpressInstallerResumeGeneration only
accepted the legacy three-field, agent-bound six-field, and port-bound
nine-field formats. After a reboot/relogin continuation, completeSession()
therefore rejected the installer's own current receipt with "DGX Station
Express installer resume state is malformed" — even though the deployment
was fully healthy and printed "OpenClaw is ready".

Add a mode-bound format branch that accepts the exact ten-field receipt (the
nine port-bound fields plus `mode=<express|provider>`, matching
validate_station_install_mode in install.sh), while still accepting the
legacy formats and rejecting an unknown/expanded mode.

Add tests that write the current installer receipt and assert the production
parser accepts it (and rejects an unknown mode), coupling the writer and
parser contracts so they cannot drift again.

Signed-off-by: Jason Ma <jama@nvidia.com>

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-code-quality

github-code-quality Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 77cc677 in the fix/8205-station-exp... branch remains at 96%, unchanged from commit 8295d20 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 77cc677 in the fix/8205-station-exp... branch remains at 81%, unchanged from commit 8295d20 in the main branch.

Show a code coverage summary of the most impacted files.
File main 8295d20 fix/8205-station-exp... 77cc677 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/onboard...press-resume.ts 78% 76% -2%
src/lib/credentials/store.ts 56% 55% -1%
src/lib/inferen...er-discovery.ts 88% 87% -1%
src/lib/inferen...y-production.ts 48% 48% 0%
src/lib/sandbox...rce-identity.ts 87% 87% 0%

Updated August 04, 2026 15:10 UTC

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Station Express resume validation now accepts exact mode-bound receipts with mode=express or mode=provider. Legacy formats remain supported. Installer tests cover valid modes, malformed modes, receipt validation, and temporary-state cleanup.

Changes

Station Express receipt handling

Layer / File(s) Summary
Mode-bound receipt validation
src/lib/onboard/station-express-resume.ts
The parser accepts exact 11-line receipts with validated fields and allowed modes. Supported legacy formats remain valid.
Installer resume contract tests
src/lib/onboard/station-express-resume.test.ts, test/install-station-resume-cleanup.test.ts
Tests cover express and provider receipts, unknown modes, generation validation, temporary-home cleanup, and shared repository setup.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: area: onboarding

Suggested reviewers: apurvvkumaria, brandonpelfrey

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The parser accepts supported mode-bound and legacy receipts and rejects malformed modes, with production contract tests covering the linked issue objectives [#8205].
Out of Scope Changes check ✅ Passed The changes remain within scope by updating receipt parsing and adding installer resume contract tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the parser change to accept the current mode-bound Station Express resume receipt.
✨ 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/8205-station-express-mode-receipt

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

@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 `@src/lib/onboard/station-express-resume.test.ts`:
- Around line 654-669: Add a separate public-boundary acceptance test alongside
the existing ten-field receipt test that writes modeReceiptText("provider") and
verifies assertStationExpressInstallerResumeMatches does not throw. Keep the
test focused on provider-mode behavior and use the same temporary
HOME/state-directory setup and cleanup without asserting implementation details.
🪄 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: 5e41318a-fc83-4ac2-9e17-7d4e0030b610

📥 Commits

Reviewing files that changed from the base of the PR and between 7b4c42d and ebe1584.

📒 Files selected for processing (2)
  • src/lib/onboard/station-express-resume.test.ts
  • src/lib/onboard/station-express-resume.ts

Comment thread src/lib/onboard/station-express-resume.test.ts Outdated
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

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 terminology decisions differ; normalized E2E selections differ; severity counts match.
2 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • provider resume receipt at test/install-station-resume-cleanup.test.ts:66: selected only by the second-opinion lane as justified.
  • mode-bound receipt at src/lib/onboard/station-express-resume.test.ts:648: selected only by the second-opinion lane as justified.
3 additional E2E selections from the second opinion

Advisory only. The primary lane did not select these E2E jobs or targets.

  • ubuntu-repo-docker-post-reboot-recovery: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • spark-install: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • full-e2e: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

2 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — mode-bound at src/lib/onboard/station-express-resume.test.ts:648: Keep "mode-bound" for receipts that include mode=.
  • established — port-bound at src/lib/onboard/station-express-resume.ts:347: Keep "port-bound" for the port-field receipt shape.

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.

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

Reviewed the exact two-file diff and compared the parser values with validate_station_install_mode() in scripts/install.sh. The new shape remains strict about line count, field names, agents, sandbox name, policy tier, ports, mode, revision, model, and generation. I found no credential, injection, authorization, dependency, logging, cryptography, configuration, or privilege regression.

The CodeRabbit request for a separate provider acceptance test is reasonable additional contract coverage but is not a correctness blocker: express and provider use the same Set.has path, the current acceptance test exercises the ten-field shape, and the unknown-value test exercises rejection.

I cannot approve this SHA because both Advisor jobs failed, the required E2E gate is cancelled, and the branch is behind current main. Refresh it, obtain current required checks, and add the final documentation-writer review receipt with no-docs-needed evidence if the independent review confirms this internal receipt fix has no documentation impact.

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

Reviewed commit d701132e0a. The only change after the prior receipt-parser review is the main merge. The ten-field mode shape remains strict and matches the installer writer; no code defect was found.

Approval is blocked by the shared main capability-union failure tracked by #8213, failed required E2E/CI, and a documentation-writer receipt that must identify this commit.

@senthilr-nv senthilr-nv self-assigned this Aug 4, 2026
@senthilr-nv senthilr-nv added bug-fix PR fixes a bug or regression area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: install Install, setup, prerequisites, or uninstall flow platform: dgx-station Affects DGX Station hardware or workflows v0.0.102 labels Aug 4, 2026

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

No blocking findings. The parser accepts only the exact mode-bound receipt shape, preserves legacy compatibility, rejects unknown modes, and the installer contract tests cover both express and provider using the real writer and public parser. CI is green. Approved.

@senthilr-nv
senthilr-nv enabled auto-merge (squash) August 4, 2026 14:57
@senthilr-nv
senthilr-nv merged commit bef5d0b into main Aug 4, 2026
75 checks passed
@senthilr-nv
senthilr-nv deleted the fix/8205-station-express-mode-receipt branch August 4, 2026 15:19
apurvvkumaria added a commit that referenced this pull request Aug 4, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Prepares the canonical v0.0.102 release documentation from the current
release-labeled scope.
The change adds a dated changelog for all 38 user-facing shipping PRs
and corrects the OpenClaw agent command reference for the behavior
delivered by #8191.

## Changes

- Add `docs/changelog/2026-08-04.mdx` with the v0.0.102 release summary,
detailed behavior changes, support boundaries, security evidence links,
and links to durable documentation.
- Update `docs/reference/commands.mdx` to describe non-JSON OpenClaw
output capture, its combined limit, marker handling, stream suppression,
recovery guidance, and exit behavior.
- [#8167](#8167) ->
`docs/changelog/2026-08-04.mdx`: Records authenticated attachment of
operator-managed llama.cpp servers.
- [#8129](#8129) ->
`docs/changelog/2026-08-04.mdx`: Records the Experimental managed vLLM
profile for two DGX Spark systems.
- [#7983](#7983) ->
`docs/changelog/2026-08-04.mdx`: Records qualification of the May 2026
GB300WS factory image.
- [#8207](#8207) ->
`docs/changelog/2026-08-04.mdx`: Records the qualified DGX Station
driver transaction.
- [#8208](#8208) ->
`docs/changelog/2026-08-04.mdx`: Records mode-bound Express resume
state.
- [#8158](#8158) ->
`docs/changelog/2026-08-04.mdx`: Records recovery of host-global
dual-Station runtime ownership.
- [#8145](#8145) ->
`docs/changelog/2026-08-04.mdx`: Records Windows-host Ollama validation
from Docker Desktop's network context.
- [#8190](#8190) ->
`docs/changelog/2026-08-04.mdx`: Records HTTP model pulls when WSL has
no local Ollama executable.
- [#8195](#8195) ->
`docs/changelog/2026-08-04.mdx`: Records reuse of a healthy
installer-managed CLI.
- [#8053](#8053) ->
`docs/changelog/2026-08-04.mdx`: Records early rejection of incompatible
OpenShell gateway versions.
- [#8098](#8098) ->
`docs/changelog/2026-08-04.mdx`: Records the bounded
package-service-to-standalone gateway recovery transition.
- [#8216](#8216) ->
`docs/changelog/2026-08-04.mdx`: Records the final dashboard port
selected during multi-sandbox onboarding.
- [#8146](#8146) ->
`docs/changelog/2026-08-04.mdx`: Records managed startup-state
restoration for stopped sandboxes.
- [#8092](#8092) ->
`docs/changelog/2026-08-04.mdx`: Records gateway watchdog recovery for
classified not-serving states.
- [#8182](#8182) ->
`docs/changelog/2026-08-04.mdx`: Records consistent managed-recovery
wait configuration.
- [#8040](#8040) ->
`docs/changelog/2026-08-04.mdx`: Records Docker sandbox rollback
authority through late validation.
- [#8130](#8130) ->
`docs/changelog/2026-08-04.mdx`: Records bounded Shields deadline
recovery and durable containment.
- [#8086](#8086) ->
`docs/changelog/2026-08-04.mdx`: Records repair of narrowly validated
permission-only configuration drift.
- [#8122](#8122) ->
`docs/changelog/2026-08-04.mdx`: Records prompt failure and guidance for
corrupt transition locks.
- [#8124](#8124) ->
`docs/changelog/2026-08-04.mdx`: Records policy restoration flags,
previews, and target revalidation.
- [#7886](#7886) ->
`docs/changelog/2026-08-04.mdx`: Records explicit destruction after
pre-delete Shields hardening failures while preserving recovery
authority.
- [#7901](#7901) ->
`docs/changelog/2026-08-04.mdx`: Records multi-port uninstall behavior
and shared-resource preservation.
- [#7984](#7984) ->
`docs/changelog/2026-08-04.mdx`: Records one classified transient remote
MCP startup retry.
- [#7954](#7954) ->
`docs/changelog/2026-08-04.mdx`: Records bounded hosted-inference probe
replies.
- [#7574](#7574) ->
`docs/changelog/2026-08-04.mdx`: Records preservation of validated
reasoning capabilities through onboarding.
- [#8089](#8089) ->
`docs/changelog/2026-08-04.mdx`: Records proxy routing for Hermes
WhatsApp pairing and media traffic.
- [#7682](#7682) ->
`docs/changelog/2026-08-04.mdx`: Records native Hermes session deletion
and identifier validation.
- [#8150](#8150) ->
`docs/changelog/2026-08-04.mdx`: Records corporate CA trust for
LangChain Deep Agents Code image builds.
- [#8156](#8156) ->
`docs/changelog/2026-08-04.mdx`: Records reviewed managed runtime
dependency remediation.
- [#8180](#8180) ->
`docs/changelog/2026-08-04.mdx`: Records reviewed MCP discovery runtime
dependency updates.
- [#8196](#8196) ->
`docs/changelog/2026-08-04.mdx`: Records private npm dependency
remediation across managed images.
- [#8203](#8203) ->
`docs/changelog/2026-08-04.mdx`: Records reviewed Hermes and LangChain
Deep Agents Code Python dependency updates.
- [#8125](#8125) ->
`docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for invalid
enumerated CLI values.
- [#8193](#8193) ->
`docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for
unresolved sandbox base images.
- [#8118](#8118) ->
`docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for changed
gateway authority.
- [#8191](#8191) ->
`docs/changelog/2026-08-04.mdx`, `docs/reference/commands.mdx`: Records
output capture, marker handling, recovery guidance, and exit behavior
for non-JSON OpenClaw agent commands.
- [#8187](#8187) ->
`docs/changelog/2026-08-04.mdx`: Records the aligned
interactive-installation start across supported agents.
- [#8153](#8153) ->
`docs/changelog/2026-08-04.mdx`: Records current product capabilities
and support boundaries.

## 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
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: This documentation-only
release preparation does not change executable behavior. Existing
changelog and published-route tests pass.
- [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:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: Independently reviewed `docs/changelog/2026-08-04.mdx` and
`docs/reference/commands.mdx` at commit `b89913780`. All 38 user-facing
v0.0.102 PRs are represented, #8191 behavior matches the implementation,
and the writing rules, documentation style, controlled terminology,
route structure, and skip policy pass review. Targeted tests pass 36/36
and the documentation build completes with 0 errors.
- Agent: Codex Desktop independent documentation writer
<!-- docs-review-head-sha: b899137 -->
<!-- docs-review-agents-blob-sha: 3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- 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 validate:pr` passed after refreshing `origin/main` 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 --project integration
test/changelog-docs.test.ts test/check-docs-published-routes.test.ts`
passed 36/36.
- [x] Applicable broad gate passed — not applicable to
documentation-only changes; `npm run docs` completed successfully with 0
errors.
- [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) —
completed with 0 errors and 2 existing Fern warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [x] New doc pages include SPDX header and frontmatter (new pages only)
— the native dated changelog uses the required parser-safe MDX SPDX
comment and intentionally has no frontmatter.

---
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>


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

## Summary by CodeRabbit

- **Documentation**
- Added release notes for v0.0.102, covering authentication, hardware
setup, WSL, installer recovery, sandbox resilience, policy management,
inference reliability, CLI improvements, and unified quickstarts.
- Updated command documentation to explain how non-JSON agent output is
collected, replayed, and reported.

- **Bug Fixes**
- Improved command-output recovery guidance when output exceeds limits
or contains unsupported fallback markers.
- Preserved accurate command exit-status reporting after output
processing.

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

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

Labels

area: install Install, setup, prerequisites, or uninstall flow area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression platform: dgx-station Affects DGX Station hardware or workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Station Express rejects its mode-bound resume receipt at completion

5 participants