Commit Graph
13488 Commits
Author SHA1 Message Date
Neilandpetersindex 884575a797 fix(github): verify cached integration PRs after tracking is removed
Use the existing REST PR mapping to read the head repository's default
branch when no tracked remote or origin can identify it. Require matching
repository and head metadata, and preserve the PR if the lookup fails.

This clears both closed and merged integration PRs cached by a fork
checkout after its upstream tracking is removed.

Co-authored-by: petersindex <287557875+petersindex@users.noreply.github.com>
2026-10-10 17:08:10 -07:00
Neilandpetersindex 82c5484f66 fix(github): scope PR selection and clear rejected cached links
Apply the default-branch policy while probing each repository, so an
integration PR cannot preempt a valid result or suppress the same number
in another repository. Check branch heads by repository and server.

Invalidate remote defaults when their review scope or SSH provider changes.
Report rejected PR URLs through an optional refresh-result field, so merged
integration PRs clear from both caches even at the current worktree head.
Share the manual and coordinator cache update implementation.

Co-authored-by: petersindex <287557875+petersindex@users.noreply.github.com>
2026-10-10 17:08:10 -07:00
Neil 0bc07c9954 fix(github): validate implicit default-branch PR repository identity 2026-10-10 17:08:10 -07:00
petersindex 7ac9f4d2f1 fix(github): compare a tracked upstream with its own remote's default branch
A fork's upstream remote can default to a different branch than origin.
Read refs/remotes/<remote>/HEAD for the tracked remote and fall back to
origin's default only when git never recorded it. Reuses the default-branch
resolver's host routing and cache.
2026-10-10 17:08:10 -07:00
petersindex ae861b76c1 fix(github): don't link a PR headed by the default branch a branch tracks
A branch made with `git switch -c feature/x origin/develop` tracks the
default branch. When its own PR lookup missed, the tracked-upstream fallback
attached the newest PR whose head is `develop` (an unrelated develop to
release PR) and cached its number, so the wrong link survived restarts.

Drop a match headed by the tracked upstream when that upstream is the default
branch of a repo PRs target. The check runs only after such a match, so normal
polling adds no git calls, and it also heals numbers cached before the fix.

