Skip to content

fix(app-session): support v3 descriptors with Windows regression coverage - #154

Open
Lee-SiHyeon wants to merge 2 commits into
ScriptedAlchemy:mainfrom
Lee-SiHyeon:fix/windows-descriptor-v3
Open

Lee-SiHyeon wants to merge 2 commits into
ScriptedAlchemy:mainfrom
Lee-SiHyeon:fix/windows-descriptor-v3

Conversation

@Lee-SiHyeon

Copy link
Copy Markdown

Grok Bot Desktop 0.71.2 writes a version 3 gateway descriptor. CLI 0.12.4 rejects that descriptor with UNSUPPORTED_VERSION, so an already signed-in Windows app cannot provide the CLI's gateway session. Accepting v3 through the existing v2 entries path restores session discovery while retaining single-entry selection and the existing decryption checks.

This builds on the open #143: its compatibility fix, Changeset, and generated bundles are cherry-picked from Nicolas Mertens's commit e9ac66339d422733a6054ff61795d9841ffe43da, preserving his authorship. The additional commit supplies Windows regression coverage and the verified results below. If #143 is the preferred merge vehicle, that test commit can be taken there independently after regenerating the artifact manifest.

  • Add synthetic Windows v3 fixtures for the DPAPI key-provider path, usable-session inspection, empty/ambiguous/missing entries, and a tampered AES-GCM tag. Invalid entries must fail before accessing the DPAPI key.
  • Run doctor --json against isolated v2 and v3 app-data directories on Windows, macOS, and Linux. This exercises the built CLI and its flight worker, catching incomplete bundle updates.
  • Refresh the committed artifact source snapshot, retaining the existing executable mode.

Validation on Windows with Node 24.10.0:

  • Source validation, build, and typecheck passed. Artifact validation passed immediately after the Windows build. The committed manifest retains the unchanged CLI's POSIX 0755 mode, which the Windows build omits; validating that committed manifest on this host reports AB6004, also reproduced with the unmodified main artifact. POSIX artifact validation remains for CI.
  • node --test test/app-session.test.js test/doctor.test.js test/url-policy.test.js test/release-config.test.js test/codex-commands.test.js: 40 passed, no failures or skips.
  • npm run test:routes: 97 passed.
  • Live read-only check using this branch's built CLI and Desktop 0.71.2: app session usable, gateway authentication present, and two bots returned. No messages were sent; credentials, account identifiers, and conversation content are excluded.
  • npm run check reaches the unit suite but is not fully green on this Windows host: 170 passed, 3 failed, 28 skipped. All three failures also reproduce in a separately built, unmodified main checkout at 43499fa: the history disk-failure assertion, Windows absolute-path ESM import in host-tool-inventory.test.js, and symlink privilege EPERM in relay-state.test.js.

Nicolas Mertens and others added 2 commits October 16, 2026 12:54
Current Grok Bot desktop builds write gateway-descriptor.json version 3,
which keeps the version 2 entries layout (adds savedAtMs per entry).
Every command failed with "Unsupported Grok Bot gateway descriptor
version 3". Treat v3 like v2; the multiple-entries safety check stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7jcCQRFPBA9cNGeLvEoJi
Exercise the existing Windows DPAPI key-provider path with synthetic v3
fixtures, including invalid entries and AES-GCM authentication failure.
Run the built doctor command for v2 and v3 under isolated app-data paths
on Windows as well as macOS/Linux, covering the flight worker bundle.

Refresh the artifact source snapshot while preserving its executable mode.
@changeset-bot

changeset-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: af40323

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
grok-bot-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant