Skip to content

[upstream #11147] fix(git): use workspace agent for first-work branch rename - #107

Open
innocarpe wants to merge 10000 commits into
mainfrom
fix/branch-rename-selected-agent
Open

innocarpe wants to merge 10000 commits into
mainfrom
fix/branch-rename-selected-agent

Conversation

@innocarpe

Copy link
Copy Markdown
Owner

Portfolio mirror of my contribution to upstream stablyai/orca.
Exhibition only — the real review/merge target is upstream.

Upstream

Summary

Description First-work auto branch rename prefers the workspace/selected agent (hook agentType) over the global Source Control AI default, so rename no longer fails against a default agent without remaining usage. ## Focused fix - In scope: preferred-agent override for `bra

Note

  • Do not merge this into innocarpe/orca main until the upstream PR is merged.
  • After upstream merges: sync fork from upstream, then close this mirror PR.
  • This open PR exists so visitors see in-flight work on this fork's Pull requests tab.

@innocarpe
innocarpe force-pushed the fix/branch-rename-selected-agent branch 2 times, most recently from 691db80 to 8ec042c Compare November 2, 2026 08:56
OrcaWin and others added 28 commits November 9, 2026 01:22
…er for long cloud dictations (stablyai#40238)

* fix(dictation): wait as long as the host's cloud deadline when a paired phone or browser stops

* fix(dictation): compute the host's cloud deadline from its exact sample count
…stablyai#40095)

* fix(terminal): end a dead preserved terminal host's PTYs as host loss

After an update Orca keeps the previous version's terminal host so agents
survive. That host has no respawn, so when it later died nothing ended its
PTYs: panes stayed connected on a frozen frame and input went nowhere.

Once every reconnect attempt finds its endpoint refused or missing, each of
its PTYs now ends as host loss with history kept, and the pane's restore is
no longer refused because the dead host cannot answer.

Fixes stablyai#38432

* fix(terminal): require process-exit proof on POSIX and keep checking until proven

Review follow-ups: an unproven attempt restarts the count instead of ending
the check; on POSIX the old host's pid must also be gone; a proven-gone host
answers 'not live' for every id; one throwing exit listener cannot strand
the remaining sessions.
…copy (stablyai#40266)

* fix(dictation): don't throw when the paired web client has no speech catalog

* feat(i18n): translate the dictation pill, error pill and queued-send copy

* fix(i18n): say Chinese queued sends happen automatically
…ablyai#40280)

* feat(release): publish a server-only Linux tarball for orca serve

Each release now also uploads orca-server-linux-x64.tar.gz and
orca-server-linux-arm64.tar.gz (orcad slot from the qualified template, the
pinned Node, and an orca-ide launcher) plus orca-server-sha256sums.txt, so a
Linux host can run orca serve without the desktop package.

The tarballs are packed and smoke-tested (serve --recipe-json, then pair a
second profile) on both architectures, including bare ubuntu:24.04 and
debian:12-slim containers. Upload runs only after the release is published
and nothing depends on it, so it cannot hold the desktop release.

* fix(release): keep the server tarball's launcher env out of its terminals; skip refs that predate it

- The launcher runs the CLI with ELECTRON_RUN_AS_NODE=1, as the packaged app does, and the CLI strips it
  before starting orcad; ORCA_APP_EXECUTABLE and ORCA_SERVE_RUNTIME are cleared.
- Ship Node's LICENSE beside the runtime.
- Skip packing on release refs that predate the scripts, and upload only when both tarballs passed.
- Run the PR smoke when the CLI's serve-runtime selection changes; document service install.
…#40230)

* refactor: group renderer workspace ownership and navigation

* refactor: use the defining WSL rewrite store identifier

* refactor: route new upstream consumers to workspace owners

* refactor: consolidate connection owner test imports

* refactor: preserve upstream review-owner test retirement
… restart (stablyai#11762) (stablyai#40275)

* test(vm): pin file saves in a recipe-created Orca server workspace (stablyai#11762)

* test(vm): wait for the save round trip, let the app reconnect itself, edit a plain-text file

* test(vm): say why the recipe save spec needs a longer timeout
…pshots (stablyai#40288)

Host session-tab snapshots rebuild native chat tabs without the
client-owned focus visit, so Cmd+J recents ranked chats last and showed
their creation time.

Fixes stablyai#39841
…ai#40073)

The sticky External Ports header used hover:bg-accent/50, a translucent
background that let scrolled port rows show through on hover. Blend the
accent into the popover color so the hover state stays opaque.

Fixes stablyai#40056
stablyai#39976)

The native chat split action required the source agent-session tab to carry
a TUI agent tag, so sessions without one (e.g. untagged or non-TUI agents)
could not be split and the tour's split step stalled. Any agent-session tab
in a known group is now a valid split source.

Co-authored-by: Neil <[email protected]>
…tablyai#39845)

The composer refuses focus while an overlay is open, and the selection
popover was still open when the quote was appended. Close it first.
…tablyai#40082)

The plain-shell readiness test polled with vi.waitFor (1s default budget)
for reconcileConfig and the spawn env. Under CPU load the spawn takes over
a second and the test failed with 'expected undefined to be defined'.

Await an explicit reconcile-started signal and the spawn itself, and move
cleanup to onTestFinished so the gate is released and spies/env restored
even when a regressed spawn blocks until the test timeout.

Fixes stablyai#40078

Co-authored-by: Jerry Wu <[email protected]>
…ns; log how the daemon exited (stablyai#40289)

* fix(terminal): don't restart every dead saved tab when a worktree opens; log how the daemon exited

Opening a worktree mounted every saved terminal tab that had no PTY, and each
hidden mount started a fresh shell or agent. With many finished agent tabs this
started dozens of agents at once and could exhaust a host's process limit.

Saved tabs with no PTY anywhere and nothing queued to start now wait until
they are shown; the existing capped idle warm-up still admits up to four.
The main process now records the daemon's exit code or signal and names it in
the respawn log line.

Fixes stablyai#39166

* fix(daemon): forget a predecessor's exit when a replacement daemon launches
…ff View setting (stablyai#40256)

* fix(diff): persist inline / side-by-side diff view via the Default Diff View setting

The file diff and combined diff toolbars toggled inline vs side-by-side only
in local component state (plus a session-only module preference for the
combined diff), so switching worktrees or agent threads reopened the diff in
the saved inline default.

The toggle now writes the existing diffDefaultView setting, and both viewers
derive sideBySide directly from it. The per-view cache and module memory no
longer carry a separate sideBySide value.

Fixes stablyai#40241

Co-authored-by: Wooseong Kim <[email protected]>

* test(diff): drop the removed sideBySide field from the cached combined-diff view

---------

Co-authored-by: Neil <[email protected]>
…inal (stablyai#40147)

When a dashboard card has no live PTY (e.g. chat-session tabs), the agent
dialog previously showed only the "preview unavailable" notice. It now also
renders the card's stored last user/agent messages, unclamped and scrollable,
below the notice. The rendering is extracted into AgentCardLastMessages and
shared with the kanban card, which keeps its line clamps.

Fixes stablyai#40144

Co-authored-by: Neil <[email protected]>
…refix (stablyai#40064)

Claude echoes "Set model to Opus 5.5" without the "Claude" vendor prefix,
and never echoes the picker-only " alias" suffix or a raw "claude-" id
prefix. The confirmation observer required every picker-label token, so a
successful switch resolved to unknown and showed "Could not verify the
model change". Normalize the expected label before matching; context
tokens such as 1M are still required.

Fixes stablyai#40058

Co-authored-by: Neil <[email protected]>
Link underlines in Native Chat, the markdown preview and the rich markdown
editor sat 2px below the baseline, so descenders (g, y, p, j) crossed them and
skip-ink broke the line into dashes. Use a 0.25em offset that scales with font
size and zoom, and override the shared renderer's underline-offset-2 in Native
Chat.

Fixes stablyai#40217

Co-authored-by: Neil <[email protected]>
… popover (stablyai#39917)

Claude reports deferred categories (MCP tools, system tools loaded on
demand) that sit outside the used total, but summarizeContextUsage
dropped the flag, so the popover listed them as window percentages next
to real usage and the rows summed to well over 100%.

Keep the deferred flag on each summary row and render deferred rows in
their own group under a divider, with token counts instead of a share of
the window and a note that they are not counted in the used total.

Fixes stablyai#39878

Co-authored-by: Neil <[email protected]>
OrcaWin and others added 26 commits November 9, 2026 20:24
* fix: clarify account usage reset display

* fix: address account usage accessibility review

* fix: localize account reset duration units
…d only (iOS rejects them with a red screen in development) (stablyai#40615)
…ces (stablyai#40606)

* feat(cmd-j): add an extra-results seam for non-workspace palette sources

Sources register through usePaletteExtraSources (empty here, so the palette is
unchanged). Each supplies a section label, rows ranked with the shared match
engine, an empty-query cap, a tie preference, and a placement hint relative
to Workspaces. A source may also hide workspaces it represents from the
Workspaces list while their tabs stay in Open Tabs and recents.

* fix(cmd-j): make extra-result rows keyboard-selectable

Selection skipped the new row type, so Enter could not reach a leading
extra row.

* fix(cmd-j): count extra-result rows in the announced result count

The live region counted only the built-in result kinds, so a query that
matched only extra rows announced zero results.
A search box finds agents and files; / moves into it from the list. The list keeps the default agent, Terminal, Browser, Markdown and Mobile emulator.
… folders (stablyai#40624)

* refactor(orchestration): isolate the legacy remote-attachment code behind one entry per side

Move today's remote-attachment (federation) code, unchanged, into
orchestration/legacy-remote/ (worker server) and
orchestration/legacy-remote-home/ (Run home). Code outside each folder
imports it only through legacy-remote.ts / legacy-remote-home.ts; a test
pins that. No behaviour change.

* refactor(orchestration): keep the legacy entry modules out of import cycles

The DB layer reaches each legacy folder through a DB-only module, and the
federation method arrays are spread where they were before, so no module
loads differently from main when imported first.

* test(orchestration): only the DB layer may use the legacy DB-only modules

* refactor(orchestration): let the two legacy folders import each other directly

They are one frozen unit; going through the other folder's entry module
made the Run-home half load the whole worker-server half.

* refactor(orchestration): import the pinned-server lookup from its legacy sibling

* refactor(orchestration): remove the import cycles the Run-home entry module created

Keep the pinned-server lookup at its original path (shared worker code calls it)
and let the worker list import the fleet snapshot directly; import/no-cycle is
clean again.
…e item follows (stablyai#40639)

The copy / fork / scroll-up row hung 20px into the gap below it in every case, so an
agent's card, a notice, a tool run or the turn's own diff rollup and PR card sat flush
under it. Decide once per slot whether the actions may hang: only when the row draws
nothing after its message and what follows is the person's own bubble or nothing.
Otherwise they keep their own height and the row's estimate is charged for it.
… states in their own rows (stablyai#40652)

* feat(settings): group Voice settings like the other panes and fold the setup card into its rows

The setup card is gone. Its switch is the first row (Dictation), and its
messages move to the rows they are about: download progress and updates in
the model list, a missing microphone under Input. The model list is a table
with a one-line description per model, a plain quality word and equal-width
buttons aligned to the card edge.

* fix(settings): keep the delete button's hover reveal off the Button itself

* fix(settings): line up the Voice model table and make the language and repo-hint rows read plainly

* fix(settings): wait for the catalog before the Dictation status, and open the tab that shows the recommended model

* refactor(settings): share the Voice download check, order keep-loaded choices at the source, count model languages from the catalog
…tablyai#40486)

* fix: retain prepared checkout cleanup ownership after timeout

* test: retain capacity for unregistered preparation leftovers

* fix: keep expired cleanup admission outside retry budget

* fix: verify original preparation registration before removal

* Retain preparation authority through bounded capacity recovery

* Exercise preparation cleanup failures through real filesystem fixtures

* Inject root mkdir failure without obstructing checkout absence proof

* Match the host filesystem path in preparation failure coverage

* Align preparation fixtures with physical cleanup ownership

* Await owned recovery in the fleet cleanup control

* Release abandoned preparation cleanup maintenance leases

* Match cleanup test identity paths on Windows

* Wait for completed preparation disposal in maintenance regression

* Await final cleanup state in maintenance controls
…tablyai#40643)

* refactor(mobile): finish concrete owner and test placement cleanup

* test(mobile): finish whole-case policy cleanup after review
…6143)

* fix(i18n): update permission and mobile task translations

* fix(i18n): retain community Portuguese pagination copy

Adopt the matching translations from stablyai#39124, also carried by stablyai#40456.

Co-authored-by: marlico77 <[email protected]>

---------

Co-authored-by: marlico77 <[email protected]>
openHttpLink, openOwnedHttpLink and openAppHttpLink now return whether
the link opened in Orca's browser, the system browser, or nowhere.
Callers that ignore the value are unchanged. The modifier routing
helper moves to its own module to keep the router under the line cap.
* fix(i18n): correct recent translation drift

* fix(i18n): refine recent localized messages

* fix(i18n): translate WSL host status

* fix(i18n): include WSL status in runtime catalog

* fix(i18n): clarify saved draft timestamp
…tablyai#40331)

* perf(native-chat): project structured chat tabs per workspace bucket

The shared chat-tab list was keyed on the whole unifiedTabsByWorktree
identity, so every tab write anywhere (terminal title batches included)
rescanned all tabs and handed every consumer a new list. Rebuild only the
buckets whose identity changed and return the previous list while no chat
tab changed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* perf(native-chat): reconcile chat status membership per changed tab

The status bridge rebuilt every member and host group and captured every
chat on any tab-map or owner-input change, and recaptured every chat on any
launch notification. Membership now updates only the tabs whose identity
changed; owner-input changes re-resolve only unstamped tabs, the only ones
whose host depends on them; launch notifications name their session so only
its tabs are recaptured (unaddressed ones still recapture all). The sleep
and launch-directory companions of one projection land in one store write.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(ratchets): guard whole tab-map triggers and hot-map listeners

Add a count ratchet for identity comparisons of the whole
unifiedTabsByWorktree/tabsByWorktree map in renderer code (counts may only
fall), wired into pnpm lint, run-ratchets discovery and changed-check
selection. Extend the advisory no-whole-hot-map-selector rule to inline
store listeners that compare a whole hot map and to effect bodies that use
one whole from getState().

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* revert(lint): drop the hot-map listener/effect extension

The guard stays scoped to the repaired seams; no repository-wide rule change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(native-chat): capture chat status on semantic tab changes; address tombstone retirement

Focus, preview and order-only tab writes no longer recapture a chat's
status: membership and the projection fences compare the fields the
projection reads. Absent-tombstone retirement now names the sessions it
retired, so no launch producer sends an unaddressed notification.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* feat(store): keyed-record transition seam for tab maps and companion records

Writers build next tab buckets and keyed companion records through
replaceTabBuckets / replaceRecordEntries (or name the keys of a record they
already built), which record exactly which keys and tab IDs changed against
the produced record. Readers ask readTabMapChanges / readRecordChanges for
an addressed delta; any unannotated link reads as a full resync. Adds
subscribeTabTransitions and a store-observer installer registry. The
chat-tab list and the status bridge now consume addressed deltas and keep
the whole-list walk only as the cold path.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* feat(store): annotate every shared tab-map writer through the seam

Shared tabsByWorktree/unifiedTabsByWorktree writers (tab, editor, browser,
worktree, ssh, terminal create/close/navigation/title-batch/reconnect/
hydration, web-session mirroring and layout frames) now build or annotate
their next tab buckets and companion records with the exact workspace and
tab IDs they changed; full hydration, full frame builds and reconnect
inventories are named full resyncs. Writers that copied every bucket for
one tab (preview promotion, dirty-file preview clear, worktree removal
filters, sleeping-record identity rename) now keep unchanged buckets.

Replace the renderer-wide tab-map comparison ratchet with a narrow seam
guard: the repaired consumers may walk a whole tab map only in named cold
paths, and the pinned writer modules may not build raw seam records.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(store): name seam fields once; type seam records; record moved respawn writes

Writers stop repeating tracked field names (centralized in
seam-record-fields.ts), the seam takes a named KeyedSnapshot record type
instead of casts, and the layout-writer baseline records the respawn
helpers moved unchanged out of worktree-layout-lifecycle.ts.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(store): drop seam field cast; record the seam field list in the layout-writer baseline

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(native-chat): keep chat-tab list in source workspace order (C3/F1)

Every source workspace keeps a projection slot, even without chats, and the
seam reports when a write added or deleted a workspace key or moved a
surviving bucket, so the incremental list never reorders first-match
consumers; those transitions take the cold rebuild.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(native-chat): keep projection and retirement debt awake (C2, F3)

A member is owed from attach or semantic change, members without a host
feed keep their own debt, and every reconciliation drains existing owed or
retired work even when no new member changed, including a closed last chat
whose feed is gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(store): stop inferring host-mirror companion IDs from visible tabs (C1)

A host retraction can delete PTY or layout records for tabs neither
inventory lists, so the mirror funnel marks its tab-keyed records full
resync instead of advertising an incomplete addressed set.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(ratchets): close indirect paths in the tab-map seam guard (C4)

The guard now rejects ordinary callers of the bridge cold path, value
imports the repaired consumers have not reviewed, and raw seam records built
into a local binding without a seam helper annotating it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* test(native-chat): drive real tab actions through the status bridge (F2)

Close, session rebind with a late old-session tick, and a legacy owner
change, through createUnifiedTab/setTabLabel/closeUnifiedTab, so the
addressed reconciliation path is exercised.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore: exempt seam field-name constants from the layout-writer ratchet; drop dead setters (F4)

The seam's SEAM_*_FIELDS lists name fields without writing them, so the
ratchet skips them and the raised baseline row is gone (renderer total 569,
main 571). setStructuredChatSleptAt and the two launch-directory setters
lost their last callers to the batched companion write.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* feat(store): Map provenance and source-ordered change keys in the seam (PR A addenda)

replaceMapEntries gives Map-typed fields (runtimeStatusByEnvironmentId) the
same weak provenance and readRecordChanges protocol. Change keys compose
forward through a chain, oldest write first, so added keys come out in
source order (index keys first for records, as Object.keys orders them). A
surviving key deleted and re-added, in one write or across a chain, and a
record builder that moves a surviving key, read as a 'reordered' full
resync.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(store): writers declare key order; seam reports ordered additions (N1c, N1a)

The seam no longer scans both records to rediscover order on every
annotation. replace* helpers know insertion order by construction; annotate*
takes a declared order ('appended' by default, 'reordered' for a builder
that moves keys, read as a full resync), verified only under test.
Addressed changes now report keys, source-ordered added keys and deleted
keys, so a reader holding its own key ranks places changes in O(changed).
Worktree removal declares its editor-transfer records reordered.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* perf(native-chat): scope the chat-tab projection to chat-bearing workspaces (N2c)

The projection keeps chat subsets only for workspaces that have chats, plus
per-workspace source ranks that change only when a workspace is added or
deleted. A focus, label or title write costs O(that workspace); the
ordered list is materialized lazily, only for full-list readers, and keeps
its identity while no chat changed. Workspace adds and deletes are
addressed through the ranks instead of a cold rebuild.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(ratchets): resolve aliases and require annotation before publication (C4)

Any reference to a cold helper or Object enumerator outside its named
callers counts, including aliases and callbacks; writer values are followed
through local aliases and must be annotated before the write that
publishes them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* test(native-chat): scoped hydration keeps the warm chat list equal to a cold read (D1)

Drives the real scoped hydrateTabsSession on early/later chats of one
session: source order, list order and first-match precedence match a cold
rebuild, including when the selection order differs from hydrated order.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* perf(native-chat): cache the chat-workspace order across chat edits (D1 item 5)

The lineage keeps chat-bearing workspaces in rank order and only inserts or
removes one when it gains its first or loses its last chat; a chat object
change re-flattens the list without re-sorting. Full resyncs rebuild it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(ratchets): the seam guard recognizes only construction helpers and cold marks (D1)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* refactor(store): addressed provenance only from constructing helpers (D1)

Remove annotateRecordReplacement/annotateTabBucketReplacement and their
caller-declared order: only replace*/recordDraft/tabBucketDraft, which
perform the construction, derive changed keys, additions and deletions from
their operations (delete-then-reinsert reads as reordered); opaque
reconstructions use markFullResync. Every former annotate caller is
migrated: ordinary local writes build their records once through helpers
or drafts with today's operations and order; scoped tab and terminal
hydration, the reconnect inventory, host-mirror application and layout
flush are full resyncs. Change readers move to keyed-record-change-reads.ts.
Renderer layout-writer total 567 (main 571).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* test(native-chat): type the hydration fixture without a cast

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(store): seam record writes define own entries, even __proto__ (N5c)

replaceRecordEntries and drafts assigned through the inherited __proto__
setter, so a tab id '__proto__' lost its own PTY, layout and startup
entries. Both now define an own data property, as the computed-key literals
they replaced did; contract test included.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* perf(terminal): build each createTab record once (N4c)

createTab took ensureGroup's and insertSplitGroup's whole records and the
orphan cleanup's seam records, then rebuilt them through the seam. It now
takes the per-worktree group and split results and gives the orphan
cleanup only the bucket it reads, so every seam record is constructed once
with its ordered operations.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(ratchets): record createTab's orphan-cleanup input view (renderer total 570, main 571)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* refactor(terminal): split orphan cleanup so createTab cleans only companion caches (N6c)

buildOrphanTerminalCompanionCleanupPatch holds the per-tab cache, tab-bar
order and selection cleanup; buildOrphanTerminalCleanupPatch adds the seam
record deletes on top, unchanged for reconciliation. createTab calls only
the companion part with real state and deletes the seam entries through its
single construction, so the stub input view and its layout-writer baseline
rise are gone (terminal-tab-creation.ts back to 10).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* perf(terminal): filter the orphan cleanup's kept bucket once (N7c)

The full cleanup filters the workspace's tabs once and hands the kept
bucket to the companion part, which takes its replacement active tab from
it; createTab's companion-only call still makes its single find pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* Scope terminal parking inputs and registries to workspace ownership

* Guard parking ownership and cover background split output

* Connect parking ownership to accepted tab transitions

* Use accepted Map provenance and preserve parking owner order

* Read paired parking capability deltas from the shared seam

* Consume ordered additions from accepted record transitions

* Expose first-tab and outside-owner views of terminal membership

* Construct terminal binding and startup transitions at their writers

* Construct shutdown and orphan cleanup transitions from ordered operations

* Construct presentation and sleeping record transitions at their writers

* Express semantic parking inputs and close annotation guard escapes

* Keep replacement values typed from their source records

* Construct sleeping session moves without changing nullable status records

* Follow the constructing seam integer-key module

* Adopt the separated transition reader module

* Ratchet the cold parking compiler bailout improvement

* Exercise parking fixtures through addressed inputs and live ownership

* fix(tabs): keep removed worktrees' group entries deleted on removal

The second emptied-group collapse in removeWorktreeLayout also visited
removed worktrees and wrote their deleted groupsByWorktree entry back as
an empty list, a delete-then-set the seam read as a reordered full resync.
It now visits only surviving workspaces, so removal stays addressed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(tabs): closeEmptyGroup collapses through the shared builder again

collapseGroupLayout takes the record builder, and the renderer passes the
seam's replaceRecordEntries, so the per-worktree collapse publishes with
provenance without new counted layout writes (tabs-group-actions back to 12).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(tabs): reconciliation names its draft fields once (2 + 4 <= 9)

The written-field sets come from SEAM_ field-name constants instead of
string literals, so the reconciliation split no longer raises the combined
layout-writer count (tabs-reconciliation 2, tabs-reconciliation-batch 4,
against the original 9).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(terminal): bound parking updates to changed ownership facts

* fix(terminal): type parking ratchet entry descriptors

* chore(tabs): publish reconciliation drafts with explicit field writes (N9c)

Revert the SEAM_ field-name constants: the drafts are held under their own
names and finishReconciliationDrafts publishes each written draft as an
explicit unifiedTabsByWorktree/groupsByWorktree/activeGroupIdByWorktree/
layoutByWorktree property, so the counter sees every real write and the
split totals 2 + 4 against the original 9, with no exemption.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(parking): follow merged module paths

* Move parking assignment invalidation into the store observer

* Limit parking assignment checks to changed tab rows

* Separate tab row recording from provenance reads

* Preserve uncertainty across skipped tab reinsertion

* Keep root terminal watchers within workspace surfaces

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…i#40674)

The strict target check added in stablyai#38514 rejected a preview answer whose type
differed from the request, so every /issues/N link to a pull request (all bare
#N references in chat) showed "Preview unavailable.". Previews now match on
repository and number and accept either type; other callers stay strict.

Also log the failure class of a swallowed owner/repo lookup error.
…thod (stablyai#40646)

Every orchestration method is now defined with defineOrchestrationMethod and
declares its access: kind (reads, writes or localOnly), the caller field, the
target fields with their subject kinds, whether it reads a collection, and an
optional named rule. The registry refuses an orchestration method whose
handler was not built by those factories, so no method runs without the check.

The existing per-method authorization moves out of handler preambles into
named rules, in the same order: reply (helper answerer or the Run's current
consumer), taskCreate, taskList, taskUpdate, dispatch, gateCreate, gateResolve
and gateList. The check runs where the handler ran, inside the mutation
executor's invoke, keeping each handler's sync or async error contract. An
observed replay of an accepted reply or send runs its declared replay hook
before any rule, so an accepted call is never authorized again. The
session-caller binding reads the declared caller field instead of its own
table, and send --on is carried by a wrapper inside the check.

No behaviour change: a table over every method, recorded on main, pins each
call's outcome for four callers.
Prefer the workspace/selected agent when generating an auto-rename slug
so rename no longer fails against a default agent without remaining usage.

Fixes stablyai#11009
@innocarpe
innocarpe force-pushed the fix/branch-rename-selected-agent branch from 8ec042c to 01c1626 Compare November 10, 2026 07:56
@innocarpe innocarpe added the bug Something isn't working label Nov 10, 2026
@innocarpe

ghost commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Sync update (01c1626882)

Rebased onto current upstream/main. First-work branch rename prefers the workspace agent when that agent can generate a slug, and falls back to the configured Source Control AI agent otherwise. Related tests: 8 passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.