Skip to content

New chat: the machine first, the place following it (a session on another machine with no project, in any folder) - #503

Merged
SSFSKIM merged 14 commits into
masterfrom
fix/new-chat-machine-first
Nov 6, 2026
Merged

SSFSKIM merged 14 commits into
masterfrom
fix/new-chat-machine-first

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

What the owner asked (2026-11-06)

you can't open new session on other machines unless I declare certain project on that machine. this is not needed -- let machine be chosable without choosing project. Like if I just want to open session on mini, on certain directory with no git, I should be able to.

What changes

Machine first. A New chat tab's machine chip opens whenever the app reaches another machine, project or none. Its menu lists This Mac and every up RL2 machine. A machine where the member's rights are known and lack spawn is greyed, with why in the item. "Set up this project there…" is gone: choosing the machine is enough.

The place follows the machine. With another machine chosen, the project chip's menu is that machine's, in the local menu's shape:

  • its own projects (read from its session.projects.list as the menu opens);
  • New project, which opens the existing folder sheet, now titled "New project on " and naming no org project. Any folder there, git or not, is registered with its trust read, exactly as the setup did;
  • Don't work in a project, its home with no project.

A greyed item reads its reason inline: not an owner, or an endpoint that predates the setup or the home spawn. A local project chosen first keeps its org-matched checkout there, with its words, branch and Worktree box as today. Otherwise the chip falls back to "Choose a project" on that machine. This Mac chosen again gives the local row back. Send needs a place on the machine and no longer needs a local project.

The contract change. session.spawn from a current machine owner (the test that already admits trust) may name the home as checkout: '~' (HOME_CHECKOUT). For every other member, and for sminos.spawn, it is unknown-checkout. The spawn starts in machineHome(), the realpath of os.homedir(), with no project, as a local "Don't work in a project" does; a worktree there is refused. The home's trust card reads ~ through the setup policy, which expands it as the folder list does. The endpoint advertises rl2.spawn-home, which moves RL2 to 1.10; that is why this run has cross-build. The menu reads it through two new main-to-renderer MachineState fields: the member's rights (from caps) and the endpoint's capabilities (from h2).

The home-root rule (a binding addition from the desk track). For a remote caller, a session root whose realpath is a home of the machine, or an ancestor of one (/, /Users), counts as no root, owners included. The homes are os.homedir()'s realpath and the passwd home's, when the two differ. Unicode forms are folded only when a path is compared with a home; everything else uses native realpaths. The rule covers:

  • git.*, through CheckoutBounds and the checkout rule.
    • A root's repository is learned by rev-parse and the worktree list (git.worktree.list, which now answers git's own toplevel), never by a status scan.
    • A root whose repository (git's top level there, or its main checkout) is a home bounds nothing of git's.
    • An answer that isn't definite fails closed and is never cached.
    • Each remote git read's own path is checked again at the request. This covers a home's linked worktree checked out below a project root.
    • A worktree status's path that is a home, or doesn't resolve, is refused.
  • The checkout feed. git.changed, files.changed under a dropped root, and a home checkout's scm.remote.output are filtered. They are held while the bounds are read, and never delivered against bounds the feed couldn't read.
  • files.*, in the files service's own rootsOf, keyed on HandlerContext.remote. Only the endpoint seam sets that flag (mawsd's front.dispatch / intercepted), and machine.op carries it through.
  • scm.*, when the checkout covers a home: by its realpath, by git's top level there, or by its trust key.

Local behaviour is unchanged. WIRE_MINOR moves to 28: git.worktree.list's optional toplevel.

