Commit Graph
3630 Commits
Author SHA1 Message Date
Jinjing 3beb5b58ae perf(orchestration): a paired server's pull loop checks only its own rows each pull (STA-15102) (#41834)
peerMailRelayWants ran every pull-loop iteration and rebuilt the global set of
servers (SELECT DISTINCT over every remote_run_links row, closed history
included, plus home conversations) to answer one boolean for one server.
It now asks about that server only, each an index seek on existing indexes.
2026-11-12 23:24:38 -08:00
OrcaWinandOrcaWin 1f4ab5b631 test: remove synthetic mailbox and admission pipeline cases (#41863)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 22:46:06 -08:00
OrcaWinandOrcaWin 9103a362db test: remove 13 low-value workspace teardown cases (#41851)
* test: prune teardown warning and mock projection cases

* test: prune redundant unstopped PTY projections

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 22:26:57 -08:00
OrcaWinandOrcaWin 1cd89abca4 test: remove five low-value runtime pipeline suites (#41844)
* test: remove runtime projection suites with low-value fixtures

* test: remove simulated mobile and worker observation pipelines

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 22:11:20 -08:00
Neil 98bcd7943a refactor: organize text generation around concrete owners (#41838)
* refactor: organize text-generation modules around concrete owners

* refactor: combine imports from the defining CLI command owner
2026-11-12 21:30:08 -08:00
Jinwoo Hong 479f564829 perf(orchestration): rank empty-check hint candidates in one pass over the Run (#41779)
* perf(orchestration): rank empty-check hint candidates in one pass over the Run

* perf(orchestration): take the oldest candidate without spreading arguments
2026-11-13 00:18:52 -05:00
Neil 2050d9fbc6 refactor: group source-control modules by operation ownership (#41812) 2026-11-12 20:41:35 -08:00
Neil 0f80eed95a perf(plugins): pause a plugin's automations in one batched write (#41787)
* perf(plugins): pause a plugin's automations in one batched write

* perf(plugins): limit the automation batch path to pause fields; test batch/single parity
2026-11-12 20:39:03 -08:00
OrcaWinandOrcaWin 57dbdf8713 test: remove narrow wakeup and worker output checks (#41807)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 20:21:00 -08:00
Kelvin Amoaba 6514abb90c feat(workspace-cleanup): keep workspaces with unsaved edits from a paired desktop (#41785)
* feat(workspace-cleanup): keep workspaces a paired client has unsaved edits in

* fix(workspace-cleanup): keep each window's unsaved-editor report and send them in order
2026-11-13 04:09:18 +00:00
Neil cc29ae4820 refactor: organize provider modules by defining owner (#41772)
* refactor: organize provider modules by defining owner

* refactor: bind cleanup runner to provider owners
2026-11-12 20:04:13 -08:00
OrcaWinandOrcaWin 96bad75a6d test: remove narrow release and migration checks (#41792)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 19:57:21 -08:00
OrcaWinandOrcaWin ddf4aa8d74 test: trim worker release checks and remove precheck suites (#41796)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 19:53:48 -08:00
Brennan Benson e4fdb8db89 Attribute Git demand and make setup path discovery asynchronous (#41325)
* Attribute Git demand and resolve setup paths asynchronously

* Check detached attribution without requiring an exact span envelope

* Keep invalid setup repository fixtures inside disposable directories

* Retire setup runner synchronous launch allowance

* test: type the canonical Git executor mock import
2026-11-12 19:36:24 -08:00
OrcaWinandOrcaWin 82f90d9f07 test: remove narrow marker and orchestration checks (#41782)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 19:33:10 -08:00
Jinjing 571d29adf4 fix(mobile): open a linked workspace root from a chat link (#36078) 2026-11-12 19:26:30 -08:00
Kelvin Amoaba 1449339903 feat(workspace-cleanup): run cleanup rules automatically in the background on each host (#41760)
* feat(workspace-cleanup): run cleanup rules in the background on the owning host

* fix(workspace-cleanup): keep workspaces whose own orca.yaml has an archive script
2026-11-13 03:10:49 +00:00
Kelvin Amoaba 0f395db435 feat(workspace-cleanup): classify released orchestration worker workspaces for cleanup (#41763)
A workspace a worker start created gets the 'orchestration-worker' reason once every dispatch on it released its terminal and its work landed in the default branch, a merged review or the coordinator's branch. Commits the coordinator's branch already holds no longer count as unpushed.
2026-11-13 02:51:19 +00:00
OrcaWinandOrcaWin 86313a0f87 test: prune fleet variants and scoped automation fixture (#41759)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 18:41:49 -08:00
OrcaWinandOrcaWin 309975de24 test: remove low-value lifecycle, follow-up, and cache cases (#41755)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 18:28:24 -08:00
OrcaWinandOrcaWin 7b73a633cf test: remove repetitive federation and onboarding policy cases (#41748)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 18:02:23 -08:00
OrcaWinandOrcaWin 5bee67a03b test: remove crew cost probes and unproved waiter coverage (#41743)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 17:55:45 -08:00
Neil 69dc20ed33 refactor(automations): group run lifecycle modules by ownership (#41737) 2026-11-12 17:44:20 -08:00
OrcaWinandOrcaWin 7c167e12a8 test: remove low-value stress and draft-mirror suites (#41733)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 17:36:04 -08:00
Neil aa03cfb7c7 refactor: organize worker and federation lifecycle owners (#41716) 2026-11-12 17:00:29 -08:00
Neil f9c7d17f9d refactor: organize sidebar inputs by concrete owners (#41698) 2026-11-12 16:24:24 -08:00
Brennan Benson 912a723f6c Give terminal agents a lasting Agent ID with Copy Agent ID (#41286)
* Give terminal agents a lasting Orca Agent ID

Terminal agents now get an Orca ID (orca_session_id:<agent>_<uuid>) derived
from their own conversation id on the host that runs them, so it stays the
same across worktree sleep/wake, app restart and a hand-run resume in any
pane. The terminal pane menu gets Copy Agent ID beside Copy Session ID, and
worktree ps --json agent rows carry orcaSessionId. Messaging a terminal
agent by that ID is refused with a message naming its pane until terminal
delivery lands.

* Name terminal agents at row admission and fix review round 1

- Perf: a row's Agent ID is resolved once, when its provider key changes at
  admission (legacy rows via the status adapter's prepareRow hook, tmux rows at
  canonical commit) and carried on the row as runtime-only agentIdentity.
  Snapshots, publications and internal notifications only copy it; no key
  serialization, cache lookup or database access per walk. Drops the pane FIFO
  cache.
- Refusal: the identity service keeps a reverse index id -> rows, kept exact by
  the adapter's rowChanged hook; a terminal refusal reads only matching panes
  and names only confirmed running ones (no resume seeds, exited or
  unconfirmed restored rows).
- Retry: a read-only identity file is lookup-only and never mints; any store
  failure backs off all SQLite work for 30 s; a Copy click retries once.
- Menu: Copy Agent ID shows for a live pane only when its host stamped an ID,
  and for a sleeping pane only when this app owns it on macOS/Linux.
- SSH: a sleeping record keeps its connection; a foreign (non-WSL) one resolves
  no ID.
- Renderer keeps an existing ID only for the same agent, owner and provider key
  including the Pi transcript locator.
- tmux-selected terminal rows carry their ID at every snapshot seam and in Copy
  resolution; structured chat rows stay excluded.

* Keep Agent ID work out of notifications and reach Copy wherever a host can answer

- Internal status/provider notifications walk rows without Agent ID work:
  canonical (tmux-selected) rows are decorated only for outputs that carry
  the id (snapshots, live emit, ps, Copy). The tmux publish body is now
  publishTmuxSelectedStatus so tests drive the production path.
- A row this host can name but has not yet (failed or pending link) is
  published with orcaSessionId: null; older hosts omit the field. The
  renderer offers Copy Agent ID on a live row whenever the field is present,
  and the click retries through terminal.agentId.
- Hosts advertise terminal.agent-id.v1. A sleeping pane offers Copy Agent ID
  when its owner is this app on macOS/Linux, or a remote owner that advertises
  the capability on a known non-Windows platform, and its record names no
  foreign connection.
- "Running in pane" places require that this runtime observed the row; a
  saved status, Done included, is history.

* Guard the pane menu subscription and stop offering Copy where it can never succeed

- A settled read-only miss (no link in a newer build's identity file) no
  longer publishes orcaSessionId; only a resolved id or a pending failed link
  does, so Copy Agent ID is offered only where a click can succeed.
- Render contract for the per-pane menu selection: another pane's or host's
  status change re-renders no unaffected pane; a pane's own stamp flips its
  availability.

* Move terminal agent identity SQL into a worker thread

Main's blocking-SQLite ratchet forbids the synchronous identity store, so
(per the decider ruling) agent-identities.db is now owned by one lazy
worker-thread entry per hook-server owner, desktop and orcad alike.

- The schema, open/version handling, mint/link transaction and read-only
  behaviour move unchanged into agent-identity-worker-entry.ts; main keeps
  only the key type, path and an async client over WorkerThreadRequestQueue.
- Admission stays synchronous: a new key is published pending (null), one
  request per exact key is shared by every row and click, and the committed
  answer re-stamps the current rows still pending on that key (legacy and
  tmux-selected) as identity-only replays. Replies are fenced by store
  generation, key and current subscription; failures back off 30 s and a
  Copy click retries once.
- terminal.agentId and the terminal-ID refusal are async: Copy waits for the
  pending lookup and revalidates the pane; send/task routing resolves the
  terminal recipient (awaiting the store's has() on an index miss) before
  any synchronous routing or effects.
- The renderer treats the host's row naming a conversation as authoritative
  for its id, so a settled miss clears a pending null, while ID-less local
  updates keep it.
- Packaged for desktop and orcad; registered as a worker entry, no baseline
  growth.

* Own identity demand per key, publish settled ids as projections, recheck authority

Implements the second decider ruling for the identity worker:

- One owner-level demand table replaces the per-key promise backlog and the
  settled-row scan: each exact key a current row or caller needs has one
  record (identity, places, waiters); the pump sends the worker one operation
  at a time, only for keys still needed, so a healthy burst completes and
  detached keys are never sent. Operation deadlines start at dispatch; a
  caller's wait expiring never drops a row's demand.
- One failure gate for lookups and membership: after a failure nothing is
  sent for 30 s except one coalesced Copy attempt; a single owner wake
  retries while rows still wait, and cancels with the last demand or close.
- The retirement barrier outlives a client: a replaced worker must exit
  before another starts; a different store path is a different authority.
- Settlement re-stamps the stored row and publishes a projection only: window
  readers get the row without its hook event (no agent-state record) and
  session.tabs is woken by a row touch; no enriched subscriber, plugin event
  or freshness heartbeat runs again.
- Copy and terminal membership check the owner generation after their waits.
  A known chat is decided by the chat store alone; send, peer mail, reply and
  assignee admission resolve the terminal recipient before reading the facts
  they act on, recheck the sender after the wait, and group send reselects
  its audience and mailboxes after each wait before writing.

* Scope identity answers to their store authority, expire Copy grants with callers, index provider aliases

- One synchronized authority token before Copy/reverse fast paths, compared after their awaits;
  answers carry their authority and an ended store turns rows, tmux subjects and the reverse
  index pending together. Status path changes sync the authority outside admission.
- A failed operation reschedules the pump so a queued click gets its attempt; grants belong to
  live waiters and a click joining a running attempt earns none.
- Provider-native ids resolve through a commit-maintained alias index at the record store.
- Group fan-out no longer classifies authoritative candidates; @idle rereads statuses with
  current candidates before the final synchronous selection.
- Hook-server unit fixtures use an in-memory identity client; a real worker load/stop failure
  check covers the worker boundary.

* Pick a shared provider alias's owner among its owners only

The alias index keeps the store's listing order (readable, then unreadable) as derived ranks, updated from the draft's appended keys on commit, so a duplicate alias no longer walks the history per lookup.

* Ask a remote pane's host for its Agent ID by the host's own pane key

Copy Agent ID on a web-terminal surface sent the client's mirrored pane key, which the execution host does not know, so it answered null.

* Keep focus where the user moved, recover a missed identity re-stamp, ack peer-mail replays first

Copy Agent ID refocuses its pane only when focus is unclaimed or still in the pane; a carried pending row takes its key's settled answer; an already-delivered peer-mail retry is acknowledged before recipient preparation.
2026-11-12 16:18:16 -08:00
Kelvin Amoaba c702d7e20c feat(native-chat): run Kimi Code in Chat over its ACP server (#41661)
* feat(native-chat): run Kimi Code in Chat over its ACP server

Kimi chats launch `kimi acp` with Kimi's own sign-in and KIMI_CODE_HOME.
Orca sets Kimi's own permission mode at every start: Ask is Kimi's
default, Approve for me is its Ask When Needed mode, and Full access is
its Never Ask mode. Without that, a default_permission_mode in Kimi's
config.toml would apply while the session reports default.

A Kimi dialect reads Bash results as output and exit code, drops the
streamed arguments a running call shows as text, names the command or
path on approval cards, and takes questions as forms so every question
reaches the chat.

* fix(native-chat): import Kimi session history helpers from their new home
2026-11-12 23:31:05 +00:00
Neil 5859a505e0 refactor: organize terminal topology by persistence owner (#41690) 2026-11-12 15:22:50 -08:00
Brennan Benson 91b3f12f03 perf(git): reuse branch snapshots across searches (#41558)
* perf(git): share branch snapshots across repository searches

* fix(git): read branch occupancy and current checkout live

* Preserve branch occupancy and unborn checkout parity

* Keep native searches for clients without qualified refs

* fix(git): preserve compiled branch option caching

* fix(git): derive selected source labels from branch identity

* test(git): resolve selected source fixture import

* fix(git): keep branch default menu translations reactive

* test(git): type mobile branch row mock parameters

* fix(git): keep branch metadata expiry bounded during streaming
2026-11-12 15:12:55 -08:00
Kelvin Amoaba ee99d584d9 feat(dictation): optional AI cleanup of dictated text, with a correction word (#41497)
* feat(dictation): optional AI cleanup of dictated text, with a correction word

Off by default. When on, a dictation's text goes through the user's agent
CLI (the AI text actions' runner, Haiku by default for Claude) before it
lands: the pill says "Cleaning up…" and the text is inserted once. Failure
or a 10 s timeout inserts it as heard with a warning; the pill's X skips
cleanup. A consent dialog asks before text first goes to an agent. The
correction word ("scratch that") survives filler removal for cleanup to act
on. The microphone test gets "Try cleanup", and phone dictation the computer
transcribes is cleaned on the host.

* fix(dictation): keep finals that arrive during cleanup and tighten cleanup edges
2026-11-12 22:59:25 +00:00
Brennan Benson 810d82d3e9 Keep Codex messages queued until their settings can be applied (#41476)
* Preserve queued Codex input through turn admission

* Correct admission regression assertions

* Establish accepted input in queued send receipt regression

* Preserve sparse and legacy Codex input intent across writes

* Narrow legacy option regression input type

* Use native Fast label in legacy tier regression fixture

* Assert goal settings eligibility through observable refusal outcomes

* Establish real input eligibility in queue lifecycle fixtures

* test(chat): establish pending mail handover boundaries

* test(chat): isolate stale mail cleanup at deletion boundary

* Keep successful turn mode and settings reply ownership current

* test: narrow queued mode regression input
2026-11-12 14:52:16 -08:00
Kelvin Amoaba c679989e6d fix(native-chat): continue a usage-limited chat on the account you switch to (#41665)
* fix(native-chat): let a chat continue on the account you switch to after a usage limit

A usage-limit reset belongs to the account that hit it. After a switch the
host kept holding the chat until the old account's reset, and desktop and
phone hid Continue until then, so Switch Account on the card did nothing.
The host now releases the hold once the chat would start on another
account, letting only that account's own reading hold it, and publishes the
earlier continue time that both clients read.

* fix(native-chat): save the account a usage limit hit, per cut

The fallback to the chat's founding account could report a switch that
never happened for a chat that had already moved, releasing it before the
new account's reset. Save the cut's account while the child that ran it is
live, use only that, and key the switch time by the cut it belongs to.

* fix(native-chat): record the account each chat runtime launched on

record.accountHome names only the founding account, so after a switch
nothing said which account a usage limit hit. Owner proof now records the
account each runtime fence launched under, every host cut carries its
turn's fence, and the hold reads the cut's account from that pair. This
replaces the sweep's saved copy, which a fast child exit could miss.

Spending the new account showed before a switch now holds the chat until
its own reset; only a reading taken after the switch releases it.

* fix(native-chat): restart the switch time when the chat moves to yet another account

A second switch for the same cut kept the first switch's time, so a reading
of the newer account taken before it was chosen could release the chat.
2026-11-12 22:49:22 +00:00
Neil d634063ef2 refactor: organize mobile cloud relay by lifecycle owner (#41681) 2026-11-12 14:36:07 -08:00
Brennan Benson 8b2caa497c test(terminal): isolate live zsh hook command lookup (#41678) 2026-11-12 14:24:53 -08:00
Brennan Bensonandliaoxingyu 3586fdc055 fix(terminal): capture replay snapshots at one output position (#41247)
Capture the terminal screen, output position and unfinished parser state together on the existing output queue so restored output continues at the correct byte. Retire reconstructed partial escape state on Reset.

Tracked in #34435 and STA-12466.

Co-authored-by: liaoxingyu <3114147163@qq.com>
2026-11-12 14:18:24 -08:00
Neil cab3a67382 refactor(orcad): organize runtime, launch, and host lifecycle owners (#41659) 2026-11-12 13:54:51 -08:00
Jinjing d373f9ba38 fix(skills): stop calling another Orca build's skill copy out of date (#40706)
* fix(skills): stop calling another Orca build's skill copy out of date

Every Orca build on a host (the installed app, dev builds, the CLI, a paired
server) shares one skills folder, and each one auto-updates it to the text it
ships. A build only recognises SKILL.md text from itself or older releases, so
a copy a newer build (or a dev build) wrote looked like a user edit: the
nudge said "An installed Orca skill is out of date" and Update offered to
replace it with older text.

Whenever Orca writes a skill it now leaves a marker,
~/.agents/.orca-skill-digests/<skill>/<sha256>, on the disk of the host that
plans. A copy whose bytes match a marker plans as leave 'other-build': it
reads as current, is never nudged, and silent update leaves it alone. A user
edit changes the bytes, so it is still asked about. A paired server plans and
records on its own disk, so the client never compares hosts.

* fix(skills): mark copies already at this build's digest so other builds see them as Orca's

A copy that already equals this build's bundle plans keep-only, so no write
ever recorded its marker, and copies written before the marker existed stayed
'edited' to any other build. Executing a plan now records the marker whenever
a location holds this build's bytes, and the silent update records it for
keep-only entries. The startup scan asks the host (this machine or a paired
server) once per session to run that keep-only update, so an already-current
build marks its copy on its first run. Preview stays read-only.

* chore(skills): drop unreachable other-build setup copy and document touched planners

'other-build' leaves are always replaceable, so the non-replaceable setup
attention lookup never selects one; it now shares the generic fallback and its
dedicated string is removed. Add short docstrings to the touched planning,
execution and copy functions.

* fix(skills): retry the startup marker when the host did not record it

A marking-only call kept its session mark even when the host never ran the
recording, so a failed or busy call left the copy unmarked for the rest of the
session. Release the mark when the call rejects, another update held the
target, or the host reports the skill busy or changed, so the next plan
refresh asks again. A host without silent update keeps its mark, avoiding a
call per scan.

* fix(skills): include Codex session's P2 fixes; warn only when a marker call may have written

Includes two P2 review fixes from a Codex session in this worktree:
- A newly selected agent links to a recognized other-build shared copy
  instead of being left as shared-not-current, and execution re-checks that
  shared copy so the dependent link is skipped if it changed after planning.
- Installed-skill views refresh after every silent-update call, since a
  marking-only call re-plans on the host and can still update a copy.

A rejected marking-only call now shows the uncertain-outcome warning only
when the request reached a paired host and its reply was lost. A refusal
before sending, or the host's own error reply, cannot hide a write: the mark
is released for retry without a warning. Calls that started real updates
keep warning on any rejection. Restores the docstrings removed in that
session.

* fix(skills): stop retrying a failed skill marker on every plan refresh

Every marker call ends in a plan refresh, and a refresh re-scans. Freeing
the mark after a busy or failed call made each refresh ask again, so a host
that stayed busy or unreachable looped without end. Ask once per target,
skill and bytes per session; a later session, a manual update or any write
of the skill records the marker instead.

* fix(skills): recognise another build's copy under a skill's former name

A build from before a rename records its marker under the former name.
Check that marker for former-name copies too, so a renamed build no longer
calls such a copy edited and nudges about it. A user edit, a cloud receipt
or extra files still keep the copy as it was.

* fix(skills): warn about any failed skill update that may have reached the host

A paired host's timeout or lost reply also arrives as an RPC error, so an
RPC error is no proof that nothing was written. Only a refusal before
sending now stays quiet.

* fix(skills): send a silent skill update only to the host that was checked

Pin the update to the runtime and pairing that answered the capability
check, so a re-pair while the check awaits cannot send it to another host.

* fix(skills): record markers without updating, and never offer to replace another build's copy

A marker call now asks the host to record copies already at its bytes and
nothing else, so it can never write a skill and needs no warning or
re-plan; hosts that predate it reject the request and write nothing. It
is sent only in a scan that starts no update.

Another build's copy is no longer offered for Replace, which could
downgrade it, and its dialog line reads "Kept: written by another Orca
version".

* fix(skills): keep other-build setup current across host pairings

* fix(skills): preserve other-build prerequisites during migration
2026-11-12 13:41:55 -08:00
Brennan Benson 0664f1c9bb fix: hide deleted workspaces while background cleanup finishes (#41483)
* Retire workspaces after durable removal acceptance

* Refuse plugin fallback into retiring workspaces

* Complete plugin workspace test fixture identity

* Restore removal helper bindings and complete test doubles

* Configure durable removal storage in runtime test fixtures

* Initialize durable removal fixtures before exercising cleanup

* Preserve descendants and explicit parent choices during removal

* Guard cached lineage traversal against catalog rescans

* Explain cleanup ownership before workspace name fallbacks

* Match automatic branch handling for empty overrides

* Use valid optional removal facts in traversal fixtures
2026-11-12 13:32:43 -08:00
Neil c3f8f4100c refactor(native-chat): organize launch, transcript, and conversation owners (#41643) 2026-11-12 12:45:03 -08:00
Neil e1d4314a46 refactor(window): organize clipboard, lifecycle, security, and relay owners (#41634)
* refactor(window): group clipboard, lifecycle, security, and relay owners

* refactor(window): keep Electron paste handling with desktop clipboard
2026-11-12 11:47:00 -08:00
Brennan BensonandNeil b3f8a5ac8d Deliver browser recovery completion to the clients that need it (#41489)
* Deliver client browser reconciliation completion to observed workspaces

* Supply the workspace snapshot in empty adoption coverage

* Skip recovery completion output after its recipient unsubscribes

* Check activity work in the departed recipient regression

* Select accepting session listeners before recovery delivery

* Preserve scoped removal and recovery clearing delivery

* Specify reconciliation listener selection type directly

* Use inherited reconciliation listener selection contract

* Type reconciliation observations by their actual owners

* Update recovery test row-order import after main integration

* fix(tests): import GitHub image capability from its owner (#41625)

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-11-12 11:37:12 -08:00
OrcaWinandOrcaWin 50e702d51f test: retire scanner, runtime status, and chat windowing suites (#41621)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 10:43:51 -08:00
Brennan BensonandClaude Opus 5.5 5d34b135ab perf(worktrees): one owner for each repository's worktree list (#41480)
* perf(worktrees): give each repository's worktree list one owner

The sidebar and the runtime catalog each kept their own copy of a
repository's `git worktree list` result and their own staleness rule, so
the same change was often listed twice. One owner per repository, host
and Git runtime now holds the observation, its flight and invalidation;
each reader keeps its accepted age (sidebar 5 s, runtime 30 s plus the
admin-file verifier up to the 5-minute ceiling) and shares the scan.

Settled rows now go stale on Git-level mutations too, overtaken readers
follow one trailing scan, store hygiene uses the facts captured before
the scan that produced the rows (once per observation), and a cooled-
down watcher failure defers its catalog refresh instead of dropping it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(worktrees): fence the catalog owner by runtime, single flight and hygiene claims

Sidebar reads age from scan start, so runtime verifications no longer
stretch them; probes only certify rows fingerprinted before their scan.
One flight per owner, with a single trailing scan after invalidation.
Switching a repo's Git runtime retires the old owner, and a reader whose
owner was retired mid-read returns non-authoritative rows. Only pruning
readers claim hygiene, failed scans keep the evidence gate's no-retry
claim, overflow invalidates at once, and the stopped-distro fallback
serves only current rows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(worktrees): let only the live route own a repository's catalog

The catalog owner now asks the live registration which path and Git
runtime are current instead of trusting whichever request arrives last.
A request admitted for a replaced route runs no Git, retires nothing and
answers non-authoritatively; liveness is rechecked before a flight
starts and when it publishes. Route-changing writes retire obsolete
owners after they land. Adapters re-resolve the route after the WSL
admission check, a mismatching verification probe becomes the rescan's
fingerprint, and runtime scans share the strict true-empty-aware reader.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(worktrees): bound live-route checks and recheck authority before pruning

Live-route checks read the repo registry once per synchronous pass
instead of hydrating every repo per check. WSL discovery answers that
change a repo's Git route retire obsolete owners like other route
writes, and desktop and headless pruning recheck the owner's authority
for the observation after their own awaits.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(worktrees): revision the live-route snapshot and carry owner authority to publication

Route checks use one registry and project pass per route-input revision,
which repo, project-membership and runtime-setting writes advance
synchronously; WSL discovery answers retire obsolete owners at once.
Repair-state and SSH routes never acquire local Git authority. Metadata
pruning rechecks owner authority after its path probes, fleet lineage
claims require a current observation, and final desktop and runtime
listings stay non-authoritative once the owner has retired their route.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(worktrees): keep remote-owned repos out of local Git routes

Registrations owned by another host never get a local Git route, WSL
discovery notifies after the distro list is written and isolates its
listeners, and tests cover idle retirement on route-input and discovery
changes plus pruning that loses owner authority mid-helper.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(worktrees): cover catalog route authority at its production seams

Real repo-removal writer revokes the route at once, and desktop and
runtime listings never publish owner rows as authoritative after their
route was retired.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(worktrees): prove catalog authority at the pruning helper and Git conversion writer

The runtime listing loses route authority during its own metadata prune
and stays non-authoritative; a real held path probe deletes nothing once
the owner retires the route; a folder converted to Git is admitted as a
live route as soon as the write lands.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(worktrees): keep strict true-empty listing behind the mockable lister

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(worktrees): start each worktree.ps case from an unobserved catalog owner

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* build(typecheck): list the WSL discovery change module in the web project

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(worktrees): withdraw catalog authority from a replaced observation

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 10:32:22 -08:00
Neil 7fea1779d0 refactor(startup): group launch and platform startup owners (#41613)
* refactor(startup): group launch and platform startup owners

* refactor(startup): preserve ACL recovery copy protection
2026-11-12 10:15:54 -08:00
OrcaWinandOrcaWin a1034d5bd8 test: retire mobile presence and native-chat fixture suites (#41617)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 10:02:51 -08:00
Neil fb8d6f950b refactor(github): organize concrete feature owners (#41601) 2026-11-12 09:17:26 -08:00
OrcaWinandOrcaWin 7106c8657d test: remove low-value edit, display, and PTY suites (#41606)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 09:03:19 -08:00
OrcaWinandOrcaWin f7782fae0f test: remove low-value process, recovery, and UI cases (#41600)
* test: remove narrow icon, hydration, and composition cases

* test: remove low-value process, recovery, and UI cases

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 08:47:20 -08:00
Neil 560a22e00f refactor(cli): organize command dispatch and orchestration owners (#41562)
* refactor(cli): organize command dispatch and orchestration owners

* test(orchestration): retire superseded unbound mail refusal case
2026-11-12 08:12:55 -08:00