Repository navigation
mobile: keep computer tokens device-only; harden prune and npm publish - #402
Merged
Merged
Conversation
Review of #400 found that cross-device computer sync cannot work in the shipping app (iCloud KVS is not entitled; the identifier is commented out in project.yml pending the iCloud container) while it still moved Kittylitter tokens into iCloud Keychain. Remove the sync until it can be redesigned and entitled: - Remove the computer ledger (cloud_sync::computers), its KVS key, and the SavedServerStore/CloudKVSBridge wiring. - Alleycat tokens are device-only again. Tokens a pre-release build put in iCloud Keychain are moved back: the device-only copy is written before the iCloud copy is deleted. saveToken adds or updates in place, so a failed write never removes a working token. The in-memory cache stays. - prune-rust-target.sh only acts on a Cargo target (named `target` with Cargo's CACHEDIR.TAG), rejects a non-numeric cap, skips while cargo or rustc is running, and never removes the target directory itself. - release.yml: publish-npm runs in the `npm-publish` environment, which GitHub restricts to `main`, so a dispatch from another branch cannot obtain an npm publish token. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
A Codex review of #400 found that cross-device computer sync cannot work in the shipping app, while it still moved Kittylitter tokens into iCloud Keychain. This removes the sync before release and fixes the other must-fix findings. The Mobile Release for #400's merge was cancelled before any TestFlight or Play upload, so no tester received the sync code.
Key changes
com.apple.developer.ubiquity-kvstore-identifieris commented out inproject.ymlpending the iCloud container. The ledger, its KVS key and the Swift wiring are removed.saveTokenadds or updates in place instead of delete-then-add, so a failed write can't drop a working token.target, with Cargo'sCACHEDIR.TAG), rejects/and$HOME, rejects a non-numeric cap, skips while cargo/rustc is running, and never deletes the target directory itself.publish-npmruns in the newnpm-publishenvironment, restricted tomain. The npm trusted publisher will be bound to that environment too.Kept from #400: reconnect waits for the in-flight pass, detached account probes with a 10 s deadline, in-memory token cache, coachmark removal.
Verification
cargo test -p codex-mobile-client --lib cloud_sync: 8 passed.make ios-sim-fast: BUILD SUCCEEDED.SavedServerStoreTests: passed.$HOME, a non-numeric cap, and staged pruning in a temp target (only the iOS deps survive stage 2; stage 3 leaves onlyCACHEDIR.TAG).Follow-ups (not in this PR)
Real cross-device sync needs the iCloud container and provisioning profiles, plus a redesign per the review: opaque ids and no credential-bearing URLs in KVS, logical clocks with a device tie-breaker, no tombstones from decode failures, element-level merge instead of whole-value LWW, and fixing the
CloudKVSBridgeecho. Also from the review: coalesce concurrent reconnect callers onto one result, and cancel timed-out account RPCs in the session worker.🤖 Generated with Claude Code