Design points settled with the architect

  • '~' rather than an omitted checkout. Making a required input optional is breaking under the wire manifest's rule (diffProperties), so it would take a WIRE_MAJOR. With the sentinel, the spawn's schema is unchanged (WIRE_MINOR moves only for git.worktree.list's toplevel). An older endpoint answers it unknown-checkout, and the renderer words that "update MAWS on ".
  • The '~' spawn starts in os.homedir(), which reads $HOME first, not in the passwd home. That is where its trust card, the folder list and the e2e scene's sandboxed home all read. The rule drops both homes.
  • Sidebar (design item 4): checked, not changed. A session started this way sits under its machine's row in A's sidebar, both in a project only that machine holds and in no project. A reads no projects of a machine its org rows cover (renderer ipc/events.ts), and a listing joins only A's own projects (main/org/rows.ts). So there is no group per project of that machine. That is P5's model; the e2e asserts it.

Residue (non-blocking, accepted with the architect)

  • scm's home check is two steps. It reads the checkout before the command resolves it again, so a swap between the two needs a same-user process on the machine.
  • The bounds cache can miss a repository change. CheckoutBounds keeps repositories per set of roots, so a git init of a home, or a nested repository removed, during the endpoint's lifetime is seen only once the roots change. Each request's own path is still checked live.
  • files.changed paths are compared as named. The machine's only emitter (watch.ts) names join(entry.real, name), canonical up to its last name.
  • The feed's held output is capped and can stay silent. Held scm.remote.output shares HELD_FILE_CHANGES' cap, which drops the oldest silently. A feed whose bounds couldn't be read stays silent until the session's next change.
  • A separate-git-dir home with a linked worktree outside it. The worktree service can't find its main checkout; the desk track reproduced this and it discloses nothing.
  • The worktree service folds paths to NFC (holders.ts canonicalPath; logged by the architect as tech debt). On a normalization-sensitive filesystem, a decomposed root whose composed spelling is another directory, or none, therefore fails closed for remote git.
  • Not driven in e2e: a member without spawn, and a non-owner's greyed items. The scene's org has one member; component tests cover both.
  • No Worktree box for another machine's own places. It is the local project's.
  • Stale comments in e2e/remote.spec.ts: the chooseMachine helper's comment (about line 302) still says the menu lists only machines that hold a checkout, and M9's "Not driven" note cites a stale MachineMenu.test.tsx path. Both are left as they were so fix/remote-subagent-rows merges cleanly.

Proof

  • Red first. e2e:remote run 42197614854 at f266ada, the cases written before the menus existed. M9 and the new machine-first case both failed, at the disabled machine chip.
  • e2e:remote green on the renderer head e4c1fdf: run 42199950569, 5 passed, 0 flaky, the machine-first case and M9 among them.
  • Full gate on 40d5d59 (every class-1 e2e group, unit:darwin, probes, packaged and cross-build): run 42205374911, 55 of 56 jobs green with 0 flaky, including e2e:remote (5 passed) and packaged (120 passed). The one red job was unit shard 4: checkout-rule.test.ts's Unicode-sibling case, whose expectation round 4 changed. The test-only 2981316 corrects it, and static, unit, probes and cross-build on 2981316 are green in run 42206657034, 0 flaky. The product code is identical between the two runs.
  • Reviews.
    • The desk track reviewed the endpoint and service hunks over four rounds (45ac201, then 0cc34c9, 3690966, 1130605 and afeb5c3); every finding was fixed on top.
    • doperpowers:reviewer-high ran three passes:
      • e4c1fdf: incorrect. The fail-open probe and the linked worktree, both fixed in round 2. A held attempt keyed by machine, fixed in 2ddd937. Cache revalidation, which is residue.
      • 2ea1a1a: incorrect. core.worktree and scm's linked-worktree home, fixed in 62c2a7e. The left-attempt key, fixed in 3b8fb98.
      • The follow-up over 2ea1a1a..40d5d59: correct, no material findings.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

…E_CHECKOUT) for a chat in no project there (rl2.spawn-home, RL2 1.10); the home-root rule: for a remote caller a root at the machine's home or above it is no root (CheckoutBounds, the checkout feed's file changes, the files service's roots and scm by the endpoint seam's remote context), one realpathed home (machineHome) that a '~' spawn starts in

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… its endpoint's capabilities (h2), again at a caps refresh, for the machine menu; rl2.spawn-home named for the device

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ct, the machine chip opens and B is chosen; New project on B registers a folder with no git and starts there; Don't work in a project starts in B's home once its trust is reviewed; M9's setup walked through B's New project

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… is a home (a home kept in git) bounds nothing of git's, so no git read runs on the home's repository; the checkout feed holds file changes and scm output while its bounds are read and never delivers them against bounds it couldn't read; scm's checkout covers a home by its repository too, and the feed drops a home checkout's scm output; the rule's homes are os.homedir()'s and the account's (machineHomes), a '~' spawn still starting in os.homedir()'s

files.changed paths are compared as named: the machine's only emitter, the files service's watch table, names a change under the watched directory's confirmed realpath (join(entry.real, name)), so a path is canonical up to its last name. A '~' spawn keeps os.homedir() ($HOME first): the folder list, the setup policy's '~' trust read and the e2e scene's sandboxed home all read it, and the account's home is dropped beside it.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…hine chip opens with or without a project and lists every up RL2 machine, one where the member can't start sessions greyed with why; with another machine chosen the project chip's menu is that machine's places (its projects, New project through its folder sheet naming no org project, Don't work in a project in its home where its endpoint lists rl2.spawn-home and the member owns it), a local project's checkout there kept as before; Send starts there with no local project

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…tory is learned by rev-parse and the worktree list (git.worktree.list, no work-tree scan, which a home kept in git timed out), and only git's definite answer (the repository, or none) lets a root bound git: a timeout, a failure or the spine away leaves it a file root alone, its checkout covering, never kept; a root covers a home by its own worktree's root or its main checkout's (a linked worktree of a home kept in git), so the bounds, the feed and scm agree; paths are compared with the homes in one Unicode form (NFC, the trust key's)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…is its place's, not its machine's alone: another place chosen on the same machine lets it go, so a reload restores and the next Send asks after only the place the chip names

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…xt that may be absent (a caller passing none is this machine's own: main's wiring test calls them so)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…, compare and dispatch on realpaths as the filesystem names them (only a comparison with a home folds Unicode forms), and each remote git read asks, at its request, whether git at its own path answers for a home's repository (a home's linked worktree below a project root of its own repository), refusing no-target for one or for an answer that isn't definite

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ot takes no repository answer that its composed spelling isn't (the worktree service runs git at the NFC spelling: a sibling of it, or none, says nothing of the root), and a worktree status's path, a place, is refused no-target when it is a home or above one, or doesn't resolve (git.diff's and git.log's path stay pathspecs in the repository)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…'s own reading at the path (git.worktree.list now answers rev-parse's toplevel, core.worktree included; WIRE_MINOR 28), which must be the root or above it, so a repository whose work tree is the home, or anywhere but the root, bounds nothing of git's; scm's home guard reads git's top level at the checkout too (a home that is a linked worktree of a repository kept elsewhere)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…other place keeps its number, so the next start takes the next attempt key and main, which answers a key it holds with that key's own attempt, never returns the old place's session

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ch the endpoint's bounds now learn a root's repository from

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
… is refused its own git read too, as round 4 fails closed on a repository answer that isn't the root's

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T11:32:44.628158Z 2981316 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 1dabeac into master Nov 6, 2026
SSFSKIM added a commit that referenced this pull request Nov 6, 2026
…at's machine first with the home-root rule (PR #503, DL 237); the O7 plan's subagent-rows gap marked lifted for lane B; three tracker rows

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM deleted the fix/new-chat-machine-first branch November 6, 2026 16: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.

1 participant