0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
Commit graph

108 commits

Author SHA1 Message Date
Wing
f9b6a0578f The macOS bundle version only ever goes up: a release is <x.y.z>.9999
A beta's CFBundleVersion is <x.y.z>.<n>; the release's was plain <x.y.z>,
below its own betas (0.2.139.7 > 0.2.139). LaunchServices takes the highest
of several copies of one bundle id, and a retired bundle can linger. The
release is now <x.y.z>.9999, above every beta of its version and below the
next version's first; a beta's number must stay below 9999, and the build
checks the value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 13:22:03 -07:00
Wing
a0a4efcc27 Second review: whole version folders, a trial-only job, choices kept
From an independent review of the branch:
- Windows: a version's folder is complete with its engine AND its scripts,
  and a folder is removed whole or not at all (moved aside first, which
  Windows refuses while its engine runs). A cleanup during a trial could
  leave the next version's engine without its scripts, an app with no
  interface until the next release.
- The job that ends the engine with the zeron.exe wrapper is made only for
  an update's trial: elsewhere Ctrl+C reaches both, and the job would cut
  the engine's own clean shutdown short.
- A beta record with no claim (the old app's switch, before `chosen` was
  recorded) is a choice: the beta it installs keeps it one rather than
  claiming it, so a stable release doesn't move it.
- A claim a stable release ended is recorded as such, not as a choice of
  Stable that would let a beta be sent back to an older release.
- An install the old app's updater moved here leaves the GitHub feed (no
  beta channel beside it) for the edge's at its first launch as the zgx
  app, however it arrived; a package no longer brings its feed.
- release.yml fails loudly when it can't read the beta manifest: claim-only
  betas reach a stable release through that copy alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 13:20:37 -07:00
