Skip to content

Personal Cloud Computer overhaul (draft: opened to run the hosted checks, not ready to merge) - #730

Draft
timjang3 wants to merge 2012 commits into
mainfrom
overhaul/personal-cloud-computer
Draft

timjang3 wants to merge 2012 commits into
mainfrom
overhaul/personal-cloud-computer

Conversation

@timjang3

Copy link
Copy Markdown
Collaborator

What this is

The overhaul branch: one Home per person, devices connected once, connected agents that hold a grant, your own agents as Runs of a task, and watch, Stop and Disconnect from any client. See AGENTS.md and docs/architecture.md on this branch.

It is opened as a draft so the hosted Linux, macOS and Windows checks run on it. It is not ready to merge and should not be reviewed line by line yet.

State of this head

  • Contains main through fix(client): send Host AuthSessionId in x-opensteer-expected-session instead of ClientScope.loginId #728.
  • Whole Linux check (unit, integration in six parts with lock order enforced, typecheck, lint, format, real-Chromium suites) run on this head outside GitHub. Three test files are known to fail on Linux here, each with an owner:
    • tests/pool-host-enrolment.test.ts: a host script uses a BSD-only stat flag (a real Linux fault; fixed on the pool branch).
    • apps/host/src/threads/home-files-wire.integration.test.ts and apps/host/src/agents/runner-reattach.integration.test.ts: test faults, fixed on the Stop branch.
  • Two unit tests sit close to their time limit and can time out on a busy machine: apps/host/src/agents/runner-child.test.ts and apps/runner/src/runtime/runner-shutdown.test.ts. They pass alone.
  • The Windows lane and the hosted macOS lane have never run on this branch before this pull request. Their results here are the first.

Still to land on this branch

Each is built on a branch of its own and lands after an independent read and the whole check: messaging held as connections, removal of organizations, one door for commands a person and a connected agent can both use, automations, engines' own configuration for tasks that are not the person's, Stop and Disconnect evidence, the browser pool's Home side, the follow view, phone typing, tab sleep on Linux, and repairs to the Electron journeys.

Migrations

This branch's own migrations are numbered 0100 onward; main's keep their own range. A Home on released main moves forward through both. Databases created by earlier builds of this branch are not supported.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
opensteer-marketing Skipped Skipped Nov 24, 2026 12:50pm UTC

Request Review

timjang3 and others added 29 commits November 23, 2026 17:02
… live session

- ShellHub.end, an agent's Stop of a live session: the end is written with its admission (admit,
  its FOR SHARE read of the connection) in one transaction before any socket is claimed or
  closed; refused there, nothing closes and the refusal is raised before any effect (the
  attempt settles failed). admit is never stripped: an ending another cause already claimed
  writes its owed row, then records the agent's Stop where it is admitted.
- An approved proposal: the person actor carries the proposer's last admission
  (CommandProposal.readmit, its #stillAsks), passed to the core command and the administration
  service, which gives it to the session's end as its admit: a Disconnect after beginApproval
  is seen where the end is written.
- browser.history.clear and .remove ran no admission at commit at all: an agent's erasure is
  now admitted in its transaction, as every other administration write is.
- Closing a gone proposer's ask locks the Request without messaging's origin rule
  (assertRequestOriginMayContinue): it only takes authority away; an approval still passes it.

Tests, each failed first:
- session-stop-readmission "ends nothing when it is revoked after its attempt is recorded,
  before the session ends (K2)": revoked just as the hub ends the session (after every handler
  check): "expected undefined to be true" (the Stop succeeded and ended the session).
- requests.integration "admits the proposing connection again where the change is written,
  after the approval began (K2)": "expected 'undefined' to be 'function'" (no readmission).
- browser-history-store: an agent's clear refused at commit: "promise resolved "true" instead
  of rejecting" (history erased).
- requests.integration X9 failed after the 19674e0 merge (the origin rule threw before the ask
  closed) and passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trigger.create governs its anchor task, so commandHolds listed it for a chat anyone may message,
which the tools and the rule otherwise keep from automations: shown meant sendable, and a
stranger's message could end in a standing automation. One predicate (anyoneChatHoldsNo: the
automations family, whatever thing a command names) is read by commandHolds (the listing and
the door's first gate) and by admitCommand (the door's admission, and every readmission at the
effect), which answers not_found. The trigger store already refuses such an automation where it
is created (noProgramWithoutPersonalContext).

Test (holds-reach, the property test): the caller "a chat anyone may speak in" against every
automation command (trigger.create, update, status.set, run, cancel): not shown, not found when
sent, not found where admitted. Failed first: "expected [ 'trigger.create: shown', …(2) ] to
deeply equal []" (shown, sent and admitted).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es batch

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tters whole when cut