Fixes #26948
2026-10-10 17:08:10 -07:00
Jinwoo Hong 6404b7e83d test(relay): load generator can send two concurrent assigns per host (--duplicate-assign-probes) (#27107)
Rebased onto main as one commit; kept both sides of the package.json test-list conflict with #27096.
2026-10-10 20:06:42 -04:00
Jinwoo Hong c2da6337b4 fix(relay): staging sleep runs under the admission selector instead of refusing (#27126)
* fix(relay): staging sleep runs under the admission selector instead of refusing

The selector generation is monotonic and staging is past 0, so the nightly sleep could
never run again. Under a selector, admission belongs to the selector and the selector-era
wake restores it, so the sleep proves every cell empty and not reserve, never writes a
cell's admission, and refuses if the selector moved during the sleep.

* fix(relay): staging sleep re-reads reserve cells just before stopping the MIGs

The cell-flags workflow runs outside the staging lock, so a reserve flip can land
while Cloud Run scales down.
2026-10-10 20:05:33 -04:00
Jinwoo Hong 15ee25e3a6 feat(relay): a free-form staging load mode on Prove Relay Asia Staging (#27115)
Staging auth mints relay load principals for one workflow file only, so the step-5
staging run's load lives as a mode of that workflow. Load runs take their own
concurrency group and no Cloud SQL lease, so deploys and switch writes can run
under load. Origins, region, principals and sharding are pinned by the workflow.
2026-10-10 20:05:29 -04:00
Jinwoo Hong c445584584 feat(relay): a staging cell-flags workflow, trusted by the staging relay deploy identity (#27113)
Rebased onto main as one commit after its parent squash-merged.
2026-10-10 20:05:13 -04:00
Neil 8b2c795d8a test(native-chat): seed large transcript fixtures in one transaction 2026-10-10 17:05:02 -07:00
Neil dac3ae167c test(native-chat): verify ZCode readers on every desktop platform 2026-10-10 17:05:02 -07:00
Neil b74e9464eb fix(native-chat): prepare SQLite readers for ZCode-only WSL homes 2026-10-10 17:05:02 -07:00
Neil 3d51f67f2f test(native-chat): seed ZCode through the execution host 2026-10-10 17:05:02 -07:00
Neil 4fd7398013 test(native-chat): run ZCode SQLite fixtures on the production runtime 2026-10-10 17:05:02 -07:00
Neil 45c4d6ecbb fix(native-chat): preserve ZCode store selection and transcript order 2026-10-10 17:05:02 -07:00
star-nebula ecc3433bdf feat(native-chat): read ZCode session transcripts through the OpenCode SQLite reader
ZCode's CLI persists an OpenCode-v1-shaped history in its own SQLite store
(~/.zcode/cli/db/db.sqlite). The Agent Session History scan already lists
those sessions, but opening one in the native chat found nothing: the chat
transcript path had no ZCode awareness.

Resolve a zcode transcript against the ZCode database (native home, then WSL
homes) before any OpenCode install, tag every read (signal, page, subscribe)
with the agent, and apply the same hidden-transcript filter the scan uses so
ZCode's hidden bookkeeping rows stay out of chat renders.
2026-10-10 17:05:02 -07:00
Jinwoo Hong 7d81ce26c4 infra(relay): staging c1 gets a 600/60 cap, and c1/c4 get rehome trust, for the step-5 e2e (#27117)
* infra(relay): staging c1 gets a 600/60 cap and c1/c4 get rehome trust for the step-5 e2e

The reserve and demote routes answer only on cells with rehome trust, and Terraform
requires a rehome source to carry explicit connection limits. Staging only.

* infra(relay): pin staging c1 to c2's cap-capable image with its new cap

The legacy 2d0f6e6 image cannot report capped connection telemetry, so main holding it
with a 600/60 cap would leave any c1 apply failing its heartbeats for good.
2026-10-10 20:03:55 -04:00
Jinwoo Hong 2110887080 fix(relay): staging director deploys set the admin identity the director trusts to gha-relay (#27121)
Rebased onto main as one commit after its parent squash-merged.
2026-10-10 20:03:43 -04:00
Jinwoo Hong b154baf6d7 fix(relay): staging director deploys run as relay-dir with rehome identity, and can register one cell's cap (#27118)
Rebased onto main as one commit after its parent squash-merged.
2026-10-10 19:53:44 -04:00
OrcaWinandm4air 19f20c8b16 test(e2e): pass the catalog owner to the remaining fetchRepos callers (#27325)
Co-authored-by: m4air <m4air@Mac.localdomain>
2026-10-10 16:49:47 -07:00
db2ed7ca36 perf(mac): name terminals in Orca instead of ps tty= (#27146)
Ask ps for raw terminal device numbers and name them in Orca: a verified direct lookup of /dev/ttys<minor> per distinct terminal, with an exact first-alias /dev scan fallback. Removes Apple ps's per-row /dev scan (~1 s CPU per capture on a busy Mac).

Fixes #24889

Co-authored-by: Giorgio Zamparelli <giorgio.zamparelli@gmail.com>
Co-authored-by: out-of-place <contact@outofplace.space>
2026-10-10 16:45:23 -07:00
Jinwoo Hong e9bf6d1c3f fix(relay): the cell switch tool changes only the named switches (#27056)
* fix(relay): the cell switch tool changes only the named switches and checks every key on read-back

A cell resets a key missing from its switch file to its default, so the tool now reads the
current object and changes only what --set names. The read-back compares every known key and
fails when the cell reports ignoredKeys.

* fix(relay): the cell switch tool refuses a switch the cell's image does not support

It reads supportedFlags from runtime-status (#27057). An image from before that field takes only
readinessLocal and ticketCheck off/shadow, so ticketCheck=enforce cannot void an old cell's object.

* fix(relay): the switch tool validates the whole object, refuses voided files, and records admitMode in Postgres

Every key and value of the object to be written is checked against what the image accepts (an
image without the list: only the keys it applies, ticketCheck off/shadow). A file the cell did
not apply is refused. admitMode=reserve needs a typed RESERVE <cell>; Postgres records reserve
before the file is written, and db only after the cell reports every control leased again.

* feat(relay): the switch tool knows reregisterInFlight (1-16), the flip-back pace

* fix(relay): the switch tool closes the cache gap before reserve, undoes a refused write, and has a break-glass db flip

After recording reserve in Postgres it waits past every director's 5 s cache and records it
again (re-running the open-flow check) before writing the file. A file write refused outright
(412 or 4xx) puts Postgres back to db; after a 5xx it stays reserve. An object the cell did not
apply is repaired when the new object passes the image check. Break glass (typed BREAK GLASS
<cell>) records db for a dead or unreachable reserve cell without its read-back.

* fix(relay): a director deploy refuses a traffic move across reserve-mode support while any cell is reserve

* fix(relay): the flip-back wait scales with the cell's controls and pace, and says how to finish

* fix(relay): the switch tool refuses to re-arm a tripped cell, breaks glass only on a silent one, and undoes reserve if the second post is refused

* feat(relay): director deploys set reserve placement, and refuse turning it off while any cell is reserve

* fix(relay): Terraform keeps the deploy-owned placement and shadow cells, and the deploy guard reads placement as built and refuses dropping a reserve cell from the shadow list

* fix(relay): director deploys take --admin-audience alone, name a drifted deploy identity, and carry the shadow seat-feed cells

Staging passes --admin-audience for the reserve guard without durable rehome
verification, which the parser refused. Only the generation and control
origin now travel together, and they still need the audience.

The guard decodes the caller from its token and refuses, by name, a revision
whose ORCA_RELAY_DEPLOY_SERVICE_ACCOUNT is another account, instead of
reading into a 401.

--shadow-seat-feed-cells (preserve, all, or a cell list) is a workflow input
on both director deploys; preserve keeps the serving value. A contract test
parses every workflow's real argv for both deploy scripts.

* fix(relay): the flag tool paces a flip back from the pool size the cell reports

An image from before the field falls back to the deployed sizes.
2026-10-10 19:41:47 -04:00
Jinwoo Hong 3c6c24f8fa test(relay): deterministic step-5 simulation with invariants 1-8 (#27040)
Rebased onto main as one commit after its parent squash-merged.
2026-10-10 19:41:33 -04:00
Jinwoo Hong 289586947e feat(relay): alert when a reserve-mode cell trips its dead-man (#27096)
Rebased onto main as one commit after its parent squash-merged; kept both sides of the add/add list conflicts with #27024.
2026-10-10 19:40:31 -04:00
Jinwoo HongandClaude a90e5d9de6 ci(e2e): run the layout oracle on PRs that change layout writers (#27103)
* ci(e2e): run the layout oracle on PRs that change layout writers

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

* ci(e2e): narrow the layout oracle triggers to the modules that write layout

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-10 19:28:50 -04:00
Neil 33a1ddfc26 ci(zcode): register native credential tests in the Windows lane 2026-10-10 16:24:14 -07:00
Neil 70f0b1adec ci(zcode): install the pinned test runner before native contracts 2026-10-10 16:24:14 -07:00
Neil 6de900fcc6 test(zcode): verify rollback with real Windows file permissions 2026-10-10 16:24:14 -07:00
Neil 1f6ab26ec6 fix(accounts): preserve competing keys during failed GLM saves 2026-10-10 16:24:14 -07:00
Luchong ae573a9063 fix(accounts): keep an identical plaintext key after a failed restore
A restored plaintext envelope can match the rejected replacement byte for
byte. Do not delete that file, since it is the previous key rather than a
new secret.
2026-10-10 16:24:14 -07:00
Luchong c33fa877d4 fix(accounts): remove a rejected GLM key when restore fails
A failed plaintext replacement can publish the new key before file
restriction is confirmed. If restoring the previous key fails before it
replaces that file, delete only the rejected envelope so a completed
restore is left intact.
2026-10-10 16:24:14 -07:00
Jinwoo Hong 9029e84883 feat(relay): log metric and console alert for unreadable cell switch files (evidence code) (#27024) 2026-10-10 19:22:21 -04:00
Jinwoo Hong a18883130f fix(relay): database sweeps and ops reads skip reserve-mode cells (step-5 census, inert) (#27046)
Rebased onto main as one commit after its parent squash-merged.
2026-10-10 19:22:11 -04:00
NeilandTauri-EPO a09dc9aa71 fix: honor inactive Claude account retry deadlines (#26936)
Automatic inactive Claude account refreshes now reuse each account’s existing retry deadline before sending requests. Healthy accounts keep refreshing, and manual forced refresh retains its current behavior.

Partially addresses #26588.

Co-authored-by: Tauri-EPO <enrico.pin@gmail.com>
2026-10-10 16:12:08 -07:00
Jinwoo Hong fda01facc2 feat(relay): the director that booked a join writes its row about a second later (off) (#27048)
Rebased onto main as one commit after its parent squash-merged.
2026-10-10 19:11:59 -04:00
Neil 04f8f2b5d8 feat(accounts): isolate ZCode sign-in terminal setup 2026-10-10 16:04:51 -07:00
Neil 7dfcef4e10 test(composer): reuse fixtures to restore the main lint gate 2026-10-10 16:04:08 -07:00
Neil 808c4ae9a6 test(zcode): verify read-only account contracts across platforms 2026-10-10 16:04:08 -07:00
Neil b9ea43ba9e test(accounts): keep quota fixtures consistent with saved state 2026-10-10 16:04:08 -07:00
87da8432cd fix(zcode): isolate read-only account discovery and quota ownership
Co-authored-by: Luchong <lu740528977@gmail.com>
Co-authored-by: GuanBear <guanbear@users.noreply.github.com>
2026-10-10 16:04:08 -07:00
Jinwoo Hong 3f7943c411 fix(relay): cells without a seat feed stay out of shadow coverage and switch state (#27058)
Rebased onto main as one commit after its parent squash-merged.
2026-10-10 18:54:30 -04:00
OrcaWinandm4air e7ee93e265 docs(rpc): a paired client runs commands as you; say so when pairing (#27317)
* docs(rpc): paired workspace access runs commands as the user; pairing dialogs say so

* docs(rpc): mobile is gated by its allowlist, not by tier

* docs(rpc): wrap comment

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
2026-10-10 15:53:43 -07:00
Neil 68519e63b9 fix(composer): preserve explicit workspace names after selecting tasks (#26937)
Preserve names entered after selecting a work item in desktop, mobile and folder creation. Reuse the existing source and last-generated-name state, and avoid repeating source naming when a delayed base lookup finishes.

Verified the current-main merge composition: 70 focused tests and renderer typecheck pass; newer execution-host routing and folder launch checks remain intact. The reviewed PR head has no failed or pending CI checks and no unresolved review threads.
2026-10-10 15:32:21 -07:00
Neilandkambarakun eaf5dbed9e fix(cli): preserve alias recovery while guarding destructive suggestions (#26934)
Co-authored-by: kambarakun <kambarakun@gmail.com>
2026-10-10 15:16:18 -07:00
Neil 8ba353a1a7 [CI] Refresh unit timing weights and reduce repeated test setup (#27315) 2026-10-10 15:15:03 -07:00
OrcaWinandm4air 42be4c50d4 chore(settings): rename "Active Server" to "Default host for new projects" (#27286)
* chore(settings): rename "Active Server" to "Default host for new projects"

The setting (still activeRuntimeEnvironmentId) now only picks the host for new
projects with no source and the initial host of the Settings host picker, so
the copy says that. Refusal and help text say existing projects stay on their
own host, the provider-scope hints point at the Settings Host menu, and the
Remote Orca Servers search entry keeps "active server" as a keyword.

* fix(settings): credential hints point at the setting that still scopes them

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
2026-10-10 15:01:12 -07:00
OrcaWinandm4air ddcbb78013 chore(lint): bypassing owner routing fails lint (#27313)
* chore(lint): delete the focus-routing helpers; bypassing owner routing fails lint

The last six renderer sites (Settings visibility defaults, preflight readiness,
Linear key dialog copy) mirror the default scope host and now say so through
defaultScopeHost. getActiveRuntimeTarget and settingsForRuntimeOwner are
deleted with their re-exports, the unused settings-fabrication helpers go with
them, and the owner-routing baseline is empty, so any new use fails lint. The
provider dispatch rationale is rewritten in neutral, shorter terms.

* test(preflight): keep the existing cast's rationale on the edited line

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
2026-10-10 14:43:42 -07:00
OrcaWinandm4air e7d7c5bbeb refactor(worktrees): worktree create, listing, removal and repo hook/ref reads route by their owner (#27298)
* refactor(worktrees): worktree create, listing, removal and repo hook/ref reads route by their owner

Worktree create, prefetch, detected listings and missing-terminal teardown,
preserved-branch cleanup and removal follow the repo or workspace owner.
Repo hook and base-ref reads take the repo's host id instead of settings.
Composer, settings panes and the setup guide pass the selected repo's host.

* test(hooks): build the duplicate-row state without a cast

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
2026-10-10 14:28:22 -07:00
Neil 26ee9bbfab [CI] Reduce repeated test setup and unnecessary packaging (#27308)
* [CI] Reduce repeated test setup and remove source text checks

* [CI] Consolidate transcript tests and preserve fixture-only CI routing

* [CI] Retarget reliability gate to consolidated transcript suite
2026-10-10 14:26:04 -07:00
OrcaWinandm4air 853c25de3e refactor(git): git calls route by the worktree's owner (#27291)
* refactor(git): git calls route by the worktree's owner

RuntimeGitContext carries the owner's transport (target) instead of a
settings object, so raw focus settings no longer compile at a git call.
Source control, the checks panel, diff loaders, fork sync, lineage,
worktree metadata, review push targets and diff-comment persistence derive
it from the repo or worktree rows (resolveOwner) or a captured owner.
Editor-slice remote actions take an explicit runtimeTarget and otherwise
resolve the worktree owner; an unresolved owner is refused, never sent to
the focused server. Generation preferences ride a separate prefs field.

* fix(work-items): one owner row routes direct-launch preflight, PR start point and create

* fix(review): PR dialog effects key on the host, not the target object

A fresh target literal per render re-ran base-ref discovery forever and ran the
test worker out of memory.

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
2026-10-10 14:07:55 -07:00