Wing
3fc34ad298 Windows CI builds the app as its package does; the beta scripts say what engine they take
windows.yml builds `-p zeron` and then runs package-windows.ps1, which
builds it again with LUAU_CXXFLAGS=-DNDEBUG: Luau and all that links
mlua were built twice. The step takes the same flag. And the beta
scripts' usage says the engine they're given must be built with it, as
the check now holds: a stable release's engine from before isn't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 11:23:56 -07:00
Wing
3adca33221 Release engines run Luau without its asserts, and each package checks it
The engine links Luau (mlua's luau0-src: visuals, plugin services) and
was built from the root, where nothing sets LUAU_CXXFLAGS: its Luau kept
its asserts, about a fifth of script time. LUAU_CXXFLAGS=-DNDEBUG now
goes on the builds of a release's engine, not a root .cargo/config.toml,
so test and development builds keep them:

- zgx-beta.yml: each job's "the engine, from this commit" step (macOS,
  Linux, Windows' whole zeron.exe).
- release.yml's engines, which the packaging scripts build themselves:
  package-linux.sh's release build, package-macos.sh, package-windows.ps1
  without -BetaVersion (so a local package is right too).

Each package refuses an engine with them. The engine has no zgx-script,
so not the app's warning; instead what LUAU_ASSERT keeps when asserts
are on (Luau/Common.h: #expr, __FILE__): each Luau source file's path,
VM/src/l*.cpp, either separator. The workflow's engine build, exactly,
here: 36 such paths without the flag, none with it (no luau0-src path at
all); the check fails the first and passes the second. A debug package
(package-linux.sh PROFILE=debug) is left alone: luau0-src turns asserts
on in any debug build.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

On stable-zgx (cherry-picked from d1bf8d327): the engine steps are
zgx-build.yml's, which release.yml's stable and zgx-beta.yml's beta both
call, so the flag goes there, and zgx-beta.yml is stable's as it was;
release.yml's old-app jobs build their engines in the packaging scripts.
package-zgx-beta.sh is package-zgx-macos.sh, and Windows' engine for the
zgx app is -ZgxEngine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 11:23:29 -07:00
Wing
ee37cc5079 A beta download moves to stable with the first stable release; review fixes
Channel (Wing's decision): an install on beta only because a beta download
claimed it moves to stable when a stable build reaches it, once, recorded
and logged at that build's first launch, and read so by any updater before
that (an engine's remote update included). One whose person chose beta stays
on beta: the record now says `chosen`, and a later beta's claim doesn't
overwrite it.

Windows, from an independent review:
- A first-start completion takes its own version's package first (a GitHub
  release's own download path, or the edge's manifest-<version>.json that
  release.yml and zgx-beta.yml now publish), so a withdrawn or newer latest
  can't strand an install.
- A package with no beta\<version> folder installs as the old app: the way
  back works over a zgx install.
- The engine the zeron.exe wrapper starts is in a job that ends with the
  wrapper (children break away), so a failed trial's watchdog can't leave it
  running while the old version restores data.
- The engine in beta\<version>\engine counts as the installation, so a
  zgx install updates from another device; its updates come as the package.
- zeron-update.json is replaced only when it names a default feed, and not
  during a trial.
- The beta-feed copy reads the beta manifest from the bucket, and leaves it
  when unsure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 11:14:21 -07:00
Wing
7f01dad0f6 The beta channel carries every zgx release; beta downloads stay on it
A stable release of the zgx app is also published to the beta feed when it's
newer than the beta there, so the website's beta downloads get each stable
release with no action. The zgx app follows the channel on record on Windows
and Linux too (as on macOS), so those installs stay on beta afterwards
rather than dropping to stable.

Windows: every zgx release keeps its files in beta\<version>, the name the
betas in the field check a package for; with a per-channel folder they
couldn't have installed a stable release from the beta feed. A package also
brings its feed: an install the old app's updater moved here switches from
the GitHub release to the edge's feed (stable at its root, beta beside it),
which release.yml now writes into the package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 11:00:08 -07:00
Wing
6bf634308b Stable releases ship the zgx app, installable by every shipped Zeron
release.yml builds the zgx app through zgx-build.yml, the build zgx-beta.yml
now shares, and keeps the old app behind `app: gpui` / STABLE_APP for a way
back. Its manifest says minimumMacOS 13.0, which shipped updaters honour.

Windows: the old app's updater installs only zeron-<v>-windows-<arch>.exe.
That zeron.exe now completes its own install on first start: it fetches the
release's zip from its feed (checksum from the feed's manifest), unpacks its
version's folder (app\<v>\, a beta's beta\<v>\), and offers Retry on failure.
Its later updates come as the zip on every channel.

Linux: zgx's libdbus is linked in (libdbus-sys vendored), so `zeron
headless` on servers and Cloud machines needs no library the old app didn't;
the build checks that.

zgx-beta.yml's manifest gave stable's engine version; it's the beta's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 10:47:23 -07:00
Wing
c2b03c014f zgx: every apps/zgx test passes, the known-failures list empty
Each failure fixed at its cause; none skipped or ignored.

A test fixture's bug:
- shell_fixture set the sidebar's grouping to one list and, later, back to
  project: each reload replayed both, the sidebar still showing crossfaded
  its list out and took the keyboard from its row before the reload could
  keep it (palette_focus_tests' save). Set once, to what it stays. (zgx
  took the focus trail after the load: reported with a repro, zgx #2011.)

Stale tests, the app having moved on:
- Opening a chat gives its composer the keys (c865bf3be): the focus, menu,
  palette and shell tests put the keyboard back on the sidebar row before
  Shift+F10 or ⌘K (focus_tests::keys_on_row).
- Work in's Device row is a submenu row (f5c307863), `@` opens the
  launcher (#mention-popover), and zgx-desktop closes popups and puts the
  window at the back in one event: popups, split tests.
- About's toast and link menu are there; the test runner's tree() stops at
  200 lines, which the page fills: asked for directly.

Tests that took a Mac's keys for every platform's: the history keys
(⌘[ ⌘] or Alt+←/→), the key labels (⌘X or Ctrl+X, ↵ or Enter, …), and
Appshots' ⌘ (`meta`).

Flaky under load, now deterministic:
- A large diff's memory test runs with room per call (30 s): the lexer
  over 8,000 lines came past a debug build's 500 ms with the machine
  loaded past its cores. Its memory limit is as it was.
- A plugin's picture is counted by its path, not by any connection to the
  port: another test's may reach a port reused.

Linux CI: lavapipe (mesa-vulkan-drivers) so visuals' shaders render; with
no GPU at all, the test checks the shader says so and the scene still
draws. scripts/ci/test-zgx.sh runs with an empty list on macOS's bash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 02:04:24 -07:00
Wing
e0365a26ea Plugins launch: one SDK everywhere, zgx tests in CI, install.sh guards ~/.zeron
- A4: re-copy apps/zgx/plugins-sdk/zeron.luau into all 14 copies (git,
  github, parallax-scenes, 11 plugins-dev examples); 12 lacked the agents
  block, all lacked the "project" context fix. examples_tests
  `sdk_copies_match_canonical` checks them byte for byte. The beta packaging
  (macOS, Linux, Windows) stamps the canonical SDK into each shipped builtin,
  so builtins can't ship a stale one. Builtins aren't signed (the engine scans
  them as Zeron's own), so nothing to re-sign.
- A6: a `zgx` CI suite (zgx-tests.yml, planned by scripts/ci/plan.py): apps/zgx
  unit tests and the Luau UI tests (`zgx test ui`, CLI at the pinned rev) on
  macOS and Linux, plus the engine's plugin tests on macOS. Known failures
  (10 Rust, 2 Luau About tests) live in scripts/ci/zgx-known-failures.txt;
  anything else fails. core-tests also runs engine tests/plugin_services.rs.
  No Windows job yet.
- B13: plugins-dev/install.sh refuses ~/.zeron as well as ~/.comet-native
  (and anything under them, symlinks resolved); its default is every example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:26:20 -07:00
Wing
9929004dd7 zgx beta: its engine carries the beta's version
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-05 21:53:29 -07:00
Wing
dd55507797 zgx beta: the engine comes from the same commit
A beta tests what's next, the engine too. It compiles the engine from its own
commit on every platform, rather than downloading the latest stable release's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-05 19:02:52 -07:00
Wing
5bcd21ad35 Merge zeron/zgx into the beta branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

# Conflicts:
#	crates/update/src/channel.rs
2026-11-05 19:01:50 -07:00
Wing
64ab0e3f83
TestFlight: wait longer for Apple, and never reuse a build number (#1243)
Apple can take more than ten minutes to list an upload. The verify step now waits
thirty, minting a new token as the old one nears its 20 minutes. Because the list
lags, the next build number also has a floor from the run and attempt, so a rerun
can't choose a number Apple has already taken.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-05 17:33:09 -07:00
Wing
cc14ce6055 zgx beta: a draft takes the files, then it's published
Releases here are immutable once published, and the release action publishes a
prerelease before uploading unless it's a draft: beta-v0.2.137-beta.7 was
published empty and its uploads refused. So the draft takes the files, and the
next step publishes it as a prerelease that's never the latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-04 12:48:09 -07:00
Wing
edcb78ebf1 zgx beta: Linux and Windows
Linux (x86_64, aarch64) and Windows (x86_64) beside macOS: the zgx interface and
the latest stable's own engine, by checksum, with stable's artifact names but
the beta's version. Windows has no standalone .exe, which can't run alone.
Every key stays under beta/, the manifest last, listing every platform's files.
A run by hand can pick platforms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-03 22:32:26 -07:00
Wing
c2127e6837 zgx beta: by-hand runs of different versions don't queue behind each other
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-03 22:23:35 -07:00
Wing
d898f936ed
zgx: Zeron's interface on zgx (app, design system, plugins, beta channel) (#1137)
* zgx: Zeron's interface on zgx (app, design system, plugins, onboarding, Zeron Preview)

A new desktop app in apps/zgx: Zeron's interface written in Luau on zgx,
its design system, built-in plugins (Git, GitHub, Parallax scenes) and
theme templates, plus the engine and edge work it needs (plugin services
and agent tools, the agent registry, project icons, profile, organisation
admin, onboarding, plugin signing keys) and a separate Zeron Preview
package and workflow (preview-v* tags, off until enabled).

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

* Fix Linux and Windows builds: Listener's signing_in, Command::as_std on Windows

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

* Engine: plugin watchers ignore reads (inotify loop), per-component snapshot paths, Windows create-over-folder is DestinationExists

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

* zgx as a beta channel of Zeron.app; shared CLI, launch and notify crates; update channels

- Update channels (stable/beta) with semver prereleases, cross-channel installs, ZeronEngineVersion and a macOS 13 floor for beta; "Get beta updates" in the current app's Check for Updates.
- The command line moves into crates/cli and engine start-up into crates/launch, shared by the current app, zeron-engine and zgx; zgx hands engine commands to the bundle's Zeron Engine helper.
- zgx beta packaging and .github/workflows/zgx-beta.yml (beta-v* tags, gated by ZGX_BETA_ENABLED); the separate Preview packaging is removed.
- Templates install from links with updates, an Unverified badge for unknown authors, the Archived settings page, the Cloud repository picker, palette sub-steps without scope tabs.
- Git plugin refreshes on file changes; GitHub plugin batches, tiers and throttles its polling; failed PR watches retry with backoff.
- zgx f81d5e99.

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

* zgx: registry agents' sign-in state, methods and icons; PR badges isolated per session

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

* Harness: registry sign-in uses the crate's Child (Windows build)

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 03:21:42 -07:00
Wing
40183b9337 zgx as a beta channel of Zeron.app; shared CLI, launch and notify crates; update channels
- Update channels (stable/beta) with semver prereleases, cross-channel installs, ZeronEngineVersion and a macOS 13 floor for beta; "Get beta updates" in the current app's Check for Updates.
- The command line moves into crates/cli and engine start-up into crates/launch, shared by the current app, zeron-engine and zgx; zgx hands engine commands to the bundle's Zeron Engine helper.
- zgx beta packaging and .github/workflows/zgx-beta.yml (beta-v* tags, gated by ZGX_BETA_ENABLED); the separate Preview packaging is removed.
- Templates install from links with updates, an Unverified badge for unknown authors, the Archived settings page, the Cloud repository picker, palette sub-steps without scope tabs.
- Git plugin refreshes on file changes; GitHub plugin batches, tiers and throttles its polling; failed PR watches retry with backoff.
- zgx f81d5e99.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 00:57:33 -07:00
Wing
2d63bdb2ab zgx: Zeron's interface on zgx (app, design system, plugins, onboarding, Zeron Preview)
A new desktop app in apps/zgx: Zeron's interface written in Luau on zgx,
its design system, built-in plugins (Git, GitHub, Parallax scenes) and
theme templates, plus the engine and edge work it needs (plugin services
and agent tools, the agent registry, project icons, profile, organisation
admin, onboarding, plugin signing keys) and a separate Zeron Preview
package and workflow (preview-v* tags, off until enabled).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:37:18 -07:00
Wing
6ab1a34bc1
Release: retry R2 uploads, and let the publish job re-run on an immutable release (#1135)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 20:59:42 -07:00
Sina Khalili
74c68888c2 CI: keep signing and deploy credentials in environments only main and release tags can use
Every secret was repository-level, so anyone with write access could read it
by pushing a branch that edits a workflow (or a build script) and running it.
Jobs that need credentials now take them from GitHub environments whose
deployment-branch policy admits only main (and v* tags for releases):
apple-release, android-release, google-play and cloudflare. Branch, pull
request and merge-queue runs get no environment and fall back to the existing
unsigned/debug paths.

CODEOWNERS now names both owners on .github/, edge/vault/, scripts/ci/, the
release packaging scripts and the Android signing config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 15:23:14 -07:00
copilot-swe-agent[bot]
1e630c8c40
Merge remote-tracking branch 'origin/main' into android/play-testing-release
# Conflicts:
#	apps/android/README.md

Co-authored-by: SinaKhalili <20732540+SinaKhalili@users.noreply.github.com>
2026-11-02 21:58:58 +00:00
Daniel Katulevskiy
2500e8b34f
CI: one entry workflow with admission, reuse, priority/locks and a fast pull request tier (#1077)
* CI: one entry workflow with run admission and a fast pull request tier

Pull request checks took a median of ~3 hours from push to done, and ~110
minutes of that was jobs waiting for a runner. Each push asked for ~207
runner-minutes on 15-20 jobs, almost all of it compiling, so bursts of
pushes queued hundreds of jobs and every run held a few runners while the
rest of its jobs waited behind other runs.

- ci.yml is the only pull request / main / merge queue entry point. `plan`
  picks the suites a change needs; `admit` waits until every runner the
  run needs is free, then all its jobs start together and each runner is
  released when its job ends (scripts/ci/admit.py, first come first served
  with conservative backfilling, state read from the Actions API so fork
  pull requests work). `CI result` is the one check to require.
- Pull requests get a fast tier: Windows, macOS, voice and Android run only
  when the change looks platform specific (their files, platform
  conditionals or APIs in changed code); `ci:full` or CI_PR_TIER=full runs
  everything. Main and the merge queue run the full tier.
- Voice: 14 `cargo test` builds capped at 2 jobs (~40 min) become core-tests
  additions plus one nextest build for audio and the mobile voice core; the
  workflow no longer runs uncancelled on every push or saves caches from
  pull requests.
- Windows: three test jobs become one nextest build; one shared cache
  instead of four (~4.5 GB of the 10 GB repository cache).
- Linux UI and browser share one job and cache; edge coordinator and vault
  share one job; the macOS app is built with the test dependencies instead
  of a `cargo check` that recompiled everything; iOS no longer waits for
  the frame-source job, which only runs when the GPUI pin can change.
- Only main saves Rust caches.

* CI admission: cap reservations read from other runs, expire unseen ones

A pull request can edit its own ci.yml, so the reservation in its admit job
name is untrusted. Cap it at the largest plan.py makes, and stop counting an
admitted run's never-created jobs 90 minutes after admission, so one run
cannot hold more than a full run's runners or hold unused ones for long.

* CI: reuse passes on unchanged inputs; ci:priority, ci:lock and an emergency workflow

Reuse. plan fingerprints every suite's inputs in the tree under test (the
merge with main for pull requests): workspace manifest, lockfile, toolchain,
CI files, the suite's workflow and non-Rust files, and for Rust suites the
packages it tests plus every workspace package they depend on, plus any file
outside those that their sources name with a ../ path (scanned every run).
Every job records its pass in the Actions cache under that fingerprint as its
last step; a suite whose jobs all passed is skipped and reserves nothing, and
single Windows and voice jobs are skipped on their own. Pull requests trust
their own passes and main's; main and the merge queue trust only main's;
ci:full and manual runs reuse nothing. Callers are split per suite so each
records under its own fingerprint.

Priority and locks (labels, so triage or above). ci:priority puts a pull
request's runs at the front of the admission queue; ci:lock keeps a full
run's runners out of everyone else's budget while the pull request is open
(until unlabelled, merged, closed or CI_LOCK_HOURS), and admits its runs
first. Runs name their pull request in the admit job; the claim counts only
when that pull request's head is the run's commit. ci-emergency.yml (write
access) locks a pull request, cancels the other pull requests' CI runs and
re-runs its own if needed.

* CI reuse: fail closed

The merge queue, the last gate before main, reuses nothing. A pull request
that changes a Rust build file no selected suite's fingerprint covers reuses
nothing. Sources that build a path from CARGO_MANIFEST_DIR's parent in code
make their suite read the whole workspace. concat!(.., "/../x") paths and
.cargo/ count as inputs.

* CI result: fix the result listing (shell quoting)

* CI: run less on pull requests, more on schedule, and merge tiny test binaries

Measured in CI, test execution is a small part of every job; compiling and
starting jobs that run little is the cost. So:

- Voice: only the audio stack (zeron-audio, which nothing else builds yet)
  and the packaged Windows media runtime remain, for their own files. The
  mobile voice/orb tests were a subset of ios-core, the macOS/Windows
  `cargo check` of harness+engine duplicated the platform builds, and the
  voice-media tests join the Windows nextest build.
- Fast tier gating of jobs and steps to their own files: Windows packaging
  (`app`), the iOS simulator tests and their bindings, the Linux and macOS
  browser/preview fixtures. Android builds the APK on pull requests for the
  app, the FFI crate and dependency changes; the iOS mobile-core paths come
  from zeron-mobile's Cargo closure. Gated jobs and optional steps are part
  of the reuse fingerprint.
- GPUI frame-source runs only when the pinned zui revision moves.
- Version bumps (only `version = "..."` lines in Cargo.toml/Cargo.lock)
  select nothing and are left out of fingerprints.
- nextest `ci` profile for pull requests and main leaves out the slow/soak
  tests (48-chat and real-quantum doc_host sync, the codex dying-server
  backoff, preview leak, two sleep-bound discovery tests); the cursor_shim
  stress test runs 14 rounds (ZERON_STRESS_ROUNDS, 100 by default). Preview
  discovery tests run one at a time (fixed port).
- Nightly ci.yml schedule runs everything in full; weekly-tests.yml runs the
  engine integration binaries and crate tests no workflow ran.
- Linux core no longer builds the 8 test binaries that run nothing there
  (Windows-only or all-#[ignore]d). The small harness, engine and preview
  integration suites move into one `tests/misc` binary per crate. The orb
  geometry tests move to zeron-orb (they tested its re-export); the
  assertion-free microbenchmark is dropped. The macOS app builds with the
  tests instead of rebuilding zeron-ui without the fixture feature.

* CI: pass the nextest config to the build-only steps too

NEXTEST_PROFILE=ci names a profile from scripts/ci/nextest.toml; the macOS and
Windows `--no-run` builds did not load that file, so nextest refused the
unknown profile.

* Engine: keep the git identity setup inside the home it is given

configure_git_identity pinned HOME but inherited XDG_CONFIG_HOME, and
`git config --global` writes $XDG_CONFIG_HOME/git/config when that file
exists. With a sandbox or test home, the identity landed in the developer's
real git config: running the engine tests on a machine with XDG_CONFIG_HOME
set replaced the user's name and email with the test's. An XDG_CONFIG_HOME
outside the given home now gives way to the home's own, and the test pins it
for its own git calls too.

* CI: iOS simulator tests in parallel with ios-core; Windows UI tests side by side

- The C header and module map the simulator tests link are committed in
  apps/ios/CoreFFI (outside Xcode's synchronized folders) and refreshed by
  scripts/ios/build-core.sh like the Swift bindings; ios-core checks all
  three are current. ios-tests no longer waits for ios-core's artifact, so
  the iOS path is one job long instead of two.
- The simulator core for the unit tests builds in the dev profile, not the
  optimized `mobile` profile the app ships.
- Windows runs zeron-ui's tests side by side: nextest gives each its own
  process, so the in-process `--test-threads=1` restriction no longer applies.

* CI admission: budget defaults at the organization's runner limits

20 jobs in total and 5 on macOS (the organization's concurrency limits), and
at most 10 on Windows so Linux keeps half the pool. The repository variables
still override them.

* CI: skip the browser steps when the Linux setup failed

They run after a failed UI test on purpose (a separate signal), but without
the system packages (an apt mirror stall) they can only fail too.

* CI: retry the WebRTC terminal path test (a known race)

remote_terminals' network-change test asserts no keystroke goes through the
relay once the path reports Direct; in a loaded run one did. Retried like the
other timing-sensitive tests in nextest.toml until the race is fixed.

* Fix two races that failed CI on loaded runners

- Muse: a crash usually shows first as "Muse stdout closed", racing the
  process exit; `try_wait` lost that race under load and users got the bare
  protocol error instead of "Muse exited unexpectedly" with Muse's last
  stderr lines. Wait up to 250 ms for the exit, as the Pi driver already
  does (a_crash_mid_turn_reports_muses_last_words failed this way).
- Remote terminals: a subscription reported TerminalPath::Direct before
  attaching the direct writer, so a keystroke typed by whoever saw Direct
  could still go through the relay (a_terminal_rides_a_real_webrtc_pair_
  through_a_network_change failed this way). Report Direct once writes
  ride the link. The CI retry for that test goes.

Both tests pass 25 runs in a row under CPU load.

* CI reuse: count only the CI files a suite runs

Every suite's fingerprint included all of scripts/ci and the composite
actions, so a change to the planner or the scheduler (which decide what runs,
not whether it passes) re-ran every suite. Each suite now counts the CI files
it executes: nextest.toml and the Linux or Windows setup for the Rust suites,
test-core.sh for core, the macOS fixture runner for macOS, apt-install.sh for
the installer. ci.yml still counts for all.

* docs: changing the fingerprint inputs reruns everything once

* CI admission: no circular waits

Two ways admission could deadlock (until the fail-open timeout):

- Each waiting run counted every other waiting run's admit job as a busy
  runner, including runs queued behind it. With a full run (16 of 20) at the
  head and five or more waiting behind it, the head waited for their runners
  and they waited for it. A run now counts only the admit runners ahead of it.
- Two ci:lock labels each reserved 16 of 20 runners and counted the other's
  reservation, so neither locked pull request (nor anyone else) could start.
  Locks are now ordered by when their label was added: an older lock ignores
  a newer one's standing reservation.

Every wait now points forward in one order, so no cycle can form. A test
simulates 3000 random queues (sizes, priority, overlapping locks, polling
order) and checks they all drain; the previous scheduler deadlocked in 309.
The fail-open timeout drops from 5 h to 2 h as the backstop for the one case
outside the model (waiting admit jobs taking every runner in the pool).

* CI admission: waiting admit jobs yield when they starve the pool; ignore runs that never take their turn

Waiting costs a hosted runner from the same pool as the suites. With about
20 runs waiting, their admit jobs held the whole pool, admitted runs' jobs
got no runner, and nothing moved until the 2-hour fail-open. When an
admitted run's Linux or Windows job has queued 10 minutes, every running
admit job but the first quarter of the budget now starts its run without a
reservation, giving its runner back. A new test models GitHub's runner pool
as well as admission: without yielding most 30-run queues never drain, with
it all 200 do.

A reservation read from another run is not trusted, but a run whose edited
admit step never finished still held everyone behind it for 2 hours (and a
fake admitted run held a full run for 90 minutes). A waiting run that could
have been admitted for 3 minutes but still waits is now ignored, and an
admitted run's jobs that have not appeared 10 minutes after admission stop
counting, except the late result and publish jobs.

Polling backs off further from the head of the queue (5 min, 10 min under
400 requests left): the GITHUB_TOKEN quota is shared with releases, the
Cursor SDK update and CI emergency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* CI: voice and the Linux browser fixture nightly only; forks reuse only main's passes

Over two weeks the voice jobs left after the move into core-tests (AEC3
and the packaged Windows runtime) never failed, and the Linux browser
fixture's failures were window-timing flakes and package downloads. Both now
run nightly, on manual runs and with ci:full. The zeron-ui tests stay on
every change: 2,046 tests in 29 s, and the only check that caught one real
regression in that window.

A fork's earlier runs could save a pass entry for the fingerprint of a
later, clean-looking commit, so its suites would be skipped and the pull
request would still show a green CI result. Until the merge queue (which
reuses nothing) is the required gate, forks reuse only main's passes;
CI_FORK_REUSE=own turns their own back on (ci.yml passes it to plan in the
workflow commit that follows).

Docs: admission's new yield and unresponsive-run rules and polling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Engine: keep the user's own XDG_CONFIG_HOME when the git identity home is theirs

The XDG_CONFIG_HOME guard replaced any XDG_CONFIG_HOME outside `home` with
`home`'s. When `home` is this process's own, that hid an identity the user
keeps in an XDG_CONFIG_HOME elsewhere, and the machine identity went into
~/.gitconfig, which wins over it. It now only applies to a sandbox or test
home.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* CI workflows: Android gets only its own secrets, on pushes to main; CI_FORK_REUSE

secrets: inherit gave android.yml every repository secret, and the merge
queue (code not on main yet) would have signed with the release keystore.
ci.yml now passes the four signing secrets and the R2 token by name, on
pushes to main only; pull requests and the merge queue use the debug key,
as forks always did.

Also: ci.yml passes the CI_FORK_REUSE variable to plan, and the comments in
ci.yml, voice-tests.yml and ui-tests.yml say voice and the Linux browser
fixture run nightly.

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

* CI: test-core also runs main's crates/doc/tests (attachments_roundtrip is among them)

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

---------

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-01 15:51:25 -07:00
Wing
1b3e335c36
Edge: profile routes (#1115) 2026-10-30 16:42:51 -07:00
Sina Khalili
1aac985c48 Build signed Android App Bundles and automate Play testing uploads 2026-10-27 20:38:31 -07:00
zeronsh[bot]
79fd52198a
Releases: serve the Android APK's stable name uncached; name each build uniquely (#1032)
The edge served every release artifact but .txt/.json as
`public, max-age=86400, immutable`, overriding the `no-cache` the Android
workflow uploads zeron-android-arm64.apk with. That name is replaced by
every build, so a browser that had downloaded it once kept handing back
the old APK for a day without asking again.

The release route (now edge/src/releases.ts, covered by a workerd test)
serves an object's own cache-control when it was uploaded with one, and
.apk as application/vnd.android.package-archive. Desktop artifacts upload
without one and keep their headers. Each published APK is also named for
its build number (zeron-<version>-<build>-android-arm64.apk), so the
per-build copies are never replaced and can be cached for good.

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-24 21:00:59 -07:00
Wing
684becf0f8
Android app on the shared Rust mobile core (Material 3 Expressive) (#609)
* Android app on the shared Rust mobile core

A Jetpack Compose app (apps/android) that links crates/mobile through
UniFFI — the same transcript layout engine, text measurement and
virtualization as iOS. The painter draws Rust display lists on a Skia
canvas at Rust coordinates with the same Geist bytes; Minikin backs the
fallback measurer. UI is Material 3 Expressive with Zeron's palette.

Kotlin-only renames in crates/mobile/uniffi.toml avoid clashes with
Throwable.message and AutoCloseable.close.

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

* Android: online hosts first, fade the transcript behind the composer; more screenshots

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

* Android: composer-first new session, capsule composer, iOS-parity session rows

- New session is the iOS/desktop canvas: harness mark + "What are we
  building?" over a composer card whose chips (project, branch or host,
  model, effort) open Material 3 Expressive grouped menus.
- One shared composer: a resting one-line capsule that becomes a card
  with context chips when focused; no drop shadow; shape-morphing
  send/stop; a Queue/Steer delivery chip while the agent works.
- Session rows show the harness brand mark, project + branch subline,
  Done/Input/Failed status and state-tinted PR badges; small extended FAB.
- Harness brand marks ported from the shared SVG path data.

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

* Android: Zeron's icon set and a Material 3 Expressive shell

- Every glyph is Zeron's own: the desktop icon set (crates/ui/assets/icons)
  plus the iOS tab/tool icons, compiled to VectorDrawables at build time
  (scripts/android/svg2vd.py) — no Material icons left in the UI.
- Expressive shell: display-weight Geist headers (emphasized type scale),
  filter pills with live counts, SegmentedListItem rows with project-toned
  harness tiles, a floating nav capsule + round search button, and the
  New session bar with the live summary (iOS accessory parity).
- Round tonal chrome on the session screen, expressive action menus for
  row / transcript / overflow actions, rebuilt settings and search.

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

* Android: runway, fold/reveal motion, attachments, @ mentions, queue editing

- Own-turn runway (desktop OwnTurnAnchor): an immediate send glides the
  prompt to the top and holds a viewport of room for the reply; a message
  queued behind the live turn takes the runway once its bubble lands.
- Row motion: fold toggles tween 140 ms ease-out, a growing tool group
  reveals over 360 ms expo; rows interpolate from the previous frame.
- Attachments: Photos / Files / Paste image via the system pickers,
  staged as JPEG (long side <= 2560, <= 24 MB, up to 8) with removable
  thumbnails; pending thumbnails in the transcript show a wavy upload
  ring driven by the escort progress.
- @ mentions: file suggestions above the composer; tokens become
  zeron-file links on send (session + new session).
- Queue editing: host lease with renewal, the user's draft stashed and
  restored, only the visible text committed.
- Project picker is a bottom sheet grouped by machine; choice menus are
  one group with a trailing check.

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

* Android: replace all screenshots with the current UI

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

* Android: chat wallpaper (iOS parity)

The wallpaper hero behind the sessions list and the new-session page:
aspect-filled artwork fading out downward at the opacity the Rust
contrast guard allows (wallpaper_safe_opacity), the new-session composer
softening it, and the list fading it as it scrolls. Effects (dither,
ASCII, halftone, scanlines) run in the shared core (wallpaper_render).
Settings has choose / effect / remove; --es wallpaper <path> and
--es wallpaper-effect set it at launch, like iOS -wallpaper.

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

* Android: flat session chrome, per-chunk streaming veil

- The transcript ends where the composer begins: no gradient scrim, no
  text streaming behind the composer (the runway's viewport was the full
  height, so reply tails ran under it, faded and cramped).
- Header is a flat Material top app bar that takes the container tone
  once content scrolls under it, instead of a gradient cut-off.
- Jump to latest is a small FAB floating over the transcript.
- Streaming veil: each inserted chunk fades on its own clock, found by a
  prefix+suffix diff (list rows carry their bullet after the item text,
  so the old prefix check skipped the veil and words popped in); chunks
  are recorded during composition so new text is never drawn opaque
  first.

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

* Android: Material navigation — search app bar, extended FAB, no custom nav

Two destinations don't take a navigation bar in Material 3 (it's for
three to five), and a floating capsule isn't a Material component. Home
now follows the search-led Material pattern: AppBarWithSearch with the
account avatar (→ Settings, now its own screen with a large top app
bar), ExpandedFullScreenSearchBar for search, FilterChips, and an
ExtendedFloatingActionButton for New session that collapses on scroll.
Session and new-session headers are standard TopAppBars with icon
buttons. Removes the custom floating nav, pills, and tonal circle
buttons. All screenshots recaptured.

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

* Android: restore the filter pills; white send arrow on the accent

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

* Android: restore the pre-review home, settings and chat header

Brings back the Sessions header, floating nav with the New session bar,
Settings as a tab, the search screen, and the round header buttons.
Keeps the flat transcript/composer layout, jump FAB, streaming veil,
filter pills and white send arrow, and adds a status-bar scrim on
scrolled home and settings. Screenshots recaptured.

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

* Android: iOS feature parity — questions, drafts, sections, projects, archive

- Question panel: one page per question, auto-advance, "Other…" text,
  Pi input/editor prompts (prefill + multiline) answerable; replaces the
  composer while open.
- Sessions: Group by Project (git identity, Home per device), options
  menu (New section, Collapse all, Group by project, Archived), swipe
  right to pin, Move to section, section rename/delete, pinned reorder,
  Archived screen, Undo snackbar from every archive, iOS row precedence.
- New session: project picker grouped by repository with a host chip
  for checkouts, New project folder browser, text/options/images kept
  when closed unsent.
- Session: per-chat drafts, open failures return to Sessions with a
  note, image viewer (thumbnails and image chips), chip icons, "Sending
  to host…" and reconnect countdown, PR chip Open/Copy link, take photo,
  Ctrl+Enter sends, markSeen on leave.
- App: sends get 25s to deliver after backgrounding (short FGS), an
  expired session keeps its local store, OAuth state checked, tokens
  sealed with Android Keystore, sign-out confirmation, list/detail
  layout on large screens, Ctrl+N / Ctrl+Shift+F.

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

* Android: README launch routes; pull to refresh waits for a real change

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

* Android: remote voice mode (port of the iOS voice call)

Adds sh.zeron.android.voice, the Android side of the Codex voice
orchestrator call: audio on the phone, Codex and its tools on a
registered execution host advertising voiceHostCapability().

- VoiceController (iOS RemoteVoiceController): host eligibility and the
  remote-voice dev override, start/stop/mute, end reasons with messages
  and Retry/Settings, per-user/org remembered host and style, call
  sounds, proximity (earpiece + screen off at the ear), one call at a
  time, no auto reconnect, the scripted preview and a WebRTC self-test.
- VoicePeer + VoiceMedia (CodexVoicePeer/NativeVoiceMedia): Google WebRTC
  M150 (io.github.webrtc-sdk:android, the iOS pin's milestone), audio
  only; Prepare/Offer/ApplyAnswer/SetMuted/Levels/Close completed through
  VoiceCall.completeMedia exactly as iOS; manual audio until the host
  confirms, focus loss ends the call, speaker/earpiece/headset routing.
- VoiceCallService: microphone foreground service with a CallStyle call
  notification (host, call clock, Mute, Hang Up; tap opens the stage).
- Compose UI: the core orb on a Canvas, the core caption fader, the call
  stage, voice settings, the New session bar button / live call strip,
  the session header button and VoiceHost (mic prompt, keep-awake,
  off-stage failure snackbar).
- Call sounds from the iOS app in res/raw.

Wiring into AppModel, navigation and the existing screens is left to
the integrating change.

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

* Android: wire voice into the app

The call lives on AppModel (stopped on any sign-out). The New session
bar carries the voice button and the live call strip; sessions get a
header voice button; Settings gets a Voice row; the call stage and
voice settings are routes (also from the call notification and
zeron://voice). Launch extras: voice-preview, voice-stage, remote-voice,
voice-selftest.

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

* Android: zeron://voice opens the call

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

* Android: stop re-composing every session row on scroll

The sessions screen read `list.firstVisibleItemScrollOffset` while
composing (for the status-bar scrim), so it re-ran on every scroll frame
while the header was on screen. `RowActions` was rebuilt on each run, so
no row could skip: every visible row re-composed every frame.

`StatusBarScrim` now takes the list and derives `scrolled` itself (the
same read in Settings, Archived and Voice settings goes with it), and
`RowActions` is remembered.

Nothing Phone (2), release build, 1.5 s drag at the list top: UI thread
p90 7.7 -> 5.6 ms; 8 flings: 7 -> 0-3 janky frames.

* Android: fade the status-bar scrim without a grey flash

Animating from Color.Transparent (black at zero alpha) passes through
semi-transparent grey: in the light theme the status-bar band dropped
from luma 249 to 173 for ~67 ms on each toggle (screen recording). Fade
from the page tone at zero alpha instead; same for the nav bar pill.

* Android: ask for the panel's peak refresh rate while touching

Nothing OS holds third-party windows at 90 Hz on its 120 Hz panel
(`PRIORITY_APP_REQUEST_RENDER_FRAME_RATE_RANGE ... mMaxRefreshRate=90.0`)
unless the window asks for a display mode. Ask for the fastest mode while
the user touches the app and for 10 s after, then hand the choice back so
an idle screen isn't pinned at 120 Hz.

Drag at the list top: a frame every 11.2 -> 8.4 ms (90 -> 119 fps), no
dropped frames; coming back from idle costs one ~19 ms frame while the
mode switches.

* Android: side chats, subagents, terminals and visuals (iOS parity); M3 floating toolbar

Companions, as on iOS:
- Chips above the composer ("2 working", side chats, live terminals) and a
  companions sheet listing a session's subagents (live first, ticking),
  side chats (new, fork, swipe to archive) and terminals (swipe to close).
- Session header gains the companions button (badged while agents run); the
  menu groups New side chat / Fork / Terminal, Pin / Copy / Archive, Delete.
- Side chats head themselves under their parent; fresh ones left unused go.
- Subagent cards in the transcript open the subagent's live, read-only
  transcript with a working/finished/failed bar.
- Terminals: a View painting the Rust emulator's frames (box drawing and
  blocks drawn per cell), IME + hardware keys, fling scrollback, pinch to
  resize, word selection with a floating Copy / Add to message / Paste menu,
  a key bar (esc, sticky ctrl/alt, tab, repeating arrows, punctuation,
  paste), a tab switcher, status pill, and refs that reattach after launch.
- Agent visuals (show_visual) paint in the transcript with live surfaces
  and controls.

Home drops the tab bar for a Material 3 Expressive floating toolbar
(Settings, Search, voice) with New session as its FAB; it tucks away to the
FAB while scrolling down. Settings is a pushed page.

Merged main; the Kotlin bindings rename TerminalSession.close → end, and
build-core.sh ships libc++_shared.so (the core now links C++).

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

* Android: Material 3 bottom app bar on the Sessions page

Settings, Search and voice as the bar's actions, New session as its FAB;
the bar slides away while the list scrolls down. Replaces the floating
toolbar, which sat small and centred over the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: Cloud and large-screen parity with iOS

Cloud (iOS Cloud/):
- CloudStore: status and credits, GitHub, the vault's logins and their
  usage, billing, session machines; cached reads that revalidate, with
  backoff when a read fails. Browser hand-offs come back through
  zeron://signed-in.
- Settings → Agents: Providers (each device's agents with their switches
  and logins, plus Cloud's), Cloud (GitHub, repositories, Cloud projects),
  Billing (credits, plans, packs, Stripe checkout and portal).
- An agent's accounts on Cloud or a device: usage bars, switch, remove,
  sign in through the browser (paste-code fallback), API keys.
- GitHub device-flow sheet; the Cloud project picker.
- New session on Cloud: the Cloud host, Cloud's models, branches from
  GitHub, "New Cloud project…", "Starting on Cloud…", out-of-credits.
- Sessions: the out-of-credits notice (a refused send shakes it), a failed
  Cloud machine named in the banner, an error card's "Log in".
- Welcome pages after sign-in: appearance, sync, GitHub, agents,
  notifications.

Large screens (iOS SplitRootController), from 700dp wide: the sessions
sidebar beside the open session or the new-session page; companions in an
inspector column with terminals, subagents and side chats pushed inside it
(the sidebar steps aside below 1100dp); Settings as a dialog; Ctrl+N,
Ctrl+Shift+F, Ctrl+B, Ctrl+J, Ctrl+Alt+0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: the Cloud list's scrim derives its scroll state too

* Android: drop the title header from the session menu

It repeated the header's title and host, and clipped the first item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: the model picker as a sheet (iOS parity)

"Model" over where the chat runs, a provider switcher whose thumb follows
swipeable pages (the chat's provider first), models straight on the sheet
with the current one tinted and checked and scrolled into view, a notice
("Your next message continues this chat with Codex", or why the provider
can't change now), search past 12 models, loading skeletons, and a beat to
see the pick land before it closes. Sessions offer the host's other
providers between turns when the host can switch (Cloud chats: Cloud's
agents); picking one moves the chat there and drops the old effort and
options. The new-session page opens the same sheet with a tab per provider
the target runs.

A host that doesn't answer its model list gets the built-in catalog after
5 s (the FFI call can't be cancelled, so the wait is raced, not timed out);
providers that join after the sheet opens load then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: build the APK in CI and offer it on zeron.sh

- .github/workflows/android.yml: a release APK (arm64, the core at the
  mobile-dist profile) whenever the app or the Rust core changes. Pull
  requests get it as an artifact; main publishes it to R2 as
  zeron.sh/releases/zeron-android-arm64.apk (no-cache) plus a versioned copy
  and sha256s. Publishing needs the upload key in secrets; forks and
  unconfigured repos build debug-signed and don't publish.
- Gradle: the version is the workspace's (Cargo.toml), the build number comes
  from CI, and assembleRelease signs with ZERON_ANDROID_KEYSTORE when set.
- build-core.sh: ZERON_ANDROID_PROFILE picks the core's Cargo profile.
- Website: Android in the mobile downloads row; on an Android phone the
  download buttons offer the APK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: a third the APK size; CI artifact holds only the APK

- Compress native libraries and dex in the APK: it's downloaded from
  zeron.sh, not delivered by Play (161 MB → 44 MB locally).
- Drop material-icons-extended: the app draws Zeron's own icons, and only
  leftover imports referenced it.
- Package only the ABIs the core was built for (ZERON_ANDROID_ABIS): CI's
  arm64 APK no longer carries WebRTC's x86_64 library.
- The workflow stages in out/android: the repo's dist/ (desktop packaging)
  was swept into the artifact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android CI: build with the release key

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android CI: stop compiling the core for the host

The Kotlin bindings came from a host build of zeron-mobile, compiled twice
(the plain lib, then again with the generator's feature): about 7 of the
build's 15 minutes. UniFFI's generator now has a crate of its own
(crates/mobile-bindgen, uniffi + its CLI) and reads the bindings out of the
Android library just built, as the iOS script does with its device library;
the output is byte-identical. Without the NDK the script still builds a host
library for the bindings.

Pull requests build the core at the quicker `mobile` profile; main keeps
`mobile-dist` (thin LTO) for the published APK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: wing-anara <wing_13@live.com>
Co-authored-by: Alexandre VARGAS <alexandre.vargas.lopez@gmail.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-24 17:12:34 -07:00
zeronsh[bot]
2ca1024027
CI: install cargo-nextest into a run-scoped bin dir on macOS (#1020)
GitHub moved macos-latest to the macOS 26 image, whose rustup comes
from the system package manager, so ~/.cargo/bin no longer exists and
the nextest extract failed on every macOS run. Extract the
checksum-verified binary into $RUNNER_TEMP/nextest-bin and put that on
PATH instead; it also stays out of the rust-cache'd ~/.cargo.

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-24 21:38:11 +00:00
Wing
2d6895cbb3
TestFlight: build with Xcode 27.1 so iPhone Duo gets the native layout (#983)
TestFlight builds came from macos-latest's Xcode 26.6 (iOS 26.5 SDK). On
iOS 27.1, apps linked against an older SDK run in compatibility mode on
iPhone Duo: bars stay horizontal instead of moving into the vertical
bar, and the 27.1-only code paths (behind #if compiler(>=6.4)) are
compiled out. Build 98 showed exactly that on a real device.

The job now runs on the xcode-27 image (preview) and selects Xcode 27.1
with xcode-select (not DEVELOPER_DIR, which build-core.sh's `env -i`
would drop). PR CI stays on Xcode 26, which keeps checking the app still
builds there.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:25:29 -07:00
Wing
2e151ca65a
Harden every provider: crash and stall detection, Windows-safe launching, and run recovery (#977)
* Harness: lossy line framing for child stdio; OpenCode startup retries and readiness

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

* Harness: drop unused line-reader imports; retry OpenCode port races per line

lossy_lines replaced every tokio Lines, leaving AsyncBufReadExt and
BufReader imports unused across the harnesses.

Address-in-use was matched against the stderr tail after exit, but the
tail keeps only the last few lines and Node prints EADDRINUSE above a
stack trace that scrolls it out, so a lost port race failed the spawn
instead of retrying. Match it per line alongside "database is locked",
with a fixture that loses the race once.

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

* Claude: classify results by their error fields and never drop a result line

The CLI files API failures (invalid key, 429, 529, full context) under
`subtype: "success"` with `is_error`/`terminal_reason`/`api_error_status`;
they ended the turn Completed. They now end Errored with readable wording
(the CLI's own text after a plain headline), aborts end Interrupted, and a
failure already shown by the assistant frame's error code is not repeated.

A stdout line that failed to parse was skipped, and when it was the
`result` the turn never ended. Lone surrogate escapes (Node cutting a
string through a pair) are repaired, explicit nulls read as absent
fields, and a result line that still won't parse ends the turn anyway.

`api_retry` and compaction keep the turn visibly alive; a long retry run
says so once, and a compaction boundary reports the new context size.

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

* Harness RPC: fail pending requests on a dead stdin; resolve void responses

A failed stdin write now closes the client and rejects every awaiting
request at once instead of leaving them until stdout EOF, which a
descendant holding the pipe can delay forever. A bare {jsonrpc, id}
frame (a JS server answering a void method) resolves its caller with
null instead of stranding it; frames with other members but neither
result nor error stay diagnostic noise.

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

* ACP: bound turn stops, answer open dialogs, and see handshake crashes

- A stopped turn the agent never settles closes Interrupted after 12s and
  retires the process; the next message restores the session in a fresh
  one instead of the chat spinning on a cancel nobody answers.
- Question dialogs are tracked, and a stop or interrupt answers each
  'cancelled' as ACP requires after session/cancel.
- Model/config switches are bounded (15s per call) and a stop or
  interrupt gets through while one is in flight.
- The handshake watches the child: a crash while a descendant holds stdout
  reports at once with the exit status and stderr, not after 120s.
- Model discovery drains its incoming channel so a notification burst or
  a server request cannot stall the probe.
- Grok: initialize declares the prompting client type and every
  session/cancel carries the user gesture, which stops stale background
  wake prompts from restarting cancelled work.

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

* ACP: restore sessions the way the agent advertises; sign in once on auth_required

- A resumed run uses session/load only when loadSession is advertised,
  else session/resume when sessionCapabilities.resume is; Antigravity
  prefers resume, since its load replays every tool call and a long chat
  outlasts the handshake. Load gets its own 90s budget on top of the
  handshake's, and any failed restore still falls back to a fresh session
  with a visible notice.
- auth_required while opening the session authenticates once with the
  agent's own default method (Grok: cached_token) and retries; a default
  that needs a terminal or an env var is refused with a clear message.
  Agents that sign in from Settings keep pointing there.

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

* Harness: version probes, Windows home, and the child environment

Version probes no longer pin a timeout for the process lifetime: the
budget is 10s on Windows (npm shims start node first) and 5s elsewhere,
an inconclusive probe is retried after 30s, and probes run outside the
global cache lock with per-binary coalescing so one slow CLI cannot stall
every harness.

On Windows the home directory is USERPROFILE (what Node's os.homedir()
uses); an MSYS-style HOME is only a fallback when it is an existing
absolute Windows path.

The login-shell snapshot now also captures TLS trust (SSL_CERT_FILE,
SSL_CERT_DIR, NODE_EXTRA_CA_CERTS, REQUESTS_CA_BUNDLE), SSH_AUTH_SOCK, the
locale and __MISE_DIFF; compose_child_path hands them to agent children
that lack them, and gives macOS children a UTF-8 LC_CTYPE when a Dock
launch has no locale. The child PATH puts the login shell's PATH before
the daemon's own minimal one. The probe runs in its own session so an
interactive shell cannot take the terminal, falls back through $SHELL,
the passwd shell and the defaults within one budget, then launchd's PATH
on macOS, and speaks nushell's syntax.

On Windows the child PATH and CLI discovery add the persisted registry
PATH (read fresh, %VAR% expanded) and the node-manager directories
discovery searches, so node/npx MCP servers resolve and a Node installed
after startup is found.

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

* Harness: read the process table natively and never signal a reused pid

Descendant snapshots read /proc on Linux (slim images often lack ps) and
libproc on macOS, falling back to ps. Each descendant's start time is
recorded with it, and tree teardown re-verifies it before every SIGTERM
and SIGKILL, so a pid that exited and was reused by an unrelated process
during the grace period is left alone.

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

* Harness: retry install renames Windows reports as sharing violations

Moving a finished adapter or archive install into place retries
ERROR_ACCESS_DENIED / ERROR_SHARING_VIOLATION / ERROR_LOCK_VIOLATION for
about two seconds on Windows: the malware scanner or the just-exited
verify process briefly holds the fresh tree open. npm discovery also
consults the registry PATH on Windows.

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

* ACP: inline image attachments when the agent takes image prompts

Agents advertising promptCapabilities.image now get staged attachments as
image content blocks with the text, on the first prompt and on every later
message, including steers queued for the turn boundary or a mid-turn
steering call. The path refs still ride the text, so agents without the
capability are unchanged. Pi's image loader is shared: its blocks are
already ACP's image content shape.

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

* Owned processes: strip every inherited Claude Code session marker

A child launched from inside a Claude Code session (or on a Cloud machine
running one) inherited its session id, messaging socket and token, IDE
port, pid and effort level, and its own Claude took itself for nested in
that session. The user's own configuration (CLAUDE_CONFIG_DIR, Bedrock/
Vertex switches, the Git Bash path, ANTHROPIC_*) is kept.

`shutdown_with` also ends a descendant snapshot taken earlier: once the
agent has exited and been reaped, its orphans can no longer be traced.

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

* Claude: recover stale resumes, own the process tree, report every crash

- A resumed session the CLI has no conversation for (it answers "No
  conversation found" and exits) broke the chat for good: the same id was
  reused forever. Claude's own history is checked first and an empty or
  missing transcript starts fresh; when the CLI still refuses, the run is
  relaunched once without --resume, everything already written to stdin
  replayed. Both say the earlier context is gone.
- The CLI runs in its own process group, so teardown reaches its MCP
  servers and tools on every exit, not only an interrupt.
- A crash in any turn now ends it, not just in the first; the message
  waits briefly for the exit status and the stderr tail, which land just
  after stdout closes.
- A refused set_model / apply_flag_settings is shown and not taken as
  applied (the next change re-sends it; unanswered ones time out), and
  control requests we don't serve get an error reply instead of silence.
- Discovery runs without the user's hooks or IDE auto-connect, waits 25s
  for a cold start, and reports the exit and stderr when it fails.
- Title runs drop --strict-mcp-config next to a managed-mcp.json, which
  the CLI refuses it beside.
- On Windows an npm claude.cmd shim resolves to the native claude.exe
  shipped beside it.

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

* Codex: repair Windows npm installs at their own version, via the owned launcher

On Windows the `codex` entry is a `codex.cmd` shim, not a symlink, so the
canonical path's grandparent was %APPDATA% and the repair reinstalled
`latest` instead of the installed version. Read the package beside the shim
(`node_modules/@openai/codex`) as well.

npm itself is discovered as `npm-cli.js` on Windows; run it through the node
beside it. Launch everything through crate::process::Command, so the GUI
never flashes a console window and a timed-out install takes npm's whole
process tree down with its job object.

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

* Codex: harden the app-server driver against retries, lost resumes and crashes

- `error` notifications: one Codex will retry ("Reconnecting... 2/5") is
  progress, logged instead of written into the transcript as a permanent
  error (live, 0.164.0: nine per failed turn, each carrying the 401 text).
  A final one is held and reported once, by the turn's Done, never as both
  an error part and the Done's error. Subagent streams follow the same rule.
- Error text reads codexErrorInfo and additionalDetails: an unauthorized
  code or an upstream 401 becomes a fixed "isn't signed in ... run codex
  login" message, usage/rate limits (or a 429) a limit message with the
  reset time from account/rateLimits/updated.
- thread/resume falls back to a fresh thread only when the conversation is
  gone (no rollout, unknown id), and says so in the reply; an archived
  thread is unarchived and resumed; any other failure fails the run.
- A crash during thread/turn setup reports the exit status and stderr tail;
  the stderr reader closes the tail at EOF so the report never waits it out.
- A Codex CLI known to be older than 0.146.0 is refused up front.
- A turn interrupted by someone else ends Interrupted, not Completed.
- After an interrupted turn, which commands still run is asked of
  thread/backgroundTerminals/list (a command's processId is Codex's exec
  session, not an OS pid); older app-servers fall back to an OS liveness
  probe, now implemented on Windows too instead of counting every command
  gone.
- item/permissions/requestApproval goes through the approval question path
  (granted outright with auto-approve); MCP elicitations are asked when they
  are a flat form and otherwise declined with a valid reply rather than a
  JSON-RPC error that failed the MCP tool call.
- initialize opts out of turn/diff/updated and command/patch output deltas,
  retrying without the opt-out if an older app-server refuses it.
- At most 32 server requests wait on a person at once; extras are refused
  as overloaded instead of spawning unbounded tasks.

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

* Pi: keep the RPC stream alive through noise, lone surrogates and huge frames

A line that is not JSON (a dependency's console output) used to end the
run, as did any frame over 32 MiB and any frame carrying a lone UTF-16
surrogate escape, which JS emits for a string sliced mid-pair and
serde_json refuses. Lone surrogates now become U+FFFD and the frame is
reparsed; a line that still fails is skipped and logged; an oversized
frame is dropped and the reader resyncs at its newline.

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

* Pi: settle after compaction, survive rejected steers, answer every dialog

- A state barrier that finds Pi compacting, retrying or holding queued
  input now re-checks when compaction or the retry ends; before, the turn
  waited for an agent_settled that never came and spun Working forever.
- A submission Pi refuses (a steer, a failed command) is an Error event
  for that message; the turn it joined goes on, and only a turn it opened
  settles Errored. State queries the turn's end waits on are bounded at
  15s, and a mid-session model change at 30s.
- extension_error is shown but no longer fails the turn.
- Dialogs still open when a turn ends or is interrupted are answered
  cancelled, so an extension awaiting one is not stuck while Pi lives on.
  A dialog timeout of 0 means none, and a negative one has expired.
- A crash reports its exit status and stderr instead of the pipe symptom
  (Pi stdout closed, EPIPE) by waiting briefly for the exit.
- Windows: session paths handed to --session lose the \\?\ verbatim
  prefix canonicalize adds.

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

* Windows: launch npm shims' targets directly; retry transient spawns

npm's .cmd shims went through cmd.exe, which cannot use a UNC working
directory (projects on \\wsl.localhost or a share ran in C:\Windows),
caps the command line at 8191 characters and rejects CR/LF arguments. A
whitelist parser recognizes the layouts cmd-shim generates (npm 7+ and
the older npm 6 / npm 5 forms) and the launcher runs the target itself:
a native .exe directly, a node script as `node.exe <script>`, preferring
the node.exe beside the shim, then node on the child's PATH. Shims that
set variables, use another interpreter, or are hand-written keep the
cmd.exe route, which now fails clearly past 8191 characters and warns
about a UNC working directory.

Process creation is retried with 100/300/1000ms backoff on sharing and
lock violations, and on access denied when the image changed in the last
minute (the malware scanner holding a freshly updated CLI). A missing
working directory is reported as NotADirectory rather than an error that
reads like a missing binary. An extensionless program path is judged by
its file name, so a dot in a directory (C:\Users\first.last) no longer
skips the PATHEXT probe.

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

* Windows: give agents their kill grace before terminating the job

shutdown_child terminated the job immediately, so Claude or Codex could
be killed mid-write to their session files on teardown. A still-running
child now has its stdin closed and up to kill_grace to exit on its own
(callers have already sent their protocol shutdown) before the job is
terminated; an exited child is cleaned up at once as before.

Also silences a Windows-only dead-code warning in the shell snapshot and
gives the interactive-fallback probe test a budget that survives a full
parallel test run.

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

* Cursor: bound stops, keep startup stops, and stop misreporting failures as success

- A stopped turn the SDK never settles (its cancel can wedge on a dead
  transport) closes Interrupted after 12s and retires the shim; the next
  message resumes the agent in a fresh one.
- A stop that lands while the agent is still being created or resumed is
  no longer lost: the first turn settles cancelled exactly once and its
  prompt never runs. One during the rate-limit retries cuts the wait short
  and ends the turn before it began.
- Two rejections the SDK leaves unawaited (a shell tool's failed spawn, a
  write to a closed exec stream) are logged instead of killing the chat.
- A run that finishes with a reply consisting only of a transport dump
  (ConnectError, the backend's generic failure line) reports an error
  instead of success; prose quoting the same diagnostic is still an answer.
- A reply the SDK settled without streaming it is shown; a send refused
  because a dead process left the agent's run active is retried once with
  the SDK's force option.
- Images: attachments ride the SDK send as inline images, on the first
  prompt and on later messages (which wait for a turn boundary, since
  native steering takes text only).
- Cursor counts as installed when the SDK has credentials (CURSOR_API_KEY
  or its saved login), not only when the unused cursor-agent CLI exists.

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

* OpenCode: spec-compliant SSE decoding, a bus silence bound, honest reconnects

The event bus parser split frames only on "\n\n", parsed each data line on
its own, dropped a whole frame on one invalid byte and rescanned its buffer
from the start for every chunk, which goes quadratic on multi-megabyte
frames. It is now an incremental decoder for the standard framing: LF, CR
and CRLF line endings (a CR may close one chunk and its LF open the next),
comments, data lines joined with LF, and lossy per-line UTF-8.

A server that wedged mid-turn left the turn Working forever: reads had no
bound once the stream was up. Both generations keep an idle stream talking
(1.x a server.heartbeat event every 10s since at least 1.14.17, 2.x a
": heartbeat" comment every 15s; verified live against 1.18.31 and 2.1.2),
so 45s of silence now abandons the stream and the reconnect re-syncs. The
connect itself is bounded the same way.

The reconnect budget reset on any 2xx, so a server that accepted and then
closed the stream before its first frame was retried forever. It now resets
only once a stream delivers a frame.

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

* OpenCode: attachments as proper file URLs

Attachments rode as format!("file://{path}"): nothing was percent-encoded,
so a `#` cut the path at a fragment, `?` turned the rest into a query (1.x
even reads ?start=&end= off it as a line range) and `%` decoded into
something else, on every OS. On Windows a drive path became file://C:\...,
whose drive letter parses as a host, and a UNC share lost its server.