One rule instead of a script list: every control, format, lone surrogate and
Default_Ignorable_Code_Point goes, except a joiner between two non-Latin letters or
marks, a joiner inside an emoji sequence, and U+FE0F after an emoji or in a keycap.
The braille blank is a space. The cut keeps an emoji sequence, a flag, a skin tone, a
keycap and a letter with its marks whole. Every expression compiles with the app's
hermesc (260318099.0.4).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…as a Disconnect does

The command branch of the Disconnect set joined the floor only where it was disconnected; a
narrowing (cleanup_reason 'narrowed') neither waited on nor showed an in-flight outside command,
as it does for sessions. It now includes the narrowed floor, so a narrowing's cleanup ends only
with the command's evidence (its settled state; unknown counts with contact lost).

Test (command-attempts.integration, "a narrowed grant and a connection's command acting outside
(K4)"): a running attempt, the grant narrowed, the attempt outstanding until it settles. Failed
first: "expected [] to deeply equal [ Array(1) ]" (not in the set).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…equests

The area filtered a connection's Requests by its own threads.origin_connection_id: it hid
Requests the lineage may see (an everything connection's view of another task's person-side
Request) and skipped the asker, ended-connection and revoked-Runner checks. It now reads the ids
connectionRequests gives the connection, as messaging's 19674e0 has it (connectionRequestsQuery,
ended connections hidden), at the holder's live mode: the same Requests its task tools count and
read.

Test (lineage-visibility "applies connectionRequests inside SQL before pending caps and activity
paging, matching absence byte-for-byte", extended; the fixture's MCP server takes the command
tools): the Run in an everything connection's lineage reads opensteer_state requests: B's
visible Request is there, B's hidden ones are not, and one more hidden Request changes no byte.
Failed first: "expected [] to deeply equal [ Array(1) ]" (the visible Request hidden).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erhaul

Resolved 4 conflicts (git rerere resolved 0 files) keeping both intents:
- packages/database/src/execution-authority.ts: kept 808b6d4's lineageExecutionStanding alongside P1's threadExecutionAdmitted and availableExecutionEnvironmentSubquery.
- packages/database/src/store.ts & packages/database/src/thread-store.ts: kept 808b6d4's TaskReader/readTask alongside P3's connectionAuthority-scoped pendingRequests on both getAssignmentForOwner and readTask/getThreadForOwner.
- apps/host/src/mcp/handlers/product.ts: kept 808b6d4's readTask/callerReader calls alongside P3's connectionAuthority parameter in #readSubagent, #task, and standalone opensteer_task_send.

Verified all auto-merged overlaps (browser-service.ts, request-agent-response.ts, thread-inbox.ts, thread-row-mappers.ts, assignment-store.ts, personal-hot-paths.parity.json, work-home.integration.test.ts, app-service.integration.test.ts, runtime.ts, docs/architecture.md).
…s batch) into electron-smokes

One conflict, apps/host/src/browser/browser-service.test.ts; the shared
conflict cache held no resolution for it. The overhaul added tab sleep's
tests (TS10, V3, V4, Z1) where this branch had replaced the landed 'a tab
closed while activation reopens it' test with the after-landing batch's
confirmed/unconfirmed it.each. Kept both: tab sleep's tests, then the
it.each; the landed form of the test, unchanged on the overhaul, goes. The
reopening test merged without a conflict and keeps both sides: TS10's
answered resumeTab on the second activation and this branch's check that no
fence or close was sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ide an emoji or flag

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… else is quoted

The web quoted a name only beside words, so a name beside an address stood unquoted;
the phone and plain text quoted a name that was the whole heading. Both now go by
whether anything else stands in the sentence. Also tests the claim cut.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ent's own task too

The Home's refusal and the apps' line were two copies; they are now one pair of
constants in @opensteer/core. The mock marked only a chat's tasks ended; a
connected agent's own task (its externalWork) now ends with its connection.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… never run twice

The test re-ran 0109 by deleting the ledger's rows from 0109 on and calling
migrateToLatest, which ran every later migration a second time; each one then
failed on what it had already made, and each branch that added a migration had
to undo its own objects in this test first (the engines batch dropped an index
and a column here).

replayFromChatRoutesEnd now sets the later ledger rows aside, runs the ordinary
migrator with the list cut after 0109, and puts the later rows back. The two
drops are gone. Nine of nine pass under lock-order enforce at a head with two
later migrations.

Calling 0109's step directly was tried first and is not used: its statements
then run under the test's lock-order checker, which the migrator's run is
exempt from.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…failed in the journey's results

