Skip to content

fix: make Grok launch availability truthful (#3861)#3909

Merged
CompleteDotTech merged 65 commits into
mainfrom
agent/issue-3861-grok-launch
Jul 26, 2026
Merged

fix: make Grok launch availability truthful (#3861)#3909
CompleteDotTech merged 65 commits into
mainfrom
agent/issue-3861-grok-launch

Conversation

@CompleteDotTech

@CompleteDotTech CompleteDotTech commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

Implements the remaining Grok Build launch-integrity gaps for #3861 on top of the shared availability contract from #3891.

  • Gates Grok version and authenticated model-catalog probes on the same ready availability result used by chat.
  • Treats synchronous and asynchronous spawn() failures as structured runtime errors. A post-preflight ENOENT retains runtime_missing; other launch failures use runtime_launch_failed.
  • Failed launches complete through done(isError) without exposing the resolved executable or GROK_BIN path, emitting a fabricated assistant response, or persisting a fabricated assistant turn.
  • Keeps runtime status, Familiar Studio, Familiar Summoning Circle, capability overview, and chat error states truthful for discovered-but-unlaunchable launchers.
  • Keeps native-Windows migration fixtures capability-aware: privileged real-symlink cases run where supported while fallback coverage remains active.

Closes #3861.

Acceptance matrix

  • Missing Grok emits runtime_missing before spawn, creates no child process, and never fabricates an authentication/no-output assistant reply.
  • GROK_BIN discovery remains validated and invalid overrides fall through without exposing their value.
  • Native Windows executables, npm shims, and WSL launcher behavior retain focused coverage.
  • Grok JSONL provider errors remain actual CLI errors after a successful start.
  • Status and chat share availability semantics; Grok version/model probes run only for ready plans with the same scoped environment.
  • Async ENOENT and injected synchronous UNKNOWN post-preflight spawn failures complete with structured errors and cannot reach the generic authentication fallback.
  • Setup, familiar selection, Summoning Circle, and capability overview distinguish unavailable from installed runtimes using shared remediation; reports without availability remain neutral.

Verification

Rebased safely onto current origin/main (38b4c0ba); head is 3db3df6d.

Passed on native Windows:

  • pnpm typecheck
  • pnpm lint
  • pnpm check:tests-wired (1254 wired)
  • node --require ./scripts/css-source-contract-hook.cjs --experimental-strip-types src/lib/runtime-availability.test.ts
  • node --require ./scripts/css-source-contract-hook.cjs --experimental-strip-types src/lib/grok-bin.test.ts
  • node --require ./scripts/css-source-contract-hook.cjs --experimental-strip-types src/lib/grok-build.test.ts
  • node --require ./scripts/css-source-contract-hook.cjs --experimental-strip-types src/app/api/harnesses/route.test.ts
  • node --require ./scripts/css-source-contract-hook.cjs --experimental-strip-types --import ./scripts/test-alias-register.mjs src/app/api/chat/send/route-runtime-availability.integration.test.ts (missing Grok zero-spawn, async ENOENT, and synchronous spawn failure)
  • node --require ./scripts/css-source-contract-hook.cjs --experimental-strip-types src/app/api/api-contracts.test.ts (238 route contracts)
  • Focused Familiar Studio, Summoning Circle, onboarding, and capability overview suites.

pnpm test:api was re-run after the Windows fixture guards. It intentionally skips scripts/dev-app-teardown.test.mjs on native Windows because Node cannot deliver POSIX signals to exercise Bash traps; it passes the native Windows migration suites and consistently stops only in unchanged src/app/api/beads/route.test.ts cleanup with EBUSY removing its temporary project-a Git fixture after 24 assertions. The test blob is identical to origin/main; this reproducible Windows cleanup defect remains tracked as cave-pp2 and is outside this PR. The earlier fake-server timeout was investigated: this native Windows host has only the WSL bash.exe launcher with no installed Linux /bin/bash, so the POSIX Bash/signal fixture cannot start its fake server. The native-Windows skip is environmental; scripts/dev-app.test.mjs still pins the Windows cmd.exe launch configuration. Focused Grok coverage and all static gates pass.

CI

Fresh CI and CodeQL will run for 3db3df6d after the force-push. The Swift audit is intentionally skipped.

@CompleteDotTech CompleteDotTech self-assigned this Jul 26, 2026
@CompleteDotTech
CompleteDotTech marked this pull request as ready for review July 26, 2026 16:56
@CompleteDotTech
CompleteDotTech force-pushed the agent/issue-3861-grok-launch branch 5 times, most recently from 63eb477 to b31f933 Compare July 26, 2026 20:07
@CompleteDotTech
CompleteDotTech force-pushed the agent/issue-3861-grok-launch branch from b31f933 to b14fdc3 Compare July 26, 2026 20:29
@CompleteDotTech
CompleteDotTech force-pushed the agent/issue-3861-grok-launch branch from b14fdc3 to 3db3df6 Compare July 26, 2026 20:40
BunsDev and others added 7 commits July 26, 2026 15:43
Refresh the Settings daemon control sheet from the approved ZIP handoff while preserving live multi-host, travel, executor, and Omnigent behavior.

Update iOS connection copy and open Chats at the newest non-archived conversation without overriding explicit navigation intents.

Normalize saved hub URLs and use design-system spacing tokens in response to Copilot review.

Signed-off-by: Val Alexander <bunsthedev@gmail.com>
Scope OMNIGENT_TOKEN to an exact normalized OMNIGENT_SERVER_URL match.

Preserve scoped Vault fallback, JWT, and Databricks pointer semantics.

Add regressions for attacker URLs and missing Databricks workspace hosts.
…tivity

feat(grok): add fail-closed tool activity compatibility
…ctivity-3865

feat(chat): add safe correlated OpenClaw Gateway dispatch
Bind encrypted hub token custody to the configured hub origin.

Migrate legacy raw custody at config load/save and clear mismatched custody.

Prevent token reuse after tokenless hub switches.
…857-codex

fix(copilot): preflight direct JSONL launcher
@CompleteDotTech
CompleteDotTech merged commit 81d7903 into main Jul 26, 2026
15 checks passed
@CompleteDotTech
CompleteDotTech deleted the agent/issue-3861-grok-launch branch July 26, 2026 21:46
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.

Grok Build: block missing launcher before chat and remove the false authentication fallback

2 participants