Both wires resolve the URL with Node's fileURLToPath, so build what it maps
back to the same path: every byte outside the unreserved set encoded, drive
paths as file:///C:/..., UNC paths as file://server/share/..., verbatim
\\?\ prefixes dropped. The expected URLs match Node's own pathToFileURL
for the same paths, and a live attachment named "shot #1 ?%.png" resolves
on 1.18.31 and 2.1.2.

The directory header encoding is unchanged: both generations decode it
with decodeURIComponent, so a Windows path arrives exactly as the official
SDK's encodeURIComponent would deliver it; a test now pins that.

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

* OpenCode: a stop aborts the turn's subagent sessions too

Stop and interrupt aborted only the root session. A foreground subagent
ends with its parent, but a background one (the task tool's background
mode) does not, and a stop keeps the server up for the next prompt: the
subagent kept running and spending tokens after the user stopped it. Its
chip settling early made it easy to miss.

After the root's abort is accepted, every child session the bus announced
is aborted as well, settled chips included, plus (1.x) any the server lists
as the root's children. Detached and bounded at 15s, so the turn still
settles on the root's own idle; a child that is already idle or gone is
ignored.

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

* Pi: build the dialog test fixture with struct-update syntax

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

* OpenCode: notice a crashed server within half a second

run_session never watched its own server process: a crash mid-turn was
noticed only after the bus burned its whole reconnect budget, 40 attempts
of 250ms plus a connect each, and a refused loopback connect costs about
2s on Windows, so the turn read Working for a minute or more before the
crash surfaced. The loop now polls the child every 500ms; on exit it waits
for the stderr reader to drain and settles through the same path the bus
loss uses (now shared), with the crash message and its stderr tail.