OPENSTEER_ELECTRON_SMOKES names the electron journey's smokes to run, in
order (one may repeat); all of them by default. quit-diagnosis.mjs appends
to the journey's results.jsonl one short row per quit --tab-restore run:
the ids of p1, pop and f1, the first trial failure, and for a failed drag
the sidebar order and the rows the list held when the row was lifted and
before it was dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hey enter

The tab-sharing extension's profile name (pairing and rename, copied into each
sign-in receipt) and an engine's subagent title (start and update) were stored as
sent. They now go through outsideName like every other name from outside.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…left

readConnectionRowStanding checked target access (agentGrantAccess) and the work policy's mode
(applyConnectionPolicy) on the stored grant, and handed the stored grant to its callers;
liveAgentConnection narrowed it only after. It now computes the effective grant
(effectiveConnectionGrant) once, decides both with it and returns only it; liveAgentConnection
and bridge admission take it from there.

Callers of the standing read, and what each decided with the grant:
- liveAgentConnection (every admission, authorizeTarget, commandReach, connectionRequests'
  scope): already the effective grant.
- agent-session-store lockLiveConnection (direct session work): target access with the stored
  grant, inside the standing read.
- bridge-admission (a chat's message): returned the stored grant as its connection's.
- thread-inbox (a connected agent's input): id and label only.
- personal-snapshot-store endedOriginForThread, assertPersonMayContinue: standing only.
None could decide wider than granted today: the agent_connections_bridge constraint (0108)
already stores only a selected grant of tasks and plugins for a chat anyone may speak in, so the
stored and effective grants agreed on every live row. So this test could not fail first.

Test (connection-standing-grant.integration, K6): the database refuses an everything grant for
such a chat (constraint agent_connections_bridge); the standing read gives the effective grant;
a profile it never held reads as not found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t fix, on 19674e0)

No conflicts; nothing came from git's shared conflict cache. chat-routes-end.integration.test.ts
is the overhaul's whole (it re-runs only 0109).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
timjang3 and others added 30 commits November 24, 2026 00:36
…y once the file holds one, so it never asks about process group 0

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…inux proc scoping, Runner hold/watch/recovery, Codex stopNode, pidfd signaling)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… answers with the outcome it completed with, never unknown

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…view after rapid Stop+Resume

Two rare journey failures the run's evidence could not decide:
- browser, agent-and-tab-modal-dialogs: the person's start for an agent's new tab waited for it to
  paint and timed out (5 s), before any dialog opened. The page now says what its paint wait
  depends on (paintEvidence(): surface, applied and metrics revisions, frame subscription, frames
  seen at another size than the placement, mount, rendering demand); the check samples it while it
  waits and writes electron-never-shown-paint.json only when it sees no picture.
- menu-bar, home-stop: the live view redialled just before the rapid Stop (Nov 23 and Nov 24) and
  was never admitted again. The smoke now keeps each live-view socket's dial, open, messages and
  close, samples the watch state from the rapid Stop on, and logs both only when that wait fails.

No wait, timeout or assertion changed; the paint wait's behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xecutionBinding only when rejectHeldAnchor is set
…takes it to a fresh install's

packages/database/src/fixtures/released-home-0046.sql is pg_dump of main (6e4687d) after main's
own migrateToLatest on an empty database, with its ledger; its header holds the script that made
it (two runs gave the same bytes). released-home-schema.integration.test.ts loads it, seeds a
Team ask, a connected agent's delivered input and a main webhook, runs this branch's migrations,
and compares every relation, column (type, nullability, default), constraint, index, trigger,
function, view and ledger row with a fresh install. One difference is named: main's team_blobs
CHECK reads back from the dump with its ANDs flattened. With 0038's live key list and no 0110
retirement (S1 as found), the test fails.

The three 'from 0046' files now start from this fixture instead of this branch's copy of main's
migrations. A clone is emptied by setting its schema aside, not dropping it, so several such
files at once do not exhaust PostgreSQL's lock table.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Before the Host listens, a long update showed nothing on a Home that is not the desktop app.
Each pending migration now prints "Updating your Home's database: step n of m" as it starts;
Kysely has no such hook, so migrateToLatest wraps each pending migration's up. The desktop
ignores the line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s the reattach, not the tab

Seen in the menu-bar journey's home-stop (Nov 23, twice on Nov 24): Resume brought this Mac's
Runner back, the Home sent the person's tab its reattach on the new stream, and the rapid Stop
restarted the Runner as it went out. The send failed on the closing socket ('WebSocket is closed')
before the Home had taken in that stream's loss, so the reattach read it as a refusal: the
person's browser session failed, its viewer was closed (1011) and its redial refused for good
(4002, 'no longer attached'), and the live view never came back.

