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

10 commits

Author SHA1 Message Date
Wing
fbb89b20a4 ci: run restart_hook (an engine freed after shutdown) on pull requests
The engine-graph leaks fixed in 1a7dc2e49 went unseen because CI never
ran local_first. restart_hook fails if either hold comes back (checked:
it fails with the strong hook, and with the plugin host kept), runs in
under a second, and needs no services. It stays its own binary: the hook
it checks is process-wide.

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:50:05 -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
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
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
Chance
6973500bc0
Sync: update loro to 1.17 so streaming chats stop leaking memory (#1116)
* Sync: update loro to 1.17 so streaming chats stop leaking memory

loro before 1.17 left another copy of a doc's text in its string arena on
every snapshot export (fixed in loro-dev/loro 089a4e6). chat_persistence
exports a dirty chat each second, so a chat with a streaming agent grew
quadratically until the arena passed 4 GiB and export panicked (#905).

* Sync: upgrade edge Loro and guard snapshot memory growth

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

---------

Co-authored-by: gratenes <claude@storage.gay>
Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-31 11:55:18 -07:00
Alexandre V.L
95b294658f
Claude subagents: give a typed /skill's fork a chip and a tab (#1043)
* Claude subagents: give a typed /skill's fork a chip and a tab

A `/skill` typed as the prompt, when the skill runs in a fork
(`context: fork`), showed nothing while it ran: no chip, no tab, and
the badge and card didn't count it. No tool call starts it. Its
`task_started` carries no tool id, and its messages carry
`forked-command-<name>` and arrive "together and in order after the
forked skill finishes"
(https://code.claude.com/docs/en/headless.md#follow-subagent-messages).
The spawn gate kept them in the journal.

That task start now makes the fork a spawn chip, `Agent: /<name>`, and
the skill's prompt opens its tab. The chip's id adds the task to the
CLI's, which repeats on every run. Until the turn ends, any
`forked-command-*` traffic feeds the chip, and the prompt's echo is
dropped once. The fork's notification comes before that replay, so it
only records the status. The chip settles just before the turn's Done,
or when the driver ends a stopped turn itself. After that the CLI's id
stays in the journal again, and a late frame can't reopen the chip.

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

* Typed-fork-chip demo media for the PR (live stills)

* Claude subagents: a second typed fork settles the first

A turn runs one typed fork, but nothing enforced it: a second task start
before the first settled replaced it, and the first's chip ran on with
nothing left to settle it, counted in the badge for good.

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 <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-26 22:02:38 +00:00
Alexandre V.L
ae1ec6ad8d
Fork: settle the running subagent chips a fork copies (#1045)
* Fork: settle the running subagent chips a fork copies

A fork copies the source's entries as they are, so a subagent still
running there kept a `running` chip in the fork. No run in the fork ever
settles it: the chip and its lanes-card row spun forever (#1001).

The copy now settles it `failed`, like run end and the restart sweep
do. The chip keeps its ref, so it still opens the subagent's transcript.
The source keeps its own.

CI now runs the engine's `side_chats` tests, where the fork tests live.

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

* Fork-settles-subagents demo media for the PR (live before/after stills)

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

* docs: a fork settles copied questions and running spawn chips

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

* docs: reflow the ForkSideChat paragraph

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: 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-26 21:53:34 +00: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
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
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