A crash between turns ends the runtime the same way, and a message that
arrives after one reports the crash rather than its prompt's refused
connect; the next message then starts a fresh server.

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

* OpenCode: prompts and replies that survive lost answers and bus gaps

Prompt delivery. A prompt POST that timed out or lost its connection
errored the turn even though the server may have queued it, and the next
prompt could then land on a still-busy session. Prompts now carry a
message id minted in opencode's own ascending form (1.x messageID, 2.x id;
sessions order messages by id). On an ambiguous failure (timeout, dropped
connection, 5xx) the session is checked before anything else: running, or
holding a message under that id, means the prompt landed. Otherwise it is
posted once more; 2.x admits a repeated id once and 1.x is only re-posted
when no message carries it, so a retry cannot duplicate the turn. A 4xx
still fails at once, and a failure for a turn the bus already shows busy
keeps the turn. Outcomes are bound to the turn that posted them, like the
native command failures they now share a channel with.

Stall clock. Both wires report busy within milliseconds of accepting a
prompt, before any provider package install or catalog fetch (traced live
on cold isolated 1.18.31 and 2.1.2 servers), so a slow first turn on
Windows cannot trip the no-progress bound once its prompt is in. What
could was a server slow to admit the prompt itself, such as a contended
database. The bound now starts when the server accepts the prompt; the
POST is bounded on its own.