A send the stream cannot take while it is still the Runner's current stream now waits for that
stream's loss, which marks the restart before it rejects the stream's requests; the reattach then
waits for the next boot as for any restart inside its deadline. Its own timer bounds it, and a
request with no timer, or on a stream already gone, fails at once as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0044 now holds its own copies of runNewsAt and unreadTaskSql, identical to main's. outsideName
(0109, 0113), personNameFromEmail (the account service's 0022) and resourceRevisionsDdl (0038,
0110) stay shared, and migration-meaning-pins.test.ts records their outputs for a fixed table of
inputs, so a change to one fails a test that says to add a new migration instead.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… own code and a test that takes it to exactly a fresh install, the helpers migrations call are pinned, each migration says its step as it starts

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… a start's paint wait times out

The never-shown case came back in another check (two-casts-across-dialog, Nov 24): the person's
start waited 5 s for a new agent tab to paint while the agent's own cast of that page had frames,
and the paint retry a second later took its first frame at once. The page's paintEvidence() now
goes on the cast-paint-timeout line of the follow view's record, which every check's evidence
carries; the one check's own sampler goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…timing held

The window idle test slept 250 ms after a window action and then required the visit to be
shown, against a 400 ms limit: a runner that overslept by 150 ms failed it though the broker
was right (hosted run on 11c3f1f, native-mac passwords-tests). The check is now read on the
timer's own clock: an attempt the process overslept is taken again, never judged; an attempt
whose timing held and found the visit ended fails at once. Proven both ways: with the broker's
restart removed the test fails on its assertion; with a forced oversleep on the first attempt
it passes on the second.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…close, so a restart stays a restart

The menu-bar journey's home-stop again (11c3f1f, Nov 24 08:36): the double Stop's second
restart came as the Home was handling the Runner that had just come back, the Home's send failed
on the closing socket ('Runner connection failed while handling a Runner message: WebSocket is
closed'), and the failure path disconnected the Runner as lost before its close arrived with the
restart code. Its browser stream was then removed as 'primary-lost', the person's reattach took
that for an end, the session failed ('The computer's browser stream went away') and the live view
was never admitted again.

A failure on the Runner's socket, or on one of its module streams, while that socket is already
closing now leaves the end to the socket's close, whose code says whether it is restarting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… clock before any journey

The default Mac journeys at 11c3f1f showed macOS's 'com.apple.sshd-session is requesting to
bypass the system private window picker' in the guest, which took the active app in the middle of
chrome-background's typing row. The guest says why: replayd's ScreenCaptureApprovals.plist holds
one approval, for /usr/libexec/sshd-keygen-wrapper, last asked 2026-10-22 when the image was made,
with kScreenCapturePrivacyHintDate 2026-11-21 (that plus its 30-day policy); every guest whose
clock is past that asks again at the first capture a journey makes over SSH, and nobody answers.

A guest step before the suite now sets, for every program the image already approved, the last ask
to now and the next to now plus its own policy (what Allow records), and restarts replayd so it
reads them. It runs only in a VM, approves nothing new, and fails the job if it cannot write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entry, at the job's own revision

The VM runner on the host comes from another checkout, so a host-side step in test-vm.ts does not
run for a job of this revision (the default journeys at 55d25a6 never ran it). The guest's entry
to every Mac journey, test-macos-journeys.sh, runs at the job's revision before any journey: it
calls scripts/test-vm/screen-capture-approval.sh there, and test-vm.ts goes back as it was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…job, not as asked now

An approval stamped as asked now, read by a restarted replayd, still put the prompt up five
minutes later (probe 20261124T100819Z-d5e3ff6e): its rule is not the age of the last ask alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he far date

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hat the approval is renewed as of now

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…age answers it

The browser journey's follow view, 'The tab was never shown' (c187717 at 06:29, and at
1bb6985 with no system prompt in the guest): the person's start for an agent's new tab waited
five seconds for the page to paint and gave up. The page's own facts at that moment (paintEvidence,
recorded by the smoke): not mounted, its geometry applied at the current revision, no frame drawn
and none seen at any size. A page resting in its host for a cast has its content drawn already and
draws nothing new on its own; the paint subscription asked for a frame only of a view attached to
a visible window. It now asks whenever a paint wait subscribes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e taking the replacement lease

The lost-authority-session test took a replacement lease as soon as this side saw the
terminated session end. PostgreSQL releases a terminated backend's locks as that backend
exits, which can be later: on GitHub the replacement met 'Another Host process already owns
this Deployment database' (hosted run on 56dc786, integration 5). The test now waits for
the lock itself to be gone in pg_locks, then takes it. Proven on Linux with a forced late
release of 300 ms: the test as it was fails with that conflict, the new one passes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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