Repository navigation
feat(mobile): new tasks can be placed by their origin, like web - #75
Conversation
Mobile new tasks only ran on the picked machine. A fresh draft now starts as Auto when more than one connected, operable machine hosts its project (a machine pick or real locality pins it), and an Auto send is admitted at its recorded origin through the existing admitThreadPlacement RPC before anything is uploaded or prepared. - The queued creation keeps its IDs and stores the placement in its own envelope; the binding rebinds the same outbox message by revision. - Admission runs ahead of the drain's upload, shell and project gates. - Every upload, stored-upload check and launch at the bound machine asks the origin again for the same command and binding, with the owner and both sessions rechecked across the wait. - Upload requests carry their placed owner through retries, and Auto drafts' bytes are held until placement. - Routes for a placed send follow its message to the bound machine. - Drafts documents that hold Auto drafts or placed tasks are written as version 2, which older builds refuse to read or overwrite. ARC now also runs the mobile typecheck and the mobile placement suites. Committed with --no-verify: the pre-commit hook's knip/host-Node step fails on this host for reasons unrelated to this change. Format, changed-file lint, mobile typecheck, 14 mobile test files and the 19-file ARC list were run and passed. Model: claude-opus-5-5 Task: CLO-866 universal native thread placement, mobile consumer slice (root handoff, dispositions M-A) Agent: Claude Code in T3 Code, existing CLO-866 source owner thread (Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RESULTCLO-866 mobile consumer slice (native placement for new mobile tasks): RESULT, published for root's single R1
Final checks (raw logs under
Older-build persistence check (
Development history ( Design decisions to review
Not verified: new-head ARC CI (no run had appeared yet when this was posted), and any simulator, device, runtime, peer, provider or Crown execution. Root retains the single R1, exact new-head CI acceptance and merge. |
PR75 — single independent R1: changes requestedThis is the completed one ordinary independent automated review of the mobile native-placement slice. I am independent of the original source author; this is not human approval.
PR75-R1-F1 — P2: Reopening an unbound pending task drops the identity needed to follow its destinationThe original Send path supplies Concrete sequence: an Auto task is durably queued at A while admission is pending; the user leaves its initial Send route and opens the pending task from Home; admission then binds the same message to B. The queue/outcome moves to B, but the reopened route still names A and has no message ID to follow. When the A queue entry disappears, the detail-read barrier no longer finds that creation under A, so it can subscribe to the nonexistent A thread and show the unavailable state while the real task proceeds at B. Required repair: carry the stable pending message ID through the actual placed-task resume entry point(s), using the same semantics as the initial Send route. Add a focused behavioral guard starting with the real pending-list route, then exercising A-to-B binding through both readers, queue/outcome cleanup retaining B, and unrelated task completion not taking navigation. The current routing tests call the pure resolver with the ID already supplied, so they cannot catch this missing caller wiring. PR75-R1-F2 — P2: An explicitly machine-scoped new-task route can still seed AutoThe M-A contract distinguishes a generic project's origin anchor from an explicitly machine-scoped entry, which must preserve that machine as a manual choice. The provider's new draft seeding uses only scratch status and the candidate count; its inputs do not carry route machine intent. The draft route reads a concrete environment/project, but applying that route never sets manual; it only adds locality when a branch is present. Concrete sequence: open a fresh, explicitly machine-scoped draft for A/project A without a branch/worktree, while A and B are connected and operable hosts of the project. With A already selected, the provider persists Required repair: preserve explicit machine-entry intent through route/provider initialization and persist manual before the new draft can upload or queue. Keep generic project selection's representative origin distinct so genuinely generic eligible drafts still default to Auto. Add a focused route/flow guard covering an explicit A entry with two eligible machines, alongside the generic Auto case and restored explicit intent. A user explicitly choosing Auto afterward may change a fresh draft's intent under the existing rules; initial route scope must not be silently lost. Source coverage and limitsThe review followed the real persisted envelope and signed-out document versioning, same-message rebinding/CAS, admission before destination gates, destination project/path use, the later upload callback with its carried operation identity, fresh origin qualification, both connection/session checks, retry/restore behavior, and existing delivery/removal ownership. I also inspected the relevant changed tests and actual caller paths; test counts were not treated as proof of missing UI wiring. The route-effect dependency change was inspected in its surrounding value/effect relationship. This review does not assert an additional dependency-only defect without a concrete failing transition. No code edits, test execution, native/device/provider/peer/Crown calls, or merge were performed by this reviewer. Root owns CI evidence and final acceptance. Root reports the actual CI run 44348822076 succeeded on a synthetic merge whose tree equals the reviewed tree; that passing run does not close F1 or F2. Author-local checks and old-build compatibility experiments remain attributed to the author's result comment, not to independent execution here. Both findings above are source-derived; runtime behavior has not been claimed as observed. Focused closure on
|
STARTCLO-866 PR75 · PR75-R1-F1/F2 · repair attempt 1: START
|
BLOCKERCLO-866 PR75 · PR75-R1-F1/F2 · repair attempt 1: STOP (the guarded verification failed at lint) Nothing is committed or pushed. PR75's head is still Tried and changed (held uncommitted; held-file inventory digest
Evidence before the guarded run (logs
Guarded run (
Still failing: that one lint error. No behavioral failure was observed. Decision needed: may I make a lint-only correction as guard attempt 2? It would run the effect's draft creation through Records in
No runtime, peer, provider or Crown action was taken. |
STARTCLO-866 PR75 · PR75-R1-F1/F2 · repair attempt 2 (root disposition): START
|
…hine entries stay pinned PR75-R1-F1: opening a queued Auto task from Home dropped its message id, so the route stayed on the origin after it was bound elsewhere. Send and the pending list now share one route for a queued task, and a placed one carries its message id; the route controller's follow logic moved into a hook so both readers use it. PR75-R1-F2: a draft opened from an explicitly machine-scoped entry (the unavailable-thread redirect, new thread on a branch) could still seed Auto. Those entries now carry environmentSelection "manual", which the provider receives as its route entry: the draft is created pinned there, and no draft is created at all while that machine's project is not yet selected, absent or not. Generic project entries keep the Auto rule. New tests drive the real Home handler through both route readers, and the provider through explicit, unresolved, generic, restored and re-applied entries; the new test is registered in the mobile react project and ARC. Committed with --no-verify: the pre-commit hook's knip/host-Node step fails on this host for reasons unrelated to this change. Format, changed-file lint, mobile typecheck, the 15-file mobile list and the 19-file ARC list were run under the repair guard and passed. Model: claude-opus-5-5 Task: CLO-866 universal native thread placement, PR75-R1-F1/F2 repair (attempt 2, root disposition) Agent: Claude Code in T3 Code, existing CLO-866 source owner thread (Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RESULTCLO-866 PR75 · PR75-R1-F1/F2 · repair attempt 2: RESULT, published (guard: passed)
Diff vs
Attempt 2 (the guarded correction plus verification)
Checks (raw log sha256,
Retained history: attempt 1's guarded lint failure ( Records (in
Not verified by me: new-head ARC run 44354603761 was in progress when this was posted. Also not verified: simulator, device or runtime behavior. Root owns that CI acceptance, the same reviewer's focused F1/F2 closure, and merge. |
STARTCLO-866 PR75 · PR75-R1-F1 residual · global attempt 3 (root caller disposition): START
|
PR75-R1-F1 residual: a thread selection held by a branch checkout runs later through startOpeningDetail, which preloaded the route's raw machine and thread before navigating. For a placed task bound elsewhere in the meantime, that mounted the origin's thread detail. A Thread route that names a pending message now skips that speculative preload; navigation and its params are unchanged, and the route's readers load the bound thread behind its creation barrier. Other routes preload as before. The pending-route test now selects through the real selection gate and startOpeningDetail, and checks an ordinary route still preloads. Committed with --no-verify: the pre-commit hook's knip/host-Node step fails on this host for reasons unrelated to this change. Format, changed-file lint, mobile typecheck, the 15-file mobile list and the 19-file ARC list were run and passed. Model: claude-opus-5-5 Task: CLO-866 universal native thread placement, PR75-R1-F1 residual (global attempt 3, root caller disposition) Agent: Claude Code in T3 Code, existing CLO-866 source owner thread (Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RESULTCLO-866 PR75 · PR75-R1-F1 residual · global attempt 3: RESULT, published
Diff vs
Proof
Checks (the single command
Accounting (manual; not enforced by the canonical helper)
Not verified by me: the new-head CI run, and any simulator, device or runtime behavior. Root owns changed-head CI and the same reviewer's focused residual-F1 closure. |
Root source acceptance — PR75 mergedThe mobile native-placement slice is accepted at head Fresh eligible drafts can retain Auto placement intent; explicit machine entries are pinned before draft creation, and unresolved explicit targets wait. Placed outbox work carries its stable ownership into actual destination uploads/launch and navigation. Home resumes carry the message identity, both readers follow the destination behind its creation barrier, and pending routes skip speculative preloads that could use a stale origin. Existing manual, local, restored and bound operation semantics are preserved. Acceptance evidence
The failed first repair, passed second repair, and explicit caller-authorized post-pass F1 continuation are retained without reset. The canonical helper's post-pass limitation and manual continuation accounting are disclosed. The host pre-commit This accepts source, not simulator/device execution or fleet installation. Root continues the already prepared schedule-placement slice with the same original author; deployment, provider recovery and receiver acceptance retain their separate gates. |
Mobile new tasks could only run on the machine picked for the draft. This brings web's native placement (from the shared admission work in #74) to mobile. A new task can now be Auto: its recorded origin admits it and binds it to a machine before anything is uploaded or prepared there.
How it works
manual). Real locality also keeps it where it is: a chosen local checkout, an existing worktree, a PR checkout, machine-local context, or a scratch folder.confirmQueuedbefore anything else; a failed write means no admission request.orchestrationEnvironment.admitThreadPlacement. This happens before the upload, shell and project gates. Candidates are the project's machines that are currently operable and can run the request.updateThreadOutboxMessage(bound, revision)), in the same file,thread-outbox/<messageId>.json.no-eligible-environmenthands it back to its origin draft, still on Auto.pendingMessageId.useResolvedThreadSelectionandLiveThreadRouteControllerresolve it to the message's current machine before any scoped key or detail read. The controller moves only its own route's params, and only while they still name the same pending task.kind: "placed-creation", schema version 3). Older flat readers fail on it and keep the file unread. Legacy writes stay flat version 3, and readers 1–4 are kept.Unchanged: existing-thread sends, legacy fixed creations, machine pins, uploaded references,
removeownership and tombstones,clearEnvironment's refusal on unreadable records (which follows the current destination), and the PR71/PR74 safeguards.Verification (source tests only)
@t3tools/mobiletypecheck: 0 errors. Changed-file format check and lint: clean.threadOutboxDelivery.placement.test.tsuses the real outbox manager, drain and codec. It covers:composer-attachment-uploads.test.tsuses the real worker, queue callback,prepareTurnAttachmentsand file storage. It shows zero URL mints or transfers for:0d51b186code ran against state written by this build, in a temporary worktree that has been removed.ARC CI now also runs
vp run --filter @t3tools/mobile typecheckand the 14 mobile test paths.Limits
Model: Claude Opus 5.5 (
claude-opus-5-5), Claude Code in T3 Code. Committed with--no-verify: the knip/host-Node pre-commit step fails on this host for unrelated reasons; the checks above were run separately.R1 repair: PR75-R1-F1 and PR75-R1-F2
Head
ff8228d6279be554ff989a5bf39938c23715bb39, treea9ba6e7c900733aa8c02b3bb5f4d94c4c7a01a02. Its parent is the reviewed head2ad5f4209be79ac28fda3ea5789d9366e16e83e1; the base is0d51b186371e56c3c642a4b6db3ffd3760cbeab9. It is a normal descendant: no amend, rebase or force-push.queuedTaskRouteParams. A placed task's route also carriespendingMessageId; a fixed task's route is unchanged.useFollowPendingRoute.environmentSelection: "manual".Stackpasses that to the provider asrouteEntry.src/features/home/pendingTaskRoute.test.tsx(new, React project; also listed in ARC). It runs the real list model and Home handler, then both route readers, through A→B binding, delivery and outcome cleanup, an unrelated completion, and a legacy fixed task.new-task-flow-provider.test.tsxgains six cases: explicit entry, waiting for the entry's own project, unresolved target, a later deliberate Auto choice, restored manual, and a generic entry.clo-866-pr75-r1.json. Attempt 1 failed at lint (98f517f3…) and stays recorded. Attempt 2, the guarded correction plus verification, passed.5a947da4…0afd891e…7ad3f1db…5b1bd602…b9698deb…40424554…).9f7dc058…).31cd72b3…).--no-verify(the host's knip/Node pre-commit step fails for unrelated reasons).R1 residual: PR75-R1-F1, deferred preload
Head
3c3348766d05c78844784fcb87a7f2021647cd6c, tree284bc0cce77bf9cff1518d78e1f6c0c49b0cd200, parentff8228d6279be554ff989a5bf39938c23715bb39. It is a normal descendant. F2 is unchanged.startOpeningDetail(useSelectWorkspaceDetail.ts) skips its speculative preload for a Thread route that namespendingMessageId. Navigation and its params are unchanged, and routes without a pending message ID preload as before. Both callers use this shared boundary: the layout's deferred selection and the fallback selector.pendingTaskRoute.test.tsxgoes through the real Home handler, the realthreadSelectionDeferralgate and the realstartOpeningDetail.startOpeningEnvironmentThread. The layout's selection callback is reproduced in its own order inside the real gate; it is not a mounted navigator.ff8228d6: a stalelaptop:thread-autopreload (6169136d…).ffedee6c…; lint 0 errors9abb27d5…; mobile typecheck 0 errors7ad3f1db…; 15 mobile files, 290 tests3ae9e6e3…; 19-file ARC list, 491 testsdba2abc0….--no-verify(the host's knip/Node pre-commit step fails for unrelated reasons).🤖 Generated with Claude Code