Replies. A permission approval was one POST in a detached task whose
failure was dropped, leaving the agent waiting forever. Permission and
question replies now retry with backoff (3 attempts, 10s each; a request
every route reports missing is no longer pending); a reply that still
cannot be delivered aborts the session and ends the turn with the error.

Reconnects. The bus never replays, so a permission or question asked
while it reconnected was lost and the turn blocked. After every reconnect
the pending requests of our session and its subagents are listed (1.x
GET /permission and /question; 2.x per-session /permission and /form) and
handled like live ones; ids already handled are skipped, so nothing is
answered or asked twice. A reconnect no longer settles a turn whose prompt
the server has not answered yet.

The stall and provider-retry aborts are now bounded at 5s like the others.

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

* OpenCode: opt-in live test against a real server

Drives an installed opencode through real turns, isolated from the user's
data, config and logins by per-run XDG directories (the anonymous tier
needs no account): an attachment whose name carries URL-reserved
characters, a follow-up prompt, and a stop that keeps the session for the
next one. Ignored by default; ZERON_OPENCODE_LIVE_EXE names the binary and
ZERON_OPENCODE_LIVE_MODEL optionally the model. Passes against 1.18.31
and 2.1.2.

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

* Engine: pick cut-off turns back up without re-sending them

Boot recovery revived a crashed turn by dispatching the user's original
prompt into the resumed provider session, which usually already held it
and part of the work: the model read the request twice and could redo
finished commits and edits. It also revived native commands like
/compact, and a graceful shutdown never revived anything.

- When the journal shows the provider streamed output for the turn and
  the transcript kept it under that message, the revived run sends a
  short continuation instead (Cursor's also quotes the request, since its
  SDK can drop a turn it never checkpointed). With nothing on the
  provider side, or no session to resume, the original prompt goes as
  before. Transcript, preview and title keep the user's own words.
- Native commands, turns parked on an unanswered question, and turns
  that had already finished are not revived.
- The revival ledger expires after 12h and resets when the user sends a
  message; when the cap of 3 in a row stops a revival, the aborted entry
  says so.
- A graceful shutdown marks the turns still working ({chat}.shutdown
  beside the journal) and ends them with a visible note; the next boot
  picks them up under the same rules. A user's Stop, a turn parked on a
  question, and a shutdown after forgo_revival() (sign-out) are not
  marked.

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

* ACP: settle open subagents before a timed-out stop's Done

The stop deadline sent its Done and then let the terminal bookkeeping
settle open subagents after it. Wind down through the same bookkeeping
an interrupt uses, so subagents settle first and the Done is last.

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

* Engine: retry transient start failures with backoff

A run whose harness failed to start ended at once, whatever the cause.
On Windows an antivirus scan holding a freshly updated CLI (access
denied, sharing violation) and on Unix ETXTBSY while an update rewrites
the binary are momentary, and the user saw a failed turn for nothing.

Start failures that are plausibly transient (io errors: permission
denied, resource or executable busy, would block, interrupted; Windows
sharing/lock violations) now re-dispatch against the same user entry
after 250ms, 1s and 3s before surfacing. Not installed, not signed in
and protocol errors still surface at once. A Stop during the wait ends
the run. This is a separate failure point from the startup-crash retry
(a stream that died before its session started), whose single retry is
unchanged.

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

* Engine: retry a resume the provider says is gone in a fresh session

