Skip to content

fix(mobile): stabilize Local Studio agent scan - #209

Closed
0xSero wants to merge 1 commit into
mainfrom
codex/stabilize-local-studio-agent-scan
Closed

fix(mobile): stabilize Local Studio agent scan#209
0xSero wants to merge 1 commit into
mainfrom
codex/stabilize-local-studio-agent-scan

Conversation

@0xSero

@0xSero 0xSero commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • stabilize Local Studio agent discovery across the controller's cold-registration window
  • keep generic KittyLitter scans immediate
  • reuse one shared Rust inventory path for scanner and connection, removing the duplicate connection retry loop
  • project the mode choice through thin iOS and Android calls

Root cause

The Local Studio controller can answer an inventory request before Pi, Codex, and other enabled agent bridges have registered. Litter scanned once and disabled Connect when that first inventory was empty, while the later connection path contained retries the user could never reach.

Verification

  • focused Rust recovery and Local Studio connection-expansion tests passed
  • full codex-mobile-client library suite: 774 passed, 0 failed, 5 ignored live-only tests
  • generated Swift and Kotlin bindings successfully
  • Android unit tests, debug AndroidTest compilation, and debug APK assembly passed
  • iOS fast simulator build passed
  • live iPhone 17 Pro simulator flow passed against the Pop!_OS controller: paste Local Studio connection JSON, discover Pi and Codex, select agents, connect, and observe the pairing sheet close
  • live controller inventory found Codex, Pi, OpenCode, Claude, Droid, Hermes, and Shell; multiplexed connection attached every available agent
  • Pop!_OS mobile website exercised progressive streaming, rendered reasoning, and completed a shell tool call
  • installed Local Studio desktop app completed a fresh shell tool call and rendered the completion; an existing task confirmed desktop reasoning rendering
  • the identical pre-rebase patch passed GitHub Mobile CI shared-prep, android, and ios; final head 517f2d69 passed release planning and the Windows npm test, while its Mobile CI rerun is queued for shared runner capacity

Review notes

  • Local Studio waits through the same bounded 500/1000/1500 ms registration window previously hidden in the connection path
  • refreshes merge by agent name, update later metadata, and retain earlier inventory if a later refresh fails
  • KittyLitter behavior remains immediate
  • no generated bindings or temporary live-test credentials are committed
  • physical-device and Android-emulator runtime validation were not performed in this pass

@0xSero 0xSero added bug Something isn't working priority: critical Must land in the current stabilization window labels Aug 4, 2026
@0xSero
0xSero force-pushed the codex/stabilize-local-studio-agent-scan branch from cf19c2c to 517f2d6 Compare August 4, 2026 09:15
@0xSero

0xSero commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

Self-review on 517f2d69 (after rebasing onto current origin/main):

  • No correctness, parity, or cleanup findings remain.
  • The patch is limited to six files (58 insertions / 34 deletions); 30 of the added lines are test coverage.
  • The connection path's duplicate registration retry loop was removed. Scanner and connection now use the same shared Rust inventory stabilization path.
  • Local Studio alone opts into the bounded registration wait; generic KittyLitter scans remain immediate.
  • Inventory merges by stable agent name, replaces stale metadata, avoids duplicates, and retains the best known inventory if a later refresh errors.
  • Swift and Kotlin only select the mode; registration policy remains shared in Rust.
  • The rebased commit has the same stable patch ID as the fully validated pre-rebase commit.

Validation and the remaining physical-device / Android-runtime limits are recorded in the PR body. Updated CI is running on the rebased head.

@0xSero

0xSero commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

Cleanup audit: the shared-Rust refactor is aligned with the architecture (one inventory retry/merge path, thin platform mode selection), the diff is conflict-free, and Mobile CI is fully green. Keep this draft until the actual changed surface is proven: Local Studio pairing scan on an installed iOS build and Android build must recover from an initially empty inventory, show all later-registered agents without restarting, and keep generic KittyLitter scans immediate. The existing controller/browser/desktop proofs validate the host, not those two mobile scanner surfaces.

@0xSero 0xSero mentioned this pull request Aug 4, 2026
@0xSero

0xSero commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded by release PR #219. I compared commit 9b44327d in #219 with this PR: the six-file Local Studio scan patch is content-identical, while #219 is based on the latest main and carries the same fix into the 1.7.0 release matrix. The detailed live-controller/iOS/desktop evidence from this PR remains the acceptance record; #219 still needs its documented Android and release gates.

@0xSero 0xSero closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: critical Must land in the current stabilization window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant