Skip to content

[upstream #16568] fix(codex): write runtime currentHash for mirrored hook trust - #193

Open
innocarpe wants to merge 10000 commits into
mainfrom
fix/codex-runtime-hook-trust-hash
Open

innocarpe wants to merge 10000 commits into
mainfrom
fix/codex-runtime-hook-trust-hash

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 Mirrored user Codex hooks copied the system trusted_hash into the managed runtime home. Codex's runtime currentHash for PreToolUse/PostToolUse differs, so every launch asked to review hooks again. Approved mirrored hooks now write Codex hooks/list `currentHas

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 added the bug Something isn't working label Aug 26, 2026
@innocarpe
innocarpe force-pushed the fix/codex-runtime-hook-trust-hash branch from 283fbf5 to f2b429c Compare August 26, 2026 09:17
@innocarpe

ghost commented Aug 26, 2026

Copy link
Copy Markdown
Owner Author

Sync update (f2b429c76)

Address CodeRabbit: require listing.command === entry.command before stamping currentHash. Incomplete command:null listings no longer trust a changed hook. Fingerprint-cache of verified listings stays out of this PR (heavy lift).

@brennanb2025
brennanb2025 force-pushed the fix/codex-runtime-hook-trust-hash branch from f2b429c to ed52080 Compare August 27, 2026 10:55
@innocarpe
innocarpe force-pushed the fix/codex-runtime-hook-trust-hash branch from e156bd7 to 088cf97 Compare October 29, 2026 09:50
Dhruv Singal and others added 24 commits November 9, 2026 03:25
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]>
…i#40273)

* refactor: group editor browser document and simulator owners

* refactor: update active simulator reliability command links

* refactor: preserve upstream editor and emulator test retirements
…es (stablyai#40089)

The Codex config line scanner only treated exactly three quotes as the
multiline closer, so a value like '''printf 'ok'''' left the scanner
inside the string and later tables (e.g. [projects."..."]) were missed
when writing project trust. Match toml_parser: a run of 3-5 quotes
closes the string, with up to two quotes belonging to the content.

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

Request the project on the shared issue node fields and map it in
mapRawIssueForWorkspace, so list/search rows carry the project the same
way issue detail already did. Detail now reuses the shared mapping.

Co-authored-by: Neil <[email protected]>
…d script (stablyai#39884)

The browser-extension preload was a main-build Rollup input, so it could be
split into shared CJS chunks that a sandboxed preload cannot require. Build it
with the other guest preloads as a self-contained bundle, and share the
one-byte unminified output options between the preload build and sandboxed
bundles so the extension preload stays one-byte in V8.

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

Claude paints the caret over the first glyph of a dim composer suggestion
as an undimmed inverse cell. The typed-text read kept that glyph, so an
empty composer reported a one-character draft and the stock Try "..."
placeholder was never recognized. Treat a lone inverse caret glyph ahead
of a longer dim suggestion as untyped, while keeping a real typed last
glyph that sits before a dim argument hint (e.g. /commit [message]).

Fixes stablyai#40195

Co-authored-by: Neil <[email protected]>
…yai#40318)

* test(e2e): give the provisioned-root VM a reachable git remote

VM creates now run the environment checks before creating the workspace
(stablyai#40152). The fixture VM's origin pointed at a GitHub URL it cannot push
to, so the git push check failed and the create paused on the build
sheet; the spec then read the VM's primary checkout before it was
adopted. Point the VM checkout at a local bare repo so the checks pass.

* test(e2e): wait for the provisioned root's adoption, not its listing

The VM's primary checkout appears under its branch name once its project
is set up, before the environment checks finish and adoption writes
ephemeralVmCheckoutMode. Poll for the adopted row instead.
…act test kit and ShellRecipeDriver (stablyai#40315)

One lifecycle seam (create/resume/suspend/destroy/status + capability flags and a
catalogued error type) that every environment provider implements, a shared
vitest contract any driver runs from its own test, and ShellRecipeDriver, which
wraps today's orca.yaml / plugin VM recipe runner and passes the contract.
No production callers yet.
…40313)

* refactor: group agent launch, status, and messaging owners

* refactor: consolidate direct owner imports

* refactor: import pane ownership directly in status listeners
Co-authored-by: buf0-bot[bot] <252831055+buf0-bot[bot]@users.noreply.github.com>
…eDriver (stablyai#40332)

The runtime service and failed-start cleanup now reach orca.yaml environment
recipes and plugin VM recipes through ShellRecipeDriver's recipe-shaped steps.
Same arguments, same runner, same results: records, failure copy and
diagnostics are unchanged.
…tablyai#40335)

* test: remove private hook checks and manual search benchmarks

* test: remove masked mirror hydration case and exclusive scaffolding

---------

Co-authored-by: OrcaWin <[email protected]>
…tices (stablyai#40161)

Codex reports both approved and denied automatic approval reviews on the
guardianWarning channel. Orca rendered every one as a yellow "safety review
warning", so routine approvals looked like problems. Approved reviews now
render as a neutral "approved this action" notice on desktop and mobile;
denials and timeouts keep the warning tone.

Co-authored-by: Sean876-alt <[email protected]>
Co-authored-by: Neil <[email protected]>
Neil and others added 28 commits November 9, 2026 22:32
…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.
…s tab (stablyai#40692)

A mirrored pane whose leaf lost its PTY binding (for example after its agent
exited) is resolved by pane key. Once the host had closed the tab, recovery
never treated the host's answer as proof the pane was gone, so it re-injected a
pending row into every frame and the closed tab stayed in the tab strip and the
saved session forever.

- Host: an exited PTY record outlives its tab, so terminal.resolvePane kept
  answering "disconnected" for a closed tab's pane. It now answers
  terminal_not_found when no leaf holds the pane, its PTY is not connected
  and the tab is gone from the host's workspace session.
- Client: unbound panes now follow the same rules as bound ones. A close
  record for the pane retires it at once; otherwise two authoritative absences
  (the frame omits the pane and the host cannot resolve it, or resolves it only
  as a disconnected leftover) retire it. Any sign the host still owns the pane
  restarts the count.

Refs stablyai#9194
…aving them silent (stablyai#40691)

A remote chat view could sit on a stream that looked healthy but carried no
frames, so replies never rendered and sends stayed on "Sending…" until the tab
was reopened. Two paths left a stream open after delivery had stopped:

- The host dropped a chat subscriber whose frame failed to send, but never
  ended its stream or logged why. It now logs the failure and ends the stream
  once, so the client resubscribes from its cursor.
- The desktop discards frames from a retired transport generation, but a
  rebuilt control connection advanced the generation without closing the
  streams opened under the old one. Retiring a generation now closes those
  streams, tells their windows (which resubscribe) and logs how many.

The client's reconnect wait now resets only after a stream has stayed up for
10 s, so a host that ends a stream right after its first frames cannot drive a
resubscribe every 750 ms.

Refs stablyai#39926
…tablyai#39821)

stablyai#38730 added the reportFocusLost request inside v55, so v55 daemons from
1.4.251 reject it and an app that adopts such a daemon never replaces it.
Bump to v56 so updated apps start a daemon that is known to accept the
request, never ask pre-v55 daemons, and ask v55 daemons once per daemon
incarnation instead of once per adapter, so a replacement daemon at the
same endpoint is not treated as unsupported.

Co-authored-by: Claude <[email protected]>
…ay why (stablyai#40699)

The floating workspace's terminals and Markdown notes live on the user's own
computer, and a browser tab connected to `orca serve` has none, so in the web
client its terminal and Markdown actions did nothing.

The web client's stored settings now always read the floating workspace as
off, even if an older build saved it as on, so its button and panel do not
appear. The settings toggle is disabled with an explanation. Anything that
would reveal the panel (for example "open beside", an activity row or "Edit
file in Orca" for keybindings) shows that explanation instead of doing
nothing.

Fixes stablyai#40268
… and restart cause (stablyai#40694)

Investigating stablyai#39166, the reporter could not line up host logs with daemon or
kernel logs, nor tell which client was attached or whether a pause came from
the current start.

- `orca serve` and orcad stamp every stderr diagnostic with an ISO time.
- The runtime logs each authenticated client connect and disconnect (device
  id, scope, transport, connection id; never the client's credential).
- The automatic-work pause log now says whether this start followed a clean
  exit, an unclean one or none, and when the pause began, so a carried-over
  pause is not mistaken for a fresh crash.

Refs stablyai#40328
…yai#40688)

* refactor(renderer): group workspace creation and launch owners

* refactor(renderer): combine concrete workspace naming imports
…tablyai#40686)

* feat(dictation): offer the speech model update in the dictation pill

Moves the speech model update out of the launch notification stack and into
the dictation pill. Pressing the dictation shortcut now checks the selected
model before any mic capture; when the speech engine needs a download, the
pill offers it (notice, downloading, done, failed) instead of recording.

Co-Authored-By: Claude <[email protected]>

* fix(dictation): address review on the setup pill check

- Drop a stale press before opening the setup pill, not only before recording.
- Swallow cancelDownload rejections.
- Don't cache a failed catalog load, and don't mark a model up to date from an empty catalog.

Co-Authored-By: Claude <[email protected]>

* fix(dictation): cancel a pill download closed before its first progress

Co-Authored-By: Claude <[email protected]>

* fix(dictation): make the pre-record model check a cancellable pending start

- A toggle, Escape, stop or controller teardown during the model check now
  drops the pending start, and the check rechecks current voice settings
  before opening the mic.
- A press mid-download keeps the setup pill with its progress; only a model
  seen ready is cached as ready.
- A cancelled or failed update no longer deletes the old model files, and the
  renderer keeps offering the setup target it showed until the model is ready.
- The check is prefetched off the startup path and in-flight checks are shared,
  so the first press rarely waits on main.

---------

Co-authored-by: Claude <[email protected]>
…read (stablyai#40703)

An agent row can turn bold while its workspace never becomes unread, and every
path that drops the finish on the way to the unread flag was silent, so the
next occurrence could not be traced. Each drop site now leaves one
`agent_finish_dropped` breadcrumb (mirrored to main.trace.ndjson) with its
cause, workspace and pane:

- paired-host mirror: a restored, unconfirmed done, or a done skipped as a
  host replay;
- hook lane: a pane it does not consider live, completion notifications off
  for the pane, a new turn end swallowed because an earlier hook end used up
  the turn with no working state in between, a pane pruned during the quiet
  window, or a held turn-end revision that expired;
- dispatcher: a fresh active hook status, a superseded snapshot, an
  attention-policy rejection, or a viewed pane.

No behaviour changes.

Refs stablyai#40340
…waits (stablyai#40718)

* fix(notifications): ring the synthetic waiting BEL once per prompt, not per hook restatement

Codex restates waiting on every tool call while a request_user_input_async
question stays open; each restatement wrote a permission title plus BEL, so
Orca posted a terminal-bell OS notification every few seconds for the whole
turn. Keep reasserting the title but ring only once per distinct prompt per
needs-input stretch.

* fix(notifications): keep ringing for repeat approvals during an open async question

Codex's PermissionRequest hook carries no request id, so a per-stretch prompt
set would silence a second identical approval while an async question stays
open. Ring whenever the prompt changes; only async questions, which Codex keeps
open across the turn, stay rung for the whole stretch.
…blyai#40719)

* refactor(renderer): group appearance and terminal owners and use defining imports

* refactor(renderer): remove redundant later module requests
…blyai#40739)

* refactor(mobile): group host catalog credentials descriptors and connection history

* refactor(mobile): import RPC sender and result types from defining owners

* refactor(mobile): colocate push delivery with registration operations

* refactor(mobile): point push recordings at delivery owner
…blyai#40673)

* test(ssh): isolate connection manager session holds

* test(ssh): reset both session-hold stores in the shared SSH connection fixture

The fixture reset now clears credential declines as well as user disconnects,
so every suite built on it starts without a stale hold from an earlier file in
the same worker. The per-suite resets it supersedes are removed.

Fixes stablyai#40291

---------

Co-authored-by: Vyacheslav Scherbinin <[email protected]>
…es (stablyai#40550)

* fix(terminal): keep remote-viewer clipboard env on command-less creates (stablyai#39852)

A paired viewer's plain terminal reaches the host renderer's tab-create
bridge with spawn env (ORCA_REMOTE_VIEWER_CLIPBOARD, PI_CLIPBOARD_OSC52)
but no startup command. The bridge queued pendingStartup only when a
command existed, dropping the env, so the spawned shell never saw the
remote-viewer clipboard marker and copied text stayed on the host
clipboard (stablyai#39852).

- Queue the startup whenever the request carries launch material
  (env/envToDelete/launchConfig/resume), not only a command.
- PtyPaneStartup.command becomes optional for env-only startups; spawn
  options already tolerate a missing command.
- Keep the plain-shell pre-bind input hold for startups that plan no
  post-bind work, so an env-only startup types as a plain shell does.

Co-Authored-By: Claude Code <[email protected]>

* test(e2e): layout oracle marks only panes the user can see

A hidden tab with a queued startup is laid out at opacity 0 so it spawns at
real geometry. The marker check counted it as visible because it has a size,
then waited for output that the hidden-delivery gate correctly withholds.
Paired-client creates now queue spawn env, so their background tabs hit this.

---------

Co-authored-by: Chen <[email protected]>
Co-authored-by: Claude Code <[email protected]>
…blyai#40736)

* feat(plugins): add editor.readTypography and editor.typography.changed

Plugins that render code next to Orca's editor had to open the private
profile database and reimplement Orca's font rules to match it. Host API 1.6
adds editor.readTypography (no capability; worker, panel and editor frames):
the font family and CSS stack, size with editor zoom, weight, line height in
px, ligatures, word wrap and minimap that the file editor resolves now.
editor.typography.changed carries the same values after a settings write or
an editor zoom changes them; it is the first event that needs no capability.

The pure resolution (editor typography, editor zoom, monospace font stack)
moves to src/shared so main and the renderer use one implementation.

* fix(plugins): keep editor typography resolution from throwing in main

A hand-edited profile with a non-string font family made the shared resolver
throw, which the main-process watcher would surface at startup and on every
settings write. Font values are now type-checked, the watcher catches and
logs, and it reads live settings so a write without listeners cannot leave the
event payload stale. Over-long font families are cut to the schema bound
instead of failing every read. Regenerates the testing runtime.
…40745)

* refactor(renderer): group file and document feature owners

* refactor(renderer): remove orphaned editor recovery registration suite

* refactor(renderer): colocate file explorer tree result contract
Approved system hooks still match by signature (stablyai#7110), but the
managed runtime trust entry is written with Codex's hooks/list
currentHash instead of the system trusted_hash. Both Windows
separator variants of the key are cleared before that write so
slash/backslash copies cannot stay conflicted.

Fixes stablyai#16428
Incomplete hooks/list records with command:null must not trust a
changed hook at the same key.
@innocarpe
innocarpe force-pushed the fix/codex-runtime-hook-trust-hash branch from 088cf97 to 590faed Compare November 10, 2026 12:23
@innocarpe

ghost commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Sync update (590faede55)

Rebased onto current main. Mirrored runtime hook trust is written from Codex hooks/list currentHash, and both Windows separator variants of the key are cleared before that write.

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.