The engine keeps resuming a chat's stored provider session. When the
provider no longer has it (Claude: "No conversation found with session
ID"), the startup-crash retry resumed the same dead id again, so every
message in the chat failed twice and never recovered.

When the errored start says the session is gone (a few narrow phrases;
an ordinary startup failure still keeps the id, per the 2026-08-13
incident), the retry starts a fresh session behind an in-memory "do not
resume" tombstone. The fresh run's SessionStarted then replaces the
stored id as usual, so later turns resume the new session, and nothing
durable is lost if that retry fails too.

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

* Engine: a sign-out shutdown does not revive the turns it cuts off

Both the managed background engine and the headless daemon now call
forgo_revival() before shutting the runtime down when the account signed
out, so those turns stay ended instead of restarting on next sign-in.

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

* Harness RPC: one check for a lost answer, shared with Codex

A failed stdin write now fails pending requests with "app-server stdin
closed (<io error>)", which Codex's suffix match no longer recognized:
a resume whose write hit a dead app-server could read as a refusal. The
wire's lost-answer reasons are now constants in jsonrpc.rs, and
jsonrpc::transport_lost is the single classifier Codex uses.

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

* Harness: close an agent's stdin before its Windows teardown

Windows' shutdown_child gives a child its kill grace to exit on stdin EOF,
but Codex, ACP, Claude and Pi hand stdin to a writer task that keeps it
open while any sender clone lives, so every teardown sat out the full
grace. Each now closes stdin (after the lines already queued) right
before its teardown: RpcClient::close_stdin_for_teardown, Claude's
StdinMsg::Close, Pi's Transport::close_input_for_teardown, and the Claude
probe drops its pipe. Cursor already dropped its only sender; OpenCode
and the Devin probe spawn with a null stdin. Unix teardown order is
unchanged: these are no-ops there.

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

* Harness: a missing working directory is not a missing binary

On Unix a spawn into a deleted project directory fails with NotFound,
which every driver reported as "harness binary not found".
executable::spawn_error now checks the requested directory first and
reports "working directory <path> does not exist" (Io, NotADirectory);
a real NotFound is still NotInstalled, and every other failure stays Io
with its kind for the engine's transient-retry classifier. Claude, Codex,
Cursor, ACP, OpenCode and Pi launches all go through it.

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

* Claude: a timed-out discovery probe says what the CLI printed

The probe's timeout error now carries the CLI's stderr tail (an auth
prompt, a broken config), through redact_secrets, which is now
pub(crate) for drivers that build their own diagnostics.

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

* ACP: Grok's blocked actions go to the user unless the run auto-approves

Declaring clientType "extension" makes Grok turn actions its Auto-mode
classifier blocks into session/request_permission calls, and the ACP
driver accepted every tool permission unasked, whatever the run's
auto_approve: a run that had not opted in would now execute what Grok's
own classifier refused. ToolPermissions::for_run keeps that only for an
auto-approve run; otherwise a Grok permission request goes through the
input bridge as a "Permission request" with the agent's own options,
and a drain with no bridge (setup, control calls) declines it, as the
classifier did before. Other ACP agents keep the unattended default.

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

* Harness: no dead-code warnings for Windows-only teardown items on Unix

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

* Engine: the dead-command sweep never overwrites a racing drain's outcome

The sweep read the command list, then checked the in-flight claims. A
drain that resolved the command and released its claim in between made
an applied command look consumed-but-unresolved, and the sweep rewrote
it Rejected ("interrupted before completion"). Outcomes are written
before claims are released, so the sweep now re-reads the status once it
sees no claim. Exposed by e2e harness_emitted_input_twin_* failing most
runs of the e2e binary after the engine hardening.

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

* ACP: send Grok no client type

Declaring clientType "extension" makes Grok turn the actions its
Auto-mode classifier denies into permission requests. Ordinary sends are
auto-approve, so those actions would run with nobody asked: a change of
Grok's safety policy, not a durability fix. The classifier's silent
denials stay; Grok permission requests in runs that are not auto-approve
still go to the user, and cancels keep their gesture metadata.

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

* Windows CI: run the portable harness integration suites

OpenCode on Windows draws the most reports, yet the Windows job ran only
the harness lib and two integration targets. It now also runs opencode
(an in-test HTTP/SSE server), cursor_shim (the production shim under
node) and pi_rpc (a Rust RPC peer). claude, codex, cursor and
acp_hardening stay unix-only: their fixtures are sh and python scripts
and the targets are cfg(unix) throughout. The opt-in live OpenCode test
no longer names its fixture with a character Windows file names forbid.

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

* Codex: npm repair passes --prefix in its plain Windows form

The prefix comes from canonicalize, which on Windows yields a \\?\
verbatim path; npm runs on node, which does not take those reliably.

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

* Pi: the session-resolution test expects the plain Windows path

resolves_legacy_and_native_files_and_rejects_wrong_identity compared
against canonicalize(), whose \\?\ verbatim prefix the resolver now
strips; it fails on Windows CI. It compares against the module's own
canonical() instead.

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

* Claude: every teardown waits out a login refresh, runs included

After merging main, each path that closes a Claude child's stdin,
signals it or tears it down settles the refresh lock first: the run's
teardown on every exit, the no-conversation relaunch, the interrupt
escalation, the stdin writer's EOF, and the discovery probe on success,
timeout, error and the no-stdio path. A new test holds the lock, hangs
up on a run, and checks the CLI gets neither EOF nor a signal until the
lock is released (it fails with the teardown's settle removed).

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

* Windows teardown: wait on stdin EOF only when one is coming

shutdown_child gave every Windows child its kill grace to exit after its
stdin closed, but opencode serve reads no stdin and never exits on its
own, so each OpenCode stop and probe sat out the full 3s. The Windows
Child now knows whether it has a stdin pipe and whether that pipe is
closed: ChildStdin is a wrapper whose drop the Child observes. The grace
applies only when the pipe is closed (or wait() closes it), allowing a
writer task 250ms to drop a stdin it was handed; a child with no pipe,
or one whose stdin is still held, is terminated at once as before.

Measured against the installed CLIs, Codex, Pi and Devin exit within a
quarter second of EOF (the Cursor shim's tests already require it), but
Hermes keeps running and Grok takes over 2s (a fifth of a second on
SIGTERM). Both are marked as not exiting on EOF and are terminated right
after their protocol-level stop on Windows. Unix teardown is unchanged.

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

* Engine: a signed-out stop forgoes revival whichever stop came first

The app signs out with SignOut and then stops the engine with
StopEngine, which lands in the stop branch, not the auth watcher's: a
sign-out shutdown revived its turns unless the watcher won the race.
Both the managed and the headless engine now decide from the auth state
at shutdown (forgoes_revival: a synced engine that is signed out),
whichever branch fired. A local engine, signed out as a matter of
course, still revives.

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

* Harness: the login-shell PATH leads only behind a bare system PATH

Putting the login shell's PATH first everywhere shadowed a venv, nix,
direnv or nvm PATH when the engine was started from a terminal, and
overrode a service unit's own PATH. It now leads only when the process
PATH holds nothing but system directories (a Dock/launchd launch, a
systemd default); otherwise the process PATH keeps precedence. Binary
resolution walks the PATHs in the same order as the child's PATH.

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

* Claude: the run refresh-lock test hangs up only once the fake listens

On a loaded machine the teardown's SIGTERM could reach the fake CLI
before its shell had installed the TERM trap, ending it without a trace
and failing the test. The fake now marks when the trap is set and the
test waits for it.

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

* Harness: each descendant snapshot carries its own process identities

Start times lived in one global pid map: a later snapshot from another
run overwrote an earlier run's entry for a reused pid, and one run's
teardown forgot the other's records. descendants() now returns
(pid, start) pairs that travel with the snapshot to terminate_tree, so a
teardown verifies exactly the processes its own snapshot found.

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

* ACP: accept Grok's permission requests unasked again

Every chat surface starts runs with auto_approve false, so routing Grok's
tool permission requests to the user made every Grok edit wait on a
Yes/No click. The routing existed because declaring a prompting client
type turned Grok's classifier denials into permission requests; that
client type is no longer sent, so Grok has no reason to differ from the
other ACP agents. Permission requests are accepted with the agent's
preferred allow option again, question-shaped ones still go to the user,
and the permission test now covers a run that did not opt in.

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

* ACP: a restore that does not finish keeps the session

A resumed run whose session/load outlasted its 90s budget fell into the
same path as a missing session: it started fresh and the new id replaced
the stored one, so one slow replay forked the chat away from its context
for good. The same happened when the agent exited or its pipe closed
mid-load, or refused the load for a passing reason.

A fresh session now follows only when the agent says it has no such
session (Grok's "Path not found." for the session file, Devin's "Session
not found", the resource-not-found code) or cannot restore at all (method
not found). Every other restore failure errors the run, says the next
message tries again, and reports the session being restored on the Done,
so the next message loads it again. The load budget gets a test knob.

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

* Harness RPC: drop the capture-only test client

Its only users were the Grok permission-routing tests, which are gone.

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

* Claude: resume a session whose transcript is not found here

A session counted as having nothing to resume whenever the config root's
projects directory existed but held no <id>.jsonl, and also when the
file could not be opened or read. A wrapper or CLAUDE_CODE_EXECUTABLE
that sets its own CLAUDE_CONFIG_DIR keeps its history elsewhere, so with
a leftover projects directory under ours every relaunch dropped --resume
and the chat lost its context again and again.

Only a transcript found and read through to its end, with every line
that might be conversation understood and none of them conversation, is
now Empty. Anything else is Unknown and keeps --resume; the CLI's own
"No conversation found" already relaunches a truly missing session fresh.

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

* Claude: a probe that exits before reading reports why

A CLI that fails on startup (a broken settings file, a bad install) can
exit before the discovery probe writes its initialize request. The write
or flush then fails with EPIPE, and that raw I/O error was returned in
place of the exit status and stderr that say what went wrong — which is
also why the probe's failure test was timing-dependent.

A failed write now reads on to the CLI's stdout end like any exit before
answering, and reports "<crash message> before answering the initialize
control request".

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

* Claude: only a top-level result line ends a turn when unparseable

A line that failed to parse became a turn-ending result whenever it
contained "type":"result" anywhere — including nested in another
frame's content (a tool's output, a message block). Torn or mistyped,
such a line ended the turn early.

The fallback now scans the line's top level for its own type and only
synthesizes a result when that type is result.

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

* Claude: show a refused configuration change once

A refused set_model or apply_flag_settings marks the live configuration
as unsure, so the next message carrying a configuration re-sends it all.
With the same configuration the CLI refuses the same way, and the error
was shown again on every such message.

Each request now remembers what it asked for. A refusal is shown when it
is the first for that kind of change or the ask differs from the one last
refused; a success clears it. The re-send itself is kept, so a change
that starts working is still applied.

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

* Codex: resume past an unreadable rollout, and say why in plain words

An empty or corrupt rollout file fails thread/resume with "failed to read
thread: thread-store internal error: ... is empty" or "... stream did not
contain valid UTF-8" (live, 0.164.0). Neither counted as unrecoverable, so
every later message in that chat failed the same way instead of starting
a fresh thread as the driver used to. Both now take the fresh-thread path
with the visible restore notice.

The bare "not found" match is narrowed to the thread, session and
conversation forms: an I/O error ("entity not found"), a missing
environment variable or helper binary say "not found" too, and would have
dropped a conversation a fresh start could not fix either.

The notice gives a short reason (not saved on this device, saved history
empty or unreadable, id not recognized) instead of the raw JSON-RPC text
with its method prefix, error code and rollout paths; the log keeps
Codex's own words.

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

* Codex: a rejected credential names the API key too, not only codex login

Every 401 read "Codex isn't signed in or its login expired. Run codex
login", which misleads someone on an OpenAI or custom-provider API key:
there is no login to renew, the key is wrong or revoked. The text now says
the credentials were rejected and points at both fixes. It still carries
"run codex login", the phrase the UI's signed-out detection matches, so
the sign-in action keeps showing.

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

* Codex: a crash after a final error reports that error, not only the exit

A final `error` notification is held for the turn's end to report. When
the app-server died before turn/completed, the crash Done carried only
"exited unexpectedly" and the held error, usually the reason the turn
went nowhere (a rejected credential, a limit), was dropped. It now leads
the crash Done, ahead of the exit status and stderr tail, so the UI's
sign-in and limit detection still sees it.

That crash Done also read the exit status without waiting: like the
setup-failure path it now gives stderr a moment to drain and the child a
moment to be reaped (`crash_report`, shared by both), so the message has
the status and the last lines Codex printed.

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

* Codex: a pre-release of the minimum CLI version is accepted

semver orders 0.146.0-alpha.2 before 0.146.0, so the version gate turned
away pre-releases that already speak the wire this driver maps. The gate
now compares major.minor.patch only.

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

* Codex: npm repair reinstalls a Windows shim install into its own prefix

The repair pins `npm install -g --prefix` to the prefix that owns the
broken Codex, found by following the bin link into node_modules. On
Windows the global `codex.cmd` is a shim file, not a link, so no prefix
was found and npm reinstalled into whatever prefix its own config named,
leaving the broken copy in place. A shim whose folder holds
node_modules/@openai/codex now names that folder as the prefix (npm's
Windows global layout), still in the plain, non-verbatim path form.

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

* Pi: a dialog timeout too large for a Duration no longer panics

Pi's extension dialogs carry a millisecond timeout that went straight into
Duration::from_secs_f64, which panics on a value it cannot represent. An
extension asking for an absurdly long timeout took the driver task down
with it. Such a timeout now counts as none: the dialog waits for the user,
as a zero timeout does.

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

* Pi: an idle Pi holding queued input no longer leaves the turn Working

The settle barrier treated a positive pendingMessageCount as work about to
start and waited for the next agent_settled. When Pi is idle yet reports
input queued, no run starts and no settle event follows, so the turn stayed
Working forever. That idle state is now re-polled, and past a bound (15s)
the turn settles as it stands: steering messages of ours still queued fail
the run with the existing "unconsumed steering messages" error, anything
else completes it.

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

* Cursor: cap inlined images so a large one cannot wedge the turn

Attachments were inlined up to 20 MiB each with no total, and the SDK's
send goes silent on a large inlined image: live on 1.0.32, 1.9/4.3/8.7 MB
went through while 14.5 MB produced no update for 400s+ and never settled.
Cursor now inlines at most 4 MiB per image and 8 MiB per message; anything
over rides only as the path ref already in the prompt text, which is how
every attachment was sent before inlining. The shim applies the same total
to a send that batches several messages' images.

The loader gains a capped variant; the Pi and ACP drivers keep their
existing limits.

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

* Cursor: abandon a send that never produces a single update

A send the SDK never answers left the turn Working forever with nothing
on screen: no update, no settle, no error. The SDK has no heartbeat, but
every run streams updates from its first model step, and a running tool
announces itself before it runs, so total silence since the send is the
one state that is never a slow turn. The shim now arms a bound when it
sends and disarms it at the first SDK update of any kind; past it the
turn ends errored with a message saying so, and the engine retires the
shim so the next message resumes the agent in a fresh one.

The bound defaults to 10 minutes, rides the run frame, and tests shrink it.

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

* OpenCode: retry a server that lost the first-start migration race

Concurrent first starts on a fresh database each run the schema
migration, and the losers exit with "Unexpected error" / "Failed query:"
followed by the CREATE TABLE statement (reproduced live on 1.18.21: 3-5
of 6 simultaneous fresh servers exit). A relaunch finds the schema in
place and boots, but startup only retried a locked database or a lost
port, so these chats failed outright. The statement rides the lines
after "Failed query:", so the classifier follows the stderr line by
line and only DDL counts; any other failed query stays fatal.

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

* OpenCode: a stopped turn's prompt is never posted again

A prompt whose POST died unanswered is retried by a detached delivery
task after a short delay. A stop or interrupt in that window aborted the
session, settled the turn Interrupted, and then the retry went out
anyway, starting the stopped turn over on the server with nobody
watching it. Each prompt's delivery now carries a cancellation token
that stop, interrupt and the end of the run cancel; a cancelled delivery
never posts again and reports nothing.

The retry also treated a 409 for the re-posted id as "already
admitted", and the comments said 2.x rejects a known message id. It
does not: 2.1.2 answers 200 and updates the stored message in place
(checked live). Only the landed check before a repeat keeps it from
being a duplicate turn, so the 409 case is gone and the comments say so.

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

* OpenCode: a server crash during a stop settles the turn as stopped

A server that died while a stop was settling (the abort accepted, the
idle not yet seen) took the lost-server path, which only honored an
interrupt: the turn the user stopped was reported Errored with the crash
as its error. It now settles Interrupted for a stop too.

The between-turns crash is pinned as it was before this branch: a
completed turn, then one Errored Done carrying the crash and no error
chip of its own, then the run ends so the next message starts a fresh
server.

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

* OpenCode: a server that stops responding fails the turn in seconds

A stopped or hung `opencode serve` still accepts loopback connections
(the kernel completes the handshake), so every bus reconnect waited out
the full 45s silence bound, and the run only gave up once 41 reconnects
had failed: a SIGSTOPped server kept the turn Working for about 31
minutes (reproduced live on 1.18.21 and 2.1.2). The process poll never
fires, since the process has not exited.

Now a bus that has gone a full silence without a frame gets the server
health-checked before reconnecting. Any HTTP answer within 5s proves it
alive; none fails the run with "opencode server stopped responding", and
ending the run shuts the server down. A server that keeps answering
health checks but whose bus never frames again is given up on once no
frame has arrived for 150s across at least two silences, so a clock that
jumps across a machine sleep cannot trip it alone. A crash or a stop in
the meantime still settles as before.

The bounds are overridable (`with_bus_timeouts`, like `with_graces`), so
the regressions run in seconds: a fake server that wedges after the
prompt, one that answers health but never frames, and a real scripted
server process that SIGSTOPs itself and must be gone when the run ends.

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

* OpenCode: the stalled-prompt test steps its clock without outrunning IO

stalled_prompt_post_has_a_bounded_timeout failed most runs once the
wedged-server probe landed, and some runs before: its hand-stepped
paused clock ran past the bus silence bound (firing a health probe the
fake had no time to answer) and past request timeouts before the fake
had read the request. The test turns the bus watchdog off (it is not
what this test is about) and gives loopback IO a few real milliseconds
per clock step; 60 of 60 runs pass.

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

* Engine: mark a shutdown's cut-off turns as they end, not up front

The shutdown wrote its revival marker for every working chat before
stopping them one by one (each can take seconds to settle). A turn that
finished on its own in the meantime kept the marker, and the next boot
sent it "continue where you left off" for work that was already done.

The shutdown now only flags the turns working when it began; the marker
is written where the run rewrites its interrupted Done with the shutdown
note, i.e. only for the turns the shutdown actually cut off (a start
retry the shutdown cancels during its backoff included). On boot a
marker counts only when the chat's last journaled Done is that shutdown
interrupt, so a marker left over a finished turn is dropped.

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

* Engine: the runtime's own shutdown decides whether a sign-out revives

Only the headless and background engines asked whether a signed-out
stop should forgo revival, each after its own select; the app's
in-process engine never did, so signing out there revived the cut-off
turns on the next sign-in. EngineCore::shutdown now reads the attached
auth state itself before it stops the sessions: a synced engine that is
signed out forgoes revival, a local engine (signed out as a matter of
course) still revives. The per-caller calls are gone.

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

* Engine: a rejected resume never comes back, and the reply says it started over

When the provider says the resumed session is gone, the retry starts
fresh behind an in-memory tombstone. But dispatch falls back to the
per-provider record a switched chat keeps in its doc, and that record
still named the dead id: in any chat that had ever changed provider the
"fresh" retry resumed the rejected session again, failed, and every
later turn did the same, leaving the chat broken for good.

Session ids the provider rejected are now remembered per chat and
skipped wherever the resume comes from, until a new session replaces
them. The fresh run's reply also opens with a notice that the earlier
session is gone, instead of silently losing the provider's history.

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

* Engine: a revived turn's continuation always carries the request

The continuation a revived turn sends was only "continue where you left
off" for every provider but one, on the reasoning that the resumed
session already holds the request. That breaks when a provider quietly
starts a new session because its resume failed: the new session gets
the nudge alone and the user's request is lost.

Every provider now gets the nudge with the original request attached
for reference, worded so a session that does hold the turn carries on
without redoing finished work, and one that does not handles it.

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

* Engine: a prompt that starts with a path is not a native command

Boot recovery never revives a native command, and history replay never
wraps one, but "native command" meant any prompt with a leading slash:
"/tmp/app/main.rs panics on start" was taken for a command, so a crash
mid-turn left that work unrevived. A prompt is now a native command when
a command selected in the composer leads it, or when its delivered text
leads with a /name in the command-name grammar (no slashes), which a
path never matches.

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

* Engine: a refused spawn retries only while the CLI was just updated

A start that failed with PermissionDenied was always retried as
transient, three times with backoff. That covers antivirus holding a
CLI that was just rewritten, but a CLI that lost its execute bit (or
sits on a noexec mount) fails the same way forever, and the user waited
out every retry for an error that was certain from the first.

The error carries no path, so the engine asks the harness for the CLI
it launches and counts a refused permission as transient only when
that file was modified within the last minute. Busy, would-block and
interrupted spawns (and the Windows sharing violations) still always
retry.

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

* Engine: start retries and revivals re-check Stop, shutdown and newer sends

A start that failed transiently, or died before its session started,
is retried by a fresh dispatch after the failed run has removed itself.
A Stop landing in that gap found no run to stop, and a shutdown that had
not reached the run yet did not stop the backoff either: the retry then
started the stopped work again, or spawned a new agent mid-shutdown.
Boot revival had the same shape: it checked for a newer run, then
awaited, and could revive the old request into (or after) a message the
user sent meanwhile.

User Stops are now counted per chat before they look for the run; a
retry carries the count its failed run started under and, at the moment
its own run registers under the run lock, ends the turn interrupted if a
Stop came since or the engine is shutting down (marked for revival in
the shutdown case). The backoff also ends on shutdown. A revival yields
when a run is live or a newer user message is in the transcript,
checked at dispatch entry and again under the run lock.

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

* Engine: a Stop survives an engine that dies before the run settles

A Stop cancels the run, which then has up to a few seconds to end its
stream before the engine synthesizes the interrupted Done that closes
the journal. Until then the journal still reads as a turn in progress,
so an engine that crashed or was killed in that window revived the
stopped turn on the next boot as if it had crashed mid-work.

A user Stop on a turn in flight now leaves a marker beside the chat's
journal; it is cleared once the journal records a Done or the next turn
starts. Boot recovery never revives a turn so marked.

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

* Harness: the probe-coalescing test gives its slow binary room

On a loaded machine the slow fixture (a 3s sleep) could outlast the
default 5s probe budget, and a caller saw no version. The test now
probes with a 30s budget: what it checks is coalescing, not timing.

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

* Windows: a working directory with a NUL is invalid input, not missing

The launcher's missing-directory check ran before encoding, so a cwd no
directory can have (an embedded NUL) failed as NotADirectory instead of
InvalidInput, failing windows_native's invalid-launch-inputs test on
Windows CI. The check now leaves such a name to the encoding check.

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

* Codex: a rollout the OS will not hand over keeps its thread

"failed to read thread" also covers a rollout that still exists but
could not be opened (chmod 000 answers Permission denied (os error 13)),
and starting fresh then replaced the stored thread id for good. Only an
empty rollout or one unreadable as data (invalid UTF-8, a parse failure)
starts a fresh thread now; IO wording (os error, permission denied,
locked, busy, too many open files, timed out) and anything unrecognized
error the run and keep the id for the next message.

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

* ACP: only an agent naming the session missing forks the chat

A bare "not found" matched loads that failed for other reasons (an MCP
server command or a model not found) and started a new session over a
chat whose session was fine. A restore now starts fresh only on ACP's
not-found or no-restore codes, or a message naming the session missing.
Grok is special-cased: its only answer for an unknown session is
"Path not found." with FS_NOT_FOUND (checked live on 1.0.46), which
counts as missing for Grok alone.

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

* Cursor: an abandoned send is heard no more

The shim abandons a send that produces no update within the silence
bound, but the process lives on, and a send that came back late kept
streaming its updates after the turn's Done. The abandoned send's
updates are now dropped; the next message starts a run of its own, and
the comment no longer claims the engine retires the shim.

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

* Engine: a turn whose teardown errors during shutdown is still revived

A shutdown cut-off was recognized only when the turn ended Interrupted
with no error. A harness whose teardown surfaced an error as the engine
went down (a broken pipe, an errored Done) left its turn unmarked, and
it was never picked back up. Any interrupted or errored end of an active
turn the shutdown interrupted now counts as the cut-off.

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

* Engine: a sign-out marks every turn stopped before terminating any

The shutdown stops chats one at a time, up to its grace each. After a
sign-out, an engine killed partway through that loop left the chats it
never reached with open journals, which crash recovery revived at the
next sign-in. Forgoing revival now writes the user-stop marker for every
turn in flight first.

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

* Windows: a spawn retry's wait hands the runtime worker off

A Windows launch that hit a sharing violation waits up to ~1.4s between
attempts, and Command::spawn is synchronous, so that sleep stalled a
Tokio worker and every task queued on it. On a multi-thread runtime the
wait now runs under block_in_place; elsewhere (no runtime, a
current-thread runtime, a blocking-pool thread) it stays a plain sleep.

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

* Harness: an invalidation during a version probe wins

An install that rewrites a wrapper in place (same path, mtime and size)
clears the binary's cached version by name, but a probe already running
against the old wrapper then stored its answer over the invalidation,
pinning the stale version. Invalidation now counts per name, and a probe
whose names were invalidated while it ran returns its answer without
caching it.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:38:04 -07:00
Wing
cc7da5c2aa
Zeron Cloud, provider switching, and the phone model picker (#966)
Cloud chats on machines of their own (delegation, sleep/wake, durable delete), a credential vault, Stripe billing with Cloud's own portal, per-account Cloud availability, the edge's Cloud model list, provider switching between turns, the phone's tabbed model picker, and desktop/phone/engine polish.
2026-10-22 03:18:13 -07:00
José Gurruchaga
01a399db18
Add per-device custom worktree locations (#530)
* Add per-device custom worktree locations

* Refine worktree location settings presentation

* Fix Windows path handling for custom worktree locations

* Fix verbatim Windows paths passed to git worktree add

* Compare worktree filesystem identity in Git refs regression test

* Avoid Git directory length limit when creating Windows worktrees

* Preserve Settings redesign after rebase and fix long Windows Git working directories

* Validate Windows worktree launch limits and cover long checkout files

* Move worktree location settings to General

* Use native folder picker for local worktree locations

* Open the worktrees device switcher menu rightward

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

* Simplify worktree location settings into a single row

Browse saves the chosen folder immediately, so the path field and the
Save/Cancel actions are gone. Reset returns to the default location and
forgets the remembered folder: disabling without a folder now clears it.

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

* Refuse worktree locations that would nest checkouts inside the repository

Picking the folder that holds the repo (e.g. ~/code for ~/code/comet) put
new worktrees at ~/code/comet/<name>, inside the primary checkout, where
they appear as untracked embedded repositories.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: wing-anara <wingleeanara@gmail.com>
2026-10-13 16:12:18 -07:00
José Gurruchaga
053ce2eac0
Persist embedded browser sessions across tabs and app restarts (#573)
* refactor(browser): define stable device-local profile identity

* fix(browser-linux): persist website data and cookies by profile

* fix(browser-macos): persist isolated website stores on macOS 14

* fix(browser): preserve profile lifecycle across tabs and windows

* test(browser): verify persistent storage across app launches and profiles

* docs(browser): document persistent profiles and session lifecycle

* fix(browser-linux): initialize WebKit without blocking the UI

* fix(browser): correct macOS fixture import and Windows profile test

* fix(browser): invoke macOS storage fixture wrapper through bash

* fix(browser): propagate macOS fixture failures and initialize profile cleanup

Require explicit storage results, validate deletion in every store, and preserve primary failures while attempting all profile cleanups. Add opt-in native cookie and same-process reopen diagnostics.

Validated on macOS 27 arm64: release check/build and native tests pass. Two complete storage runs correctly fail on cookies returning after process restart; all profile cleanups pass. Cookie deletion persistence remains unresolved.

* fix(browser-macos): retain profile stores for the application lifetime

* fix(browser-macos): preserve profile stores through process exit

* test(opencode): remove fixture startup and clock races

* Revert "test(opencode): remove fixture startup and clock races"

This reverts commit dffcec2cdee4d6903649fe156c5b813d91e12376.

* test(browser): verify PR state follows profile identity
2026-10-12 17:53:46 -07:00
José Gurruchaga
4a5fb8b443
Internal session plumbing and packaging cleanup (#819)
* test(codex): document and probe native voice capabilities

* feat(proto): define local voice session contracts

* fix(harness): bound realtime media and prioritize control messages

* feat(codex): attach realtime voice to an idle thread runtime

* feat(engine): own voice leases and enforce subscription eligibility

* feat(mcp): create standalone sessions on selected hosts

Add chat/side kinds with compatible defaults, resolve projects within the selected device, and validate that host's harness and model catalogs before writing. Route transcript reads to the chat host and preserve send baselines across waits so missing session rows and delayed replies cannot return an old response.

Cover invalid requests, remote catalogs, mixed batches, wait races, two-engine execution and interrupt delivery. Add an isolated MCP stdio smoke fixture.

* feat(doc): persist canonical voice transcripts once

* docs(mcp): document standalone and remote session workflows

* feat(audio): add native capture and streaming playback

* feat(audio): handle echo cancellation and voice interruptions

* feat(ui): coordinate voice ownership over local engine RPC

* feat(ui): extract the Bezel orb into a native Zeron component

* feat(ui): replace the composer with a central orb during voice sessions

* feat(mcp): constrain voice orchestration to subscription policy

* build(voice): add microphone permissions and offline audio CI

* test(voice): verify lifecycle, billing boundaries and rollout gates

* fix(voice): preserve text transport and idle billing boundaries

* feat(codex): connect subscription voice through native WebRTC

* feat(engine): activate native voice ownership and preserve delegated work

* feat(ui): enable native voice with central orb and retained drafts

* fix(mcp): keep voice delegation on subscription-backed Codex

* test(voice): document native transport and add opt-in connectivity smoke

* fix(voice): close audit races and validate project subscription context

* Fix Codex voice initialization and macOS microphone permissions

* Allow Codex voice agents to delegate through upstream MCP

* Make voice a persistent orchestrator with a dedicated stage

* Add call controls and elapsed time to the voice stage

* Remove decorative rings around the voice orb

* Add voice selection menu and simplify stage artwork

* Remove voice status labels beneath the orb

* Fix dictation and realtime voice integration after rebase

* Move Codex voice style selection into Voice settings

* Restore window dragging from the voice stage titlebar

* Open the voice stage immediately when starting a call

* Smooth voice orb motion and speaking transitions

* Remove the green audio pulse from the voice microphone control

* Show the live voice orb above the orchestrator chat composer

* Use full chat IDs in MCP reply instructions

* Correlate MCP replies by message IDs instead of remote timestamps

* Keep the voice stage open when launched from Settings

* test(voice): add a split-host Codex voice compatibility probe

* feat(voice): package a standalone desktop media runtime

* feat(proto): define client-media voice control contracts

* refactor(codex): separate voice signaling from local audio

* feat(engine): own remote voice sessions with ephemeral leases

* feat(rpc): route versioned voice controls to execution hosts

* feat(voice): coordinate local media with remote Codex control

* feat(ui): start voice on a selected remote Codex host

* test(voice): cover cancelled preparations and stale session controls

* test(voice): prepare desktop rollout validation and offline CI

* feat(ios): add a pinned native WebRTC compatibility endpoint

* feat(mobile): expose remote voice sessions through UniFFI

* feat(ios): bridge native audio lifecycle to remote voice calls

* feat(ios): add remote voice controls and registered host selection

* test(voice): cover relay and iOS lifecycle and prepare live acceptance

Add half-open and native callback regressions, stage-only diagnostics, complete runtime notices, and development test instructions. Keep real Mac/Fedora/iPhone acceptance opt-in for user validation.

* refactor(orb): share the thinking-orb engine through zeron-orb

Move the renderer-agnostic engine, presets, motion and a new OrbAnimator
(clock, audio response, state crossfades) into crates/orb. The GPUI widget
now delegates to the animator, so desktop and mobile paint identical frames.

* feat(voice): rebuild iOS remote voice around the desktop orb and phone-call audio

- Share the call view (phase, caption, levels, speaking, orb state) in
  voice-session; the client derives speaking because client media has no
  host meter. Keep owner-event headroom so level meters never overflow it.
- Title remote orchestrator chats "Voice session" like local ones.
- UniFFI: typed call state and end reasons instead of JSON, a distinct
  denied-microphone failure, and OrbRenderer frames from zeron-orb.
- iOS: OrbView paints the desktop orb; start voice from the New session bar
  (live strip while a call runs), the session nav bar and the iPad sidebar;
  full-screen call stage with caption, transcript (flagged when Codex waits
  for an answer), mute, route picker and hang-up.
- Phone-call audio: proximity sensor moves output to the earpiece, headsets
  win, calls survive screen lock, headset loss re-routes instead of ending.
  Install the WebRTC audio configuration globally so it is not reverted when
  the audio unit starts.

* fix(voice): install the macOS voice runtime under codex-resources/voice

Codex's helper only initializes from a codex-resources/voice directory and
exits with code 23 on initializeRuntime anywhere else, which the desktop
reported as "Voice could not connect". Bundle the runtime at
Contents/Resources/codex-resources/voice, reject other locations up front,
and report a helper that cannot start as an unavailable runtime.

Ship the runtime byte-for-byte with OpenAI's Developer ID signatures instead
of re-signing it ad hoc.

* fix(ios): reopen the call stage from the live strip and redo voice settings

The live strip in the bottom bar is a plain UIControl, which never sends
.primaryActionTriggered, so tapping it did nothing; listen for touchUpInside.
UI tests cover reopening the stage after the transcript and after minimizing.

Voice settings now follow the Settings list style: the resting orb, the
devices Codex can run on with their status, the voice as a pop-up menu, and
what to expect during a call.

* fix(ios): resume the orb animation when the app becomes active again

At willEnterForeground the app still reports .background, so the display
link never restarted and the orb stayed frozen after returning from Home.

* fix(ios): guard voice preview state in Release builds

* feat(voice): veil streamed caption words in on desktop and iPhone

Move the transcript's renderer-agnostic streaming veil into zeron-veil so
the voice call caption can use the same chunk fades on both platforms. A
new CaptionVeil keeps the veil aligned with the ellipsized tail and fades
the previous utterance out when the speaker turn changes; reduced motion
shows text directly. Desktop recolors GPUI runs; iOS gets UTF-16 spans
through CaptionFader and paints an attributed caption on a display link.
The desktop transcript keeps its behavior; the iOS transcript is untouched.

* fix(ui): step the voice stage aside when opening any session

Opening a session only hid the stage indirectly, when the selection changed,
so clicking the thread already under the stage (or the one you came from
Settings) did nothing. open_chat now hides the stage explicitly; the call
keeps running in the background.

* feat(voice): reuse host orchestrator chats across calls

* fix(voice): reserve orchestrator atomically and preserve rotation retries

* feat(voice): rotate the orchestrator transcript after 1000 entries

* feat(voice): package remote media runtime for Linux and Windows

* feat(voice): use the installed Codex helper everywhere and stop bundling it

Remote voice now plays audio through the client's own standalone Codex
installation, like local voice, instead of a runtime packaged inside
Zeron. The resolver moves to zeron-voice-media and is shared by the
harness and the desktop media endpoint; ZERON_VOICE_MEDIA_DIR remains a
development override. macOS, Linux and Windows packages no longer
contain Codex binaries, GStreamer/GLib or the Visual C++ runtime, so
Zeron takes on none of their redistribution or update obligations.
package-voice-runtime.py stays as a development projection tool.

Missing-runtime messages point to Codex's official installer, since npm
installs lack the voice runtime.

Notices and disclosures:
- THIRD_PARTY_NOTICES: full MIT chain for the orb (Bezel,
  gpui-thinking-orbs, thinking-orbs), Codex NOTICE, OpenAI trademark and
  non-affiliation statement, and WebRTC for iOS.
- The iOS app carries the orb's MIT notice; the Linux tarball now ships
  LICENSE and THIRD_PARTY_NOTICES.md.
- Microphone purpose strings on macOS and iOS state that voice sessions
  stream audio to OpenAI; dictation stays on device.
- Docs describe the voice data flow, and the acceptance checklist lists
  the legal and privacy decisions that block a public release.

* feat(ios): show the voice call in the Dynamic Island and on the Lock Screen

* fix(voice): hide the voice trigger when this device has no Codex

The microphone in the sidebar footer only shows when Codex is installed and
enabled on this device, following the same catalog the composer offers. It
re-reads after Settings → Agents changes and when returning to a window that
hides it. A start without Codex now asks for an install instead of a retry.

* test(voice): seed the real rotation threshold in the remote rotation test

* feat(voice): sound the start and end of a call on desktop and iPhone

A call sounds as it is placed, before the microphone opens, and again when
the user hangs up or a connected call ends. A failure to connect stays quiet
and explains itself. Nothing sounds in between. The iPhone plays them as
system sounds, so they follow the ringer switch.

* perf(voice): skip the rate limits round trip before each call

The pre-call probe read account/rateLimits/read, a ~1 s backend round
trip, and ran twice per call (prepare and negotiate). Its result was never
shown: the native backend makes the final usage decision. Dropping it
saves about 1.7 s per call on desktop and iPhone.

* perf(voice): release the orchestrator runtime 5 minutes after hang-up

The voice orchestrator's Codex runtime and MCP servers hold ~200 MB. Its
idle window was the generic 30 minutes, counted from the runtime's start,
so a call ending late in the window left a runtime reaped right after the
hang-up. It now idles 5 minutes, restarted at each hang-up.

Hang-ups wake the reaper directly, so even a short call restarts the
window, and a reap armed before a call began rechecks for it instead of
cutting the call.

* fix(voice): enable client-owned remote voice by default

* fix(harness): read whole resumed histories and report why stdout failed

509818ed capped every JSON-RPC line at 8 MiB on the transport shared by
text chats. A resumed long chat returns its history in one response
(54-71 MiB measured), so resume failed and was reported as an exit even
though Codex was alive. Lift the cap (voice bounds its own messages) and
keep the read error's cause for every waiting and later request.

* fix(harness): name the rejected request in JSON-RPC errors again

dca9a05f made peer rejections structured but dropped the method from
their message, so chats showed 'JSON-RPC rejection -32600: …' without
saying which request failed. Prefix the method again and render it as
upstream did, keeping the code available for auth detection.

* test: skip POSIX mode check on Windows hosts

* fix: launch Codex batch shims from plain paths and answer account/read in fake

* refactor(engine): remove the superseded local session RPC surface

The client-media protocol replaced these methods; nothing calls them anymore.

* refactor(harness): restore the shared JSON-RPC transport

Return the stdio transport every agent uses to its upstream behavior
(unbounded writes, no timeouts or polling timers) and keep only an
additive notification route that is registered while a subscriber
exists.

* fix(ui): let the full-window stage show the window glass

On translucent appearances the stage painted an opaque fill unlike the
new-thread page. Drop the fill there and fade out the page it covers.

* fix(ui): show the full-window stage over Settings

Settings replaces the workspace layout and never mounted the stage, so
opening it from there did nothing. Mount it beside the settings sidebar
and fade the page it covers.

* fix(voice-session): keep the live caption on the newest turn

Turns arrive interleaved: a user final often lands after the answer has
started streaming. Keep each turn's text separately and caption the
newest one, so a late final never takes the caption back and deltas
never restart it. Desktop and mobile now share this state.

* ci: build the desktop UI only in the UI workflow

The offline-linux job compiled zeron-ui without the WebKitGTK and
JSON-GLib packages its build script requires, so it failed every run.
Drop its UI step; the UI workflow already runs those lib tests and now
also runs the orb geometry test.
2026-10-06 23:47:32 -07:00
notsapinho
73bd3c8429
Composer: mention images and files as chips (#775)
* Mention images and files in the composer as chips

Pasting, dropping or attaching a file now stages it and drops a chip at the
caret, so a prompt can say which attachment it means. Images read "Image N";
any other regular file (up to the existing 24 MB limit) is staged as opaque
bytes and its chip carries the file name and the file theme's icon.

Chips and attachments stay in step: removing the last chip for an attachment
unstages it (undo brings both back), removing a tile removes its chips, and
the `@` list pins staged attachments above project files. Chips share one pill
style across files, folders, skills, commands and attachments, in the composer,
the transcript and queue rows. The chip text is the plain label when a prompt
reaches a provider, which pairs with the upload of the same name; uploads and
the prompt trailer are unchanged.

Non-image attachments also render as file pills in sent messages and as icon
tiles in queue rows, and a queued message with files can be restored for
editing: uploads read back whatever their type, while workspace files stay
image-only.

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

* Derive chip prefix and directory flag from the chip kind

FileMentionLink stored its kind alongside a prefix character and an is_dir
flag that the kind already determines; they are now methods on the link, and
the sent-message span drops its is_dir field. Attachment chips are converted
to plain labels in harness_prompt instead of inside file_mention_prompt, which
no longer knows about attachments, and the icon cache locks without a
poisoned-mutex branch.

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

* Drop tiles for chipped attachments and center chip labels

A chip is the attachment's handle (hover previews it, deleting it unstages
it), so the composer and queue rows no longer repeat chipped attachments as
tiles; attachments without a chip keep theirs. Sent messages keep their
strip, which carries upload progress and opens the image.

Chip pills sat a pixel below the line box's middle, which left labels
looking high. Geist's cap height is centered on the line box, so the pill
now is too.

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

* Show sent attachments as chips only, with image chips opening the image

A sent message's chips stand in for their attachments, so the strip above
the bubble keeps only attachments without a chip (appshots, mobile sends).
An image chip carries its upload's path: clicking it opens the image full
size, as the thumbnail did, and its upload is loaded and kept with the row.

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

* Keep chips and attachments in step while editing a queued message

Chip deletion was never reconciled during a queued edit, so a file whose
chip was deleted still uploaded on save. Reconciliation was off because
restored files had no chip numbers and the edit shared the displaced
draft's numbering and undo stash.

Restored attachments now take the numbers of the chips that name them,
the edit gets its own numbering and stash (the draft's come back when it
ends), reconciliation runs during the edit, and a saved edit demotes chips
whose attachment is gone. When the edited row disappears and both drafts
merge, the edit's chips become their labels so numbers cannot collide.

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

* Show upload progress on sent chips

Chipped attachments left the strip above a sent message, and with it the
thumbnail's upload ring. A chip now carries the upload it names: while
the bytes are still crossing to the host its icon well shows the transfer
percent as a ring (or a spinner when no real position is known), and an
image that can't be read back shows a warning there. File chips get the
same progress; image chips still open the image once loaded.

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

* Show desktop file attachments as name pills on mobile

Desktop can now send any file, and those refs reach mobile through the
synced transcript. The mobile user row handed every attachment to an
image widget, so a ZIP became a broken thumbnail and a failed image load.
Non-image refs now render as a file-icon + name pill (upload prefix
stripped, pending refs included) using the existing Icon widget, so iOS
needs no changes. Composer chip links show as their plain label instead
of raw Markdown, and the "See the attached file(s)." placeholder is
hidden like the image one.

attachment_display_name moves to zeron-proto (desktop re-exports it),
next to a shared is_image_path using the desktop's decodable extensions,
so mobile splits images from files the same way.

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

* Cover external file drops end to end and run attachment tests on macOS

The file-chip tests called add_paths directly, so nothing exercised the
ExternalPaths receiver a real Finder or file-manager drop goes through.
The new test dispatches FileDropEvent enter/hover/drop with a zip, a PNG,
a folder and an oversize file into the main chat and both side chats,
and checks chips, staged files and the error notice in each.

A mixed drop showed only the last refusal, so a folder's error was hidden
behind an oversize file's. Refusals from one drop now share the notice.

The macOS job's nextest filter now includes the attachment staging, chip,
drop and queue/transcript chip regressions.

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

* Open image chips full size on click instead of on hover

The composer's tiles opened an image full size on click; with them gone,
image chips previewed on hover instead. A click on an image chip now opens
the same full-size viewer, with the pointing hand over it, and its hover
card is gone. A drag across the chip still only selects text; file chips
keep their name tooltip.

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

* Show the desktop's chips in iOS message bubbles

Synced prompts on iOS showed file mentions as accent "@name" text and
attachment chips as plain labels, beside a thumbnail strip that repeated
them. Bubbles now draw every chip kind (files, folders, skills, commands,
images, file attachments) as the desktop's soft pill with an icon well,
using the tool badge's colors and the bundled file-theme icons.

As on the desktop, attachments a chip names leave the strip above the
bubble, and tapping an image chip opens its upload in the image viewer.
The chip-to-upload match moves into zeron-proto so both clients share it,
and the demo's veil chat now opens on a prompt with chips.

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

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Wing <contact@winglee.io>
2026-10-05 11:33:45 -07:00
Wing
56dc5ff3a3 CI: pin every action to a commit SHA, keep pins current with Dependabot
Tags like @v2 can be moved by whoever controls the action's repository, and
release.yml runs these actions next to the macOS signing and notarization
secrets. Each reference now names the commit its tag points to today (version
in a trailing comment), so CI runs the same code as before. Dependabot opens
one grouped PR a week to move the pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:04:12 -07:00
Wing
55f5ed4c8d CI(macos): give macos-native the old job's 45 minute limit
A cold-cache run on macos-latest builds for about 20 minutes and checks the app
for 9; all 50 tests passed but the job hit 30 minutes in the browser fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 15:17:47 -07:00
Wing
a5c00e0b50 CI(macos): run the macOS jobs on macos-latest, as before
macos-14 is two releases behind what macos-latest provides (macOS 26), and
zeron-text's CoreText tokenizer check fails there (136/20000 differ, limit 20)
while passing on macos-latest in main's runs. Keep the native, frame-source
and iOS jobs on the image the old jobs used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:00:33 -07:00
Wing
7aed43b472 CI(macos): run CoreText tests on macOS, drop /etc/hosts patch, harden nextest download
- zeron-text's coretext tests are #![cfg(target_os = "macos")]; moving the
  mobile core tests to Linux silently dropped them. macos-native now runs
  binary_id(zeron-text::coretext).
- run-macos-fixture.sh no longer writes /etc/hosts: preview hostnames are meant
  to resolve through WebKit's per-domain proxy, so a DNS fallback could let the
  fixture pass with that path broken. Retries and warnings stay.
- nextest download: https-only, TLS 1.2+, retries, extract only cargo-nextest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:09:05 -07:00
Wing
2249a11296 Merge ci-linux-fast (#694) into ci-macos-fast
Resolve the expected conflicts: ui-tests.yml keeps core-tests and drops the
iOS changes job (now in macos.yml) and the macOS/iOS-only path filters;
preview-tests.yml drops the networking job, whose Rust tests now run in
core-tests (Linux) and macos-native (macOS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:08:23 -07:00
Wing
5d5d935991 CI: cover cursor paths in ui-tests, verify nextest after cache restore, nightly release-profile run
- ui-tests.yml also triggers on scripts/*cursor-sdk* and cursor-*.yml, so the
  Rust half that moved out of cursor-compatibility still runs for those PRs.
- linux-ci installs nextest after rust-cache restores ~/.cargo/bin, so the
  checksum-verified binary is the one used.
- release-profile-tests.yml runs the Linux core and UI suites daily with
  --release (no cache save), backstopping the dev-profile switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:07:48 -07:00
Wing
b7404fbd8e Merge remote-tracking branch 'origin/main' into pr-694 2026-10-01 12:06:50 -07:00
Daniel Katulevskiy
878307a3d6
CI: run Linux tests with nextest on a dev profile and one shared build
- ui-tests: session-sync-regressions becomes core-tests (one build for the
  harness, engine, sync, update, doc and preview tests); ui-tests and
  linux-browser use nextest, the dev profile and a shared rust-cache
- cursor-compatibility: the Rust half runs from core-tests on PRs and main;
  it only runs here for release, cursor-sdk-update dispatch and manual runs
- preview-tests: the Linux leg moves into core-tests
- linux-installer: install desktop-file-utils with bounded apt retries
2026-09-30 17:37:33 -07:00
Daniel Katulevskiy
9cb1de50f5
CI: add Linux test helpers (setup action, nextest, apt with retries)
A composite action installs the toolchain, a checksum-pinned cargo-nextest
and apt packages (bounded retries, cached .debs), and wires the main-seeded
Rust cache. scripts/ci/test-core.sh runs the harness, engine, sync, update,
doc and preview tests as one build and one nextest run. nextest.toml retries
the two tests that are timing-sensitive under nextest. Not used by any
workflow yet.
2026-09-30 17:37:33 -07:00
Daniel Katulevskiy
c168ba5b45
windows: run the crate suites as two parallel jobs 2026-09-30 17:12:22 -07:00
Daniel Katulevskiy
c286d118b4
CI: remove the macOS jobs from ui-tests and preview-tests
macos-frame-recovery, ios-tests and their path-filter job move to macos.yml; the preview networking tests on macOS run there as well.
2026-09-30 16:36:54 -07:00
Daniel Katulevskiy
52a3481dc5
CI: add a macOS workflow with one compile and parallel jobs
New macos.yml holds all macOS CI work: updater/preview/native UI tests and the WebKit fixtures from one nextest compile on the dev profile, the gpui frame-source test, and the iOS checks (Rust mobile core tests and the Swift bindings check now on Linux, simulator tests on macOS behind the original path filter). scripts/ci/run-macos-fixture.sh wraps the native fixtures with bounded retries.
2026-09-30 16:36:54 -07:00
Daniel Katulevskiy
f4abe69b88
CI: run Windows tests in three parallel jobs on a cheaper profile 2026-09-30 16:35:50 -07:00
Daniel Katulevskiy
710b06ff85
CI: seed the Rust cache from main and stop cancelling main runs
PR caches are scoped to their merge ref, so no other PR could read them, and main never saved one because in-progress main runs were cancelled. Only main writes the Rust caches now (PRs restore them), main runs are no longer cancelled, and Cursor compatibility also runs on pushes to main so it seeds its cache.
2026-09-30 16:33:28 -07:00
José Gurruchaga
df0cd2980a
Replace Pi ACP adapter with native RPC integration (#630)
* feat(pi): add native RPC transport and compatibility contracts

* feat(pi): implement native harness and event normalization

* feat(pi): resume native and legacy ACP sessions

* feat(pi): support native steering and reliable cancellation

* feat(pi): expose native models commands and skills

* feat(pi): bridge extension dialogs to desktop and mobile input

* feat(pi): preserve Zeron MCP delegation in native sessions

* feat(pi): activate native RPC driver and CLI discovery

* refactor(pi): retire ACP adapter and verify native lifecycle parity

* fix(pi): preserve switched sessions empty resumes and composer drafts

* docs(pi): translate RPC migration research into English

* style(ios): trim whitespace in updated question bindings

* test(acp): wait for scenario progress before steering

* test(pi): compare canonical session paths on Windows

* fix(pi): deliver steering bursts in the same model step

* fix(ios): preserve generated Swift binding whitespace

* fix(pi): scrub nested-agent env and keep dropped-resolver semantics

Pi's native launch skipped owned::configure, so CLAUDECODE and the other
nested-agent variables the ACP launch removed leaked into pi. The engine's
new input-cancellation task also turned a dropped resolver into an empty
answer; keep it an error for harnesses (opencode rejects on error).

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

* ci: run the native Pi RPC driver tests

pi_rpc needs the native-fixture feature and pi_resume is an engine test;
neither ran in any workflow.

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

* fix(pi): never overwrite a configured Pi steering mode

set_steering_mode persists to Pi's global settings.json. Selecting `all` on
every session start silently rewrote the user's standalone Pi preference and
undid any `/steering` choice on the next run. Select `all` only while neither
the global nor the project settings configure a mode.

PiHarness::with_agent_dir lets tests (and callers) pin PI_CODING_AGENT_DIR for
both the child and Zeron's own reads, so fixture tests never consult the
developer's real Pi settings.

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

* fix(ios): don't trap on duplicate question ids when prefilling answers

Dictionary(uniqueKeysWithValues:) crashes on a repeated key; question ids come
from agents and synced docs, so keep the first instead.

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

* style(pi): rustfmt the steering-mode guard and its tests

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

* fix(pi): start fresh with a notice when a session can't be restored

The native driver hard-failed a resume whose Pi session file was missing.
The engine injects the chat's stored session id on every dispatch, so one
unwritten or deleted session file left the chat failing every message for
good. The ACP adapter and the Codex driver start a new session and announce
the lost context instead; do the same. Proven-empty sessions still keep
their UUID via --session-id.

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

* fix(pi): never fail a turn over an attachment Pi can't inline

Composer uploads include SVG, HEIC, BMP, TIFF and AVIF. The native driver
errored the whole run on any of those (or an unreadable path), while the
Claude driver skips them and the retired adapter ignored attachments: the
path refs already ride the prompt text. Load images best-effort instead.

Also give native startup the 120s budget the ACP handshake gave Pi, since
extensions can start cold.

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

* style(pi): rustfmt the lost-session live test

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:14:54 -07:00