From 623d181092f94c1b06e2462ec16755bde24b769e Mon Sep 17 00:00:00 2001 From: Ryuz Date: Thu, 19 Nov 2026 08:23:17 +0100 Subject: [PATCH 1/7] Cello 0.1.0: image pin, OUTER_CELLO_BIN, CELLD_* refusal in check-config/serve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Pin ghcr.io/ryuzcorp/cello:0.1.0@sha256:3d6943…deb87689; binary /usr/local/bin/cello; CELLO_ESBUILD/CELLO_VERSION image env. - OUTER_CELLD_BIN -> OUTER_CELLO_BIN (default cello); the bare old default follows the rename, an explicit old path is still honored so a carried-over production env keeps booting. - from_vars fails on any CELLD_* naming the CELLO_* spelling, so the release preflight aborts before prod is touched. Test fails before. --- crates/outer/src/config.rs | 85 +++++++++++++++++++++++++++++++++++--- deploy/outer.env.example | 13 ++++-- docker/Dockerfile | 33 +++++++-------- 3 files changed, 104 insertions(+), 27 deletions(-) diff --git a/crates/outer/src/config.rs b/crates/outer/src/config.rs index f0b39e1..1e6068a 100644 --- a/crates/outer/src/config.rs +++ b/crates/outer/src/config.rs @@ -381,8 +381,8 @@ pub struct RuntimeConfig { pub app_uid_range: (u32, u32), /// Idle time before an app's fleet is stopped (`OUTER_SLEEP_AFTER_S`). pub sleep_after_secs: u64, - /// `OUTER_CELLD_BIN`, `OUTER_BUN_BIN`, `OUTER_ESBUILD_BIN` (passed to celld). - pub celld_bin: String, + /// `OUTER_CELLO_BIN`, `OUTER_BUN_BIN`, `OUTER_ESBUILD_BIN` (passed to cello). + pub cello_bin: String, pub bun_bin: String, pub esbuild_bin: Option, /// Global build slots (`OUTER_BUILD_CONCURRENCY`, default half the CPUs). @@ -427,6 +427,25 @@ impl Config { pub fn from_vars(vars: &BTreeMap) -> Result> { let get = |name: &str| vars.get(name).map(|v| v.trim()).filter(|v| !v.is_empty()); let mut problems = Vec::new(); + // Cello 0.1.0 renamed every `CELLD_*` variable to `CELLO_*` and + // refuses to start with any `CELLD_*` set — and Outer no longer + // emits any. A carried-over setting is dead config at best, so fail + // here, in both `serve` and `check-config` (the release preflight + // runs the latter against prod's env file): the release aborts + // before prod is touched, naming the exact rename. + { + let mut renamed: Vec<(&String, String)> = vars + .keys() + .filter(|name| name.starts_with("CELLD_")) + .map(|name| (name, format!("CELLO_{}", &name["CELLD_".len()..]))) + .collect(); + renamed.sort(); + for (old, new) in renamed { + problems.push(format!( + "{old} was renamed to {new}: set {new} instead of {old} (Cello 0.1.0 refuses to start with any CELLD_* variable set)" + )); + } + } let domain = get("OUTER_DOMAIN") .unwrap_or(DEFAULT_DOMAIN) @@ -628,8 +647,17 @@ impl Config { 1800, &mut problems, ), - celld_bin: resolve_bin( - get("OUTER_CELLD_BIN").unwrap_or("celld"), + cello_bin: resolve_bin( + get("OUTER_CELLO_BIN") + .or_else(|| { + // Deprecated pre-Cello name: honored so a carried-over + // production env keeps booting. The bare old default + // means "whatever the image carries", so it follows + // the rename; an explicit path keeps working. + let old = get("OUTER_CELLD_BIN")?; + (old != "celld").then_some(old) + }) + .unwrap_or("cello"), vars.get("PATH").map(String::as_str).unwrap_or(""), ), bun_bin: resolve_bin( @@ -1615,10 +1643,57 @@ mod tests { assert_eq!(cfg.runtime.bun_bin, fake.to_string_lossy().into_owned()); // Missing tools and explicit paths keep their raw names: config load // (and check-config) never depends on installed tools. - assert_eq!(cfg.runtime.celld_bin, "celld"); + assert_eq!(cfg.runtime.cello_bin, "cello"); assert_eq!(cfg.runtime.esbuild_bin.as_deref(), Some("/opt/esbuild")); } + #[test] + fn stale_celld_env_refuses_with_the_cello_spelling() { + let err = Config::from_vars(&vars(&[ + ("OUTER_STORE", "memory"), + ("CELLD_OPERATOR_TOKEN", "stale"), + ("CELLD_DURABILITY", "bucket"), + ])) + .unwrap_err(); + assert!( + err.iter() + .any(|p| p.contains("CELLD_OPERATOR_TOKEN was renamed to CELLO_OPERATOR_TOKEN")), + "missing operator-token rename: {err:?}" + ); + assert!( + err.iter() + .any(|p| p.contains("CELLD_DURABILITY was renamed to CELLO_DURABILITY")), + "missing durability rename: {err:?}" + ); + } + + #[test] + fn cello_bin_defaults_and_honors_the_deprecated_name() { + // Fresh env: the new name and the new default. + let cfg = Config::from_vars(&vars(&[("OUTER_STORE", "memory")])).unwrap(); + assert_eq!(cfg.runtime.cello_bin, "cello"); + let cfg = Config::from_vars(&vars(&[ + ("OUTER_STORE", "memory"), + ("OUTER_CELLO_BIN", "/opt/cello"), + ])) + .unwrap(); + assert_eq!(cfg.runtime.cello_bin, "/opt/cello"); + // Carried-over production env keeps booting: an explicit old path + // is honored, while the bare old default follows the rename. + let cfg = Config::from_vars(&vars(&[ + ("OUTER_STORE", "memory"), + ("OUTER_CELLD_BIN", "/opt/celld"), + ])) + .unwrap(); + assert_eq!(cfg.runtime.cello_bin, "/opt/celld"); + let cfg = Config::from_vars(&vars(&[ + ("OUTER_STORE", "memory"), + ("OUTER_CELLD_BIN", "celld"), + ])) + .unwrap(); + assert_eq!(cfg.runtime.cello_bin, "cello"); + } + #[test] fn partial_tls_triple_is_rejected() { for missing in ["OUTER_TLS_CERT", "OUTER_TLS_KEY", "OUTER_ORIGIN_PULL_CA"] { diff --git a/deploy/outer.env.example b/deploy/outer.env.example index a786331..0209ae2 100644 --- a/deploy/outer.env.example +++ b/deploy/outer.env.example @@ -2,6 +2,11 @@ # blanks, `chmod 600` it. Every variable outer reads in production, one line # each; unset entries fall back to the dev default shown. Secrets stay blank # here by design — never commit the filled file. +# +# Cello note: the runtime refuses to start with ANY `CELLD_*` variable set +# (every one was renamed to `CELLO_*`). If `outer check-config` fails with +# e.g. `CELLD_OPERATOR_TOKEN was renamed to CELLO_OPERATOR_TOKEN`, rename +# that line here and re-run the release. # Platform host; apps live at .. OUTER_DOMAIN=outer.now @@ -122,11 +127,11 @@ OUTER_SLEEP_AFTER_S=1800 # and refuses fleets and builds while it is missing; off skips it and is # refused for non-localhost domains. Default required. OUTER_EGRESS_FIREWALL=required -# Binaries handed to celld; resolved against PATH, explicit paths pass -# through. Defaults celld, bun (both in the image's PATH). -#OUTER_CELLD_BIN=celld +# Binaries handed to cello; resolved against PATH, explicit paths pass +# through. Defaults cello, bun (both in the image's PATH). +#OUTER_CELLO_BIN=cello #OUTER_BUN_BIN=bun -# esbuild for celld Worker bundling; unset uses celld's own. The image +# esbuild for cello Worker bundling; unset uses cello's own. The image # carries /usr/local/bin/esbuild. #OUTER_ESBUILD_BIN=/usr/local/bin/esbuild # Platform oxfmt binary that formats agent commits (js/ts/json/css/md…). diff --git a/docker/Dockerfile b/docker/Dockerfile index 71c7dc3..2b899bc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,29 +3,26 @@ # (under tini) and owns every other process: # # outer (uid 0) MCP, OAuth, app proxy, deploys, supervision -# ├── celld × N one fleet per awake app, each as the app's own uid +# ├── cello × N one fleet per awake app, each as the app's own uid # └── bun / sh builds, as the app's uid # # outer terminates TLS itself (rustls) on OUTER_LISTEN: the Cloudflare # Origin CA certificate plus Authenticated Origin Pulls (mTLS). -# celld comes from the ryuzcorp/celld fork: upstream denoland/celld at -# 0.6.3 plus the fork's patches (Void framework compatibility, sandbox -# containers/exec, D1/R2 fixes, deploy project-read confinement with -# `--read-root`), published as `-ryuzcorp.` with SLSA -# provenance attestations. The two ARG lines below are the single source -# of the pin: a bump changes these values (the tag, then the digest from -# the fork's publish summary). Upstream celld ships only security fixes -# from 0.6.x on, so the fork carries the patches. -ARG CELLD_VERSION=0.6.3-ryuzcorp.12 -ARG CELLD_DIGEST=sha256:01c9da9e41e4db13c31b31a7a5815e07d03deb6f3557ce3d6f536ea6df4efc50 -ARG CELLD_IMAGE=ghcr.io/ryuzcorp/celld:${CELLD_VERSION}@${CELLD_DIGEST} +# cello is the renamed celld continuation (ryuzcorp/cello): the same code +# and formats as celld `0.6.3-ryuzcorp.13`, new names, published as semver +# with SLSA provenance attestations. The two ARG lines below are the +# single source of the pin: a bump changes these values (the tag, then the +# digest from the release's publish summary). +ARG CELLO_VERSION=0.1.0 +ARG CELLO_DIGEST=sha256:3d6943b69b2201f8980f73178d3530c4b7f558c2bcb3cbb99badbc67deb87689 +ARG CELLO_IMAGE=ghcr.io/ryuzcorp/cello:${CELLO_VERSION}@${CELLO_DIGEST} ARG ESBUILD_VERSION=0.28.2 # Pinned formatter for agent commits. Keep in step with the template's # `oxfmt` devDependency, `.github/workflows/ci.yml`, and the extension list # in `crates/outer/src/git/format.rs`. ARG OXFMT_VERSION=0.74.0 -FROM ${CELLD_IMAGE} AS celld +FROM ${CELLO_IMAGE} AS cello # --- web site (Blume) ----------------------------------------------------------- # The platform host serves this static build for humans and agents; the MCP @@ -72,10 +69,10 @@ RUN --mount=type=cache,id=outer-cargo-registry,target=/usr/local/cargo/registry, # --- runtime ------------------------------------------------------------------ # bun runs app installs and builds. git backs each app's repo. nftables -# enforces the egress policy. esbuild is what celld bundles Worker code with. +# enforces the egress policy. esbuild is what cello bundles Worker code with. FROM docker.io/oven/bun:1.4-slim AS outer ARG ESBUILD_VERSION -ARG CELLD_VERSION +ARG CELLO_VERSION RUN apt-get update && apt-get install -y --no-install-recommends \ tini ca-certificates curl git nftables \ && rm -rf /var/lib/apt/lists/* \ @@ -98,7 +95,7 @@ RUN for uid in $(seq 200000 201023); do \ echo "app-${uid}:x:${uid}:" >> /etc/group; \ done \ && mkdir -p /data -COPY --from=celld /usr/local/bin/celld /usr/local/bin/celld +COPY --from=cello /usr/local/bin/cello /usr/local/bin/cello COPY --from=build /out/outer /usr/local/bin/outer # The built web site, served on the platform host from OUTER_SITE_DIR. COPY --from=site /site/web/dist /usr/share/outer/site @@ -115,8 +112,8 @@ WORKDIR /data ENV OUTER_DATA=/data \ OUTER_LISTEN=[::]:443 \ OUTER_SITE_DIR=/usr/share/outer/site \ - CELLD_ESBUILD=/usr/local/bin/esbuild \ - CELLD_VERSION="${CELLD_VERSION}" + CELLO_ESBUILD=/usr/local/bin/esbuild \ + CELLO_VERSION="${CELLO_VERSION}" VOLUME /data EXPOSE 443 ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/outer"] From 6e482e7f19ef78d9d996cb6288ac1a9274208e67 Mon Sep 17 00:00:00 2001 From: Ryuz Date: Thu, 19 Nov 2026 08:23:27 +0100 Subject: [PATCH 2/7] Cello 0.1.0: fleet emits CELLO_* env, health gate, reserved prefix --- crates/outer/src/fleet/cgroups.rs | 2 +- crates/outer/src/fleet/health.rs | 10 +-- crates/outer/src/fleet/manager.rs | 92 ++++++++++---------- crates/outer/src/fleet/mod.rs | 2 +- crates/outer/src/fleet/nft.rs | 6 +- crates/outer/src/fleet/sandbox.rs | 9 +- crates/outer/src/fleet/supervisor.rs | 122 +++++++++++++-------------- 7 files changed, 123 insertions(+), 120 deletions(-) diff --git a/crates/outer/src/fleet/cgroups.rs b/crates/outer/src/fleet/cgroups.rs index a0abb47..b35c2ee 100644 --- a/crates/outer/src/fleet/cgroups.rs +++ b/crates/outer/src/fleet/cgroups.rs @@ -12,7 +12,7 @@ use anyhow::Context; const CONTROLLERS: &str = "+memory +pids +cpu"; /// Cap on a fleet's tasks (processes and threads — the pids controller counts -/// both). Generous on purpose: celld runs isolates in-process and a busy node +/// both). Generous on purpose: cello runs isolates in-process and a busy node /// holds hundreds of threads; the binding constraint is memory. pub const FLEET_PIDS_MAX: u64 = 4096; diff --git a/crates/outer/src/fleet/health.rs b/crates/outer/src/fleet/health.rs index a7e1d67..d9ee3b0 100644 --- a/crates/outer/src/fleet/health.rs +++ b/crates/outer/src/fleet/health.rs @@ -5,8 +5,8 @@ use std::time::Duration; -/// Poll the fleet's health route until celld's ready gate opens: 200 on -/// `/.well-known/celld/health`, every 250 ms, each attempt capped at 2 s. +/// Poll the fleet's health route until cello's ready gate opens: 200 on +/// `/.well-known/cello/health`, every 250 ms, each attempt capped at 2 s. /// Returns false once `timeout` runs out. pub async fn wait_healthy(host: &str, port: u16, timeout: Duration) -> bool { static CLIENT: std::sync::LazyLock = std::sync::LazyLock::new(|| { @@ -15,7 +15,7 @@ pub async fn wait_healthy(host: &str, port: u16, timeout: Duration) -> bool { .build() .unwrap_or_default() }); - let url = format!("http://{host}:{port}/.well-known/celld/health"); + let url = format!("http://{host}:{port}/.well-known/cello/health"); let deadline = tokio::time::Instant::now() + timeout; let started = tokio::time::Instant::now(); loop { @@ -51,8 +51,8 @@ mod tests { use std::sync::Arc; use tokio::io::{AsyncReadExt, AsyncWriteExt}; - /// Minimal celld health gate: 503 for the first `flaps` requests, then - /// 200 on `/.well-known/celld/health`. + /// Minimal cello health gate: 503 for the first `flaps` requests, then + /// 200 on `/.well-known/cello/health`. async fn serve_health(listener: tokio::net::TcpListener, flaps: usize) -> u16 { let port = listener.local_addr().unwrap().port(); let seen = Arc::new(AtomicUsize::new(0)); diff --git a/crates/outer/src/fleet/manager.rs b/crates/outer/src/fleet/manager.rs index f91699b..226d03d 100644 --- a/crates/outer/src/fleet/manager.rs +++ b/crates/outer/src/fleet/manager.rs @@ -1,4 +1,4 @@ -//! One celld fleet per app, started on demand and slept when idle. +//! One cello fleet per app, started on demand and slept when idle. //! //! `FleetManager` keeps the running fleets: `ensure_awake` starts the fleet //! for an app (coalesced per slug, bounded across slugs), `sleep_idle` stops @@ -27,8 +27,8 @@ use crate::store::credentials::Permission; pub struct ManagerSettings { /// `{data}`: fleet state lives at `{data}/fleets/{slug}`. pub data_dir: PathBuf, - /// Celld binary (`celld` on `PATH` in production). - pub celld_bin: String, + /// Cello binary (`cello` on `PATH` in production). + pub cello_bin: String, /// Bucket and creds the fleet pulls its deploys from. pub storage: FleetStorage, /// Cgroup anchor when containment is active, else `None` (dev). @@ -43,7 +43,7 @@ pub struct ManagerSettings { /// minted credentials (prod: 6 days for a 7-day TTL). Applies to fleets /// that are not being put to sleep this sweep tick. pub credential_refresh_after: Duration, - /// How long a wake waits for `/.well-known/celld/health`. + /// How long a wake waits for `/.well-known/cello/health`. pub wake_timeout: Duration, /// AES-256-GCM key for app secrets; the manager derives each fleet's /// internal-listener token from it (never stored, never a Worker var). @@ -90,13 +90,13 @@ impl FleetStorage { format!("fleets/{slug}/") } - /// The state namespaces a running celld node writes, as read-write + /// The state namespaces a running cello node writes, as read-write /// credential prefixes. **Cross-repo contract:** this list must name - /// every key the celld fork touches at runtime. A new namespace in a - /// celld release is a failed write (and usually a failed wake) until + /// every key the cello fork touches at runtime. A new namespace in a + /// cello release is a failed write (and usually a failed wake) until /// this list names it; that is deliberate, because the alternative is a /// grant wide enough to publish deployments. Each prefix names the - /// celld file that reads or writes it (`crates/celld/` unless noted): + /// cello file that reads or writes it (`crates/cello/` unless noted): /// /// - `cells/` — Durable Object state, ownership records, LTX replicas /// (`cell_cli.rs`, `control_plane.rs`) @@ -119,8 +119,8 @@ impl FleetStorage { /// - `kv/` — KV large-value blobs (`crates/logic/kv.rs`) /// - `r2/` — R2 bindings (`r2//`, `r2_store.rs`) /// - `probe/` — the startup conditional-write and range probes, and - /// `celld diagnose` (`bucket.rs`) - /// - `telemetry/` — OTel parquet, only with `CELLD_OTEL` set + /// `cello diagnose` (`bucket.rs`) + /// - `telemetry/` — OTel parquet, only with `CELLO_OTEL` set /// (`telemetry.rs`) pub fn fleet_data_prefixes(slug: &str) -> Vec { [ @@ -181,7 +181,7 @@ impl FleetStorage { struct Inner { data_dir: PathBuf, - celld_bin: String, + cello_bin: String, storage: FleetStorage, secrets_key: crate::secrets::SecretsKey, cgroups: Option, @@ -269,7 +269,7 @@ impl FleetManager { pub fn new(settings: ManagerSettings) -> Self { let inner = Inner { data_dir: settings.data_dir, - celld_bin: settings.celld_bin, + cello_bin: settings.cello_bin, storage: settings.storage, secrets_key: settings.secrets_key, cgroups: settings.cgroups, @@ -300,11 +300,11 @@ impl FleetManager { self.inner.egress.read().expect("egress lock").clone() } - /// The celld binary console data panels shell out to (`celld d1 …`, - /// `celld cell …`). Cloned out so `console_data` can build its argv + /// The cello binary console data panels shell out to (`cello d1 …`, + /// `cello cell …`). Cloned out so `console_data` can build its argv /// without reaching into the manager's internals. - pub fn celld_bin(&self) -> String { - self.inner.celld_bin.clone() + pub fn cello_bin(&self) -> String { + self.inner.cello_bin.clone() } /// Bucket coordinates and the per-prefix credential source the data @@ -453,7 +453,7 @@ impl FleetManager { )), }; let opts = FleetOpts { - celld_bin: self.inner.celld_bin.clone(), + cello_bin: self.inner.cello_bin.clone(), state_dir, shutdown_total_ms: 20_000, idle_evict_secs: 120, @@ -622,7 +622,7 @@ impl FleetManager { .map_err(|err| anyhow::anyhow!("wake semaphore closed: {err}"))?; // A fleet can outlive outer: the child reparents on restart and // keeps serving while the new process's map is empty. Starting a - // second celld would collide on the port, so one probe comes first; + // second cello would collide on the port, so one probe comes first; // a healthy port means awake. `wait_healthy` tries once before its // first sleep, so a zero timeout is a single probe, not a skip. if health::wait_healthy("127.0.0.1", app.port, Duration::ZERO).await { @@ -873,10 +873,10 @@ impl FleetManager { /// [`crate::apps::serving::decide`]. Free apps keep sleeping as before, /// and a stopped or held app is not woken. /// - /// `ensure_awake` covers the sleeping case (a booted celld adopts the + /// `ensure_awake` covers the sleeping case (a booted cello adopts the /// deployment pointer and arms the new generation's cron schedule) and /// is a no-op for a tracked fleet. The one warm-up request then drives - /// a real visitor path into the fleet: celld's health gate and + /// a real visitor path into the fleet: cello's health gate and /// `/reload` both answer without running the Worker, so only a request /// proves the deployed version serves. Neither step fails a deploy; the /// caller logs an error and the keep-warm sweep retries. @@ -1396,7 +1396,7 @@ mod tests { .unwrap(); let manager = FleetManager::new(ManagerSettings { data_dir: dir.path().to_path_buf(), - celld_bin: "/nonexistent/celld".to_string(), + cello_bin: "/nonexistent/cello".to_string(), storage: FleetStorage { endpoint: "https://example.com".to_string(), region: "auto".to_string(), @@ -1430,7 +1430,7 @@ mod tests { } /// A wake counts as activity: `ensure_awake` against an already-healthy - /// port touches `last_request_at` without spawning celld. Uses a fake + /// port touches `last_request_at` without spawning cello. Uses a fake /// health endpoint, no fleet involved. #[tokio::test] async fn wake_marks_activity_without_spawning() { @@ -1477,7 +1477,7 @@ mod tests { let before = apps::now_ms(); let manager = FleetManager::new(ManagerSettings { data_dir: dir.path().to_path_buf(), - celld_bin: "/nonexistent/celld".to_string(), + cello_bin: "/nonexistent/cello".to_string(), storage: FleetStorage { endpoint: "https://example.com".to_string(), region: "auto".to_string(), @@ -1593,12 +1593,12 @@ mod tests { pool.close().await; } - /// Needs a real celld binary and an S3-compatible bucket (RustFS, with + /// Needs a real cello binary and an S3-compatible bucket (RustFS, with /// OUTER_TEST_S3_* set as in tests/store_live.rs): deploys a minimal /// worker, then starts the fleet for an app row and waits for its health /// gate. #[tokio::test] - #[ignore = "needs celld + RustFS"] + #[ignore = "needs cello + RustFS"] async fn wake_starts_a_real_fleet() { fn test_env(name: &str, fallback: &str) -> String { std::env::var(name).unwrap_or_else(|_| fallback.to_string()) @@ -1607,7 +1607,7 @@ mod tests { let bucket = test_env("OUTER_TEST_S3_BUCKET", "outer-dev"); let access_key = test_env("OUTER_TEST_S3_KEY", "outeraccess"); let secret_key = test_env("OUTER_TEST_S3_SECRET", "outersecretoutersecret12"); - let celld = test_env("CELLD_BIN", "celld"); + let cello = test_env("CELLO_BIN", "cello"); // A minimal worker so the fleet has something to serve. let proj = tempfile::tempdir().unwrap(); std::fs::write( @@ -1620,7 +1620,7 @@ mod tests { "{\"name\": \"real\", \"main\": \"index.js\", \"compatibility_date\": \"2026-09-01\"}", ) .unwrap(); - let deploy = tokio::process::Command::new(&celld) + let deploy = tokio::process::Command::new(&cello) .arg("deploy") .arg(proj.path()) .arg("--bucket") @@ -1635,15 +1635,15 @@ mod tests { .env("AWS_EC2_METADATA_DISABLED", "true") .env("S3_ENDPOINT", &endpoint) .env( - "CELLD_ESBUILD", - test_env("CELLD_ESBUILD", "/usr/local/bin/esbuild"), + "CELLO_ESBUILD", + test_env("CELLO_ESBUILD", "/usr/local/bin/esbuild"), ) .output() .await - .expect("celld deploy runs"); + .expect("cello deploy runs"); assert!( deploy.status.success(), - "celld deploy failed: {}", + "cello deploy failed: {}", String::from_utf8_lossy(&deploy.stderr) ); let dir = tempfile::tempdir().unwrap(); @@ -1663,7 +1663,7 @@ mod tests { .unwrap(); let manager = FleetManager::new(ManagerSettings { data_dir: dir.path().to_path_buf(), - celld_bin: test_env("CELLD_BIN", "celld"), + cello_bin: test_env("CELLO_BIN", "cello"), storage: FleetStorage { endpoint, region: "auto".to_string(), @@ -1690,9 +1690,9 @@ mod tests { manager.stop_all().await; } - /// Keep-warm rig: a fake celld (a script that sleeps) plus a fake + /// Keep-warm rig: a fake cello (a script that sleeps) plus a fake /// healthy port, so `ensure_awake` tracks a live fleet with no real - /// celld and no network. + /// cello and no network. struct WarmRig { _dir: tempfile::TempDir, pool: SqlitePool, @@ -1703,7 +1703,7 @@ mod tests { impl WarmRig { async fn new(always_on_max: usize) -> Self { let dir = tempfile::tempdir().unwrap(); - Self::with_celld( + Self::with_cello( dir, always_on_max, "#!/bin/sh\nexec sleep 120\n", @@ -1724,15 +1724,15 @@ mod tests { log.display() ); ( - Self::with_celld(dir, always_on_max, &script, Duration::from_secs(2)).await, + Self::with_cello(dir, always_on_max, &script, Duration::from_secs(2)).await, log, ) } - async fn with_celld( + async fn with_cello( dir: tempfile::TempDir, always_on_max: usize, - celld_script: &str, + cello_script: &str, wake_timeout: Duration, ) -> Self { let pool = crate::db::open(&dir.path().join("outer.sqlite")) @@ -1740,16 +1740,16 @@ mod tests { .unwrap(); // A fleet binary that stays alive and ignores its argv: the // health gate is answered by the fake listener below. - let celld = dir.path().join("celld"); - std::fs::write(&celld, celld_script).unwrap(); + let cello = dir.path().join("cello"); + std::fs::write(&cello, cello_script).unwrap(); #[cfg(unix)] { use std::os::unix::fs::PermissionsExt as _; - std::fs::set_permissions(&celld, std::fs::Permissions::from_mode(0o755)).unwrap(); + std::fs::set_permissions(&cello, std::fs::Permissions::from_mode(0o755)).unwrap(); } let manager = FleetManager::new(ManagerSettings { data_dir: dir.path().to_path_buf(), - celld_bin: celld.to_string_lossy().into_owned(), + cello_bin: cello.to_string_lossy().into_owned(), storage: FleetStorage { endpoint: "https://example.com".to_string(), region: "auto".to_string(), @@ -1890,7 +1890,7 @@ mod tests { /// A listener that answers 200 to every request and records each /// request line, so a test can prove a request reached the fleet. /// The health gate is answered too, so `ensure_awake` adopts the - /// port without spawning a celld. + /// port without spawning a cello. async fn recording_port(&mut self) -> (u16, Arc>>) { use tokio::io::{AsyncReadExt, AsyncWriteExt}; let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); @@ -1952,7 +1952,7 @@ mod tests { /// parallel test claims the number and the bind fails. The port /// answers 503 until the wake is in flight: the zero-timeout probe /// can never mistake it for an already-healthy fleet, so - /// `ensure_awake` always spawns (and tracks) the fake celld. + /// `ensure_awake` always spawns (and tracks) the fake cello. async fn wake_then_idle( &self, listener: tokio::net::TcpListener, @@ -1984,7 +1984,7 @@ mod tests { let manager = self.manager.clone(); let pool = self.pool.clone(); let wake = tokio::spawn(async move { manager.ensure_awake(&pool, &app).await }); - // Let the spawn land (the fake celld starts instantly), then + // Let the spawn land (the fake cello starts instantly), then // answer the health gate. tokio::time::sleep(Duration::from_millis(500)).await; ready.store(true, Ordering::SeqCst); @@ -2271,7 +2271,7 @@ mod tests { /// The 2026-11-06 incident: a successful deploy left an always-on app /// asleep. `alive` is process liveness and the deploy's `/reload` never /// reaches a sleeping fleet, so the deploy step itself must wake the app - /// AND send one visitor request: celld's health gate answers without + /// AND send one visitor request: cello's health gate answers without /// running the deployed Worker. #[tokio::test] async fn post_deploy_wakes_and_warms_an_always_on_app() { diff --git a/crates/outer/src/fleet/mod.rs b/crates/outer/src/fleet/mod.rs index 368a847..92a7cba 100644 --- a/crates/outer/src/fleet/mod.rs +++ b/crates/outer/src/fleet/mod.rs @@ -1,4 +1,4 @@ -//! One celld fleet per app: sandboxed builds, cgroup leaves, nft egress, +//! One cello fleet per app: sandboxed builds, cgroup leaves, nft egress, //! supervision and health. pub mod cgroups; diff --git a/crates/outer/src/fleet/nft.rs b/crates/outer/src/fleet/nft.rs index 6767b2f..a3d48f2 100644 --- a/crates/outer/src/fleet/nft.rs +++ b/crates/outer/src/fleet/nft.rs @@ -18,7 +18,7 @@ pub struct NftConfig { pub free_uids: Vec, pub pro_uids: Vec, /// Each app uid's own loopback ports (live and preview, public and - /// internal). Its celld dials its own node there, e.g. `celld d1 + /// internal). Its cello dials its own node there, e.g. `cello d1 /// migrations apply` at deploy, so exactly these stay reachable for that /// uid ahead of the loopback reject; every other fleet's port stays /// closed. @@ -78,7 +78,7 @@ pub fn ruleset(cfg: &NftConfig) -> String { rules.push(format!( " meta skuid {id} meta l4proto {{ tcp, udp }} ct original proto-dst 53 accept" )); - // The app's own celld needs the object store, which may sit on a private + // The app's own cello needs the object store, which may sit on a private // address: allow exactly those addresses and port, ahead of the // private-range rejects. let (v4, v6): (Vec, Vec) = @@ -250,7 +250,7 @@ mod tests { } } - /// An app reaches its own fleet's loopback ports (its celld dials its + /// An app reaches its own fleet's loopback ports (its cello dials its /// node at deploy) but no other fleet's: the allowance names the uid and /// its ports, and sorts before the loopback reject. #[test] diff --git a/crates/outer/src/fleet/sandbox.rs b/crates/outer/src/fleet/sandbox.rs index 5dfaa42..4b8ec75 100644 --- a/crates/outer/src/fleet/sandbox.rs +++ b/crates/outer/src/fleet/sandbox.rs @@ -48,13 +48,16 @@ pub fn base_env(cache_root: &Path) -> Vec<(String, String)> { /// Reserved prefixes/names the platform owns: app secrets with these names /// are dropped (logged) rather than injected into build/fleet env. /// `OUTER_*` replaces Noite's `NOITE_*`/`RUNNER_*`; jup/npm/pnpm/yarn -/// specifics are gone with the package managers. +/// specifics are gone with the package managers. `CELLD_*` stays reserved +/// next to `CELLO_*`: a carried-over app `CELLD_*` would make cello refuse +/// to start, so it must never reach the child either. pub fn is_reserved_env_name(name: &str) -> bool { name == "PORT" || name == "HOST" || name.starts_with("AWS_") || name.starts_with("S3_") || name.starts_with("CELLD_") + || name.starts_with("CELLO_") || name.starts_with("OUTER_") || name.starts_with("CLOUDFLARE_") || name.starts_with("R2_") @@ -78,7 +81,7 @@ pub fn is_reserved_env_name(name: &str) -> bool { /// plus the process group), so a shared leaf would kill sibling steps. /// /// Two env lists: `platform_env` is set by outer itself (PATH, the bucket -/// credentials `celld deploy` needs) and reaches the child as given; `env` +/// credentials `cello deploy` needs) and reaches the child as given; `env` /// carries app-supplied values (secrets) and goes through /// [`is_reserved_env_name`], so an app can never set `LD_PRELOAD`, `AWS_*` or /// any platform name. @@ -635,7 +638,7 @@ mod tests { "HOST", "AWS_SECRET_ACCESS_KEY", "S3_ENDPOINT", - "CELLD_WATCH", + "CELLO_WATCH", "OUTER_SECRET", "CLOUDFLARE_API_TOKEN", "R2_ACCESS_KEY_ID", diff --git a/crates/outer/src/fleet/supervisor.rs b/crates/outer/src/fleet/supervisor.rs index f134752..69d54de 100644 --- a/crates/outer/src/fleet/supervisor.rs +++ b/crates/outer/src/fleet/supervisor.rs @@ -1,6 +1,6 @@ // Derived from noite apps/runner/src/host/supervisor.rs @ 58a977a (Apache-2.0) // and host/logs.rs @ 58a977a (Apache-2.0). -// Outer change: one celld fleet per app, no environment fleets, no control +// Outer change: one cello fleet per app, no environment fleets, no control // fleet, no reconcile; logs are a per-app bounded ring with sequence numbers // and timestamps; no OTel/telemetry env (outer reads logs from stdout). @@ -10,7 +10,7 @@ use std::process::Stdio; use std::sync::Arc; use std::time::Duration; -/// One celld fleet per app. `Debug` redacts the minted secret, the session +/// One cello fleet per app. `Debug` redacts the minted secret, the session /// token and `extra_env` values. #[derive(Clone)] pub struct FleetSpec { @@ -28,7 +28,7 @@ pub struct FleetSpec { pub secret_access_key: String, pub session_token: Option, /// Read-only over the deployment artifacts (`fleets/{slug}/deploy/`, - /// `fleets/{slug}/deploy-blobs/`), passed as `CELLD_DEPLOY_AWS_*`. A + /// `fleets/{slug}/deploy-blobs/`), passed as `CELLO_DEPLOY_AWS_*`. A /// credential copied out of the fleet's environment can serve the /// deployment it runs but never publish one. pub deploy_access_key_id: String, @@ -41,7 +41,7 @@ pub struct FleetSpec { /// (dev machines) only warns. pub cgroups_active: bool, pub extra_env: Vec<(String, String)>, - /// Derived operator token for this slug (`CELLD_OPERATOR_TOKEN`): + /// Derived operator token for this slug (`CELLO_OPERATOR_TOKEN`): /// `None` is today's open listener (mixed states stay working). pub operator_token: Option, } @@ -87,10 +87,10 @@ impl std::fmt::Debug for FleetSpec { } } -/// Tunables for the celld invocation that are not per-app identity. +/// Tunables for the cello invocation that are not per-app identity. #[derive(Debug, Clone)] pub struct FleetOpts { - pub celld_bin: String, + pub cello_bin: String, pub state_dir: PathBuf, pub shutdown_total_ms: u64, pub idle_evict_secs: u64, @@ -98,12 +98,12 @@ pub struct FleetOpts { pub asset_cache_mb: u64, } -/// Pure construction of the celld invocation: (program, argv, env). The -/// command line and `CELLD_*` env mirror Noite's tenant fleets: listeners, -/// `CELLD_DURABILITY=bucket`, the shutdown budget, and the asset-cache and +/// Pure construction of the cello invocation: (program, argv, env). The +/// command line and `CELLO_*` env mirror Noite's tenant fleets: listeners, +/// `CELLO_DURABILITY=bucket`, the shutdown budget, and the asset-cache and /// deploy-poll bounds. The state creds ride `AWS_*` plus /// `AWS_SESSION_TOKEN`; the read-only deployment creds ride -/// `CELLD_DEPLOY_AWS_*` (celld `0052`), so the node reads `deploy/` and +/// `CELLO_DEPLOY_AWS_*` (cello `0052`), so the node reads `deploy/` and /// `deploy-blobs/` with a credential that cannot publish. Reserved names in /// `extra_env` are dropped (logged), never injected. pub fn fleet_command( @@ -122,7 +122,7 @@ pub fn fleet_command( format!("127.0.0.1:{}", spec.public_port), // Advertise on loopback: a fleet is a single node, and outer already // reaches it at 127.0.0.1:{internal} (reload). A hostname advertise - // would not resolve and breaks celld node discovery. + // would not resolve and breaks cello node discovery. "--internal-listen".to_string(), internal.clone(), "--advertise".to_string(), @@ -138,45 +138,45 @@ pub fn fleet_command( ("AWS_REGION".to_string(), spec.s3_region.clone()), ("AWS_EC2_METADATA_DISABLED".to_string(), "true".to_string()), ("S3_ENDPOINT".to_string(), spec.s3_endpoint.clone()), - ("CELLD_WATCH".to_string(), state_dir.clone()), - ("CELLD_DURABILITY".to_string(), "bucket".to_string()), - // Inside outer's stop budget, so celld seals its node log before + ("CELLO_WATCH".to_string(), state_dir.clone()), + ("CELLO_DURABILITY".to_string(), "bucket".to_string()), + // Inside outer's stop budget, so cello seals its node log before // outer's own SIGKILL fallback. ( - "CELLD_SHUTDOWN_TOTAL_MS".to_string(), + "CELLO_SHUTDOWN_TOTAL_MS".to_string(), opts.shutdown_total_ms.to_string(), ), // Bounds: idle eviction returns memory when an app goes quiet. ( - "CELLD_IDLE_EVICT_S".to_string(), + "CELLO_IDLE_EVICT_S".to_string(), opts.idle_evict_secs.to_string(), ), // Outer POSTs /reload after every deploy, so the fleet's own poll // only covers a missed reload. ( - "CELLD_DEPLOY_POLL_S".to_string(), + "CELLO_DEPLOY_POLL_S".to_string(), opts.deploy_poll_secs.to_string(), ), // Bound the per-fleet on-disk asset cache. ( - "CELLD_ASSET_CACHE_BYTES".to_string(), + "CELLO_ASSET_CACHE_BYTES".to_string(), (opts.asset_cache_mb * 1024 * 1024).to_string(), ), - // In the fleet's own state dir: celld's default is one directory for + // In the fleet's own state dir: cello's default is one directory for // every node, created 0700 by whichever starts first, so a fleet // serving as its own uid crash-looped on EACCES there. ( - "CELLD_ASSET_CACHE_DIR".to_string(), + "CELLO_ASSET_CACHE_DIR".to_string(), format!("{state_dir}/asset-cache"), ), - ("CELLD_TRUST_FORWARDED_HEADERS".to_string(), "1".to_string()), + ("CELLO_TRUST_FORWARDED_HEADERS".to_string(), "1".to_string()), // Fleets run as host processes under their own uid, not inside // containers: read memory pressure from the process itself. - ("CELLD_MEMORY_SCOPE".to_string(), "self".to_string()), + ("CELLO_MEMORY_SCOPE".to_string(), "self".to_string()), // Every app is a one-node fleet: there is no fleet capacity to wait - // for, and celld's default first-readiness gate (120 s cap) holds a + // for, and cello's default first-readiness gate (120 s cap) holds a // cold wake for about a second locally and ~3 s on the VPS. - ("CELLD_READY_FLEET_GATE_MS".to_string(), "0".to_string()), + ("CELLO_READY_FLEET_GATE_MS".to_string(), "0".to_string()), ]; if let Some(token) = &spec.session_token { env.push(("AWS_SESSION_TOKEN".to_string(), token.clone())); @@ -185,21 +185,21 @@ pub fn fleet_command( // reads `deploy/` and `deploy-blobs/` with this one, never with the // state grant above. env.push(( - "CELLD_DEPLOY_AWS_ACCESS_KEY_ID".to_string(), + "CELLO_DEPLOY_AWS_ACCESS_KEY_ID".to_string(), spec.deploy_access_key_id.clone(), )); env.push(( - "CELLD_DEPLOY_AWS_SECRET_ACCESS_KEY".to_string(), + "CELLO_DEPLOY_AWS_SECRET_ACCESS_KEY".to_string(), spec.deploy_secret_access_key.clone(), )); if let Some(token) = &spec.deploy_session_token { - env.push(("CELLD_DEPLOY_AWS_SESSION_TOKEN".to_string(), token.clone())); + env.push(("CELLO_DEPLOY_AWS_SESSION_TOKEN".to_string(), token.clone())); } // The derived per-slug token guards the internal listener; the manager // fills it, never user input (`extra_env` reserved names are skipped // below, so this cannot arrive any other way). if let Some(token) = &spec.operator_token { - env.push(("CELLD_OPERATOR_TOKEN".to_string(), token.clone())); + env.push(("CELLO_OPERATOR_TOKEN".to_string(), token.clone())); } for (key, value) in &spec.extra_env { if super::sandbox::is_reserved_env_name(key) { @@ -208,7 +208,7 @@ pub fn fleet_command( } env.push((key.clone(), value.clone())); } - (opts.celld_bin.clone(), args, env) + (opts.cello_bin.clone(), args, env) } /// Which side a captured line came from. @@ -311,7 +311,7 @@ pub fn new_log_ring_from(next: u64) -> SharedLogRing { } /// How long a fleet stop waits for graceful exit (SIGTERM) and then for the -/// SIGKILL reaping before giving up. celld shuts down gracefully on +/// SIGKILL reaping before giving up. cello shuts down gracefully on /// SIGTERM/SIGINT (cancel work, prove durability, seal the node log); /// SIGKILL is only a bounded fallback, delivered to the whole process group /// so an orphaned worker can never keep the fleet's port into the next spawn. @@ -421,7 +421,7 @@ where }); } -/// Start one celld fleet: state dir, uid drop, its own process group, its own +/// Start one cello fleet: state dir, uid drop, its own process group, its own /// cgroup leaf, and stdout/stderr captured line by line into a fresh ring. /// `log_seq_start` is the ring's first sequence number: the caller passes /// the persisted `MAX(seq) + 1` for the app, so seqs stay global per app @@ -436,7 +436,7 @@ pub async fn start( tokio::fs::create_dir_all(&opts.state_dir) .await .with_context(|| format!("create {}", opts.state_dir.display()))?; - // celld runs as the app user: the state dir outer created must be its + // cello runs as the app user: the state dir outer created must be its // own. A zero gid means "same as the uid". Only the dir itself: a // recursive walk as root over an app-writable tree is a symlink race, // and contents already belong to the app user from previous runs. @@ -536,7 +536,7 @@ pub async fn start( if let Some(err) = child.stderr.take() { spawn_capture(err, LogStream::Stderr, logs.clone()); } - tracing::info!(fleet = %spec.slug, listen = spec.public_port, internal = spec.internal_port, "started celld"); + tracing::info!(fleet = %spec.slug, listen = spec.public_port, internal = spec.internal_port, "started cello"); Ok(RunningFleet { slug: spec.slug.clone(), internal_port: spec.internal_port, @@ -635,7 +635,7 @@ mod tests { operator_token: Some("tok-test".to_string()), }; let opts = FleetOpts { - celld_bin: "/usr/bin/celld".to_string(), + cello_bin: "/usr/bin/cello".to_string(), state_dir: state.join("fleets").join("grocery"), shutdown_total_ms: 8000, idle_evict_secs: 300, @@ -650,7 +650,7 @@ mod tests { let dir = tempfile::tempdir().unwrap(); let (spec, opts) = test_spec(dir.path()); let (program, args, env) = fleet_command(&spec, &opts); - assert_eq!(program, "/usr/bin/celld"); + assert_eq!(program, "/usr/bin/cello"); let argv = args.join(" "); assert!( argv.contains("--bucket s3://outer/fleets/grocery"), @@ -665,18 +665,18 @@ mod tests { assert!(argv.contains("--internal-listen 127.0.0.1:23001"), "{argv}"); assert!(argv.contains("--advertise 127.0.0.1:23001"), "{argv}"); let env: std::collections::HashMap<_, _> = env.into_iter().collect(); - assert_eq!(env["CELLD_DURABILITY"], "bucket"); - assert_eq!(env["CELLD_SHUTDOWN_TOTAL_MS"], "8000"); - assert_eq!(env["CELLD_IDLE_EVICT_S"], "300"); - assert_eq!(env["CELLD_DEPLOY_POLL_S"], "300"); + assert_eq!(env["CELLO_DURABILITY"], "bucket"); + assert_eq!(env["CELLO_SHUTDOWN_TOTAL_MS"], "8000"); + assert_eq!(env["CELLO_IDLE_EVICT_S"], "300"); + assert_eq!(env["CELLO_DEPLOY_POLL_S"], "300"); assert_eq!( - env["CELLD_ASSET_CACHE_BYTES"], + env["CELLO_ASSET_CACHE_BYTES"], (512u64 * 1024 * 1024).to_string() ); - assert_eq!(env["CELLD_TRUST_FORWARDED_HEADERS"], "1"); - assert_eq!(env["CELLD_MEMORY_SCOPE"], "self"); + assert_eq!(env["CELLO_TRUST_FORWARDED_HEADERS"], "1"); + assert_eq!(env["CELLO_MEMORY_SCOPE"], "self"); assert_eq!( - env["CELLD_READY_FLEET_GATE_MS"], "0", + env["CELLO_READY_FLEET_GATE_MS"], "0", "single-node fleets skip the fleet gate" ); assert_eq!(env["AWS_ACCESS_KEY_ID"], "key"); @@ -684,14 +684,14 @@ mod tests { assert_eq!(env["AWS_SESSION_TOKEN"], "token"); // The deployment read credential rides its own names, so the node // never reads `deploy/` with the state grant. - assert_eq!(env["CELLD_DEPLOY_AWS_ACCESS_KEY_ID"], "deploy-key"); - assert_eq!(env["CELLD_DEPLOY_AWS_SECRET_ACCESS_KEY"], "deploy-secret"); - assert_eq!(env["CELLD_DEPLOY_AWS_SESSION_TOKEN"], "deploy-token"); + assert_eq!(env["CELLO_DEPLOY_AWS_ACCESS_KEY_ID"], "deploy-key"); + assert_eq!(env["CELLO_DEPLOY_AWS_SECRET_ACCESS_KEY"], "deploy-secret"); + assert_eq!(env["CELLO_DEPLOY_AWS_SESSION_TOKEN"], "deploy-token"); assert_eq!(env["AWS_REGION"], "auto"); assert_eq!(env["AWS_EC2_METADATA_DISABLED"], "true"); assert_eq!(env["GROCERY"], "milk"); // The derived token guards the internal listener. - assert_eq!(env["CELLD_OPERATOR_TOKEN"], "tok-test"); + assert_eq!(env["CELLO_OPERATOR_TOKEN"], "tok-test"); // Reserved names never reach a fleet. assert!( !env.contains_key("OUTER_SECRET"), @@ -722,11 +722,11 @@ mod tests { let (_, _, env) = fleet_command(&spec, &opts); let env: std::collections::HashMap<_, _> = env.into_iter().collect(); assert!(!env.contains_key("AWS_SESSION_TOKEN")); - assert!(!env.contains_key("CELLD_DEPLOY_AWS_SESSION_TOKEN")); + assert!(!env.contains_key("CELLO_DEPLOY_AWS_SESSION_TOKEN")); // The deploy access key and secret are never optional: an unset // token must not turn the pair off. - assert_eq!(env["CELLD_DEPLOY_AWS_ACCESS_KEY_ID"], "deploy-key"); - assert_eq!(env["CELLD_DEPLOY_AWS_SECRET_ACCESS_KEY"], "deploy-secret"); + assert_eq!(env["CELLO_DEPLOY_AWS_ACCESS_KEY_ID"], "deploy-key"); + assert_eq!(env["CELLO_DEPLOY_AWS_SECRET_ACCESS_KEY"], "deploy-secret"); } #[test] @@ -750,18 +750,18 @@ mod tests { assert_eq!(ring.since(0).len(), 3); } - /// Lifecycle without celld: a shell script that ignores its args stands + /// Lifecycle without cello: a shell script that ignores its args /// in for the binary, so start/stop/is_alive run for real. #[tokio::test] async fn start_stop_and_liveness() { let dir = tempfile::tempdir().unwrap(); - let bin = fake_celld(&dir, "#!/bin/sh\nsleep 30\n"); + let bin = fake_cello(&dir, "#!/bin/sh\nsleep 30\n"); let (mut spec, mut opts) = test_spec(dir.path()); - opts.celld_bin = bin; + opts.cello_bin = bin; spec.cgroup_leaf = dir.path().to_path_buf(); let mut fleet = start(&spec, &opts, 0).await.unwrap(); assert!(fleet.is_alive()); - // Captured output drains into the ring (the fake celld is silent). + // Captured output drains into the ring (the fake cello is silent). assert!(fleet.logs.lock().await.is_empty()); fleet .stop(StopGrace { @@ -774,8 +774,8 @@ mod tests { /// Atomically installed: a child exec racing a direct write fails /// ETXTBSY, so every fake binary appears via rename, never mid-write. - fn fake_celld(dir: &tempfile::TempDir, script: &str) -> String { - let bin = dir.path().join("celld"); + fn fake_cello(dir: &tempfile::TempDir, script: &str) -> String { + let bin = dir.path().join("cello"); let tmp = bin.with_extension("tmp"); std::fs::write(&tmp, script).unwrap(); #[cfg(unix)] @@ -793,7 +793,7 @@ mod tests { async fn refused_move_fails_the_start_when_cgroups_are_active() { let dir = tempfile::tempdir().unwrap(); let (mut spec, mut opts) = test_spec(dir.path()); - opts.celld_bin = fake_celld(&dir, "#!/bin/sh\nsleep 30\n"); + opts.cello_bin = fake_cello(&dir, "#!/bin/sh\nsleep 30\n"); // Nowhere to move into: the write is refused (ENOENT). spec.cgroup_leaf = dir.path().join("no-such-leaf"); spec.cgroups_active = true; @@ -812,7 +812,7 @@ mod tests { async fn refused_move_warns_only_when_cgroups_are_inactive() { let dir = tempfile::tempdir().unwrap(); let (mut spec, mut opts) = test_spec(dir.path()); - opts.celld_bin = fake_celld(&dir, "#!/bin/sh\nsleep 30\n"); + opts.cello_bin = fake_cello(&dir, "#!/bin/sh\nsleep 30\n"); spec.cgroup_leaf = dir.path().join("no-such-leaf"); spec.cgroups_active = false; let mut fleet = start(&spec, &opts, 0).await.unwrap(); @@ -833,7 +833,7 @@ mod tests { async fn capture_bounds_a_newline_less_flood() { let dir = tempfile::tempdir().unwrap(); let (mut spec, mut opts) = test_spec(dir.path()); - opts.celld_bin = fake_celld( + opts.cello_bin = fake_cello( &dir, "#!/bin/sh\nhead -c 1048576 /dev/zero | tr '\\0' 'x'; echo; echo hello; sleep 30\n", ); @@ -916,7 +916,7 @@ mod tests { let dir = tempfile::tempdir().unwrap(); let (mut spec, mut opts) = test_spec(dir.path()); // The leader exits at once, leaving a group member behind. - opts.celld_bin = fake_celld(&dir, &format!("#!/bin/sh\nsleep {marker} &\n")); + opts.cello_bin = fake_cello(&dir, &format!("#!/bin/sh\nsleep {marker} &\n")); spec.cgroup_leaf = dir.path().to_path_buf(); let mut fleet = start(&spec, &opts, 0).await.unwrap(); assert_eq!(fleet.pgid, fleet.child.id().unwrap_or(fleet.pgid)); @@ -924,7 +924,7 @@ mod tests { let deadline = std::time::Instant::now() + Duration::from_secs(5); while fleet.is_alive() { if std::time::Instant::now() >= deadline { - panic!("fake celld never exited"); + panic!("fake cello never exited"); } tokio::time::sleep(Duration::from_millis(50)).await; } From 735a940defc858557b9eeb4f89473460f09737df Mon Sep 17 00:00:00 2001 From: Ryuz Date: Thu, 19 Nov 2026 08:23:27 +0100 Subject: [PATCH 3/7] Cello 0.1.0: deploy pipeline and backups shell out to cello --- crates/outer/src/d1_backup.rs | 62 +++--- crates/outer/src/deploy/manifest.rs | 8 +- crates/outer/src/deploy/migrate.rs | 75 +++---- crates/outer/src/deploy/mod.rs | 2 +- crates/outer/src/deploy/pipeline.rs | 276 +++++++++++++------------- crates/outer/src/secrets.rs | 8 +- crates/outer/src/store/credentials.rs | 10 +- 7 files changed, 221 insertions(+), 220 deletions(-) diff --git a/crates/outer/src/d1_backup.rs b/crates/outer/src/d1_backup.rs index 2667196..0f8c69e 100644 --- a/crates/outer/src/d1_backup.rs +++ b/crates/outer/src/d1_backup.rs @@ -8,10 +8,10 @@ //! newest 3 dumps per binding, Pro the newest 30 (spec §3, owner-set //! 2026-10-26). //! -//! `celld d1 export` dumps the live database as SQL — schema beside data, +//! `cello d1 export` dumps the live database as SQL — schema beside data, //! read under one transaction on the owning node, so the dump is a single //! snapshot even while the database takes writes. The dump names exactly -//! the visible tables (`--table`, repeatable): celld's `d1_migrations` +//! the visible tables (`--table`, repeatable): cello's `d1_migrations` //! bookkeeping and the runtime's internal tables stay out, the chosen //! tables' indexes, triggers and AUTOINCREMENT counters ride along, and the //! visible views (which belong to no table, so a filtered export leaves @@ -19,11 +19,11 @@ //! statement stays under the 100,000-byte D1 statement limit //! (), and the dump holds no //! `BEGIN`/`COMMIT` (application SQL may not use them): each restore batch -//! runs inside celld's own transaction instead. +//! runs inside cello's own transaction instead. //! //! Restore replays a dump into the same database (drop the user tables, //! replay in batches) after taking a fresh backup first, so a bad restore -//! is itself restorable. `d1_migrations` — celld's migration bookkeeping, +//! is itself restorable. `d1_migrations` — cello's migration bookkeeping, //! written by `migrations apply` — is neither dumped nor dropped, so a //! restore never confuses a later apply. @@ -96,7 +96,7 @@ pub const D1_STATEMENT_LIMIT: usize = 100_000; /// daily sweep on one app. pub const MAX_DUMP_BYTES: usize = 32 * 1024 * 1024; -/// Restore applies the dump in batches of at most this many bytes. celld +/// Restore applies the dump in batches of at most this many bytes. cello /// brackets each multi-statement exec in its own transaction, so a batch is /// all-or-nothing while the whole restore stays resumable statement-wise. pub const RESTORE_BATCH_BYTES: usize = 80_000; @@ -231,7 +231,7 @@ pub async fn prune_app( // Dump // --------------------------------------------------------------------------- -/// One `celld d1 execute --json` against the app's fleet, through the backup +/// One `cello d1 execute --json` against the app's fleet, through the backup /// entry point. A free function (not a closure) so the borrow checker sees /// each call's borrows independently. async fn exec_one( @@ -317,10 +317,10 @@ async fn visible_view_stmts( Ok(stmts) } -/// Dump one binding to SQL text: one `celld d1 export` over the visible +/// Dump one binding to SQL text: one `cello d1 export` over the visible /// tables, plus the visible views and their triggers (a filtered export /// leaves both out — neither belongs to a table). The `--table` allowlist -/// keeps celld's `d1_migrations` bookkeeping and the runtime's internal +/// keeps cello's `d1_migrations` bookkeeping and the runtime's internal /// tables out of the dump, so restore never sees them; the chosen tables' /// indexes, triggers and AUTOINCREMENT counters ride along. The export is /// one snapshot even while the database takes writes — a daily sweep cost, @@ -356,7 +356,7 @@ pub async fn dump_database(ctx: &D1Ctx, app: &App, binding: &str) -> Result D1_STATEMENT_LIMIT) { @@ -530,7 +530,7 @@ fn split_sql(dump: &str) -> Vec { /// Restore one binding from SQL text: drop the current user tables and /// views, then replay the statements in [`RESTORE_BATCH_BYTES`] batches. -/// Each batch is one `celld d1 execute`, which brackets it in its own +/// Each batch is one `cello d1 execute`, which brackets it in its own /// transaction — all-or-nothing per batch, resumable across batches. pub async fn restore_database( ctx: &D1Ctx, @@ -583,7 +583,7 @@ pub async fn restore_database( // D1 enforces foreign keys by default, so dropping a populated // parent before its child fails. `PRAGMA defer_foreign_keys` cannot // be changed mid-transaction by user queries — D1 runs every query - // in an implicit transaction — but celld brackets this whole exec + // in an implicit transaction — but cello brackets this whole exec // in its own transaction, so deferring at its start covers every // drop in the batch (). let drop_sql = format!("PRAGMA defer_foreign_keys = ON;\n{}", drops.join(";\n")); @@ -727,7 +727,7 @@ pub async fn restore_binding( ))); }; let sql = std::string::String::from_utf8(bytes) - .map_err(|_| D1Error::Celld(format!("backup {} is not valid UTF-8", row.id)))?; + .map_err(|_| D1Error::Cello(format!("backup {} is not valid UTF-8", row.id)))?; let mut report = restore_database(ctx, app, binding, &sql).await?; report.fresh_backup_id = fresh.id.clone(); Ok((fresh, report)) @@ -795,7 +795,7 @@ pub async fn tick(pool: &SqlitePool, store: &Store, fleets: &FleetManager) -> an continue; } let ctx = D1Ctx { - celld_bin: fleets.celld_bin(), + cello_bin: fleets.cello_bin(), storage: fleets.storage().clone(), pool: pool.clone(), store: store.clone(), @@ -941,18 +941,18 @@ mod tests { assert!(stmts[0].contains("\"we;ird\"")); } - // --- fake celld ------------------------------------------------------ + // --- fake cello ------------------------------------------------------ use crate::auth::test_support::test_pool; use crate::fleet::manager::FleetStorage; - /// A fake `celld` answering the backup engine's exact queries: the + /// A fake `cello` answering the backup engine's exact queries: the /// `d1 export` dump over the allowlisted tables, the dump's and the /// restore's view reads, the restore's table/count reads, and (by /// logging + `exit 0`) every drop/replay batch. The state dir is baked /// into the script, so parallel tests never share it. - fn install_fake_celld(state: &std::path::Path) -> std::path::PathBuf { - let script = state.join("fake-celld"); + fn install_fake_cello(state: &std::path::Path) -> std::path::PathBuf { + let script = state.join("fake-cello"); let tmp = script.with_extension("tmp"); let log = state.join("calls.log").to_string_lossy().into_owned(); std::fs::write( @@ -1020,7 +1020,7 @@ exit 0 store: Store, ) -> D1Ctx { D1Ctx { - celld_bin: script.to_string_lossy().into_owned(), + cello_bin: script.to_string_lossy().into_owned(), storage: FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "test-region".to_string(), @@ -1094,7 +1094,7 @@ exit 0 async fn dump_exports_allowlisted_tables_and_appends_views() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); let now = crate::apps::now_ms(); seed_backup_app(&pool, &store, now).await; @@ -1175,10 +1175,10 @@ exit 0 assert_eq!(lists, 2, "{calls}"); } - /// A fake `celld` whose table list never settles: every listing + /// A fake `cello` whose table list never settles: every listing /// alternates, so the drift check retries and then gives up. - fn install_drifting_celld(state: &std::path::Path) -> std::path::PathBuf { - let script = state.join("fake-celld-drift"); + fn install_drifting_cello(state: &std::path::Path) -> std::path::PathBuf { + let script = state.join("fake-cello-drift"); let tmp = script.with_extension("tmp"); let log = state.join("calls.log").to_string_lossy().into_owned(); let counter = state.join("drift-n").to_string_lossy().into_owned(); @@ -1231,7 +1231,7 @@ exit 0 async fn dump_retries_a_schema_that_changes_mid_dump() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_drifting_celld(state.path()); + let script = install_drifting_cello(state.path()); let store = Store::memory(); let now = crate::apps::now_ms(); seed_backup_app(&pool, &store, now).await; @@ -1254,7 +1254,7 @@ exit 0 async fn restore_replays_drops_then_dump_after_a_fresh_backup() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); let now = crate::apps::now_ms(); seed_backup_app(&pool, &store, now).await; @@ -1306,10 +1306,10 @@ exit 0 assert_eq!(backups_for(&pool, &app.id).await.unwrap().len(), 2); } - /// A fake `celld` whose export carries one statement bigger than the + /// A fake `cello` whose export carries one statement bigger than the /// D1 statement limit: the dump must refuse it at backup time. - fn install_huge_row_celld(state: &std::path::Path) -> std::path::PathBuf { - let script = state.join("fake-celld-huge"); + fn install_huge_row_cello(state: &std::path::Path) -> std::path::PathBuf { + let script = state.join("fake-cello-huge"); let tmp = script.with_extension("tmp"); let log = state.join("calls.log").to_string_lossy().into_owned(); std::fs::write( @@ -1356,7 +1356,7 @@ exit 0 async fn dump_rejects_a_row_bigger_than_the_d1_statement_limit() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_huge_row_celld(state.path()); + let script = install_huge_row_cello(state.path()); let store = Store::memory(); let now = crate::apps::now_ms(); seed_backup_app(&pool, &store, now).await; @@ -1374,7 +1374,7 @@ exit 0 async fn restore_rejects_an_oversized_statement_before_dropping_anything() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); let now = crate::apps::now_ms(); seed_backup_app(&pool, &store, now).await; @@ -1400,7 +1400,7 @@ exit 0 async fn tick_skips_an_app_whose_manifest_wont_parse() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); let now = crate::apps::now_ms(); // A due app whose deployed manifest has non-array bindings: reading @@ -1451,7 +1451,7 @@ exit 0 .unwrap(); let fleets = FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: state.path().join("data"), - celld_bin: script.to_string_lossy().into_owned(), + cello_bin: script.to_string_lossy().into_owned(), storage: FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "test-region".to_string(), diff --git a/crates/outer/src/deploy/manifest.rs b/crates/outer/src/deploy/manifest.rs index 6c9ccdd..ffe32fe 100644 --- a/crates/outer/src/deploy/manifest.rs +++ b/crates/outer/src/deploy/manifest.rs @@ -1,4 +1,4 @@ -//! The live manifest celld publishes per upload: `deploy/current.json` +//! The live manifest cello publishes per upload: `deploy/current.json` //! carries the versioned `prefix`, and the authoritative deployed config is //! the manifest at `fleets/{slug}/{prefix}/manifest.json`. There is no //! `fleets/{slug}/wrangler.json` in the bucket, and the worktree @@ -62,9 +62,9 @@ pub async fn deployed_manifest( /// `database_name`/`database_id` → identity. Other binding types are ignored. /// `vars` — which may carry injected secret values — is never read here and /// never lands in the synthesized cwd config, so secrets can't leak through -/// the materialized project dir or the fake-celld-style logs that read it. +/// the materialized project dir or the fake-cello-style logs that read it. /// -/// An asset-only live version (no `main_module`) declares nothing: celld +/// An asset-only live version (no `main_module`) declares nothing: cello /// serves it without a worker, so there is no live code that could reach a /// database, and migrations must not wait on it. pub fn manifest_dbs(manifest: &serde_json::Value) -> anyhow::Result> { @@ -125,7 +125,7 @@ pub fn manifest_dbs(manifest: &serde_json::Value) -> anyhow::Result Vec { diff --git a/crates/outer/src/deploy/migrate.rs b/crates/outer/src/deploy/migrate.rs index 9d0648a..40b2266 100644 --- a/crates/outer/src/deploy/migrate.rs +++ b/crates/outer/src/deploy/migrate.rs @@ -1,9 +1,9 @@ //! D1 migrations for the deploy pipeline (spec §10.1 steps 6-7). //! //! After the gate passes, the pipeline applies pending -//! `NNNN_description.sql` files with `celld d1 migrations apply` under the +//! `NNNN_description.sql` files with `cello d1 migrations apply` under the //! app's scoped credentials. When the live version declares every database -//! being migrated, the apply runs BEFORE the `celld deploy` upload: celld +//! being migrated, the apply runs BEFORE the `cello deploy` upload: cello //! offers no staged upload (the upload publishes `deploy/current.json` and //! every fleet adopts it on its own poll), so ordering is the only gate — //! when the new pointer becomes visible the schema is already ready, and a @@ -23,7 +23,7 @@ //! unmigrated existing app IS served (the pointer moved), so the deploy //! fails at `migrate` with an error that says the new version is live //! without the migrations, and the app's live pointer moves anyway. -//! celld reads the files relative to the deploy root, orders them by +//! cello reads the files relative to the deploy root, orders them by //! numeric prefix, and records applied files by name in the app's own //! `d1_migrations` table (the same table and columns `wrangler d1 //! migrations` uses, so the two never re-apply each other's files). Outer @@ -31,26 +31,27 @@ //! after it was applied fails the deploy instead of silently drifting from //! what the database runs. //! -//! Security model: everything celld reads or Outer copies here is +//! Security model: everything cello reads or Outer copies here is //! attacker-influenced (the app's built config and build output are written //! by the app uid). The reviewed source of truth is the worktree at the //! deployed sha; `stage_migrations` copies from there into the deploy root -//! because celld reads migration files relative to the deploy root, and +//! because cello reads migration files relative to the deploy root, and //! prunes any other `*.sql` the build may have planted. `dir` values are //! validated to plain relative segments, symlinks are refused, and joins //! are contained under their base, so a hostile config cannot make Outer //! read or write outside the deploy root. //! -//! Cross-app reachability (verified against celld 0.6.2 `d1 --help` and -//! https://celld.dev/docs/services/d1): `celld d1 migrations apply` finds a +//! Cross-app reachability (verified against `d1 --help` under celld 0.6.2; +//! the flags are unchanged in Cello 0.1.0, see +//! https://celld.dev/docs/services/d1): `cello d1 migrations apply` finds a //! node through the *bucket's* node leases and signs each request with the //! fleet's shared secret read from the bucket. Outer passes //! `--bucket s3://{bucket}/fleets/{slug}` with R2 temporary credentials -//! scoped to `fleets/{slug}/` (see `store::credentials`), so celld only +//! scoped to `fleets/{slug}/` (see `store::credentials`), so cello only //! ever sees this app's leases, secret, and D1 files: another app's //! database is unreachable (its leases are invisible from this prefix and //! its nodes would reject our fleet secret). Database names are therefore -//! per-fleet namespaces, as celld documents ("Two Workers that name one +//! per-fleet namespaces, as cello documents ("Two Workers that name one //! identity reach one database" — within one fleet; a typo opens an empty //! database in *this* fleet, never another app's). No per-app registry: the //! declared names in the built config are the apply set. Localhost dev @@ -83,8 +84,8 @@ pub const MAX_DATABASE_NAME_LEN: usize = 64; pub const MAX_DATABASE_ID_LEN: usize = 256; /// One `d1_databases` entry of the built wrangler config. `database_id` is -/// the stable identity celld uses when the declaration has one (otherwise -/// celld uses `database_name`); Outer keys `d1_migration` by the same +/// the stable identity cello uses when the declaration has one (otherwise +/// cello uses `database_name`); Outer keys `d1_migration` by the same /// effective identity, so swapping the id with the same name re-applies to /// the new (empty) database instead of skipping as "already applied". #[derive(Debug, Clone, PartialEq, Eq)] @@ -96,8 +97,8 @@ pub struct D1Database { } impl D1Database { - /// The database celld resolves: `database_id` when declared, else - /// `database_name` (matches `celld d1 --help` and the D1 docs). + /// The database cello resolves: `database_id` when declared, else + /// `database_name` (matches `cello d1 --help` and the D1 docs). pub fn effective_identity(&self) -> &str { self.database_id.as_deref().unwrap_or(&self.database_name) } @@ -107,7 +108,7 @@ impl D1Database { /// string `binding` or `database_name` fail the step naming the entry, as do /// option-shaped `database_name` values and escaping `migrations_dir` values /// (both come from the app's built config, so both are validated here before -/// anything is staged or passed to celld). +/// anything is staged or passed to cello). pub fn d1_databases(value: &serde_json::Value) -> anyhow::Result> { let Some(list) = value.get("d1_databases") else { return Ok(Vec::new()); @@ -160,17 +161,17 @@ pub fn d1_databases(value: &serde_json::Value) -> anyhow::Result .collect() } -/// The directory celld reads an entry's files from, relative to the deploy -/// root. celld's own default is `migrations`. +/// The directory cello reads an entry's files from, relative to the deploy +/// root. cello's own default is `migrations`. pub fn migrations_dir_name(entry: &D1Database) -> &str { entry.migrations_dir.as_deref().unwrap_or("migrations") } /// A `database_name` is passed positionally to -/// `celld d1 migrations apply`, so it must never parse as an option: only +/// `cello d1 migrations apply`, so it must never parse as an option: only /// letters, digits, `_` and `-`, 1–64 characters, never starting with `-`. /// (Argv is passed without a shell, so spaces and metacharacters are inert; -/// the leading-dash rule closes option injection. No `--` separator: celld +/// the leading-dash rule closes option injection. No `--` separator: cello /// 0.6.2's leaf parsers don't honor `--help`, let alone `--`, so there is /// no `--` contract to rely on — `list -- foo` still reports "needs a /// database name".) @@ -193,7 +194,7 @@ pub fn validate_database_name(name: &str) -> anyhow::Result<()> { Ok(()) } -/// A `database_id` never reaches argv (celld resolves it from the wrangler +/// A `database_id` never reaches argv (cello resolves it from the wrangler /// config in the deploy root, which Outer hands over as PROJECT) and is /// only ever a bound SQLite value, so it needs no option-shape charset — /// just non-empty and bounded, so a typo'd id is a loud deploy failure @@ -296,7 +297,7 @@ pub struct MigrationFile { } /// Sorted `*.sql` files in `dir`, with content hashes. The extension matches -/// ASCII case-insensitively, like celld does (`celld d1 --help`: "The `sql` +/// ASCII case-insensitively, like cello does (`cello d1 --help`: "The `sql` /// extension is ASCII case-insensitive"). Only a missing dir holds no files: /// any other discovery failure — an unreadable dir, a bad entry, a /// non-UTF-8 name, a stat or read error — fails, so the deploy can never @@ -398,7 +399,7 @@ fn open_no_follow(path: &Path) -> anyhow::Result { .map_err(|e| anyhow::anyhow!("cannot open migration file {}: {e:#}", path.display())) } -/// Outer stages as root under the sandbox's `077` umask, but `celld d1 +/// Outer stages as root under the sandbox's `077` umask, but `cello d1 /// migrations apply` runs as the app uid and must read what was staged: /// set `mode` on the open fd (never through a path that could be swapped). /// Read-only for the app: it can't rewrite reviewed bytes after hashing. @@ -445,9 +446,9 @@ fn traversable_by_app(root: &Path, target: &Path) -> anyhow::Result<()> { /// Where an entry's files come from: the first conventional repo dir that /// holds `*.sql` — `/`, then Void's `db/migrations` when /// `dir == "migrations"`. The winner is copied into `/` because -/// celld reads migration files relative to the deploy root, and any other +/// cello reads migration files relative to the deploy root, and any other /// `*.sql` already staged there (unreviewed build output) is removed first, -/// so only reviewed worktree bytes reach celld. Build output is never a +/// so only reviewed worktree bytes reach cello. Build output is never a /// source: files that exist only under `/` are ignored, not /// applied. Returns `None` when no files exist anywhere. pub fn stage_migrations( @@ -495,7 +496,7 @@ pub fn stage_migrations( } traversable_by_app(root, &target)?; // The target itself is re-checked after the copy: a swapped-in - // symlink fails the step before celld ever reads through it. + // symlink fails the step before cello ever reads through it. // (Component swaps above the target remain a residual TOCTOU; the // build that could plant them no longer runs by this point.) if std::fs::symlink_metadata(&target) @@ -514,7 +515,7 @@ pub fn stage_migrations( /// Make `target` a real directory Outer just verified, then delete any /// `*.sql` in it that the reviewed source set does not contain: those are -/// unreviewed build output (or planted files) that celld would otherwise +/// unreviewed build output (or planted files) that cello would otherwise /// read and apply. Refuses when `target` itself is a symlink, a /// non-directory, or holds a subdirectory shaped like a migration. fn prepare_target(target: &Path, files: &[MigrationFile]) -> anyhow::Result<()> { @@ -557,9 +558,9 @@ fn prepare_target(target: &Path, files: &[MigrationFile]) -> anyhow::Result<()> Ok(()) } -/// The migration file a failed `celld d1 migrations apply` complains about: +/// The migration file a failed `cello d1 migrations apply` complains about: /// the last whitespace-separated token shaped like `NNNN_anything.sql`. -/// celld applies in order and stops at the failure, so the failing file is +/// cello applies in order and stops at the failure, so the failing file is /// the last one its output names; when the output names none, this is `None` /// and the caller falls back to the raw output. pub fn failing_file(output: &str) -> Option { @@ -595,15 +596,15 @@ pub async fn applied_sha( } /// Record every file of a successful apply (upsert: a file that somehow -/// reached celld twice keeps the newest hash, which equals the old one), -/// keyed by the effective identity celld applied to. `database_name` is +/// reached cello twice keeps the newest hash, which equals the old one), +/// keyed by the effective identity cello applied to. `database_name` is /// kept alongside for humans; the conflict key is the identity, so a /// changed `database_id` under the same name starts clean against the new /// (empty) database instead of skipping as "already applied". /// Renaming a file evades the edited-after-apply refusal by construction — -/// a new name is a new migration to both celld and this table — which is +/// a new name is a new migration to both cello and this table — which is /// inherent to name-keyed bookkeeping, not a bypass: the renamed file still -/// runs through celld in numeric-prefix order under review. +/// runs through cello in numeric-prefix order under review. pub async fn record_applied( pool: &SqlitePool, app_id: &str, @@ -845,7 +846,7 @@ mod tests { ) .unwrap(); - // Conventional Void layout stages into the deploy root for celld. + // Conventional Void layout stages into the deploy root for cello. let staged = stage_migrations(root.path(), work.path(), "migrations") .unwrap() .expect("files exist"); @@ -856,7 +857,7 @@ mod tests { .join("migrations") .join("0001_init.sql") .is_file(), - "celld reads them from the deploy root" + "cello reads them from the deploy root" ); // Build output never wins: the reviewed worktree copy overwrites it. @@ -910,13 +911,13 @@ mod tests { .join("migrations") .join("9999_evil.sql") .exists(), - "planted SQL never reaches celld" + "planted SQL never reaches cello" ); } - /// Outer stages as root under a `077` umask while celld applies as the + /// Outer stages as root under a `077` umask while cello applies as the /// app uid: staged dirs Outer owns and the copied files end up readable - /// (and not writable) by others, or celld reports "no migrations + /// (and not writable) by others, or cello reports "no migrations /// directory" — the live failure of 2026-10-24. #[test] fn staged_migrations_are_readable_by_the_app_uid() { @@ -1104,7 +1105,7 @@ mod tests { } #[test] - fn failing_file_picks_the_migration_out_of_celld_output() { + fn failing_file_picks_the_migration_out_of_cello_output() { let out = "applying 0001_init.sql\nerror applying 0002_add_users.sql: near \"X\": syntax error"; assert_eq!( diff --git a/crates/outer/src/deploy/mod.rs b/crates/outer/src/deploy/mod.rs index 8830ec3..7f4f33b 100644 --- a/crates/outer/src/deploy/mod.rs +++ b/crates/outer/src/deploy/mod.rs @@ -1,5 +1,5 @@ //! One deploy: worktree materialization, `bun install`/`bun run build`, -//! wrangler config validation, D1 migrations, and `celld deploy`. +//! wrangler config validation, D1 migrations, and `cello deploy`. //! //! The integration owner declares `pub mod deploy;` on the crate root; this //! module owns everything under `src/deploy/`. diff --git a/crates/outer/src/deploy/pipeline.rs b/crates/outer/src/deploy/pipeline.rs index eac45c2..31901be 100644 --- a/crates/outer/src/deploy/pipeline.rs +++ b/crates/outer/src/deploy/pipeline.rs @@ -4,7 +4,7 @@ //! `{data}/work/{slug}`, runs `bun install` (skipped when the lockfile hash //! is unchanged) and `bun run build`, validates the wrangler config at the //! deploy root, applies pending D1 migrations and uploads with -//! `celld deploy`, and reloads the fleet. Install, build, deploy and +//! `cello deploy`, and reloads the fleet. Install, build, deploy and //! migrate run sandboxed as the app's uid through `run_sandboxed`; the //! worktree and deploy-root steps run as outer (they only touch git //! metadata and read files). @@ -51,9 +51,9 @@ use crate::store::Store; pub struct DeploySettings { /// Worktrees at `{data}/work/{slug}`, caches at `{data}/cache/{slug}`. pub data_dir: PathBuf, - /// `celld` binary (`celld` on PATH, or an absolute path). - pub celld_bin: String, - /// Passed to celld as `CELLD_ESBUILD` when set. + /// `cello` binary (`cello` on PATH, or an absolute path). + pub cello_bin: String, + /// Passed to cello as `CELLO_ESBUILD` when set. pub esbuild_bin: Option, /// `bun` binary (`bun` on PATH, or an absolute path). pub bun_bin: String, @@ -73,13 +73,13 @@ pub struct DeploySettings { /// gate always classifies there. pub jev: Option, /// Wakes a sleeping fleet before the migrate step applies D1 migrations: - /// `celld d1` reaches the database through a running node. `Some` in + /// `cello d1` reaches the database through a running node. `Some` in /// `serve` (the fleet manager lives there); `None` in the operator CLI - /// and in tests with a fake `celld`, where no fleet can be woken and the + /// and in tests with a fake `cello`, where no fleet can be woken and the /// apply fails loudly when no fleet serves the app. pub wake: Option, /// AES-256-GCM key for app secrets, derived from `OUTER_SECRET` at boot. - /// Secrets are decrypted only for the `celld deploy` step and injected + /// Secrets are decrypted only for the `cello deploy` step and injected /// into the deploy-root config `vars`; builds never see them. pub secrets_key: crate::secrets::SecretsKey, } @@ -119,7 +119,7 @@ pub struct DeployOutcome { pub reloaded: bool, } -/// What the deploy-root step selected: the directory celld deploys and +/// What the deploy-root step selected: the directory cello deploys and /// reads migrations from, plus the exact wrangler file that won discovery /// (`dist/wrangler.json`, else `wrangler.jsonc`, else `wrangler.json`). /// The migrate step takes this instead of re-deciding, so upload and D1 @@ -133,7 +133,7 @@ pub struct DeployRoot { /// original bytes plus their mode, for a byte-identical restore once the /// upload has the file. Plaintext lives only between `inject_secrets` and /// the guard's drop, plus the uploaded copy under `fleets//`, where -/// celld needs it to serve `env.*`. +/// cello needs it to serve `env.*`. /// /// RAII: [`Drop`] restores best-effort (warn, never panic), so a panic or /// an early return in the upload window still scrubs the worktree. A @@ -314,7 +314,7 @@ fn atomic_replace_no_follow(path: &Path, bytes: &[u8], mode: u32) -> anyhow::Res path.display(), std::io::Error::last_os_error() ))); - } // Keep the original's owner: `celld deploy` runs as the app uid and + } // Keep the original's owner: `cello deploy` runs as the app uid and // must still read the file, while Outer (root in production) created // the temp. `fchown` on the fd, never through the path. if let Ok(meta) = std::fs::symlink_metadata(path) { @@ -360,7 +360,7 @@ impl DeployKind { matches!(self, DeployKind::Preview) } } -/// Where the D1 migrate step runs relative to the `celld deploy` upload. +/// Where the D1 migrate step runs relative to the `cello deploy` upload. /// For an app with a live version the default is before the upload: when /// the new pointer becomes visible the schema is already ready, and a /// migrate failure uploads nothing. The upload goes first when there is no @@ -462,7 +462,7 @@ const BUILD_LEAF_MEMORY_MAX: u64 = 2 * 1024 * 1024 * 1024; pub(crate) const BINDING_CAP_MESSAGE: &str = "Outer apps can have one D1 database and one R2 bucket for now; merge the extra ones"; -/// Top-level wrangler keys celld accepts. Anything else fails `deploy-root`. +/// Top-level wrangler keys cello accepts. Anything else fails `deploy-root`. const ACCEPTED_CONFIG_KEYS: &[&str] = &[ "$schema", "name", @@ -703,8 +703,8 @@ impl Deployer { } /// The settings this deployer runs with (bucket, credentials, dirs, - /// celld binary). The console data panels reuse them for scoped storage - /// reads and celld calls, so they never mint their own credentials. + /// cello binary). The console data panels reuse them for scoped storage + /// reads and cello calls, so they never mint their own credentials. pub(crate) fn settings(&self) -> &DeploySettings { &self.settings } @@ -1059,12 +1059,12 @@ impl Deployer { } /// Rows run in order; the first failure stops the pipeline. `Ok` carries - /// the celld version and the validated cron schedules on success. The + /// the cello version and the validated cron schedules on success. The /// review runs before `deploy-root`, and before migrations, so a blocked /// deploy never touches the app's data or uploads anything. For an app /// whose live version declares every database being migrated, migrations /// run before the upload, so no fleet can ever serve new code against an - /// unmigrated schema; otherwise the upload runs first because `celld d1` + /// unmigrated schema; otherwise the upload runs first because `cello d1` /// needs a running fleet and there is nothing to start one from yet /// (first deploy) or the live fleet cannot reach the database (the live /// version does not declare it). @@ -1200,9 +1200,9 @@ impl Deployer { } }; - // 6+7. D1 migrations and the `celld deploy` upload. For an app whose + // 6+7. D1 migrations and the `cello deploy` upload. For an app whose // live version declares every database being migrated, the migrate - // step runs before the upload: celld offers no staged or invisible + // step runs before the upload: cello offers no staged or invisible // upload (the upload publishes `deploy/current.json` and every fleet // adopts it on its own poll), so ordering is the only gate: when the // new pointer becomes visible the schema is already ready, and a @@ -1213,7 +1213,7 @@ impl Deployer { // Otherwise the upload goes first, then the wake (now possible), // then the migrations. That is the first-deploy case // (`last_deploy_sha` is NULL: no successful deploy yet, so - // `celld d1 migrations apply` has no fleet to reach through the + // `cello d1 migrations apply` has no fleet to reach through the // bucket's node leases), and the live-lacks-the-database case: the // live manifest does not declare a database this deploy migrates // (an asset-only live version, a first D1, a renamed database), so @@ -1329,7 +1329,7 @@ impl Deployer { } } - /// The `celld deploy ... --json` upload; returns the version. + /// The `cello deploy ... --json` upload; returns the version. /// The upload publishes `deploy/current.json`, which every fleet adopts /// on its own poll — so it runs after the migrate step when the live /// version declares every database being migrated (a migrate failure @@ -1379,7 +1379,7 @@ impl Deployer { .inject_secrets(pool, app, deploy_root) .await .map_err(|e| StepEnd::Failed(StepFailed::plain("deploy", &e)))?; - let outcome = self.celld_deploy(app, deploy_id, deploy_root).await; + let outcome = self.cello_deploy(app, deploy_id, deploy_root).await; // The patched config held plaintext: dropping the guard restores it // byte-identically, pass or fail — and would too on panic, since the // restore lives in `Drop`, not in a manual call. @@ -1640,17 +1640,17 @@ impl Deployer { Ok((DeployRoot { root, config }, crons, out)) } - /// Whether this `celld` writes Worker maps: the fork's `deploy --sourcemap` + /// Whether this `cello` writes Worker maps: the Cello fork's `deploy --sourcemap` /// (0.6.3-ryuzcorp.8+). Best-effort `deploy --help` probe, so machines on /// upstream celld keep deploying without maps instead of failing on an /// unknown flag. No credentials, no side effects — one help print. - async fn celld_sourcemap_support(&self) -> bool { - let out = tokio::process::Command::new(&self.settings.celld_bin) + async fn cello_sourcemap_support(&self) -> bool { + let out = tokio::process::Command::new(&self.settings.cello_bin) .arg("deploy") .arg("--help") // No inherited environment: this probe needs no credential, and // a help print must never see the server's AWS_* or - // CELLD_DEPLOY_AWS_* values. + // CELLO_DEPLOY_AWS_* values. .env_clear() .env("PATH", "/usr/local/bin:/usr/bin:/bin") .output() @@ -1661,17 +1661,17 @@ impl Deployer { .unwrap_or(false) } - /// The `celld deploy ... --json` upload; returns + /// The `cello deploy ... --json` upload; returns /// (output, version, map read). Bucket credentials come from the /// per-prefix cache when fresh (minted on a miss), so the step env never /// carries the parent keys. The fork confines project reads to the /// config's directory (a `dist/` deploy root can no longer pull a /// root-level Dockerfile or hoisted packages), so the upload names the /// checkout with `--read-root` and deploys keep building exactly what - /// upstream celld accepted. With a fork celld, `--sourcemap` collects + /// upstream celld accepted. With the Cello fork, `--sourcemap` collects /// the Worker map into the work dir (outside the deploy root, so it can /// never enter the bundle); the caller stores it per deploy sha. - async fn celld_deploy( + async fn cello_deploy( &self, app: &App, deploy_id: &str, @@ -1693,9 +1693,9 @@ impl Deployer { let bucket = self.settings.storage.bucket_url(&app.slug); let endpoint = self.settings.storage.endpoint.clone(); let region = self.settings.storage.region.clone(); - let mut env = Self::celld_grant_env(®ion, &endpoint, &creds); + let mut env = Self::cello_grant_env(®ion, &endpoint, &creds); if let Some(esbuild) = &self.settings.esbuild_bin { - env.push(("CELLD_ESBUILD".to_string(), esbuild.clone())); + env.push(("CELLO_ESBUILD".to_string(), esbuild.clone())); } // The fork admits build inputs from beyond the config's directory // only through `--read-root`: name the checkout, so a `dist/` @@ -1722,7 +1722,7 @@ impl Deployer { let work = self.work_dir(&app.slug); sweep_stale_maps(&work).await; let map_path = work.join(format!(".sourcemap-{deploy_id}.map")); - if self.celld_sourcemap_support().await { + if self.cello_sourcemap_support().await { args.push("--sourcemap".to_string()); args.push(map_path.to_string_lossy().into_owned()); } @@ -1731,7 +1731,7 @@ impl Deployer { app, deploy_id, "deploy", - &self.settings.celld_bin, + &self.settings.cello_bin, &args, env, ) @@ -1740,12 +1740,12 @@ impl Deployer { // path: a failed upload stores nothing, and no temp map may linger // into the next deploy's worktree. The read refuses symlinks and // non-regular files and caps the bytes (the worktree belongs to the - // app uid, which can replace the path while celld runs). + // app uid, which can replace the path while cello runs). let map_read = crate::observe::sourcemaps::read_map_file(&map_path).await; let _ = tokio::fs::remove_file(&map_path).await; let out = out?; let parsed: serde_json::Value = serde_json::from_str(out.trim()) - .map_err(|e| anyhow::anyhow!("celld printed non-JSON output: {e}"))?; + .map_err(|e| anyhow::anyhow!("cello printed non-JSON output: {e}"))?; let version = parsed .get("version") .and_then(|v| v.as_str()) @@ -1761,7 +1761,7 @@ impl Deployer { /// Code-defined `vars` keys lose to same-named secrets; the overwrite is /// journaled by name (names are public via `list_secrets`, values never /// are). The patched file is `0o600` while it holds plaintext; the - /// upload carries it to `fleets//`, where celld needs it. + /// upload carries it to `fleets//`, where cello needs it. /// /// Rows whose names are platform-reserved or fail the name shape are /// skipped with a warning: the sink re-checks because pre-existing or @@ -1839,11 +1839,11 @@ impl Deployer { /// Returns `(skipped, journal)`: skipped when the built config declares /// no D1 databases or the repo holds no migration files, in which case a /// sleeping fleet is never woken. Otherwise the fleet is woken first - /// (`celld d1` reaches the database through a running node), pending + /// (`cello d1` reaches the database through a running node), pending /// files apply in numeric-prefix order under the app's scoped /// credentials, and every file present is recorded in `d1_migration` so /// a later edit of an applied file fails the deploy instead of drifting. - /// A failure names the migration file when celld's output identifies it + /// A failure names the migration file when cello's output identifies it /// and carries an agent-facing line. When the step runs before the /// upload, the fleet is never reloaded and an existing app keeps serving /// its previous version; when it runs after the upload, the new version @@ -1902,10 +1902,10 @@ impl Deployer { )); } // An applied file edited afterwards is a new migration pretending to - // be an old one: fail naming it instead of letting celld silently - // skip it (celld tracks names only) and drifting from the database. + // be an old one: fail naming it instead of letting cello silently + // skip it (cello tracks names only) and drifting from the database. // Files with no recorded hash are pending; when every file is - // already recorded there is nothing for celld to do, and no reason + // already recorded there is nothing for cello to do, and no reason // to wake a sleeping fleet. // A first deploy that never went live has no previous version: say // the app isn't live yet instead of naming one that keeps serving. @@ -1934,7 +1934,7 @@ impl Deployer { match recorded { Some(sha) if sha != file.sha256 => { // After the upload the refusal still means the new - // version is live: celld never ran, so it serves + // version is live: cello never ran, so it serves // without this deploy's migration content. let (error, user_message) = if published { ( @@ -1977,7 +1977,7 @@ impl Deployer { // A preview database is disposable (fresh prefix per preview // lineage), so "all already applied" against the live pins must not // skip the apply: the preview database may never have seen these - // files. Preview applies are idempotent (celld's own `d1_migrations` + // files. Preview applies are idempotent (cello's own `d1_migrations` // journal) and never recorded. if !any_pending && !kind.is_preview() { let total: usize = staged.iter().map(|(_, files)| files.len()).sum(); @@ -2006,15 +2006,15 @@ impl Deployer { continue; } let out = self - .celld_migrate(app, deploy_id, root, &db.database_name) + .cello_migrate(app, deploy_id, root, &db.database_name) .await .map_err(|e| { let text = format!("{e:#}"); // The operator CLI runs no fleet manager (`wake: None`): - // a first deploy can never have a fleet for `celld d1` + // a first deploy can never have a fleet for `cello d1` // to reach, so the lease error it returns means the // deploy must go through the server instead. Say so - // instead of surfacing celld's lease internals. (With a + // instead of surfacing cello's lease internals. (With a // fleet manager the wake above runs first, so a lease // error there is a real failure, not this hint.) if order == MigrateOrder::AfterUploadFirstDeploy @@ -2024,7 +2024,7 @@ impl Deployer { return StepFailed::migration( format!( "first deploy with D1 migrations needs the server; deploy through MCP \ - (celld d1 needs a running fleet and none serves {} yet): {}", + (cello d1 needs a running fleet and none serves {} yet): {}", app.slug, first_output_line(&text) ), @@ -2107,8 +2107,8 @@ impl Deployer { )) } - /// One `celld d1 migrations apply` under the app's scoped storage - /// credentials (the same grant shape `celld deploy` uses: celld reads + /// One `cello d1 migrations apply` under the app's scoped storage + /// credentials (the same grant shape `cello deploy` uses: cello reads /// the fleet's shared secret from the bucket, so it needs the prefix /// grant, never the parent keys). /// No `--` before the positionals on purpose: celld 0.6.2's leaf parsers @@ -2117,7 +2117,7 @@ impl Deployer { /// instead of protecting it. Option injection is closed one layer up: /// `migrate::d1_databases` only accepts names that cannot parse as flags /// (and argv never passes through a shell). - async fn celld_migrate( + async fn cello_migrate( &self, app: &App, deploy_id: &str, @@ -2140,8 +2140,8 @@ impl Deployer { let bucket = self.settings.storage.bucket_url(&app.slug); let endpoint = self.settings.storage.endpoint.clone(); let region = self.settings.storage.region.clone(); - let mut env = Self::celld_grant_env(®ion, &endpoint, &creds); - // `celld d1` reaches the database through a fleet node, and the + let mut env = Self::cello_grant_env(®ion, &endpoint, &creds); + // `cello d1` reaches the database through a fleet node, and the // internal listener requires the fleet's token once the fleet sets // it — same slug the fleet runs under (the preview app carries the // preview key), so main and preview migrates alike authenticate. @@ -2166,20 +2166,20 @@ impl Deployer { app, deploy_id, "migrate", - &self.settings.celld_bin, + &self.settings.cello_bin, &args, env, ) .await } - /// The bucket environment for a celld child that holds the - /// whole-fleet-prefix read-write grant: `AWS_*` only. `CELLD_DEPLOY_AWS_*` + /// The bucket environment for a cello child that holds the + /// whole-fleet-prefix read-write grant: `AWS_*` only. `CELLO_DEPLOY_AWS_*` /// is the fleet's read-only deployment credential (`fleet::supervisor`); /// a deploy or migrate child publishes through the `AWS_*` grant and /// must never be handed that narrower credential, so this builder emits /// none (and [`Deployer::run_sandboxed_step`] refuses one). - fn celld_grant_env( + fn cello_grant_env( region: &str, endpoint: &str, creds: &crate::store::credentials::ScopedCredentials, @@ -2215,11 +2215,11 @@ impl Deployer { ) -> anyhow::Result { // Fail closed: no deploy/migrate child may carry the fleet's // read-only deployment credential. Those steps publish through the - // whole-prefix `AWS_*` grant, and a copied `CELLD_DEPLOY_AWS_*` + // whole-prefix `AWS_*` grant, and a copied `CELLO_DEPLOY_AWS_*` // would either break the upload or hint at the wrong grant shape. if let Some((name, _)) = extra_env .iter() - .find(|(name, _)| name.starts_with("CELLD_DEPLOY_AWS_")) + .find(|(name, _)| name.starts_with("CELLO_DEPLOY_AWS_")) { anyhow::bail!( "sandboxed step env must not carry {name}: deploy and migrate use the whole-prefix AWS_* grant" @@ -2542,7 +2542,7 @@ fn tail_cap(log: &str) -> String { } /// Stray temp maps a crashed deploy left in the work dir: same shape as the -/// path [`Deployer::celld_deploy`] passes `--sourcemap` (a dotfile only the +/// path [`Deployer::cello_deploy`] passes `--sourcemap` (a dotfile only the /// deploy step writes), never an app file. Best-effort: a leftover is one /// small inert file, and the sweep must never fail the deploy. async fn sweep_stale_maps(work: &Path) { @@ -2637,7 +2637,7 @@ fn first_output_line(text: &str) -> &str { } /// The output line naming the failed migration, when one does; otherwise the -/// first meaningful line. celld prints progress lines for applied files +/// first meaningful line. cello prints progress lines for applied files /// before the error, so the first line would name the wrong file. fn error_detail<'a>(text: &'a str, failed: Option<&str>) -> &'a str { let Some(name) = failed else { @@ -3465,11 +3465,11 @@ mod tests { assert_eq!(parsed["b"], serde_json::json!([1, 2])); } - /// `celld deploy` and `celld d1 migrations apply` hold the whole-prefix + /// `cello deploy` and `cello d1 migrations apply` hold the whole-prefix /// read-write grant through `AWS_*`; the fleet's read-only deployment - /// credential (`CELLD_DEPLOY_AWS_*`) must never enter those children. + /// credential (`CELLO_DEPLOY_AWS_*`) must never enter those children. #[test] - fn celld_grant_env_carries_no_deploy_credentials() { + fn cello_grant_env_carries_no_deploy_credentials() { let creds = crate::store::credentials::ScopedCredentials { access_key_id: "whole-key".to_string(), secret_access_key: "whole-secret".to_string(), @@ -3478,7 +3478,7 @@ mod tests { reused: false, }; let env = - Deployer::celld_grant_env("auto", "https://acct.r2.cloudflarestorage.com", &creds); + Deployer::cello_grant_env("auto", "https://acct.r2.cloudflarestorage.com", &creds); let map: HashMap<_, _> = env.iter().cloned().collect(); assert_eq!(map["AWS_ACCESS_KEY_ID"], "whole-key"); assert_eq!(map["AWS_SECRET_ACCESS_KEY"], "whole-secret"); @@ -3487,7 +3487,7 @@ mod tests { assert_eq!(map["S3_ENDPOINT"], "https://acct.r2.cloudflarestorage.com"); assert!( env.iter() - .all(|(name, _)| !name.starts_with("CELLD_DEPLOY_AWS_")), + .all(|(name, _)| !name.starts_with("CELLO_DEPLOY_AWS_")), "deploy/migrate env names only the whole-prefix grant: {env:?}" ); } @@ -3563,7 +3563,7 @@ mod tests { async fn astro_website_layout_selects_dist_and_stages_migrations() { // The website template's build output layout: `dist/wrangler.json` // wins discovery (over a root config, of which there is none), and - // the repo's `db/migrations` stages into the deploy root for celld. + // the repo's `db/migrations` stages into the deploy root for cello. let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(test_settings(data.path().to_path_buf()), 1); let app = test_app(10013); @@ -3812,7 +3812,7 @@ mod tests { fn test_settings(data_dir: PathBuf) -> DeploySettings { DeploySettings { data_dir, - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), esbuild_bin: None, bun_bin: "bun".to_string(), storage: FleetStorage { @@ -4289,7 +4289,7 @@ mod tests { let data = tempfile::tempdir().unwrap(); let mut settings = purge_settings(&data, &purge); settings.bun_bin = "/bin/true".to_string(); - settings.celld_bin = "/nonexistent/celld-binary".to_string(); + settings.cello_bin = "/nonexistent/cello-binary".to_string(); settings.jev = Some(jev_client(&fake.base_url)); let deployer = Deployer::new(settings, 1); let outcome = deployer @@ -4307,7 +4307,7 @@ mod tests { #[tokio::test] async fn blocked_deploy_never_reaches_the_deploy_step() { // A profane JSX line with a valid deploy-root config behind it. - // Install and build are no-op `true`; `celld` is missing, so a + // Install and build are no-op `true`; `cello` is missing, so a // pass-through would fail at `deploy`: `blocked` proves the gate // stopped the pipeline, with nothing uploaded. let dir = tempfile::tempdir().unwrap(); @@ -4368,13 +4368,13 @@ mod tests { // Jev flags profanity: `blocked` proves the gate stopped the // pipeline, with nothing uploaded. Install and build are no-op - // `true`; `celld` is missing, so a pass-through would fail at + // `true`; `cello` is missing, so a pass-through would fail at // `deploy` instead. let fake = FakeJev::start(block_responder()).await; let data = tempfile::tempdir().unwrap(); let mut settings = test_settings(data.path().to_path_buf()); settings.bun_bin = "/bin/true".to_string(); - settings.celld_bin = "/nonexistent/celld-binary".to_string(); + settings.cello_bin = "/nonexistent/cello-binary".to_string(); settings.jev = Some(jev_client(&fake.base_url)); let deployer = Deployer::new(settings, 1); let outcome = deployer @@ -4497,7 +4497,7 @@ mod tests { let data = tempfile::tempdir().unwrap(); let mut settings = test_settings(data.path().to_path_buf()); settings.bun_bin = "/bin/true".to_string(); - settings.celld_bin = "/nonexistent/celld-binary".to_string(); + settings.cello_bin = "/nonexistent/cello-binary".to_string(); settings.jev = Some(jev_client(&fake.base_url)); let deployer = Deployer::new(settings, 1); let outcome = deployer @@ -4549,15 +4549,15 @@ mod tests { assert_eq!(checks, 0, "nothing is recorded"); } - /// A fake `celld` for migrate tests: answers `deploy` with JSON and + /// A fake `cello` for migrate tests: answers `deploy` with JSON and /// simulates `d1 migrations apply` by walking `/migrations` /// in order. A `/.fake-fail` file names the migration that must /// fail, like a syntax error would. Bucket-shaped state never leaves the /// test: the fake treats `--bucket s3:///fleets/` as a state /// dir (`` is a tempdir), recording calls and env there, so counts /// survive the worktree wipe between deploys. - fn install_fake_celld(state: &Path) -> PathBuf { - let script = state.join("fake-celld"); + fn install_fake_cello(state: &Path) -> PathBuf { + let script = state.join("fake-cello"); let tmp = script.with_extension("tmp"); std::fs::write( &tmp, @@ -4617,7 +4617,7 @@ exit 0 /// step's env (builds run untrusted code), so the test greps this log. fn install_fake_bun(state: &Path) -> PathBuf { let script = state.join("fake-bun"); - // Atomic install like the celld fake above: execs must never catch + // Atomic install like the cello fake above: execs must never catch // the script mid-write (ETXTBSY under the parallel suite). let tmp = script.with_extension("tmp"); std::fs::write( @@ -4640,7 +4640,7 @@ exit 0 fn migrate_settings(data: &tempfile::TempDir, state: &Path, script: &Path) -> DeploySettings { let mut settings = test_settings(data.path().to_path_buf()); - settings.celld_bin = script.to_string_lossy().into_owned(); + settings.cello_bin = script.to_string_lossy().into_owned(); settings.bun_bin = "/bin/true".to_string(); // The fake reads its state dir back out of the bucket URL. settings.storage.bucket = state.to_string_lossy().into_owned(); @@ -4659,7 +4659,7 @@ exit 0 .count() } - /// How many `celld deploy` uploads the fake saw. + /// How many `cello deploy` uploads the fake saw. fn upload_calls(state: &Path) -> usize { let log = state.join("calls.log"); if !log.is_file() { @@ -4672,7 +4672,7 @@ exit 0 .count() } - /// The fake-celld subcommand sequence: `deploy` for an upload, + /// The fake-cello subcommand sequence: `deploy` for an upload, /// `apply` for a `d1 migrations apply`. The fake logs one line per /// invocation in order, so this pins migrate-vs-upload ordering. fn call_kinds(state: &Path) -> Vec<&'static str> { @@ -4695,13 +4695,13 @@ exit 0 .collect() } - /// The `celld deploy` upload names the checkout with `--read-root`: + /// The `cello deploy` upload names the checkout with `--read-root`: /// the fork confines project reads to the config's directory, so a /// `dist/` deploy root needs the checkout admitted for build inputs /// (hoisted packages, a root-level Dockerfile) that upstream celld /// resolved without a flag. #[tokio::test] - async fn deploy_names_the_checkout_as_celld_read_root() { + async fn deploy_names_the_checkout_as_cello_read_root() { let dir = tempfile::tempdir().unwrap(); let cfg = GitConfig::new(dir.path().join("git"), None); let store = Store::memory(); @@ -4715,7 +4715,7 @@ exit 0 let app = test_app(10124); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let outcome = deployer @@ -4736,19 +4736,19 @@ exit 0 ); } - /// A fake fork `celld` for the sourcemap path: `deploy --help` + /// A fake fork `cello` for the sourcemap path: `deploy --help` /// advertises `--sourcemap`, and `deploy` writes a canned v3 map to the /// flag's path before answering JSON. State stays in the baked-in dir, /// like [`install_fake_bun`]. - fn install_fake_celld_sourcemap(state: &Path) -> PathBuf { - let script = state.join("fake-celld-sourcemap"); + fn install_fake_cello_sourcemap(state: &Path) -> PathBuf { + let script = state.join("fake-cello-sourcemap"); let tmp = script.with_extension("tmp"); std::fs::write( &tmp, format!( "#!/bin/sh\n\ if [ \"$1\" = \"deploy\" ] && [ \"$2\" = \"--help\" ]; then\n\ - printf 'celld deploy -- build a Worker\\n --sourcemap PATH write the Worker source map to a local file\\n'\n\ + printf 'cello deploy -- build a Worker\n --sourcemap PATH write the Worker source map to a local file\n'\ exit 0\n\ fi\n\ printf '%s\\n' \"$*\" >> \"{}/calls.log\"\n\ @@ -4776,12 +4776,12 @@ exit 0 script } - /// A fork `celld` writes the Worker map when asked: the probe sees + /// A fork `cello` writes the Worker map when asked: the probe sees /// `--sourcemap` in `deploy --help`, the upload carries the flag, and - /// the deploy stores what celld wrote under `maps///` — + /// the deploy stores what cello wrote under `maps///` — /// with the temp path gone from the worktree afterwards. #[tokio::test] - async fn deploy_stores_the_worker_map_a_fork_celld_writes() { + async fn deploy_stores_the_worker_map_a_fork_cello_writes() { let dir = tempfile::tempdir().unwrap(); let cfg = GitConfig::new(dir.path().join("git"), None); let store = Store::memory(); @@ -4795,7 +4795,7 @@ exit 0 let app = test_app(10125); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld_sourcemap(state.path()); + let script = install_fake_cello_sourcemap(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let outcome = deployer @@ -4928,7 +4928,7 @@ exit 0 let app = test_app(10101); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let outcome = deployer @@ -4937,7 +4937,7 @@ exit 0 .unwrap(); assert_eq!(outcome.status, "success", "error: {:?}", outcome.error); // A first deploy (`last_deploy_sha` NULL) uploads before it - // migrates: `celld d1` needs a running fleet and nothing is + // migrates: `cello d1` needs a running fleet and nothing is // published yet. let names: Vec<&str> = outcome.steps.iter().map(|s| s.name.as_str()).collect(); assert_eq!( @@ -4959,7 +4959,7 @@ exit 0 assert!( outcome.log_tail.contains("applied 0001_init.sql") && outcome.log_tail.contains("applied 0002_add_owner.sql"), - "the celld output is journaled: {}", + "the cello output is journaled: {}", outcome.log_tail ); @@ -5046,7 +5046,7 @@ exit 0 assert!(!capped, "{name} fits"); } let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let bun = install_fake_bun(state.path()); let data = tempfile::tempdir().unwrap(); let mut settings = migrate_settings(&data, state.path(), &script); @@ -5215,7 +5215,7 @@ exit 0 } #[cfg(unix)] - /// `celld deploy` runs as the app uid: the replaced config must keep the + /// `cello deploy` runs as the app uid: the replaced config must keep the /// original's owner, or the upload can't read it (found live: EACCES on /// a root-owned 0600 `dist/wrangler.json`). Needs root to chown. #[test] @@ -5392,7 +5392,7 @@ exit 0 let app = test_app(10110); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -5499,7 +5499,7 @@ exit 0 let app = test_app(10111); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -5576,9 +5576,9 @@ exit 0 assert_eq!(count, 1, "a failed apply records nothing new"); } - /// The live manifest celld published for `slug`: `deploy/current.json` + /// The live manifest cello published for `slug`: `deploy/current.json` /// pointing at a versioned prefix plus the manifest there, in the layout - /// `deploy::manifest::deployed_manifest` reads. The fake celld never + /// `deploy::manifest::deployed_manifest` reads. The fake cello never /// writes these (it has no store handle), so tests seed them directly. async fn seed_live_manifest(store: &Store, slug: &str, manifest: serde_json::Value) { let prefix = "deploy/outer-app/abcd1234"; @@ -5646,7 +5646,7 @@ exit 0 let app = test_app(10120); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -5655,7 +5655,7 @@ exit 0 .unwrap(); assert_eq!(first.status, "success", "error: {:?}", first.error); - // The live version celld published: an asset-only manifest with no + // The live version cello published: an asset-only manifest with no // worker module and no bindings declares nothing. seed_live_manifest( &store, @@ -5775,7 +5775,7 @@ exit 0 let app = test_app(10121); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -5909,7 +5909,7 @@ exit 0 let app = test_app(10122); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -6015,7 +6015,7 @@ exit 0 let app = test_app(10123); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -6123,7 +6123,7 @@ exit 0 let app = test_app(10102); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -6148,13 +6148,13 @@ exit 0 assert_eq!( apply_calls(state.path()), 1, - "no celld call when nothing is pending" + "no cello call when nothing is pending" ); } #[tokio::test] async fn migrate_skips_without_d1_or_files() { - // No `d1_databases` declared: the step skips without touching celld. + // No `d1_databases` declared: the step skips without touching cello. let dir = tempfile::tempdir().unwrap(); let cfg = GitConfig::new(dir.path().join("git"), None); let store = Store::memory(); @@ -6193,7 +6193,7 @@ exit 0 let app = test_app(10103); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let outcome = deployer @@ -6212,7 +6212,7 @@ exit 0 "the journal says why: {}", outcome.log_tail ); - assert_eq!(apply_calls(state.path()), 0, "celld never runs"); + assert_eq!(apply_calls(state.path()), 0, "cello never runs"); } #[tokio::test] @@ -6230,7 +6230,7 @@ exit 0 let app = test_app(10104); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let outcome = deployer @@ -6244,7 +6244,7 @@ exit 0 .find(|s| s.name == "migrate") .expect("the migrate step is journaled"); assert!(migrate.skipped); - assert_eq!(apply_calls(state.path()), 0, "celld never runs"); + assert_eq!(apply_calls(state.path()), 0, "cello never runs"); } #[tokio::test] @@ -6276,7 +6276,7 @@ exit 0 let app = test_app(10105); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let outcome = deployer @@ -6313,7 +6313,7 @@ exit 0 .await .unwrap(); assert_eq!(last_sha, None, "a failed first deploy never goes live"); - // The upload ran first (the fleet must exist before `celld d1` can + // The upload ran first (the fleet must exist before `cello d1` can // reach it); the failure is in the migrate step that followed it. assert_eq!(upload_calls(state.path()), 1); assert_eq!( @@ -6364,7 +6364,7 @@ exit 0 let app = test_app(10112); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let failed = deployer @@ -6375,7 +6375,7 @@ exit 0 assert_eq!(failed.failed_step.as_deref(), Some("migrate")); // Still no successful deploy, so the retry is a first deploy too: // it uploads before it migrates again — and this time succeeds. - // (celld skips already-applied files on its own; the failed apply + // (cello skips already-applied files on its own; the failed apply // recorded nothing, so both files apply fresh here.) let sha_b = commit::commit( &store, @@ -6460,7 +6460,7 @@ exit 0 let app = test_app(10106); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -6470,7 +6470,7 @@ exit 0 assert_eq!(first.status, "success", "error: {:?}", first.error); assert_eq!(apply_calls(state.path()), 1); - // Same name, new content: the deploy fails before celld runs again. + // Same name, new content: the deploy fails before cello runs again. let sha_b = commit::commit( &store, &cfg, @@ -6516,7 +6516,7 @@ exit 0 assert_eq!( apply_calls(state.path()), 1, - "an edited file never reaches celld again" + "an edited file never reaches cello again" ); assert_eq!( upload_calls(state.path()), @@ -6535,7 +6535,7 @@ exit 0 #[tokio::test] async fn blocked_gate_never_migrates() { // A profane page with a valid deploy root and migration files: the - // gate blocks, and celld (deploy and migrate alike) never runs. + // gate blocks, and cello (deploy and migrate alike) never runs. let dir = tempfile::tempdir().unwrap(); let cfg = GitConfig::new(dir.path().join("git"), None); let store = Store::memory(); @@ -6566,7 +6566,7 @@ exit 0 insert_test_app(&pool, &app).await; let fake = FakeJev::start(block_responder()).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let mut settings = migrate_settings(&data, state.path(), &script); settings.bun_bin = "/bin/true".to_string(); @@ -6584,7 +6584,7 @@ exit 0 ); assert!( !state.path().join("calls.log").is_file(), - "celld never runs at all: the deploy step is never reached" + "cello never runs at all: the deploy step is never reached" ); } @@ -6622,7 +6622,7 @@ exit 0 let app = test_app(10108); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let outcome = deployer @@ -6695,7 +6695,7 @@ exit 0 let app = test_app(10109); insert_test_app(&pool, &app).await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(migrate_settings(&data, state.path(), &script), 1); let first = deployer @@ -6705,7 +6705,7 @@ exit 0 assert_eq!(first.status, "success", "error: {:?}", first.error); assert_eq!(apply_calls(state.path()), 1); - // Same name, new id: celld sees a new (empty) database, so the same + // Same name, new id: cello sees a new (empty) database, so the same // files are pending again and apply a second time. let sha_b = commit::commit( &store, @@ -6747,7 +6747,7 @@ exit 0 ); } - /// The real `celld d1 migrations` contract the pipeline depends on: + /// The real `cello d1 migrations` contract the pipeline depends on: /// `apply` is idempotent (a second run is a no-op success) and `list` /// shows the applied file. Needs a live fleet, so it runs only when the /// integrator sets it up at merge time: @@ -6755,11 +6755,11 @@ exit 0 /// `OUTER_LIVE_D1_PROJECT` (a dir with the app's wrangler config and a /// `migrations/` dir holding `0001_outer_smoke.sql`), `OUTER_LIVE_D1_DB` /// (the `database_name`), plus the bucket credentials in the env and a - /// fleet serving that app. Uses the real `celld` on PATH, unsandboxed: + /// fleet serving that app. Uses the real `cello` on PATH, unsandboxed: /// it pins the CLI surface, not the pipeline (the fake covers that). #[tokio::test] #[ignore = "needs a live fleet: OUTER_LIVE_D1_BUCKET, OUTER_LIVE_D1_PROJECT, OUTER_LIVE_D1_DB"] - async fn live_celld_migrations_apply_is_idempotent() { + async fn live_cello_migrations_apply_is_idempotent() { let bucket = std::env::var("OUTER_LIVE_D1_BUCKET") .expect("OUTER_LIVE_D1_BUCKET must be set (e.g. s3://outer/fleets/pwa-check)"); let project = std::env::var("OUTER_LIVE_D1_PROJECT") @@ -6780,12 +6780,12 @@ exit 0 let extra = extra.clone(); let bucket = bucket.clone(); async move { - let mut cmd = tokio::process::Command::new("celld"); + let mut cmd = tokio::process::Command::new("cello"); cmd.args(["d1", "migrations"]); cmd.args(&args); cmd.args(["--bucket", bucket.as_str()]); cmd.args(&extra); - cmd.output().await.expect("celld must be on PATH") + cmd.output().await.expect("cello must be on PATH") } }; let project_arg = project.clone(); @@ -6802,7 +6802,7 @@ exit 0 "a second apply is a no-op success: {}", String::from_utf8_lossy(&second.stderr) ); - let mut list = tokio::process::Command::new("celld"); + let mut list = tokio::process::Command::new("cello"); list.args([ "d1", "migrations", @@ -6813,7 +6813,7 @@ exit 0 bucket.as_str(), ]); list.args(&extra); - let list = list.output().await.expect("celld must be on PATH"); + let list = list.output().await.expect("cello must be on PATH"); assert!( list.status.success(), "list must succeed: {}", @@ -6903,7 +6903,7 @@ exit 0 .unwrap(); // No package.json: install and build skip without binaries, and the - // bad cron stops the deploy at deploy-root, before celld runs. + // bad cron stops the deploy at deploy-root, before cello runs. let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(test_settings(data.path().to_path_buf()), 1); let outcome = deployer @@ -6970,7 +6970,7 @@ exit 0 // No package.json: install and build skip without binaries, and the // second database stops the deploy at deploy-root with the cap - // message, before migrations or celld run. + // message, before migrations or cello run. let data = tempfile::tempdir().unwrap(); let deployer = Deployer::new(test_settings(data.path().to_path_buf()), 1); let outcome = deployer @@ -7071,7 +7071,7 @@ exit 0 } #[tokio::test] - #[ignore = "needs bun and celld"] + #[ignore = "needs bun and cello"] async fn end_to_end_synthetic_app_against_rustfs() { let endpoint = std::env::var("OUTER_TEST_S3_ENDPOINT").expect("OUTER_TEST_S3_ENDPOINT must be set"); @@ -7081,7 +7081,7 @@ exit 0 let bucket = std::env::var("OUTER_TEST_S3_BUCKET").unwrap_or_else(|_| "outer-live-test".to_string()); let search = std::env::var("PATH").unwrap_or_default(); - for bin in ["bun", "celld"] { + for bin in ["bun", "cello"] { assert!( std::env::split_paths(&search).any(|dir| dir.join(bin).is_file()), "{bin} must be on PATH for the live deploy test" @@ -7089,7 +7089,7 @@ exit 0 } // A minimal app: install is a no-op (no deps), build copies the root - // wrangler.json into dist/, celld deploys dist/ to RustFS. + // wrangler.json into dist/, cello deploys dist/ to RustFS. let src = tempfile::tempdir().unwrap(); std::fs::write( src.path().join("package.json"), @@ -7158,8 +7158,8 @@ exit 0 let data = tempfile::tempdir().unwrap(); let settings = DeploySettings { data_dir: data.path().to_path_buf(), - celld_bin: "celld".to_string(), - esbuild_bin: std::env::var("CELLD_ESBUILD").ok(), + cello_bin: "cello".to_string(), + esbuild_bin: std::env::var("CELLO_ESBUILD").ok(), bun_bin: "bun".to_string(), storage: FleetStorage { endpoint, @@ -7186,7 +7186,7 @@ exit 0 assert_eq!(outcome.status, "success", "error: {:?}", outcome.error); assert!( outcome.version.is_some(), - "celld version parsed from --json output" + "cello version parsed from --json output" ); let (last_sha,): (Option,) = sqlx::query_as("SELECT last_deploy_sha FROM app WHERE id = 'app1'") diff --git a/crates/outer/src/secrets.rs b/crates/outer/src/secrets.rs index 6dda614..5d4fcad 100644 --- a/crates/outer/src/secrets.rs +++ b/crates/outer/src/secrets.rs @@ -236,13 +236,13 @@ pub fn operator_token(key: &SecretsKey, slug: &str) -> String { hex::encode(token) } -/// The (`CELLD_OPERATOR_TOKEN`, token) pair for a celld invocation or -/// fleet env. `CELLD_*` names are platform-reserved: users cannot set or +/// The (`CELLO_OPERATOR_TOKEN`, token) pair for a cello invocation or +/// fleet env. `CELLO_*` names are platform-reserved: users cannot set or /// see this, and secret injection skips it, so it never reaches Worker /// vars. pub fn operator_token_env(key: &SecretsKey, slug: &str) -> (String, String) { ( - "CELLD_OPERATOR_TOKEN".to_string(), + "CELLO_OPERATOR_TOKEN".to_string(), operator_token(key, slug), ) } @@ -561,7 +561,7 @@ mod tests { fn operator_token_is_stable_per_slug_and_scoped() { let key = SecretsKey::test_key(); let (name, token) = operator_token_env(&key, "grocery"); - assert_eq!(name, "CELLD_OPERATOR_TOKEN"); + assert_eq!(name, "CELLO_OPERATOR_TOKEN"); assert_eq!(token, operator_token(&key, "grocery")); assert_eq!(token.len(), 64); assert_ne!(token, operator_token(&key, "other")); diff --git a/crates/outer/src/store/credentials.rs b/crates/outer/src/store/credentials.rs index 99dac55..47d465b 100644 --- a/crates/outer/src/store/credentials.rs +++ b/crates/outer/src/store/credentials.rs @@ -1,4 +1,4 @@ -//! Scoped bucket credentials for fleets and `celld deploy` (spec §12.6). +//! Scoped bucket credentials for fleets and `cello deploy` (spec §12.6). //! //! Fleets and deploy steps never hold the root bucket keys. With //! `OUTER_STORE=r2` and the Cloudflare pair set, outer mints Cloudflare R2 @@ -6,7 +6,7 @@ //! dev the parent keys are used directly (`CredentialSource::Static`). //! //! A grant is a [`Permission`] over a prefix list. A fleet receives two: -//! read-write over the celld state namespaces, and read-only over the +//! read-write over the cello state namespaces, and read-only over the //! deployment artifacts (`deploy/`, `deploy-blobs/`). An app's build runs as //! the same uid as its fleet and can read that fleet's environment, so a //! credential found there must not be able to publish a deployment; see @@ -205,7 +205,7 @@ impl CredentialSource { } } -/// `fleets/{slug}/` plus, for one celld legacy contract, `fleets/{slug}/wake-`: +/// `fleets/{slug}/` plus, for one cello legacy contract, `fleets/{slug}/wake-`: /// the only prefix shapes outer ever mints for. Must be non-empty, relative, /// and free of `..`; otherwise slash-terminated, except that one /// non-terminated shape under an app's fleet root. @@ -222,7 +222,7 @@ pub fn validate_prefix(prefix: &str) -> anyhow::Result<()> { if prefix.ends_with('/') { return Ok(()); } - // The celld wake-legacy keys are siblings, not children, of one name: + // The cello wake-legacy keys are siblings, not children, of one name: // `wake-format.json`, `wake-v2/` and `wake-retired-v2/`. A `wake-` // prefix covers exactly them (and not `wake/`), but this shape is only // legal directly under the app's `fleets/{slug}/` root, never at the @@ -543,7 +543,7 @@ mod tests { #[test] fn prefix_validation_rejects_shapes_outside_fleets() { assert!(validate_prefix("fleets/grocery/").is_ok()); - // The celld wake-legacy group (`wake-format.json`, `wake-v2/`, + // The cello wake-legacy group (`wake-format.json`, `wake-v2/`, // `wake-retired-v2/`) is one non-slash-terminated prefix, legal only // directly under an app's fleet root. assert!(validate_prefix("fleets/grocery/wake-").is_ok()); From 9e7b6a3cc28cef46cfb96f4837ab4b07bc33165c Mon Sep 17 00:00:00 2001 From: Ryuz Date: Thu, 19 Nov 2026 08:23:35 +0100 Subject: [PATCH 4/7] Cello 0.1.0: console, proxy, metrics and MCP call cello --- crates/outer/src/billing/mod.rs | 2 +- crates/outer/src/http/console_data/d1.rs | 146 +++++++++--------- crates/outer/src/http/console_data/durable.rs | 36 ++--- crates/outer/src/http/console_data/mod.rs | 68 ++++---- crates/outer/src/http/console_data/r2.rs | 72 ++++----- crates/outer/src/http/proxy.rs | 24 +-- crates/outer/src/inactivity.rs | 2 +- crates/outer/src/limits.rs | 2 +- crates/outer/src/main.rs | 12 +- crates/outer/src/mcp/docs.rs | 4 +- crates/outer/src/mcp/mod.rs | 6 +- crates/outer/src/mcp/registry.rs | 2 +- crates/outer/src/mcp/tests.rs | 32 ++-- crates/outer/src/mcp/tools/account.rs | 2 +- crates/outer/src/mcp/tools/backups.rs | 6 +- crates/outer/src/mcp/tools/data.rs | 18 +-- crates/outer/src/observe/logs.rs | 38 ++--- crates/outer/src/observe/metrics.rs | 2 +- crates/outer/src/observe/sourcemaps.rs | 21 +-- crates/outer/src/ops.rs | 6 +- crates/outer/src/preview.rs | 6 +- 21 files changed, 254 insertions(+), 253 deletions(-) diff --git a/crates/outer/src/billing/mod.rs b/crates/outer/src/billing/mod.rs index 365b841..5077882 100644 --- a/crates/outer/src/billing/mod.rs +++ b/crates/outer/src/billing/mod.rs @@ -2845,7 +2845,7 @@ mod tests { fleets: crate::fleet::manager::FleetManager::new( crate::fleet::manager::ManagerSettings { data_dir: data_dir.clone(), - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "us-east-1".to_string(), diff --git a/crates/outer/src/http/console_data/d1.rs b/crates/outer/src/http/console_data/d1.rs index 875821c..9635ec7 100644 --- a/crates/outer/src/http/console_data/d1.rs +++ b/crates/outer/src/http/console_data/d1.rs @@ -2,7 +2,7 @@ // // What changed for Outer: no collaborator roles (owner-only in v1, so no // `redacted`/`locked`/`caps`/`rowAction` plumbing); the database is addressed -// by its declared `binding` and resolved server-side to the celld identity; +//! by its declared `binding` and resolved server-side to the cello identity; // credentials come from `store::credentials` scoped to `fleets/{slug}/` // exactly like `deploy::migrate`; the fleet wakes through the fleet manager; // every write lands in `agent_action` with client "Console". @@ -39,7 +39,7 @@ pub const DEFAULT_PAGE_SIZE: i64 = 25; /// The server clamps every page size into this range. pub const MIN_PAGE_SIZE: i64 = 1; pub const MAX_PAGE_SIZE: i64 = 100; -/// `celld d1 execute` budget, matching Noite's 30 s. +/// `cello d1 execute` budget, matching Noite's 30 s. pub const D1_TIMEOUT: Duration = Duration::from_secs(30); // --------------------------------------------------------------------------- @@ -480,7 +480,7 @@ pub fn build_delete( } /// One atomic batch of DELETEs, each followed by `changes()` so the caller can -/// total the rows actually removed. `celld d1 execute` brackets several +/// total the rows actually removed. `cello d1 execute` brackets several /// statements in one transaction, so a failure rolls the whole batch back. pub fn build_delete_keys( schema: &TableSchema, @@ -505,7 +505,7 @@ pub fn build_delete_keys( .to_string()) } -/// Most `UNION ALL` terms one `celld d1 execute` takes. Prod celld 0.6.2 +/// Most `UNION ALL` terms one `cello d1 execute` takes. Prod celld 0.6.2 /// refuses 6+ terms (`D1_EXEC_ERROR: too many terms in compound SELECT`; /// without a trailing semicolon it misleadingly says "incomplete /// statement"), so counts for more tables run as several execs. Found live: @@ -541,7 +541,7 @@ pub fn table_count_queries(tables: &[String]) -> Vec { } /// Tag column stamping every row of a batched exec so `split_batched` can -/// route the concatenated result sets back apart. `celld d1 execute` runs +/// route the concatenated result sets back apart. `cello d1 execute` runs /// several `;`-separated statements in one call and prints one JSON object /// per row, so without a tag the sets would be indistinguishable. pub const BATCH_TAG: &str = "_q"; @@ -601,29 +601,29 @@ pub fn batch_tag_collides(schema: &TableSchema) -> bool { } // --------------------------------------------------------------------------- -// celld plumbing +// cello plumbing // --------------------------------------------------------------------------- /// What a D1 operation needs beyond the request. Built from `AppState` in the -/// handlers; built by hand in tests with a fake `celld`. +/// handlers; built by hand in tests with a fake `cello`. #[derive(Clone)] pub struct D1Ctx { - pub celld_bin: String, + pub cello_bin: String, pub storage: FleetStorage, pub pool: SqlitePool, pub store: Store, - /// Derives the fleet's `CELLD_OPERATOR_TOKEN` for every `celld d1` + /// Derives the fleet's `CELLO_OPERATOR_TOKEN` for every `cello d1` /// invocation (the internal listener requires it once fleets set it). pub secrets_key: crate::secrets::SecretsKey, /// Wakes the fleet before `d1 execute` (D1 goes through a running node). - /// `None` in tests with a fake `celld`, where no fleet can be woken. + /// `None` in tests with a fake `cello`, where no fleet can be woken. pub wake: Option, } impl D1Ctx { pub fn from_state(state: &crate::http::AppState) -> Self { Self { - celld_bin: state.mcp.fleets.celld_bin(), + cello_bin: state.mcp.fleets.cello_bin(), storage: state.mcp.fleets.storage().clone(), pool: state.mcp.pool.clone(), store: state.mcp.store.clone(), @@ -649,9 +649,9 @@ pub enum D1Error { BadQuery(String), #[error("the app is still starting")] AppStarting, - #[error("celld d1 failed: {0}")] - Celld(String), - #[error("celld d1 timed out")] + #[error("cello d1 failed: {0}")] + Cello(String), + #[error("cello d1 timed out")] Timeout, #[error("database is unavailable right now")] Unavailable(#[source] anyhow::Error), @@ -669,9 +669,9 @@ fn bad_err(err: anyhow::Error) -> D1Error { D1Error::BadQuery(format!("{err:#}")) } -/// The minimal wrangler.json synthesized for the `celld d1 execute` cwd: only +/// The minimal wrangler.json synthesized for the `cello d1 execute` cwd: only /// name (script_name), main, compatibility_date/flags, and `d1_databases` -/// [{binding, database_name, database_id?}]. No vars, nothing else — celld +/// [{binding, database_name, database_id?}]. No vars, nothing else — cello /// resolves the database identity from the cwd config, so it needs the /// declarations but must never see secret values. fn synthesize_config(manifest: &serde_json::Value, dbs: &[D1Database]) -> anyhow::Result> { @@ -767,8 +767,8 @@ async fn deployed_state(ctx: &D1Ctx, slug: &str) -> Result Result { .ok_or_else(|| D1Error::UnknownDatabase(binding.to_string())) } -/// Materialize the synthesized wrangler config into a temp project dir: celld +/// Materialize the synthesized wrangler config into a temp project dir: cello /// resolves the database identity from the cwd config. The dir holds only /// the config — no app code — and is removed with the `TempDir` guard. async fn materialize_project(config: &[u8]) -> anyhow::Result { @@ -790,7 +790,7 @@ async fn materialize_project(config: &[u8]) -> anyhow::Result Ok(dir) } -/// One `celld d1 execute` against the app's fleet. Callers pass validated +/// One `cello d1 execute` against the app's fleet. Callers pass validated /// SQL only — never raw browser input. The env carries the scoped grant /// alone (`env_clear` + minimal PATH, so no parent-process AWS keys leak), /// and the timeout kills the child on expiry. @@ -810,7 +810,7 @@ pub(crate) async fn d1_exec( .await .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("minting scoped credentials: {e:#}")))?; let bucket = ctx.storage.bucket_url(slug); - let mut cmd = tokio::process::Command::new(&ctx.celld_bin); + let mut cmd = tokio::process::Command::new(&ctx.cello_bin); cmd.arg("d1") .arg("execute") .arg(identity) @@ -849,24 +849,24 @@ pub(crate) async fn d1_exec( cmd.env(token_key, token_val); let child = cmd .spawn() - .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("spawning celld: {e:#}")))?; + .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("spawning cello: {e:#}")))?; let out = tokio::time::timeout(D1_TIMEOUT, child.wait_with_output()) .await .map_err(|_| D1Error::Timeout)? - .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("waiting for celld: {e:#}")))?; + .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("waiting for cello: {e:#}")))?; if !out.status.success() { let stderr = String::from_utf8_lossy(&out.stderr); - return Err(D1Error::Celld(first_lines(&stderr, 5))); + return Err(D1Error::Cello(first_lines(&stderr, 5))); } String::from_utf8(out.stdout) - .map_err(|e| D1Error::Celld(format!("celld printed non-UTF-8 output: {e}"))) + .map_err(|e| D1Error::Cello(format!("cello printed non-UTF-8 output: {e}"))) } /// A dump is not a diagnostic ping: the export streams up to its 32 MiB /// cap through the fleet, so it gets the migration-sized deadline. pub const D1_EXPORT_TIMEOUT: Duration = Duration::from_secs(120); -/// One `celld d1 export` against the app's fleet: a consistent SQL dump of +/// One `cello d1 export` against the app's fleet: a consistent SQL dump of /// exactly `tables` on stdout as text (no `--json`), read under one /// transaction on the owning node — a single snapshot even while the /// database takes writes. Their indexes and triggers follow each table @@ -891,7 +891,7 @@ pub(crate) async fn d1_export( .await .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("minting scoped credentials: {e:#}")))?; let bucket = ctx.storage.bucket_url(slug); - let mut cmd = tokio::process::Command::new(&ctx.celld_bin); + let mut cmd = tokio::process::Command::new(&ctx.cello_bin); cmd.arg("d1").arg("export").arg(identity); for table in tables { cmd.arg("--table").arg(table); @@ -927,20 +927,20 @@ pub(crate) async fn d1_export( cmd.env(token_key, token_val); let child = cmd .spawn() - .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("spawning celld: {e:#}")))?; + .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("spawning cello: {e:#}")))?; let out = tokio::time::timeout(D1_EXPORT_TIMEOUT, child.wait_with_output()) .await .map_err(|_| D1Error::Timeout)? - .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("waiting for celld: {e:#}")))?; + .map_err(|e| D1Error::Unavailable(anyhow::anyhow!("waiting for cello: {e:#}")))?; if !out.status.success() { let stderr = String::from_utf8_lossy(&out.stderr); - return Err(D1Error::Celld(first_lines(&stderr, 5))); + return Err(D1Error::Cello(first_lines(&stderr, 5))); } String::from_utf8(out.stdout) - .map_err(|e| D1Error::Celld(format!("celld printed non-UTF-8 output: {e}"))) + .map_err(|e| D1Error::Cello(format!("cello printed non-UTF-8 output: {e}"))) } -/// Last `n` non-empty lines of celld stderr, bounded for the log line. +/// Last `n` non-empty lines of cello stderr, bounded for the log line. fn first_lines(stderr: &str, n: usize) -> String { let lines: Vec<&str> = stderr.lines().filter(|l| !l.trim().is_empty()).collect(); let tail = &lines[lines.len().saturating_sub(n)..]; @@ -955,7 +955,7 @@ fn first_lines(stderr: &str, n: usize) -> String { } format!("{}…", &joined[..end]) } else if joined.is_empty() { - "celld exited non-zero with no output".to_string() + "cello exited non-zero with no output".to_string() } else { joined } @@ -977,7 +977,7 @@ pub(crate) fn parse_json_rows(out: &str) -> Vec>, @@ -1045,7 +1045,7 @@ fn hex(bytes: &[u8]) -> String { } // --------------------------------------------------------------------------- -// Operations (shared by the handlers and, in tests, the fake celld) +// Operations (shared by the handlers and, in tests, the fake cello) // --------------------------------------------------------------------------- /// Wake the fleet when the server runs one (D1 goes through a live node), @@ -1060,8 +1060,8 @@ async fn ready_config(ctx: &D1Ctx, app: &crate::apps::App) -> Result) -> Respons "the app is still starting", Some("Starting the app — retry in a few seconds.".to_string()), ), - Err(D1Error::Celld(detail)) => data_error( + Err(D1Error::Cello(detail)) => data_error( StatusCode::BAD_GATEWAY, "d1_unavailable", - format!("celld d1 failed: {detail}"), + format!("cello d1 failed: {detail}"), Some("Couldn't reach the app's database — the app may still be starting. Retry in a few seconds.".to_string()), ), Err(D1Error::Timeout) => data_error( StatusCode::GATEWAY_TIMEOUT, "d1_timeout", - "celld d1 timed out", + "cello d1 timed out", Some("The database query took too long. Narrow the filters and retry.".to_string()), ), Err(D1Error::Unavailable(source)) => data_error( @@ -1788,7 +1788,7 @@ async fn api_write( ), Err(err) => ( format!("failed d1 {op} on {table}"), - Err(D1Error::Celld(format!("{err:#}"))), + Err(D1Error::Cello(format!("{err:#}"))), ), }; // The audit row never carries values: only the op and the table. @@ -1858,7 +1858,7 @@ async fn api_delete_rows( ), Err(err) => ( format!("failed d1 bulk delete on {table}"), - Err(D1Error::Celld(format!("{err:#}"))), + Err(D1Error::Cello(format!("{err:#}"))), ), }; let (o, code) = match &outcome { @@ -2198,7 +2198,7 @@ mod tests { } #[test] - fn table_counts_chunk_at_the_celld_union_limit() { + fn table_counts_chunk_at_the_cello_union_limit() { let tables = |n: usize| (0..n).map(|i| format!("t{i:02}")).collect::>(); // At the boundary: one exec. assert_eq!(table_count_queries(&tables(0)).len(), 0); @@ -2428,13 +2428,13 @@ mod tests { assert!(!bytes.windows(18).any(|w| w == b"super-secret-value")); } - // --- fake celld -------------------------------------------------------- + // --- fake cello -------------------------------------------------------- - /// A fake `celld` for D1 tests: answers `d1 execute` with canned JSON + /// A fake `cello` for D1 tests: answers `d1 execute` with canned JSON /// per `--command`, recording argv, env and cwd under the state dir it /// reads back out of `--bucket s3:///fleets/`. - fn install_fake_celld(state: &std::path::Path) -> PathBuf { - let script = state.join("fake-celld"); + fn install_fake_cello(state: &std::path::Path) -> PathBuf { + let script = state.join("fake-cello"); // Atomic install (write tmp, chmod, rename): an exec racing a direct // write fails ETXTBSY under the parallel suite. let tmp = script.with_extension("tmp"); @@ -2540,7 +2540,7 @@ exit 0 let mut storage = test_storage(); storage.bucket = state.path().to_string_lossy().into_owned(); D1Ctx { - celld_bin: script.to_string_lossy().into_owned(), + cello_bin: script.to_string_lossy().into_owned(), storage, pool: pool.clone(), store, @@ -2551,7 +2551,7 @@ exit 0 const DEPLOY_PREFIX: &str = "deploy/outer-app/fd031dff832ad90a"; - /// The live manifest celld published for this app: two D1 bindings (one + /// The live manifest cello published for this app: two D1 bindings (one /// with an id, one plain), plus non-D1 binding types and a top-level /// `vars` map carrying a would-be secret — all of which the panel must /// ignore, never echoing the secret anywhere. @@ -2590,7 +2590,7 @@ exit 0 }) } - /// Pointer plus manifest, as `celld deploy` leaves them in the bucket. + /// Pointer plus manifest, as `cello deploy` leaves them in the bucket. async fn seed_deployed(store: &Store) { store .put( @@ -2646,7 +2646,7 @@ exit 0 /// A stub fleet health gate: answers 200 on every connection so /// `ensure_awake`'s pre-spawn probe counts the fleet awake and no - /// `celld` spawn ever runs. Loopback-only; the task dies with the test. + /// `cello` spawn ever runs. Loopback-only; the task dies with the test. /// Returns the bound port (each router test takes its own). async fn stub_health() -> (u16, tokio::task::JoinHandle<()>) { let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); @@ -2687,7 +2687,7 @@ exit 0 async fn tables_filter_hidden_and_pin_argv() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); seed_deployed(&store).await; let ctx = op_ctx(&pool, &state, &script, store); @@ -2721,7 +2721,7 @@ exit 0 // would 401 every D1 call against a token-protected fleet): it must // be the slug-derived value, never user input. let want = format!( - "CELLD_OPERATOR_TOKEN={}", + "CELLO_OPERATOR_TOKEN={}", crate::secrets::operator_token(&crate::secrets::SecretsKey::test_key(), &app.slug) ); assert!(env.contains(&want), "{env}"); @@ -2738,24 +2738,24 @@ exit 0 } #[tokio::test] - async fn unknown_binding_never_reaches_celld() { + async fn unknown_binding_never_reaches_cello() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); seed_deployed(&store).await; let ctx = op_ctx(&pool, &state, &script, store); let app = test_app(&pool).await; let err = list_tables(&ctx, &app, "OTHER").await.unwrap_err(); assert!(matches!(err, D1Error::UnknownDatabase(_))); - assert!(calls(&state).is_empty(), "no celld call on bad binding"); + assert!(calls(&state).is_empty(), "no cello call on bad binding"); } #[tokio::test] async fn missing_config_is_no_config() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let ctx = op_ctx(&pool, &state, &script, Store::memory()); let app = test_app(&pool).await; let err = list_tables(&ctx, &app, "DB").await.unwrap_err(); @@ -2766,7 +2766,7 @@ exit 0 async fn pointer_without_manifest_is_no_config() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); store .put( @@ -2780,14 +2780,14 @@ exit 0 let app = test_app(&pool).await; let err = list_tables(&ctx, &app, "DB").await.unwrap_err(); assert!(matches!(err, D1Error::NoConfig)); - assert!(calls(&state).is_empty(), "no celld call without a manifest"); + assert!(calls(&state).is_empty(), "no cello call without a manifest"); } #[tokio::test] async fn schema_loads_fk_indexes_ddl() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); seed_deployed(&store).await; let ctx = op_ctx(&pool, &state, &script, store); @@ -2812,7 +2812,7 @@ exit 0 assert_eq!(log.len(), 2, "{log:?}"); assert!(log[0].contains("SELECT 'ti' AS"), "{log:?}"); assert!(log[1].contains("SELECT 'ii' AS"), "{log:?}"); - // Hidden tables never reach celld through this path either. + // Hidden tables never reach cello through this path either. assert!(matches!( table_schema(&ctx, &app, "DB", "d1_migrations") .await @@ -2831,7 +2831,7 @@ exit 0 async fn rows_clamp_page_and_size() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); seed_deployed(&store).await; let ctx = op_ctx(&pool, &state, &script, store); @@ -2865,7 +2865,7 @@ exit 0 let log: Vec = calls(&state).lines().map(str::to_string).collect(); assert_eq!(log.len(), 2, "{log:?}"); assert!(log[1].contains("SELECT 'rows' AS"), "{log:?}"); - // Unknown columns and absurd input never reach celld. + // Unknown columns and absurd input never reach cello. let bad = RowsBody { page: 0, page_size: 25, @@ -2885,7 +2885,7 @@ exit 0 async fn write_builds_curated_statements() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); seed_deployed(&store).await; let ctx = op_ctx(&pool, &state, &script, store); @@ -2964,7 +2964,7 @@ exit 0 async fn bulk_delete_sums_changes_and_caps_keys() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); seed_deployed(&store).await; let ctx = op_ctx(&pool, &state, &script, store); @@ -3001,10 +3001,10 @@ exit 0 } #[tokio::test] - async fn celld_failure_surfaces() { + async fn cello_failure_surfaces() { let pool = test_pool().await; let state = tempfile::tempdir().unwrap(); - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); seed_deployed(&store).await; let ctx = op_ctx(&pool, &state, &script, store); @@ -3022,7 +3022,7 @@ exit 0 ) .await .unwrap_err(); - assert!(matches!(err, D1Error::Celld(_)), "{err:?}"); + assert!(matches!(err, D1Error::Cello(_)), "{err:?}"); } // --- HTTP guard + audit tests ------------------------------------------ @@ -3079,18 +3079,18 @@ exit 0 pool: pool.clone(), config, }; - let script = install_fake_celld(state.path()); + let script = install_fake_cello(state.path()); let store = Store::memory(); seed_deployed(&store).await; // The wake probe hits this stub and counts the fleet awake, so no - // celld spawn ever runs in router tests. + // cello spawn ever runs in router tests. let (port, health) = stub_health().await; seed_app(pool, port as i64).await; let mut storage = test_storage(); storage.bucket = state.path().to_string_lossy().into_owned(); let fleets = FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: state.path().join("fleets"), - celld_bin: script.to_string_lossy().into_owned(), + cello_bin: script.to_string_lossy().into_owned(), storage, cgroups: None, memory_max_bytes: 0, diff --git a/crates/outer/src/http/console_data/durable.rs b/crates/outer/src/http/console_data/durable.rs index 4e74507..bd49135 100644 --- a/crates/outer/src/http/console_data/durable.rs +++ b/crates/outer/src/http/console_data/durable.rs @@ -2,8 +2,8 @@ //! plus a best-effort storage preview. //! //! Ported from Noite `apps/runner/src/host/storage/durable.rs` @ 58a977a -//! (Apache-2.0): `celld cell list --json` walks the fleet bucket directly -//! (no live node needed), reserved celld-internal classes are skipped, and +//! (Apache-2.0): `cello cell list --json` walks the fleet bucket directly +//! (no live node needed), reserved cello-internal classes are skipped, and //! each instance is additionally probed with `GET /do/{scope}?read=1` — the //! app's own handler decides what the preview says. Adapted to Outer: scoped //! credentials from [`super::scoped_creds`], the class allowlist from the @@ -11,7 +11,7 @@ //! endpoint so a class with many instances lists fast (Noite embeds one //! probe per row; the probe stays best-effort either way). //! -//! There is no write path: celld exposes no generic storage API for a DO +//! There is no write path: cello exposes no generic storage API for a DO //! instance. The UI says so in its empty and help copy. use std::time::Duration; @@ -25,8 +25,8 @@ use serde::{Deserialize, Serialize}; use super::{console_app, ok, scoped_creds, unavailable}; -/// `celld cell list` reads the bucket directly; 30 s like Noite's. -const CELLD_TIMEOUT: Duration = Duration::from_secs(30); +/// `cello cell list` reads the bucket directly; 30 s like Noite's. +const CELLO_TIMEOUT: Duration = Duration::from_secs(30); /// The app's own `?read=1` handler gets 5 s; anything slower or absent /// leaves the preview blank rather than failing the list. const PROBE_TIMEOUT: Duration = Duration::from_secs(5); @@ -72,9 +72,9 @@ struct ProbeQuery { } /// Parse `durable_objects` from the built wrangler config: an object with a -/// `bindings` array of `{name, class_name}`. Both travel to `celld cell +/// `bindings` array of `{name, class_name}`. Both travel to `cello cell /// list` (the class positionally), so both are validated here — anything -/// starting with `-` would otherwise parse as a celld option. +/// starting with `-` would otherwise parse as a cello option. pub fn durable_objects(value: &serde_json::Value) -> anyhow::Result> { let Some(obj) = value.get("durable_objects") else { return Ok(Vec::new()); @@ -112,7 +112,7 @@ pub fn durable_objects(value: &serde_json::Value) -> anyhow::Result anyhow::Result<()> { @@ -134,7 +134,7 @@ pub(crate) fn validate_do_name(name: &str) -> anyhow::Result<()> { } /// Look up the declared class behind a request class name. Anything not -/// declared is refused before celld ever sees it. +/// declared is refused before cello ever sees it. pub fn find_class<'a>(bindings: &'a [DoBinding], class: &str) -> anyhow::Result<&'a DoBinding> { bindings .iter() @@ -142,7 +142,7 @@ pub fn find_class<'a>(bindings: &'a [DoBinding], class: &str) -> anyhow::Result< .ok_or_else(|| anyhow::anyhow!("unknown Durable Object class {class:?}")) } -/// The exact argv for `celld cell list`, built pure so tests pin it. +/// The exact argv for `cello cell list`, built pure so tests pin it. pub fn cell_list_argv(bucket_url: &str, endpoint: &str, region: &str, class: &str) -> Vec { vec![ "cell".to_string(), @@ -158,8 +158,8 @@ pub fn cell_list_argv(bucket_url: &str, endpoint: &str, region: &str, class: &st ] } -/// Parse `celld cell list --json` output: one JSON object per line. Reserved -/// celld-internal classes (D1, KV, queues, …) are skipped — a user class +/// Parse `cello cell list --json` output: one JSON object per line. Reserved +/// cello-internal classes (D1, KV, queues, …) are skipped — a user class /// never collides with one, but a collision must not surface internals. /// Rows without an id are skipped; the scope defaults to the id. pub fn parse_cell_list(output: &str) -> Vec { @@ -192,7 +192,7 @@ pub fn parse_cell_list(output: &str) -> Vec { /// Durable Object classes from the deployed manifest's top-level /// `do_classes`/`sqlite_classes` lists. Entries are class names as strings -/// (objects with a `class_name` are accepted too); celld-internal classes +/// (objects with a `class_name` are accepted too); cello-internal classes /// (`__D1Database` and any `__`-prefixed name) are skipped — a user class /// never collides with one, but a collision must not surface internals. /// The manifest carries no binding names, so `name` is the class: the UI @@ -302,14 +302,14 @@ async fn instances_inner( &storage.region, &binding.class, ); - let output = super::run_celld( + let output = super::run_cello( state, &args, - &super::celld_env(storage, &creds), - CELLD_TIMEOUT, + &super::cello_env(storage, &creds), + CELLO_TIMEOUT, ) .await - .map_err(|e| anyhow::anyhow!("celld cell list failed: {e:#}"))?; + .map_err(|e| anyhow::anyhow!("cello cell list failed: {e:#}"))?; Ok(parse_cell_list(&output)) } @@ -400,7 +400,7 @@ mod tests { }); let bindings = parse_manifest_do(&manifest); // Strings and class_name objects parse; duplicates collapse; - // celld-internal `__` classes and invalid names are skipped. + // cello-internal `__` classes and invalid names are skipped. // The manifest carries no binding names, so `name` is the class. assert_eq!( bindings, diff --git a/crates/outer/src/http/console_data/mod.rs b/crates/outer/src/http/console_data/mod.rs index fcc29a6..ed4f421 100644 --- a/crates/outer/src/http/console_data/mod.rs +++ b/crates/outer/src/http/console_data/mod.rs @@ -10,7 +10,7 @@ //! bucket names are validated against the app's declared bindings; a typo'd //! name opens an empty namespace in *this* fleet, never another app's data //! (see `deploy::migrate` for the same argument). R2 writes go through -//! celld (never plain S3 PUT) and are recorded in `agent_action` via +//! cello (never plain S3 PUT) and are recorded in `agent_action` via //! `mcp::actions::record_console` with both ids NULL (client "Console"). pub mod backups; @@ -185,7 +185,7 @@ pub(crate) fn deploy_settings( } /// The single live-manifest reader (see `deploy::manifest`): the deploy -/// pointer celld publishes per upload plus the manifest it points at. R2, DO +/// pointer cello publishes per upload plus the manifest it points at. R2, DO /// and D1 parse their own binding sections out of it; the pipeline reads the /// live D1 declarations out of it for the migrate/upload order. pub(crate) use crate::deploy::manifest::deployed_manifest; @@ -226,7 +226,7 @@ pub(crate) async fn scoped_s3( }) } -pub(crate) fn celld_env( +pub(crate) fn cello_env( storage: &crate::fleet::manager::FleetStorage, creds: &crate::store::credentials::ScopedCredentials, ) -> Vec<(String, String)> { @@ -258,18 +258,18 @@ pub(crate) async fn scoped_creds( .await } -/// Run one `celld` storage subcommand against the fleet's own bucket. +/// Run one `cello` storage subcommand against the fleet's own bucket. /// `args` after the binary; `env` carries the scoped grant. Request-scoped /// with a short timeout — no fleet wake, no sandboxing: the credential /// prefix (`fleets/{slug}/`) is the isolation. -pub(crate) async fn run_celld( +pub(crate) async fn run_cello( state: &super::AppState, args: &[String], env: &[(String, String)], timeout: Duration, ) -> anyhow::Result { - let celld_bin = deploy_settings(state)?.celld_bin.clone(); - let mut cmd = tokio::process::Command::new(&celld_bin); + let cello_bin = deploy_settings(state)?.cello_bin.clone(); + let mut cmd = tokio::process::Command::new(&cello_bin); cmd.args(args); // Like `d1.rs` and the fleet supervisor: start from an empty env so the // server's own environment (parent bucket keys included) never reaches @@ -284,15 +284,15 @@ pub(crate) async fn run_celld( .await .map_err(|_| { anyhow::anyhow!( - "celld {} timed out", + "cello {} timed out", args.first().map(String::as_str).unwrap_or("?") ) })? - .map_err(|e| anyhow::anyhow!("running celld: {e:#}"))?; + .map_err(|e| anyhow::anyhow!("running cello: {e:#}"))?; if !output.status.success() { let stderr = String::from_utf8_lossy(&output.stderr); let tail: String = stderr.lines().rev().take(5).collect::>().join(" | "); - anyhow::bail!("celld failed: {tail}"); + anyhow::bail!("cello failed: {tail}"); } Ok(String::from_utf8_lossy(&output.stdout).into_owned()) } @@ -303,7 +303,7 @@ pub(crate) async fn run_celld( // // Error shape for data endpoints: `{error, message, user_message}` per the // console-actions contract. `message` carries the detail the owner needs to -// act on (validation failures and celld/S3 failure tails — env values and +// act on (validation failures and cello/S3 failure tails — env values and // credentials never enter them); `user_message` is a friendly constant on // backend failures (see `unavailable_friendly`), so raw store XML never // reaches the UI. The shorthands below delegate to [`data_error`] / @@ -315,7 +315,7 @@ pub(crate) fn bad_request(message: impl Into) -> Response { data_error(StatusCode::BAD_REQUEST, "bad_request", message.into(), None) } -/// A 500 for a celld/S3 failure: the message carries the failure's tail +/// A 500 for a cello/S3 failure: the message carries the failure's tail /// (never credentials — env values never enter it). pub(crate) fn unavailable(message: impl Into) -> Response { unavailable_friendly(message, "Couldn't reach the bucket right now. Try again.") @@ -393,11 +393,11 @@ mod tests { .header("cookie", cookie) } - /// Live deploys with a fake `celld` and static credentials: guard and + /// Live deploys with a fake `cello` and static credentials: guard and /// allowlist paths run fully; only S3 reads would touch the network, /// and no test below reaches them. async fn test_state( - celld_bin: &str, + cello_bin: &str, ) -> ( axum::Router, sqlx::SqlitePool, @@ -418,7 +418,7 @@ mod tests { mcp.deploys = Deploys::live(Deployer::new( DeploySettings { data_dir: data_dir.clone(), - celld_bin: celld_bin.to_string(), + cello_bin: cello_bin.to_string(), esbuild_bin: None, bun_bin: "bun".to_string(), storage: FleetStorage { @@ -489,9 +489,9 @@ mod tests { format!("__Host-outer_sid={id}") } - fn fake_celld(exit: i32) -> std::path::PathBuf { + fn fake_cello(exit: i32) -> std::path::PathBuf { let dir = tempfile::tempdir().unwrap(); - let bin = dir.path().join("celld"); + let bin = dir.path().join("cello"); // Atomic install (write tmp, chmod, rename): an exec racing a direct // write fails ETXTBSY under the parallel suite. let tmp = bin.with_extension("tmp"); @@ -549,7 +549,7 @@ mod tests { #[tokio::test] async fn data_endpoints_need_session_and_same_origin() { - let (app, pool, _, _) = test_state("celld").await; + let (app, pool, _, _) = test_state("cello").await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; let cookie = login(&pool, "ana@example.com").await; @@ -578,7 +578,7 @@ mod tests { #[tokio::test] async fn data_endpoints_hide_foreign_apps() { - let (app, pool, _, _) = test_state("celld").await; + let (app, pool, _, _) = test_state("cello").await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; seed_app(&pool, "bob@example.com", "bakery", now).await; @@ -597,7 +597,7 @@ mod tests { } #[tokio::test] async fn data_panels_stay_owner_only_for_collaborators() { - let (app, pool, _, _) = test_state("celld").await; + let (app, pool, _, _) = test_state("cello").await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; // Collaborators count only while the owner is Pro (spec §7.4): the @@ -655,7 +655,7 @@ mod tests { #[tokio::test] async fn r2_buckets_come_from_the_manifest_then_the_local_config() { - let (app, pool, data_dir, store) = test_state("celld").await; + let (app, pool, data_dir, store) = test_state("cello").await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; let cookie = login(&pool, "ana@example.com").await; @@ -718,7 +718,7 @@ mod tests { #[tokio::test] async fn r2_undeclared_bucket_is_404_and_bad_keys_are_400() { - let (app, pool, _, store) = test_state("celld").await; + let (app, pool, _, store) = test_state("cello").await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; let cookie = login(&pool, "ana@example.com").await; @@ -737,7 +737,7 @@ mod tests { let body: serde_json::Value = body.parse().unwrap(); assert_eq!(body["error"], "not_found"); assert!(body["user_message"].is_string()); - // A traversal key never reaches celld: 400. + // A traversal key never reaches cello: 400. let (status, _, _) = send( &app, authed( @@ -749,8 +749,8 @@ mod tests { ) .await; assert_eq!(status, StatusCode::BAD_REQUEST); - // A leading-dash key would parse as a celld option: 400 with a - // user_message, before any credential or celld call. + // A leading-dash key would parse as a cello option: 400 with a + // user_message, before any credential or cello call. let (status, _, body) = send( &app, authed( @@ -769,7 +769,7 @@ mod tests { #[tokio::test] async fn r2_put_and_delete_audit_console_rows() { - let bin = fake_celld(0); + let bin = fake_cello(0); let (app, pool, _, store) = test_state(bin.to_str().unwrap()).await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; @@ -815,7 +815,7 @@ mod tests { #[tokio::test] async fn r2_delete_rejects_empty_and_oversized_key_lists() { - let bin = fake_celld(0); + let bin = fake_cello(0); let (app, pool, _, store) = test_state(bin.to_str().unwrap()).await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; @@ -824,7 +824,7 @@ mod tests { for payload in [ r#"{"bucket":"files","keys":[]}"#, r#"{"bucket":"files","keys":["a/../b"]}"#, - // A leading-dash key would parse as a celld option. + // A leading-dash key would parse as a cello option. r#"{"bucket":"files","keys":["-evil"]}"#, ] { let (status, _, _) = send( @@ -850,7 +850,7 @@ mod tests { #[tokio::test] async fn do_classes_list_and_unknown_class_is_400() { - let (app, pool, _, store) = test_state("celld").await; + let (app, pool, _, store) = test_state("cello").await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; let cookie = login(&pool, "ana@example.com").await; @@ -881,8 +881,8 @@ mod tests { assert_eq!(status, StatusCode::BAD_REQUEST); let body: serde_json::Value = body.parse().unwrap(); assert!(body["user_message"].is_string()); - // A leading-dash class would parse as a celld option: refused - // before any credential or celld call. + // A leading-dash class would parse as a cello option: refused + // before any credential or cello call. let (status, _, _) = send( &app, authed( @@ -898,7 +898,7 @@ mod tests { #[tokio::test] async fn do_probe_is_best_effort_null() { - let (app, pool, _, _) = test_state("celld").await; + let (app, pool, _, _) = test_state("cello").await; let now = crate::auth::now_ms(); seed_app(&pool, "ana@example.com", "groceries", now).await; let cookie = login(&pool, "ana@example.com").await; @@ -921,7 +921,7 @@ mod tests { } #[test] - fn celld_env_carries_the_scoped_grant() { + fn cello_env_carries_the_scoped_grant() { let storage = FleetStorage { endpoint: "https://ep".to_string(), region: "auto".to_string(), @@ -938,7 +938,7 @@ mod tests { minted_at: None, reused: false, }; - let env = celld_env(&storage, &creds); + let env = cello_env(&storage, &creds); let get = |k: &str| env.iter().find(|(key, _)| key == k).map(|(_, v)| v.clone()); assert_eq!(get("AWS_ACCESS_KEY_ID").as_deref(), Some("scoped-id")); assert_eq!(get("S3_ENDPOINT").as_deref(), Some("https://ep")); diff --git a/crates/outer/src/http/console_data/r2.rs b/crates/outer/src/http/console_data/r2.rs index e1863a5..9e3ebc9 100644 --- a/crates/outer/src/http/console_data/r2.rs +++ b/crates/outer/src/http/console_data/r2.rs @@ -4,12 +4,12 @@ //! (Apache-2.0): the `r2_encode`/`r2_decode` key form, the key/header //! validators, and the read/write split are verbatim. Adapted to Outer: //! reads use Outer's [`crate::store::s3::S3Backend`] with per-request scoped -//! credentials (`fleets/{slug}/`), writes and deletes shell out to `celld r2 -//! put` / `celld r2 delete` with the same scoped env the deploy pipeline +//! credentials (`fleets/{slug}/`), writes and deletes shell out to `cello r2 +//! put` / `cello r2 delete` with the same scoped env the deploy pipeline //! uses, and the bucket allowlist comes from the app's declared //! `r2_buckets` instead of the runner's app registry. //! -//! Reads work on a sleeping fleet (S3 + bucket-direct celld calls need no +//! Reads work on a sleeping fleet (S3 + bucket-direct cello calls need no //! running node). Every write is audited (`r2_put`, `r2_delete`). use std::time::Duration; @@ -23,7 +23,7 @@ use axum::Router; use futures::StreamExt; use serde::{Deserialize, Serialize}; -use super::{celld_env, console_app, run_celld, scoped_creds, scoped_s3}; +use super::{cello_env, console_app, run_cello, scoped_creds, scoped_s3}; /// R2's own key bound (1..=1024 bytes). const R2_MAX_KEY_BYTES: usize = 1024; @@ -42,10 +42,10 @@ const R2_PREVIEW_CAP: usize = 262_144; const R2_HEAD_CONCURRENCY: usize = 8; /// Largest upload the browser may send (spooled, never buffered twice). const R2_UPLOAD_CAP: usize = 67_108_864; -/// `celld r2 put` gets a generous timeout: a full 64 MiB upload on a slow +/// `cello r2 put` gets a generous timeout: a full 64 MiB upload on a slow /// link must fail on stall, not on a fixed wall. -const CELLD_PUT_TIMEOUT: Duration = Duration::from_secs(300); -const CELLD_TIMEOUT: Duration = Duration::from_secs(60); +const CELLO_PUT_TIMEOUT: Duration = Duration::from_secs(300); +const CELLO_TIMEOUT: Duration = Duration::from_secs(60); /// Content types a browser renders as a document: served inline like the /// rest, but under a sandbox, so a direct visit to the raw URL cannot run @@ -128,7 +128,7 @@ fn hex_value(byte: u8) -> Option { } } -/// `true` for a byte celld escapes when it stores a key. +/// `true` for a byte cello escapes when it stores a key. fn r2_escapable(byte: u8) -> bool { if byte < 0x20 || byte == 0x7F || byte >= 0x80 { return true; @@ -190,7 +190,7 @@ pub fn r2_encode_prefix(prefix: &str) -> String { } /// One stored segment back to its key bytes. A lone `%` is the empty -/// segment celld wrote; a malformed escape (a key another tool wrote) is +/// segment cello wrote; a malformed escape (a key another tool wrote) is /// kept literally rather than failing the whole page. fn r2_decode_segment(segment: &str) -> String { let bytes = segment.as_bytes(); @@ -230,7 +230,7 @@ pub fn r2_decode(stored: &str) -> String { /// A key the browser may write or delete: 1..=1024 bytes, no absolute path /// and no `..` segment, no control character, and never starting with `-`. /// A trailing `/` is legal — it is the folder marker. Keys travel -/// positionally to `celld r2 put` / `celld r2 delete`, and celld 0.6.2 +/// positionally to `cello r2 put` / `cello r2 delete`, and celld 0.6.2 /// honors no `--` separator, so the leading-dash rule closes option /// injection there. pub fn r2_key_ok(key: &str) -> bool { @@ -267,8 +267,8 @@ fn normalize_prefix(prefix: &str) -> String { /// Parse `r2_buckets` from the built wrangler config. Entries need a string /// `binding` and `bucket_name`; both come from the app's own config, but /// both are validated here before anything is listed through or passed to -/// celld — a `bucket_name` starting with `-` would otherwise parse as a -/// celld option. +/// cello — a `bucket_name` starting with `-` would otherwise parse as a +/// cello option. pub fn r2_buckets(value: &serde_json::Value) -> anyhow::Result> { let Some(list) = value.get("r2_buckets") else { return Ok(Vec::new()); @@ -315,7 +315,7 @@ pub(crate) fn validate_binding(binding: &str) -> anyhow::Result<()> { Ok(()) } -/// An R2 bucket name is passed positionally to `celld r2`, so it must never +/// An R2 bucket name is passed positionally to `cello r2`, so it must never /// parse as an option: lowercase letters, digits, dots and hyphens, /// 1–63 characters, never starting with `-`. pub(crate) fn validate_bucket_name(bucket: &str) -> anyhow::Result<()> { @@ -355,7 +355,7 @@ pub fn object_key(slug: &str, bucket: &R2Bucket, key: &str) -> anyhow::Result(buckets: &'a [R2Bucket], name: &str) -> anyhow::Result<&'a R2Bucket> { buckets .iter() @@ -363,10 +363,10 @@ pub fn find_bucket<'a>(buckets: &'a [R2Bucket], name: &str) -> anyhow::Result<&' .ok_or_else(|| anyhow::anyhow!("unknown R2 bucket {name:?}")) } -/// The exact argv for `celld r2 put`, built pure so tests pin it: key and +/// The exact argv for `cello r2 put`, built pure so tests pin it: key and /// bucket travel positionally (both pre-validated, never starting with /// `-`), and `--bucket` carries the fleet bucket URL. -pub fn celld_put_argv( +pub fn cello_put_argv( bucket_url: &str, endpoint: &str, region: &str, @@ -398,8 +398,8 @@ pub fn celld_put_argv( args } -/// The exact argv for `celld r2 delete`, built pure so tests pin it. -pub fn celld_delete_argv( +/// The exact argv for `cello r2 delete`, built pure so tests pin it. +pub fn cello_delete_argv( bucket_url: &str, endpoint: &str, region: &str, @@ -504,7 +504,7 @@ fn raw_response(content_type: Option<&str>, filename: &str, bytes: Vec) -> R /// R2 bindings from the deployed manifest's `raw_metadata.bindings`: entries /// shaped `{"type": "r2_bucket", "name": , "bucket_name": }` -/// (celld's record of the built wrangler config; the `name`/`bucket_name` +/// (cello's record of the built wrangler config; the `name`/`bucket_name` /// fallbacks cover the `binding`/`bucket` spellings). Anything else — /// D1, assets, vars, unknown types — is skipped, never failed: one unknown /// entry must not hide the buckets that parse. In particular `vars` (which @@ -561,7 +561,7 @@ async fn declared_buckets(state: &super::AppState, slug: &str) -> anyhow::Result r2_buckets(&value) } -/// Backend failures (S3/celld) answer 500 with the failure's detail in +/// Backend failures (S3/cello) answer 500 with the failure's detail in /// `message` for the owner to act on, but `user_message` stays the friendly /// constant the caller passes: raw store XML must never reach the UI. fn status_for(msg: &str, user_message: &str) -> Response { @@ -880,7 +880,7 @@ pub(crate) async fn adjust_r2_measured(pool: &sqlx::SqlitePool, app_id: &str, de } } -/// Forget the stored R2 measurement after a delete (celld reports no freed +/// Forget the stored R2 measurement after a delete (cello reports no freed /// bytes): the next upload gate re-sizes live instead of refusing against a /// stale-high number. Best effort. pub(crate) async fn clear_r2_measured(pool: &sqlx::SqlitePool, app_id: &str) { @@ -997,7 +997,7 @@ async fn put_inner( ) -> anyhow::Result { let buckets = declared_buckets(state, slug).await?; let bucket = find_bucket(&buckets, &query.bucket)?; - // Validated before anything is staged or passed to celld. + // Validated before anything is staged or passed to cello. let _full = object_key(slug, bucket, &query.key)?; if let Some(ct) = content_type { if !r2_header_ok(ct) { @@ -1005,7 +1005,7 @@ async fn put_inner( } } let size = bytes.len(); - // Spool to a file: `celld r2 put` reads `--path`, and the body must not + // Spool to a file: `cello r2 put` reads `--path`, and the body must not // sit buffered twice for a 64 MiB upload. let spool = tempfile::NamedTempFile::new()?; tokio::fs::write(spool.path(), bytes).await?; @@ -1013,7 +1013,7 @@ async fn put_inner( let settings = super::deploy_settings(state)?; let storage = &settings.storage; let creds = scoped_creds(state, slug).await?; - let args = celld_put_argv( + let args = cello_put_argv( &storage.bucket_url(slug), &storage.endpoint, &storage.region, @@ -1022,7 +1022,7 @@ async fn put_inner( &spool_path, content_type, ); - run_celld(state, &args, &celld_env(storage, &creds), CELLD_PUT_TIMEOUT).await?; + run_cello(state, &args, &cello_env(storage, &creds), CELLO_PUT_TIMEOUT).await?; Ok(size) } @@ -1038,7 +1038,7 @@ async fn api_delete( }; match delete_inner(&state, &app.slug, &body).await { Ok(count) => { - // The stored measurement no longer reflects reality (celld does + // The stored measurement no longer reflects reality (cello does // not report freed bytes): clear it so the next upload re-sizes // live instead of refusing against a stale-high number. Best // effort, like the put-side adjustment. @@ -1106,14 +1106,14 @@ async fn delete_inner( let settings = super::deploy_settings(state)?; let storage = &settings.storage; let creds = scoped_creds(state, slug).await?; - let args = celld_delete_argv( + let args = cello_delete_argv( &storage.bucket_url(slug), &storage.endpoint, &storage.region, &bucket.bucket, &body.keys, ); - run_celld(state, &args, &celld_env(storage, &creds), CELLD_TIMEOUT).await?; + run_cello(state, &args, &cello_env(storage, &creds), CELLO_TIMEOUT).await?; Ok(body.keys.len()) } @@ -1121,7 +1121,7 @@ async fn delete_inner( mod tests { use super::*; - /// Stored forms captured from celld 0.6.1: `celld r2 put` for each key, + /// Stored forms captured from celld 0.6.1 (the key form is unchanged in Cello 0.1.0): `cello r2 put` for each key, /// then a raw `ListObjectsV2`. The encoder must reproduce them byte for /// byte, and the decoder must bring them back — a browser that lists S3 /// directly depends on both. (Vectors from Noite @ 58a977a.) @@ -1145,7 +1145,7 @@ mod tests { ("star*", "star%2A"), ("tilde~x", "tilde%7Ex"), ("deep/nested/x.txt", "deep/nested/x.txt"), - // Left literal by celld. + // Left literal by cello. ("sp ace.txt", "sp ace.txt"), ("plus+sign", "plus+sign"), ("amp&and", "amp&and"), @@ -1159,7 +1159,7 @@ mod tests { ]; #[test] - fn keys_encode_and_decode_the_way_celld_stores_them() { + fn keys_encode_and_decode_the_way_cello_stores_them() { for (key, stored) in VECTORS { assert_eq!(r2_encode(key), stored, "encode {key}"); assert_eq!(r2_decode(stored), key, "decode {stored}"); @@ -1183,7 +1183,7 @@ mod tests { #[test] fn malformed_escapes_stay_literal() { - // Another tool wrote an object under a key celld cannot name; the page + // Another tool wrote an object under a key cello cannot name; the page // still renders instead of failing. assert_eq!(r2_decode_segment("a%ZZ"), "a%ZZ"); assert_eq!(r2_decode_segment("50%"), "50%"); @@ -1204,7 +1204,7 @@ mod tests { } #[test] fn write_keys_reject_leading_dash_option_injection() { - // Keys travel positionally to `celld r2 put` / `celld r2 delete` + // Keys travel positionally to `cello r2 put` / `cello r2 delete` // (celld 0.6.2 honors no `--` separator): a leading `-` would parse // as an option. Dashes elsewhere are inert and stay legal. assert!(!r2_key_ok("-evil")); @@ -1326,8 +1326,8 @@ mod tests { } #[test] - fn celld_argv_pins_bucket_url_and_positions() { - let put = celld_put_argv( + fn cello_argv_pins_bucket_url_and_positions() { + let put = cello_put_argv( "s3://bucket/fleets/my-app", "https://ep", "auto", @@ -1355,7 +1355,7 @@ mod tests { "auto", ] ); - let delete = celld_delete_argv( + let delete = cello_delete_argv( "s3://bucket/fleets/my-app", "https://ep", "auto", diff --git a/crates/outer/src/http/proxy.rs b/crates/outer/src/http/proxy.rs index 5b178ad..6f9806e 100644 --- a/crates/outer/src/http/proxy.rs +++ b/crates/outer/src/http/proxy.rs @@ -1440,7 +1440,7 @@ pub async fn handle(state: ProxyState, mut req: Request) -> Response { // the fleet, leaking app content and waking the fleet for anonymous // requests. Internal health checks go direct to loopback, like the // platform `/health` route (`ok`). - if req.uri().path() == "/.well-known/celld/health" { + if req.uri().path() == "/.well-known/cello/health" { return Response::builder() .status(StatusCode::OK) .header("cache-control", "no-store") @@ -1540,10 +1540,10 @@ pub async fn handle(state: ProxyState, mut req: Request) -> Response { .path_and_query() .map(|pq| pq.as_str()) .unwrap_or("/"); - // Outer's own traffic is never app usage: the celld health gate the + // Outer's own traffic is never app usage: the cello health gate the // wake path probes directly is excluded even when it arrives here. let raw_path = parts.uri.path(); - let metered = raw_path != "/.well-known/celld/health"; + let metered = raw_path != "/.well-known/cello/health"; // Recorded iff forwarded: only requests that reach the fleet's port // (or fail connecting to it) count. Outer's synthetic answers above // return before this closure can run. @@ -1728,15 +1728,15 @@ mod tests { hits: Arc, } - /// Tiny axum app as the fake fleet: healthy at the celld gate (so the - /// manager's pre-start probe passes and no celld spawns), echoing the + /// Tiny axum app as the fake fleet: healthy at the cello gate (so the + /// manager's pre-start probe passes and no cello spawns), echoing the /// request as JSON everywhere else. async fn start_fake_fleet() -> FakeFleet { let hits = Arc::new(AtomicUsize::new(0)); let echoed = hits.clone(); let app = Router::new() .route( - "/.well-known/celld/health", + "/.well-known/cello/health", axum::routing::get(|| async { "ok" }), ) .route( @@ -2019,7 +2019,7 @@ mod tests { fn manager(data: &std::path::Path) -> FleetManager { FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: data.to_path_buf(), - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "https://example.com".to_string(), region: "auto".to_string(), @@ -2754,7 +2754,7 @@ mod tests { let before = fleet.hits.load(Ordering::SeqCst); let req = visitor( Request::builder() - .uri("/.well-known/celld/health") + .uri("/.well-known/cello/health") .header("host", host) .body(Body::empty()) .unwrap(), @@ -2780,7 +2780,7 @@ mod tests { lock_app(&fix.pool, "app-dead", "pin", "1234").await; let req = visitor( Request::builder() - .uri("/.well-known/celld/health") + .uri("/.well-known/cello/health") .header("host", "dead.outer.test") .body(Body::empty()) .unwrap(), @@ -3367,7 +3367,7 @@ mod tests { fix.pool.clone(), FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: fix._dir.path().to_path_buf(), - celld_bin: "/nonexistent/celld".to_string(), + cello_bin: "/nonexistent/cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "https://example.com".to_string(), region: "auto".to_string(), @@ -3628,9 +3628,9 @@ mod tests { let (status, _) = get(&state, "metered.outer.test", "/items/42").await; assert_eq!(status, StatusCode::OK); } - // Excluded from metrics: the celld health gate, the unlisted + // Excluded from metrics: the cello health gate, the unlisted // robots override Outer serves itself, and unknown hosts. - let (status, _) = get(&state, "metered.outer.test", "/.well-known/celld/health").await; + let (status, _) = get(&state, "metered.outer.test", "/.well-known/cello/health").await; assert_eq!(status, StatusCode::OK); let (status, _) = get(&state, "quiet2.outer.test", "/robots.txt").await; assert_eq!(status, StatusCode::OK); diff --git a/crates/outer/src/inactivity.rs b/crates/outer/src/inactivity.rs index f082a57..ba16e88 100644 --- a/crates/outer/src/inactivity.rs +++ b/crates/outer/src/inactivity.rs @@ -541,7 +541,7 @@ mod tests { fleets: crate::fleet::manager::FleetManager::new( crate::fleet::manager::ManagerSettings { data_dir: data_dir.clone(), - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "us-east-1".to_string(), diff --git a/crates/outer/src/limits.rs b/crates/outer/src/limits.rs index 6ab1426..6c9fa4b 100644 --- a/crates/outer/src/limits.rs +++ b/crates/outer/src/limits.rs @@ -473,7 +473,7 @@ pub async fn check_requests_caps( /// apps back under. The owner email fires only on the freeze transition. /// /// What counts: D1 is the newest dump per binding (`d1_bytes_used`); R2 is -/// the bytes under `fleets/{slug}/r2/`. App code writes through celld with +/// the bytes under `fleets/{slug}/r2/`. App code writes through cello with /// scoped credentials, so Outer cannot refuse an in-runtime write at the /// call — the sweep flips the flag within the hour and the Console, commit /// and upload paths refuse while it is set. The Console R2 upload path diff --git a/crates/outer/src/main.rs b/crates/outer/src/main.rs index 23be9ee..7d8b8f8 100644 --- a/crates/outer/src/main.rs +++ b/crates/outer/src/main.rs @@ -217,7 +217,7 @@ fn build_store(config: &Config) -> anyhow::Result { } } -/// What fleets and `celld deploy` use to reach the bucket. celld only speaks +/// What fleets and `cello deploy` use to reach the bucket. cello only speaks /// S3, so apps can't run on the memory store. /// /// With the Cloudflare pair set, fleets and deploys mint scoped R2 temporary @@ -226,7 +226,7 @@ fn build_store(config: &Config) -> anyhow::Result { fn fleet_storage(config: &Config) -> anyhow::Result { let StoreKind::R2(r2) = &config.store else { anyhow::bail!( - "apps need an S3-compatible bucket (celld has no in-memory store); set OUTER_STORE=r2" + "apps need an S3-compatible bucket (cello has no in-memory store); set OUTER_STORE=r2" ); }; let credentials = match &config.cloudflare { @@ -345,7 +345,7 @@ async fn platform(config: &Config) -> anyhow::Result { let deployer = Deployer::new( DeploySettings { data_dir: config.data_dir.clone(), - celld_bin: rt.celld_bin.clone(), + cello_bin: rt.cello_bin.clone(), esbuild_bin: rt.esbuild_bin.clone(), bun_bin: rt.bun_bin.clone(), storage, @@ -859,7 +859,7 @@ async fn serve(config: Config) -> anyhow::Result<()> { let secrets_key = outer::secrets::SecretsKey::derive(&config.outer_secret); let fleets = FleetManager::new(ManagerSettings { data_dir: config.data_dir.clone(), - celld_bin: rt.celld_bin.clone(), + cello_bin: rt.cello_bin.clone(), storage: storage.clone(), cgroups: cgroups(), memory_max_bytes: rt.fleet_memory_mb * 1024 * 1024, @@ -891,7 +891,7 @@ async fn serve(config: Config) -> anyhow::Result<()> { let deployer = outer::deploy::Deployer::new( outer::deploy::DeploySettings { data_dir: config.data_dir.clone(), - celld_bin: rt.celld_bin.clone(), + cello_bin: rt.cello_bin.clone(), esbuild_bin: rt.esbuild_bin.clone(), bun_bin: rt.bun_bin.clone(), storage, @@ -901,7 +901,7 @@ async fn serve(config: Config) -> anyhow::Result<()> { cache_purge: cache_purge(&config), jev: jev.clone(), // The migrate step wakes a sleeping fleet before applying D1 - // migrations (`celld d1` reaches the database through a node). + // migrations (`cello d1` reaches the database through a node). wake: Some(fleets.clone()), secrets_key: secrets_key.clone(), }, diff --git a/crates/outer/src/mcp/docs.rs b/crates/outer/src/mcp/docs.rs index 9899b8a..86086e3 100644 --- a/crates/outer/src/mcp/docs.rs +++ b/crates/outer/src/mcp/docs.rs @@ -28,8 +28,8 @@ pub const TOPICS: &[(&str, &str)] = &[ include_str!("../../../../web/docs/agents/frontend/website.md"), ), ( - "celld", - include_str!("../../../../web/docs/agents/platform/celld.md"), + "cello", + include_str!("../../../../web/docs/agents/platform/cello.md"), ), ( "d1", diff --git a/crates/outer/src/mcp/mod.rs b/crates/outer/src/mcp/mod.rs index 861d7a7..e9e4b08 100644 --- a/crates/outer/src/mcp/mod.rs +++ b/crates/outer/src/mcp/mod.rs @@ -51,7 +51,7 @@ pub const MAX_BODY_BYTES: usize = 32 * 1024 * 1024; /// How the MCP layer runs deploys. Production wraps the real pipeline; /// tests substitute a fake that writes terminal deploy rows without -/// touching celld or the network. +/// touching cello or the network. #[derive(Clone)] pub struct Deploys { inner: Arc, @@ -164,7 +164,7 @@ impl Deploys { } /// The live pipeline's settings, for the console data panels (scoped - /// storage reads, celld calls, work-dir config reads). `None` for the + /// storage reads, cello calls, work-dir config reads). `None` for the /// test fake, which has no pipeline — those endpoints answer /// "unavailable" there. pub(crate) fn deploy_settings(&self) -> Option<&crate::deploy::pipeline::DeploySettings> { @@ -658,7 +658,7 @@ impl McpState { std::mem::forget(dir); let fleets = FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: data_dir.clone(), - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "us-east-1".to_string(), diff --git a/crates/outer/src/mcp/registry.rs b/crates/outer/src/mcp/registry.rs index 58c2219..bd4ef27 100644 --- a/crates/outer/src/mcp/registry.rs +++ b/crates/outer/src/mcp/registry.rs @@ -242,7 +242,7 @@ pub fn registry() -> Vec { ), tool::( "docs", -"Read an Outer agent guide: quickstart, templates, ilha, void, website, celld, d1, storage, backups, kv, auth, cron, queues, websockets, sse, email, sandboxes, limits, moderation, custom-domains, export, previews or look. Read the ilha guide before writing any code.", +"Read an Outer agent guide: quickstart, templates, ilha, void, website, cello, d1, storage, backups, kv, auth, cron, queues, websockets, sse, email, sandboxes, limits, moderation, custom-domains, export, previews or look. Read the ilha guide before writing any code.", Public, false, ), tool::( diff --git a/crates/outer/src/mcp/tests.rs b/crates/outer/src/mcp/tests.rs index 887c312..ced1476 100644 --- a/crates/outer/src/mcp/tests.rs +++ b/crates/outer/src/mcp/tests.rs @@ -1,6 +1,6 @@ //! End-to-end MCP tests: JSON-RPC envelope, lazy auth, every tool group. //! Deterministic: memory store, temp dirs, fake deploys, captured email -//! codes — no celld, no network. +//! codes — no cello, no network. use std::collections::HashMap; use std::path::PathBuf; @@ -7011,16 +7011,16 @@ async fn tools_show_deletes_at_on_free_and_hide_it_on_pro() { // --- app_metrics / db_query (M3 data tools) -------------------------------- // // app_metrics reads the same metric_minute/path_hour/visitor_day rows as the -// Console metrics tab; db_query runs through the same celld path as the -// Console D1 panel. The fake celld below answers `d1 execute` with canned +// Console metrics tab; db_query runs through the same cello path as the +// Console D1 panel. The fake cello below answers `d1 execute` with canned // JSON per `--command` marker, and a stub health server makes `ensure_awake` // count the fleet awake so no real fleet ever spawns. -/// A fake `celld` for db_query tests: answers `d1 execute` with canned JSON +/// A fake `cello` for db_query tests: answers `d1 execute` with canned JSON /// rows, recording argv under the state dir derived from /// `--bucket s3:///fleets/`. -fn install_fake_query_celld(state: &std::path::Path) -> PathBuf { - let script = state.join("fake-celld"); +fn install_fake_query_cello(state: &std::path::Path) -> PathBuf { + let script = state.join("fake-cello"); let tmp = script.with_extension("tmp"); std::fs::write( &tmp, @@ -7075,7 +7075,7 @@ exit 0 script } -/// The live manifest celld published for the app: D1 bindings only, in the +/// The live manifest cello published for the app: D1 bindings only, in the /// layout `deployed_manifest` reads. async fn seed_query_manifest(store: &Store, slug: &str, bindings: &[(&str, &str)]) { let prefix = "deploy/outer-app/abcd1234"; @@ -7113,7 +7113,7 @@ async fn seed_query_manifest(store: &Store, slug: &str, bindings: &[(&str, &str) } /// A stub fleet health gate: answers 200 on every connection so -/// `ensure_awake`'s pre-spawn probe counts the fleet awake and no `celld` +/// `ensure_awake`'s pre-spawn probe counts the fleet awake and no `cello` /// spawn ever runs. Loopback-only; the task dies with the test. async fn stub_query_health() -> (u16, tokio::task::JoinHandle<()>) { let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); @@ -7139,7 +7139,7 @@ async fn stub_query_health() -> (u16, tokio::task::JoinHandle<()>) { } /// db_query test app: real app row plus seeded manifest, the fleet pointed -/// at the fake celld and the stub health server. Guards keep the temp dirs +/// at the fake cello and the stub health server. Guards keep the temp dirs /// and the stub alive; `McpState` only holds path copies. struct QueryApp { state: McpState, @@ -7163,7 +7163,7 @@ async fn query_setup(slug: &str, bindings: &[(&str, &str)]) -> QueryApp { .await .unwrap(); let statedir = tempfile::tempdir().unwrap(); - let script = install_fake_query_celld(statedir.path()); + let script = install_fake_query_cello(statedir.path()); let mut storage = state.fleets.storage().clone(); storage.bucket = statedir.path().to_string_lossy().into_owned(); let data_dir = tempfile::tempdir().unwrap(); @@ -7171,7 +7171,7 @@ async fn query_setup(slug: &str, bindings: &[(&str, &str)]) -> QueryApp { std::mem::forget(data_dir); state.fleets = FleetManager::new(ManagerSettings { data_dir: data_path, - celld_bin: script.to_string_lossy().into_owned(), + cello_bin: script.to_string_lossy().into_owned(), storage, cgroups: None, memory_max_bytes: 512 * 1024 * 1024, @@ -7348,7 +7348,7 @@ async fn db_query_reads_rows_through_the_console_path() { assert_eq!(sc["truncated"], false); assert_eq!(sc["rows"][0]["name"], "ada"); assert_eq!(sc["columns"].as_array().unwrap().len(), 2); - // One `celld d1 execute` with the scoped bucket, JSON output, and the + // One `cello d1 execute` with the scoped bucket, JSON output, and the // app's database identity. let calls = query_calls(&q); assert!(calls.contains("d1 execute app-db"), "{calls}"); @@ -7412,7 +7412,7 @@ async fn db_query_caps_rows_values_and_bytes() { } #[tokio::test] -async fn db_query_refuses_writes_before_touching_celld() { +async fn db_query_refuses_writes_before_touching_cello() { let q = query_setup("groceries", &[("DB", "app-db")]).await; for sql in [ "DELETE FROM users", @@ -7438,7 +7438,7 @@ async fn db_query_refuses_writes_before_touching_celld() { assert!(message.contains("migrations"), "{sql}: {message}"); assert!(message.contains("restore_backup"), "{sql}: {message}"); } - // No refused shape ever reached celld. + // No refused shape ever reached cello. assert!(!q.statedir.path().join("calls.log").exists()); // An engine refusal (missing table) is still the caller's bug. let (_, out) = call( @@ -7539,7 +7539,7 @@ async fn db_query_resolves_the_default_binding() { ) .await; assert!(result(&out).get("isError").is_none(), "{out}"); - // An unknown binding names the problem before any celld call. + // An unknown binding names the problem before any cello call. let (_, out) = call( &q.state, Some(&q.token), @@ -7567,7 +7567,7 @@ async fn db_query_resolves_the_default_binding() { assert_eq!(err["error"], "invalid_argument"); assert!(err["message"].as_str().unwrap().contains("binding")); - // An app with no deployed D1 binding fails before any celld call. + // An app with no deployed D1 binding fails before any cello call. create_app(&q2.state, &q2.token, "plain").await; let (_, out) = call( &q2.state, diff --git a/crates/outer/src/mcp/tools/account.rs b/crates/outer/src/mcp/tools/account.rs index 4d154d4..99af55a 100644 --- a/crates/outer/src/mcp/tools/account.rs +++ b/crates/outer/src/mcp/tools/account.rs @@ -14,7 +14,7 @@ use crate::mcp::docs; use crate::mcp::error::ToolError; #[derive(Debug, Deserialize, JsonSchema)] pub struct DocsInput { - /// Which agent guide to read: quickstart, templates, ilha, void, website, celld, d1, storage, backups, kv, auth, cron, queues, websockets, sse, email, sandboxes, limits, moderation, custom-domains, export, previews or look. + /// Which agent guide to read: quickstart, templates, ilha, void, website, cello, d1, storage, backups, kv, auth, cron, queues, websockets, sse, email, sandboxes, limits, moderation, custom-domains, export, previews or look. pub topic: String, } diff --git a/crates/outer/src/mcp/tools/backups.rs b/crates/outer/src/mcp/tools/backups.rs index c26b735..7c6691a 100644 --- a/crates/outer/src/mcp/tools/backups.rs +++ b/crates/outer/src/mcp/tools/backups.rs @@ -67,8 +67,8 @@ fn tool_error(err: D1Error) -> ToolError { D1Error::AppStarting => { ToolError::internal("the app is still starting; retry in a few seconds") } - D1Error::Celld(detail) => ToolError::internal(format!("celld d1 failed: {detail}")), - D1Error::Timeout => ToolError::internal("celld d1 timed out"), + D1Error::Cello(detail) => ToolError::internal(format!("cello d1 failed: {detail}")), + D1Error::Timeout => ToolError::internal("cello d1 timed out"), D1Error::TooLarge(detail) => ToolError::internal(format!("backup too large: {detail}")), D1Error::Unavailable(_) => { ToolError::internal("couldn't reach the database right now; try again in a minute") @@ -78,7 +78,7 @@ fn tool_error(err: D1Error) -> ToolError { fn backup_ctx(ctx: &Ctx<'_>) -> D1Ctx { D1Ctx { - celld_bin: ctx.state.fleets.celld_bin(), + cello_bin: ctx.state.fleets.cello_bin(), storage: ctx.state.fleets.storage().clone(), pool: ctx.state.pool.clone(), store: ctx.state.store.clone(), diff --git a/crates/outer/src/mcp/tools/data.rs b/crates/outer/src/mcp/tools/data.rs index 1e271d6..874955b 100644 --- a/crates/outer/src/mcp/tools/data.rs +++ b/crates/outer/src/mcp/tools/data.rs @@ -1,9 +1,9 @@ //! The data tools: `app_metrics` (traffic, errors and latency from the //! same `metric_minute`/`path_hour`/`visitor_day` rows the Console metrics //! tab reads) and `db_query` (read-only SQL over the app's live D1 through -//! the same celld path as the Console D1 panel). +//! the same cello path as the Console D1 panel). //! -//! `db_query` reads go through the celld path, never the migration path, so +//! `db_query` reads go through the cello path, never the migration path, so //! the storage-freeze rules don't apply to them: reads stay allowed while //! the app is frozen, exactly like the Console grid. Writes stay with //! migrations and `restore_backup`; the read-only refusal says so. @@ -122,7 +122,7 @@ const MAX_QUERY_ROWS: usize = 200; /// Longest string value kept per cell (characters); longer values are cut. const MAX_VALUE_CHARS: usize = 5000; /// The rows JSON stays under this many bytes; trailing rows drop first. -/// (`celld d1 execute` kills the child past +/// (`cello d1 execute` kills the child past /// [`crate::http::console_data::d1::D1_TIMEOUT`], so a runaway query always /// answers in time.) const MAX_RESULT_BYTES: usize = 250_000; @@ -470,9 +470,9 @@ fn map_d1(err: crate::http::console_data::d1::D1Error) -> ToolError { ToolError::invalid_argument(format!("unknown database {binding:?}")) } // The child ran and refused the statement — a missing table, a bad - // column — so the query, not the platform, is at fault. celld + // column — so the query, not the platform, is at fault. cello // prints engine errors, bounded to a few lines. - D1Error::Celld(detail) => { + D1Error::Cello(detail) => { ToolError::invalid_argument(format!("the database refused the query: {detail}")) } D1Error::AppStarting => { @@ -500,14 +500,14 @@ pub async fn db_query(input: DbQueryInput, ctx: &Ctx<'_>) -> Result) -> Result (Option<&'static str>, &str) { @@ -99,18 +99,18 @@ fn split_log_prefix(line: &str) -> (Option<&'static str>, &str) { rest = rest[end..].trim_start(); } } - // Level plus optional target: `ERROR `, `INFO celld::x: `. + // Level plus optional target: `ERROR `, `INFO cello::x: `. for level in ["TRACE", "DEBUG", "INFO", "WARN", "ERROR"] { if let Some(after) = rest.strip_prefix(level) { if after.starts_with(char::is_whitespace) { rest = after.trim_start(); - // The target ends at the first `: ` (`celld::console: ...`, + // The target ends at the first `: ` (`cello::console: ...`, // not the first `:`): a target never holds whitespace. if let Some(idx) = rest.find(": ") { let (target, msg) = rest.split_at(idx); if !target.contains(char::is_whitespace) { rest = msg[2..].trim_start(); - // celld logs a Worker's `console.*` at tracing INFO + // cello logs a Worker's `console.*` at tracing INFO // under `cell_console`, with the console method's // level as the message's first word: // `INFO cell_console: ERROR SyntaxError: ...`. That @@ -134,7 +134,7 @@ fn split_log_prefix(line: &str) -> (Option<&'static str>, &str) { } /// Strip a leading `2026-10-24T09:41:44.123Z`-style timestamp plus the -/// tracing level/target prefix (`ERROR celld::console: `), so fingerprints +/// tracing level/target prefix (`ERROR cello::console: `), so fingerprints /// don't move with the clock. Returns the rest of the line unchanged when /// no such prefix is present. fn strip_log_prefix(line: &str) -> &str { @@ -1240,13 +1240,13 @@ mod tests { assert_eq!(seen, ring, "no line falls behind the cursor"); } - /// Captured from a real fleet on the VPS (celld 0.6.2): a Worker's + /// (captured from a real fleet on the VPS under celld 0.6.2; the prefix shape is unchanged in Cello 0.1.0): a Worker's /// uncaught `JSON.parse` failure arrives as tracing INFO under /// `cell_console`, the console level as the first word, then V8 frames. #[test] - fn real_celld_console_error_groups_into_one_event() { + fn real_cello_console_error_groups_into_one_event() { let lines = [ - "2026-10-24T11:01:41.495156Z WARN celld: HTTP connections failed event=\"http_connection_failures\" total=1", + "2026-10-24T11:01:41.495156Z WARN cello: HTTP connections failed event=\"http_connection_failures\" total=1", "2026-10-24T11:01:42.855685Z INFO cell_console: ERROR SyntaxError: Unexpected token 'o', \"not json {\" is not valid JSON", " at JSON.parse ()", " at worker.js:11034:57", @@ -1292,7 +1292,7 @@ mod tests { "2026-10-24T09:41:44.123Z ERROR cell_console: console.error nope" )); assert!(is_error_start( - "2026-10-24T09:41:44.123Z ERROR celld::console: boom" + "2026-10-24T09:41:44.123Z ERROR cello::console: boom" )); assert!(is_error_start("error: script error")); assert!(is_error_start("Traceback (most recent call last):")); @@ -1305,16 +1305,16 @@ mod tests { // An ERROR token in the message body is not error-ness: only the // tracing level field (or an explicit marker) decides. assert!(!is_error_start( - "2026-10-24T09:41:44.123Z INFO celld::console: my ERROR handling broke nothing" + "2026-10-24T09:41:44.123Z INFO cello::console: my ERROR handling broke nothing" )); assert!(!is_error_start( - "INFO celld::console: visitor said ERROR loudly" + "INFO cello::console: visitor said ERROR loudly" )); - assert!(!is_error_start("WARN celld::console: error counts are up")); + assert!(!is_error_start("WARN cello::console: error counts are up")); // Explicit markers still fire under a non-error level. - assert!(is_error_start("INFO celld::console: console.error boom")); + assert!(is_error_start("INFO cello::console: console.error boom")); assert!(is_error_start( - "2026-10-24T09:41:44.123Z INFO celld::console: TypeError: bad shape" + "2026-10-24T09:41:44.123Z INFO cello::console: TypeError: bad shape" )); } @@ -1389,7 +1389,7 @@ mod tests { fn log_prefix_does_not_move_the_fingerprint() { let a = fingerprint("Error: boom", None); let b = fingerprint( - "2026-10-24T09:41:44.123Z ERROR celld::console: Error: boom", + "2026-10-24T09:41:44.123Z ERROR cello::console: Error: boom", None, ); assert_eq!(a, b); @@ -1576,7 +1576,7 @@ mod tests { let dir2 = tempfile::tempdir().unwrap(); let fleets = FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: dir2.path().to_path_buf(), - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "us-east-1".to_string(), @@ -1781,7 +1781,7 @@ mod tests { std::mem::forget(dir); crate::fleet::manager::FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: std::path::PathBuf::from("/nonexistent-test-dir"), - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "us-east-1".to_string(), diff --git a/crates/outer/src/observe/metrics.rs b/crates/outer/src/observe/metrics.rs index f438fb7..1041edd 100644 --- a/crates/outer/src/observe/metrics.rs +++ b/crates/outer/src/observe/metrics.rs @@ -52,7 +52,7 @@ //! - **Recorded iff forwarded:** only requests that reach the fleet's port //! (an upstream response, or the 502 when the connect fails). Outer's own //! synthetic answers — unknown-host 404s, 431s, wake-failure 503s, the -//! unlisted `robots.txt` override — and the celld health gate path are +//! unlisted `robots.txt` override — and the cello health gate path are //! never counted. //! - **Retention:** [`prune`] deletes `metric_minute`, `path_hour` and //! `visitor_day` rows older than 24 h for Free apps and 30 d for Pro, diff --git a/crates/outer/src/observe/sourcemaps.rs b/crates/outer/src/observe/sourcemaps.rs index 145e127..1f13eb6 100644 --- a/crates/outer/src/observe/sourcemaps.rs +++ b/crates/outer/src/observe/sourcemaps.rs @@ -1,9 +1,9 @@ //! Per-deploy Worker source maps for error symbolication. //! -//! The deploy passes `--sourcemap ` to `celld deploy` (the fork writes +//! The deploy passes `--sourcemap ` to `cello deploy` (the fork writes //! the bundled Worker's external map, or the `no_bundle` entry's sibling //! map, with project-root-relative sources; the deployed bytes are identical -//! with or without it). What celld wrote lands under +//! with or without it). What cello wrote lands under //! `maps///worker.js.map` next to a `manifest.json`, so app //! delete/rename carry the maps with no extra path, and retention follows //! the deploy rows: after a successful deploy, sha dirs outside the recent @@ -37,15 +37,16 @@ const MANIFEST_FILE: &str = "manifest.json"; pub const WORKER_MAP_FILE: &str = "worker.js.map"; /// One map file is telemetry-scale, not bundle-scale: refuse anything bigger /// (a corrupt or hostile map must not blow the read path's memory). Matches -/// the fork's own 64 MiB ceiling from below: celld never writes more. +/// the fork's own 64 MiB ceiling from below: cello never writes more. pub const MAX_MAP_BYTES: u64 = 8 * 1024 * 1024; /// Deploy sha dirs kept per app besides the just-finished one. Occurrences /// older than this still render — with their raw, unsymbolicated stacks. pub const KEEP_DEPLOY_SHAS: usize = 10; /// The Worker bundle's report names: upstream celld serves the entry as -/// `worker.js`, the fork as its `index.js` module name — workerd prints the -/// entry bare in both cases, never an app path. Only these two names map: +/// `worker.js`, the Cello fork as its `index.js` module name — workerd +/// prints the entry bare in both cases, never an app path. Only these two +/// names map: /// the token lookup is purely positional (greatest-lower-bound), so any /// other bare frame (`node:events:1:1`, a stray `events:1:1`) would map to /// an unrelated app position instead of missing. Unknown names render raw. @@ -125,8 +126,8 @@ pub fn sha_for_ts(shas: &[(String, i64)], ts_secs: i64) -> Option<&str> { /// What the deploy's temp map path held when the upload finished. #[derive(Debug, Clone, PartialEq, Eq)] pub enum MapRead { - /// Nothing there: celld had nothing to map (asset-only or Python - /// projects, and entries without a sibling map — celld warns and writes + /// Nothing there: cello had nothing to map (asset-only or Python + /// projects, and entries without a sibling map — cello warns and writes /// nothing), or the file vanished. Not an error: there is simply no map. Absent, /// A map, but over [`MAX_MAP_BYTES`]: refused before parsing, so a @@ -137,7 +138,7 @@ pub enum MapRead { } /// Read one temp map the deploy step passed `--sourcemap`: the worktree -/// belongs to the app uid, which can replace the path while celld runs, so +/// belongs to the app uid, which can replace the path while cello runs, so /// the open refuses symlinks (`O_NOFOLLOW`), refuses non-regular files /// (FIFOs would block the deploy; directories, sockets and devices are not /// maps), and reads at most [`MAX_MAP_BYTES`] + 1 (over-cap surfaces as @@ -200,7 +201,7 @@ pub async fn store_worker_map( ) -> String { let bytes = match read { MapRead::Absent => { - return "sourcemaps: no worker map (celld had nothing to map)".to_string(); + return "sourcemaps: no worker map (cello had nothing to map)".to_string(); } MapRead::OverCap => { return "sourcemaps: skipped storing the worker map (over the size cap)".to_string(); @@ -571,7 +572,7 @@ mod tests { async fn store_refuses_bad_inputs_without_failing() { let data = tempfile::tempdir().unwrap(); let keep: Vec<(String, i64)> = vec![]; - // No bytes: celld had nothing to map (asset-only, Python, missing + // No bytes: cello had nothing to map (asset-only, Python, missing // sibling) — storing nothing is the answer, not an error. let note = store_worker_map(data.path(), "s", &"aa".repeat(32), MapRead::Absent, &keep).await; diff --git a/crates/outer/src/ops.rs b/crates/outer/src/ops.rs index 3340731..262cd79 100644 --- a/crates/outer/src/ops.rs +++ b/crates/outer/src/ops.rs @@ -217,9 +217,9 @@ mod tests { ) .await; - // A fake celld that answers the upload; no other step runs celld. + // A fake cello that answers the upload; no other step runs cello. let state = tempfile::tempdir().unwrap(); - let script = state.path().join("fake-celld"); + let script = state.path().join("fake-cello"); let tmp = script.with_extension("tmp"); std::fs::write( &tmp, @@ -236,7 +236,7 @@ mod tests { let data = tempfile::tempdir().unwrap(); let settings = DeploySettings { data_dir: data.path().to_path_buf(), - celld_bin: script.to_string_lossy().into_owned(), + cello_bin: script.to_string_lossy().into_owned(), esbuild_bin: None, bun_bin: "/bin/true".to_string(), storage: FleetStorage { diff --git a/crates/outer/src/preview.rs b/crates/outer/src/preview.rs index 6d1d83d..1dbde6f 100644 --- a/crates/outer/src/preview.rs +++ b/crates/outer/src/preview.rs @@ -196,7 +196,7 @@ pub async fn expired_previews( /// Preview D1 migrations check their edited-after-apply pins against the /// live pins, but are never recorded (see `Deployer::migrate`'s `record` /// flag): the preview database is disposable (fresh prefix per preview -/// lineage), celld's own `d1_migrations` journal in the preview database +/// lineage), cello's own `d1_migrations` journal in the preview database /// makes repeat applies idempotent, and the live gate still refuses an /// edited migration on the next live deploy. /// @@ -462,7 +462,7 @@ mod tests { let fleets = crate::fleet::manager::FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: dir.path().join("data"), - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "test".to_string(), @@ -551,7 +551,7 @@ mod tests { let fleets = crate::fleet::manager::FleetManager::new(crate::fleet::manager::ManagerSettings { data_dir: dir.path().join("data"), - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), storage: crate::fleet::manager::FleetStorage { endpoint: "http://127.0.0.1:1".to_string(), region: "test".to_string(), From 3762fa61a2b9eb44553d4d3470bb3bf5cf71154b Mon Sep 17 00:00:00 2001 From: Ryuz Date: Thu, 19 Nov 2026 08:26:08 +0100 Subject: [PATCH 5/7] =?UTF-8?q?Cello:=20no=20aliases=20=E2=80=94=20refuse?= =?UTF-8?q?=20OUTER=5FCELLD=5FBIN=20like=20CELLD=5F*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/outer/src/config.rs | 60 ++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/crates/outer/src/config.rs b/crates/outer/src/config.rs index 1e6068a..6dea47f 100644 --- a/crates/outer/src/config.rs +++ b/crates/outer/src/config.rs @@ -427,8 +427,9 @@ impl Config { pub fn from_vars(vars: &BTreeMap) -> Result> { let get = |name: &str| vars.get(name).map(|v| v.trim()).filter(|v| !v.is_empty()); let mut problems = Vec::new(); - // Cello 0.1.0 renamed every `CELLD_*` variable to `CELLO_*` and - // refuses to start with any `CELLD_*` set — and Outer no longer + // Cello 0.1.0 renamed every `CELLD_*` variable to `CELLO_*` (and + // `OUTER_CELLD_BIN` to `OUTER_CELLO_BIN`), with no aliases: cello + // refuses to start with any `CELLD_*` set, and Outer no longer // emits any. A carried-over setting is dead config at best, so fail // here, in both `serve` and `check-config` (the release preflight // runs the latter against prod's env file): the release aborts @@ -436,13 +437,20 @@ impl Config { { let mut renamed: Vec<(&String, String)> = vars .keys() - .filter(|name| name.starts_with("CELLD_")) - .map(|name| (name, format!("CELLO_{}", &name["CELLD_".len()..]))) + .filter_map(|name| { + if let Some(suffix) = name.strip_prefix("CELLD_") { + Some((name, format!("CELLO_{suffix}"))) + } else if name == "OUTER_CELLD_BIN" { + Some((name, "OUTER_CELLO_BIN".to_string())) + } else { + None + } + }) .collect(); renamed.sort(); for (old, new) in renamed { problems.push(format!( - "{old} was renamed to {new}: set {new} instead of {old} (Cello 0.1.0 refuses to start with any CELLD_* variable set)" + "{old} was renamed to {new}: set {new} instead of {old} (stale pre-Cello names fail closed)" )); } } @@ -648,16 +656,7 @@ impl Config { &mut problems, ), cello_bin: resolve_bin( - get("OUTER_CELLO_BIN") - .or_else(|| { - // Deprecated pre-Cello name: honored so a carried-over - // production env keeps booting. The bare old default - // means "whatever the image carries", so it follows - // the rename; an explicit path keeps working. - let old = get("OUTER_CELLD_BIN")?; - (old != "celld").then_some(old) - }) - .unwrap_or("cello"), + get("OUTER_CELLO_BIN").unwrap_or("cello"), vars.get("PATH").map(String::as_str).unwrap_or(""), ), bun_bin: resolve_bin( @@ -1668,8 +1667,21 @@ mod tests { } #[test] - fn cello_bin_defaults_and_honors_the_deprecated_name() { - // Fresh env: the new name and the new default. + fn stale_outer_celld_bin_refuses_with_the_cello_spelling() { + let err = Config::from_vars(&vars(&[ + ("OUTER_STORE", "memory"), + ("OUTER_CELLD_BIN", "celld"), + ])) + .unwrap_err(); + assert!( + err.iter() + .any(|p| p.contains("OUTER_CELLD_BIN was renamed to OUTER_CELLO_BIN")), + "missing bin rename: {err:?}" + ); + } + + #[test] + fn cello_bin_defaults_to_cello() { let cfg = Config::from_vars(&vars(&[("OUTER_STORE", "memory")])).unwrap(); assert_eq!(cfg.runtime.cello_bin, "cello"); let cfg = Config::from_vars(&vars(&[ @@ -1678,20 +1690,6 @@ mod tests { ])) .unwrap(); assert_eq!(cfg.runtime.cello_bin, "/opt/cello"); - // Carried-over production env keeps booting: an explicit old path - // is honored, while the bare old default follows the rename. - let cfg = Config::from_vars(&vars(&[ - ("OUTER_STORE", "memory"), - ("OUTER_CELLD_BIN", "/opt/celld"), - ])) - .unwrap(); - assert_eq!(cfg.runtime.cello_bin, "/opt/celld"); - let cfg = Config::from_vars(&vars(&[ - ("OUTER_STORE", "memory"), - ("OUTER_CELLD_BIN", "celld"), - ])) - .unwrap(); - assert_eq!(cfg.runtime.cello_bin, "cello"); } #[test] From dbc0f8e07f6918eadb45e77cece87d20b3833149 Mon Sep 17 00:00:00 2001 From: Ryuz Date: Thu, 19 Nov 2026 08:01:20 +0100 Subject: [PATCH 6/7] Migrate docs, console copy, hostile fixtures to Cello - celld.md -> cello.md; retarget /guides/celld, add /agents/platform/celld redirect - docs prose, console islands, hostile fixtures/scripts/test: celld -> cello --- AGENTS.md | 6 +++--- crates/outer/tests/hostile.rs | 16 ++++++++-------- e2e/hostile/manifest.json | 2 +- e2e/hostile/package.json | 2 +- e2e/hostile/r2-probe.mjs | 6 +++--- e2e/hostile/worker.js | 6 +++--- scripts/hostile-probe-vps.sh | 2 +- scripts/hostile-suite.sh | 2 +- web/blume.config.ts | 4 ++-- web/docs/STYLE.md | 2 +- web/docs/agents/backend/database.md | 4 ++-- web/docs/agents/backend/files.md | 6 +++--- web/docs/agents/backend/kv.md | 2 +- web/docs/agents/backend/sandboxes.md | 2 +- web/docs/agents/deploy/pipeline.md | 4 ++-- web/docs/agents/frontend/website.md | 2 +- web/docs/agents/platform/{celld.md => cello.md} | 4 ++-- web/docs/agents/platform/meta.ts | 2 +- web/docs/agents/testing/previews.md | 2 +- web/docs/frontend/install-on-phones.mdx | 2 +- web/docs/get-started/console-tour.mdx | 2 +- web/docs/reference/tools.md | 4 ++-- web/pages/console/_islands/actions/data-do.ts | 4 ++-- web/pages/console/_islands/actions/data-r2.ts | 2 +- web/pages/console/_islands/data/do/view.tsx | 6 +++--- 25 files changed, 48 insertions(+), 48 deletions(-) rename web/docs/agents/platform/{celld.md => cello.md} (87%) diff --git a/AGENTS.md b/AGENTS.md index 4c0f04d..4f52ebf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Outer: agent working agreement -Outer is a personal software forge for AI agents. An agent talks MCP to Outer, Outer builds the user's Ilha + Void app and runs it on [celld](https://celld.dev), and serves it at `https://.outer.now`. +Outer is a personal software forge for AI agents. An agent talks MCP to Outer, Outer builds the user's Ilha + Void app and runs it on [Cello](https://cello.ryuz.eu), and serves it at `https://.outer.now`. - **Design record:** the maintainer's spec at `~/Developer/vault/outer/spec.md` (not in this repo). Read it before changing behavior, and say so when a change departs from it. - **Status:** live at `outer.now` (M0 done); milestone M1 (owner alpha) in progress. @@ -45,7 +45,7 @@ is `crates/outer/tests/hostile.rs`, in two layers: and the harness refuses to pass unless the installed `inet outer` table covers the probe uid. -The `worker.js` `/probes` check needs a live celld fleet with a deployed app +The `worker.js` `/probes` check needs a live Cello fleet with a deployed app and stays a manual VPS step (see the script header). A PR that changes escape relevant behavior adds a fixture probe first, then the containment. @@ -59,7 +59,7 @@ relevant behavior adds a fixture probe first, then the containment. | `crates/outer/src/http/` | Axum router: operator probes on the platform host, app proxy fallback for app hosts | | `crates/outer/src/store/` | `Store` (R2 over S3, or in-memory) and the SQLite snapshot to the bucket | | `crates/outer/src/git/` | Each app's repo: a bucket WAL (tip bundle + `MANIFEST.json`) and worktree-free commits | -| `crates/outer/src/fleet/` | Sandboxed processes, cgroup v2 leaves, nft egress rules, the celld supervisor | +| `crates/outer/src/fleet/` | Sandboxed processes, cgroup v2 leaves, nft egress rules, the Cello supervisor | | `e2e/hostile/`, `crates/outer/tests/hostile.rs` | Hostile suite (§12.7): fixtures, manifest, two-layer harness | | `scripts/hostile-suite.sh` | Integrator entry for the privileged hostile layer (VPS) | ## Rules diff --git a/crates/outer/tests/hostile.rs b/crates/outer/tests/hostile.rs index 0c035e3..65bff8a 100644 --- a/crates/outer/tests/hostile.rs +++ b/crates/outer/tests/hostile.rs @@ -15,7 +15,7 @@ //! cgroupfs delegation, the nft table, a JS runtime, scoped R2 creds) is //! absent, so a dev machine never passes vacuously. //! -//! The worker fixture (`e2e/hostile/worker.js`) needs a live celld fleet +//! The worker fixture (`e2e/hostile/worker.js`) needs a live cello fleet //! with a deployed app, which no test here can conjure without a bucket; it //! runs as a documented manual step in `scripts/hostile-suite.sh`. @@ -225,10 +225,10 @@ fn hostile_fleet_grants_cannot_publish_a_deployment() { let [(data_permission, data), (deploy_permission, deploy)] = grants; assert_eq!(data_permission, Permission::ReadWrite); assert_eq!(deploy_permission, Permission::ReadOnly); - // The exact state namespaces, a cross-repo contract with celld: any + // The exact state namespaces, a cross-repo contract with cello: any // runtime write outside these is a failed write, and any list wider // than this (in particular anything covering `deploy/`) is a publish - // hole. `node-cells/` and the non-terminated `wake-` are celld's dead + // hole. `node-cells/` and the non-terminated `wake-` are cello's dead // node GC and legacy wake guard. assert_eq!( data, @@ -290,7 +290,7 @@ fn hostile_platform_env_never_reaches_apps() { "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "S3_ENDPOINT", - "CELLD_WATCH", + "CELLO_WATCH", "OUTER_SECRET", "OUTER_R2_BUCKET", "CLOUDFLARE_API_TOKEN", @@ -316,7 +316,7 @@ fn hostile_platform_env_never_reaches_apps() { } /// The fleet command binds loopback only and drops reserved names from app -/// env: a worker that fetches the celld internal listener or another fleet's +/// env: a worker that fetches the cello internal listener or another fleet's /// port from its own environment finds nothing to aim at, and the platform /// secrets the supervisor holds never enter the fleet's environment. #[test] @@ -346,7 +346,7 @@ fn hostile_fleet_command_is_loopback_only_and_scoped() { ], }; let opts = outer::fleet::supervisor::FleetOpts { - celld_bin: "celld".to_string(), + cello_bin: "cello".to_string(), state_dir: PathBuf::from("/data/fleets/hostile"), shutdown_total_ms: 5000, idle_evict_secs: 60, @@ -354,7 +354,7 @@ fn hostile_fleet_command_is_loopback_only_and_scoped() { asset_cache_mb: 256, }; let (program, args, env) = outer::fleet::supervisor::fleet_command(&spec, &opts); - assert_eq!(program, "celld"); + assert_eq!(program, "cello"); for flag in ["--listen", "--internal-listen"] { let at = args.iter().position(|arg| arg == flag).expect(flag); let addr = &args[at + 1]; @@ -816,7 +816,7 @@ async fn hostile_build_probes_are_contained() { /// round-trips inside one and must be refused (403/401, never 404 or a /// transport error) on a sibling prefix, the bucket root, and the deploy /// pointer (`deploy/current.json`), because the node reads deployments with -/// its separate read-only `CELLD_DEPLOY_AWS_*` grant. The probe then uses +/// its separate read-only `CELLO_DEPLOY_AWS_*` grant. The probe then uses /// that deploy grant (`HOSTILE_S3_DEPLOY_*`) to LIST and GET under /// `deploy/` (must succeed) and to PUT there (must be refused). Needs /// `HOSTILE_S3_*` env with both grants, minted by the integrator on the VPS diff --git a/e2e/hostile/manifest.json b/e2e/hostile/manifest.json index 2ccf6af..925d901 100644 --- a/e2e/hostile/manifest.json +++ b/e2e/hostile/manifest.json @@ -16,7 +16,7 @@ { "id": "fetch:loopback-target", "phase": "build", "category": "blocked-egress", "must": "fail", "desc": "Build cannot reach a live loopback listener (fail-closed: the harness proves it serves)" }, { "id": "fetch:internet", "phase": "build", "category": "blocked-egress", "must": "succeed", "desc": "Positive control: ordinary internet egress still works" }, { "id": "fetch:neighbour-fleet", "phase": "worker", "category": "fleet-ports", "must": "fail", "desc": "Worker cannot fetch another fleet's public port" }, - { "id": "fetch:platform-internal", "phase": "worker", "category": "fleet-ports", "must": "fail", "desc": "Worker cannot fetch outer's loopback / celld internal ports" }, + { "id": "fetch:platform-internal", "phase": "worker", "category": "fleet-ports", "must": "fail", "desc": "Worker cannot fetch outer's loopback / cello internal ports" }, { "id": "fetch:metadata", "phase": "worker", "category": "blocked-egress", "must": "fail", "desc": "Worker cannot reach the cloud metadata IP" }, { "id": "fetch:smtp-worker", "phase": "worker", "category": "blocked-egress", "must": "fail", "desc": "Worker cannot open SMTP ports" }, { "id": "env:worker-secrets", "phase": "worker", "category": "host-secrets", "must": "fail", "desc": "No platform secret names in the worker env" }, diff --git a/e2e/hostile/package.json b/e2e/hostile/package.json index a8d5b91..9c04d1c 100644 --- a/e2e/hostile/package.json +++ b/e2e/hostile/package.json @@ -2,7 +2,7 @@ "name": "outer-hostile-fixture", "private": true, "version": "1.0.0", - "description": "Hostile tenant fixture for the §12.7 hostile suite: a celld worker plus build/release probes that try to escape. See manifest.json and scripts/hostile-suite.sh.", + "description": "Hostile tenant fixture for the §12.7 hostile suite: a cello worker plus build/release probes that try to escape. See manifest.json and scripts/hostile-suite.sh.", "scripts": { "build": "node ./build-probe.mjs", "release": "node ./r2-probe.mjs" diff --git a/e2e/hostile/r2-probe.mjs b/e2e/hostile/r2-probe.mjs index db75802..aa9bec6 100644 --- a/e2e/hostile/r2-probe.mjs +++ b/e2e/hostile/r2-probe.mjs @@ -12,7 +12,7 @@ // - the *state* credential (HOSTILE_S3_KEY/SECRET): read-write over the // state prefixes and NOT over `deploy/` or `deploy-blobs/`; // - the *deploy* credential (HOSTILE_S3_DEPLOY_KEY/SECRET): read-only over -// `deploy/` and `deploy-blobs/` (the node's CELLD_DEPLOY_AWS_* grant). +// `deploy/` and `deploy-blobs/` (the node's CELLO_DEPLOY_AWS_* grant). // So the state positive control round-trips inside a state prefix and a // write to the deployment pointer must be refused, while the deploy grant // reads `deploy/` and a write with it is refused too. @@ -40,7 +40,7 @@ const token = process.env.HOSTILE_S3_TOKEN ?? ""; const ownPrefix = need("HOSTILE_S3_PREFIX").replace(/^\//, ""); const siblingPrefix = (process.env.HOSTILE_S3_SIBLING ?? "fleets/hostile-neighbour/").replace(/^\//, ""); const dataPrefix = (process.env.HOSTILE_S3_DATA_PREFIX ?? `${ownPrefix}cells/`).replace(/^\//, ""); -// The node's read-only deployment grant (`CELLD_DEPLOY_AWS_*`): it must +// The node's read-only deployment grant (`CELLO_DEPLOY_AWS_*`): it must // read `deploy/` and `deploy-blobs/` but can never publish. The object the // GET probe reads is uploaded by the integrator with the bucket root keys. const deployAccess = need("HOSTILE_S3_DEPLOY_KEY"); @@ -113,7 +113,7 @@ try { } // The deployment artifacts are read-only for a fleet: the node's -// `CELLD_DEPLOY_AWS_*` grant must list and get `deploy/` and can never +// `CELLO_DEPLOY_AWS_*` grant must list and get `deploy/` and can never // publish. The positive read proves the grant is the deploy one, not a // state key; the refused write is the boundary under test. try { diff --git a/e2e/hostile/worker.js b/e2e/hostile/worker.js index 50642aa..5e7109a 100644 --- a/e2e/hostile/worker.js +++ b/e2e/hostile/worker.js @@ -1,9 +1,9 @@ -// Hostile app worker (celld): serves its build/r2 probe results as JSON and +// Hostile app worker (cello): serves its build/r2 probe results as JSON and // runs the Worker-side network probes live. Every probe must fail except // internet egress. Borrowed from Noite's apps/noite/test/hostile/index.js: // Outer drops the Caddy/runner/control-port targets and aims at Outer's own // loopback surface instead (neighbour fleet ports, outer's proxy port, the -// celld internal listener). Query: /probes?neighbour=&platform=. +// cello internal listener). Query: /probes?neighbour=&platform=. import buildProbes from "./dist/probe.json"; import releaseProbes from "./dist/release-probe.json"; @@ -36,7 +36,7 @@ export default { ); worker[n1] = v1; - // Outer's own loopback surface (proxy port, celld internal listener): + // Outer's own loopback surface (proxy port, cello internal listener): // unreachable from a tenant uid under the nft policy. const [n2, v2] = await attempt("fetch:platform-internal", () => timedFetch(`http://127.0.0.1:${platform}/`) diff --git a/scripts/hostile-probe-vps.sh b/scripts/hostile-probe-vps.sh index 279217e..1470db1 100755 --- a/scripts/hostile-probe-vps.sh +++ b/scripts/hostile-probe-vps.sh @@ -225,7 +225,7 @@ for planted in "OUTER_SECRET planted" "STRIPE_SECRET_KEY planted" "AWS_SECRET_AC set -- $planted case "$1" in PORT|HOST|NODE_OPTIONS) continue ;; - AWS_*|S3_*|CELLD_*|OUTER_*|CLOUDFLARE_*|R2_*|STRIPE_*|RESEND_*|JEV_*|LD_*|BUN_*) + AWS_*|S3_*|CELLD_*|CELLO_*|OUTER_*|CLOUDFLARE_*|R2_*|STRIPE_*|RESEND_*|JEV_*|LD_*|BUN_*) [ "$1" = "BUN_INSTALL_CACHE_DIR" ] || continue ;; esac putenv "$1" "$2" diff --git a/scripts/hostile-suite.sh b/scripts/hostile-suite.sh index 0759241..514ac2a 100755 --- a/scripts/hostile-suite.sh +++ b/scripts/hostile-suite.sh @@ -50,7 +50,7 @@ # HOSTILE_S3_DEPLOY_KEY HOSTILE_S3_DEPLOY_SECRET # HOSTILE_S3_DEPLOY_TOKEN HOSTILE_S3_DEPLOY_PREFIX (=deploy/) # HOSTILE_S3_DEPLOY_OBJECT (default deploy/hostile-probe.json) -# - Worker layer (manual, needs celld + a bucket): deploy the fixture as +# - Worker layer (manual, needs cello + a bucket): deploy the fixture as # two apps (`hostile`, `hostile-neighbour`), then # curl 'https://hostile./probes?neighbour=&platform=' # and confirm every worker probe is contained except `fetch:internet`. diff --git a/web/blume.config.ts b/web/blume.config.ts index 5458415..f6cb04c 100644 --- a/web/blume.config.ts +++ b/web/blume.config.ts @@ -62,8 +62,8 @@ export default defineConfig({ { from: "/guides/ilha", to: "/agents/frontend/ilha", status: 301 }, { from: "/guides/void", to: "/agents/frontend/void", status: 301 }, { from: "/guides/website", to: "/agents/frontend/website", status: 301 }, - { from: "/guides/celld", to: "/agents/platform/celld", status: 301 }, - { from: "/guides/moderation", to: "/agents/security/moderation", status: 301 }, + { from: "/guides/celld", to: "/agents/platform/cello", status: 301 }, + { from: "/agents/platform/celld", to: "/agents/platform/cello", status: 301 }, { from: "/guides/limits", to: "/agents/platform/limits", status: 301 }, { from: "/guides/storage", to: "/agents/backend/files", status: 301 }, { from: "/guides/export", to: "/agents/deploy/export", status: 301 }, diff --git a/web/docs/STYLE.md b/web/docs/STYLE.md index 15aed95..83f5c27 100644 --- a/web/docs/STYLE.md +++ b/web/docs/STYLE.md @@ -41,7 +41,7 @@ One term per concept. Left column wins everywhere. | plan (Free / Pro) | tier, subscription (as plan name) | Capitalized plan names. | | quota | limit (for counted resources) | Code changes, apps, collaborators. `limits` only for the Deploy page title and hard technical caps. | | preview deploy | staging, branch deploy | One per app, Pro, at `--preview.outer.now`. | -| fleet | server, container, instance | The celld worker pool an app runs on. | +| fleet | server, container, instance | The Cello worker pool an app runs on. | | binding | integration, env (for config) | `d1_databases`, `kv_namespaces`, declared in `void.config.ts`. | | secret | env var, token (for stored keys) | Set outside code, read as `env.MY_KEY`. | | agent | bot, assistant (for the builder) | The AI building the app over MCP. | diff --git a/web/docs/agents/backend/database.md b/web/docs/agents/backend/database.md index cf834b6..74bdb1c 100644 --- a/web/docs/agents/backend/database.md +++ b/web/docs/agents/backend/database.md @@ -13,7 +13,7 @@ The template ships with D1 on by default. Copy `pages/index.server.ts`: a loader d1_databases: [{ binding: "DB", database_name: "app-db" }], ``` -One D1 database and one R2 bucket per app: a second `d1_databases` entry fails the deploy at validation ("Outer apps can have one D1 database and one R2 bucket for now; merge the extra ones"). The built `dist/wrangler.json` carries the binding to celld, which creates the database on first use. Celld keys the database by name, so a typo opens a silent empty database. Double-check the name. +One D1 database and one R2 bucket per app: a second `d1_databases` entry fails the deploy at validation ("Outer apps can have one D1 database and one R2 bucket for now; merge the extra ones"). The built `dist/wrangler.json` carries the binding to Cello, which creates the database on first use. Cello keys the database by name, so a typo opens a silent empty database. Double-check the name. ## Ship schema as migrations @@ -29,7 +29,7 @@ Migration order depends on deploy state: | App with a live version | Migrations run before the upload; the old code keeps serving, and a migrate failure uploads nothing | | First deploy | Upload first, then migrate; the proxy returns 503 (building page) until the first deploy succeeds, so no race is possible | -Files apply in numeric-prefix order under the app's scoped storage credentials. Already-applied files are skipped, never re-applied. A file edited after it was applied fails the deploy. Write a new migration instead. A failing migration fails the deploy and names the file; the previous version keeps serving (first deploys stay not-live, "Your app isn't live yet"), with celld's error in the log tail. The step runs only when the built config declares `d1_databases` and the repo holds migration files; no files means the step is skipped. +Files apply in numeric-prefix order under the app's scoped storage credentials. Already-applied files are skipped, never re-applied. A file edited after it was applied fails the deploy. Write a new migration instead. A failing migration fails the deploy and names the file; the previous version keeps serving (first deploys stay not-live, "Your app isn't live yet"), with Cello's error in the log tail. The step runs only when the built config declares `d1_databases` and the repo holds migration files; no files means the step is skipped. Expand first, contract later: the migration runs while the old code still serves, so prefer additive changes (new tables, nullable columns). Dropping a column the live code still reads serves errors until the new version takes over. diff --git a/web/docs/agents/backend/files.md b/web/docs/agents/backend/files.md index be86f37..7d7bf66 100644 --- a/web/docs/agents/backend/files.md +++ b/web/docs/agents/backend/files.md @@ -3,7 +3,7 @@ title: Store uploads in R2 description: R2 uploads behind your own checks, the Console R2 browser, and the read-only Durable Object handler. --- -Extra state arrives as bindings in `void.config.ts`, validated from the built `dist/wrangler.json` at deploy time. Only keys celld accepts pass. One D1 database and one R2 bucket per app: a second `r2_buckets` entry fails the deploy at validation. The person-facing guide is [Store uploaded files](/backend/files-storage). +Extra state arrives as bindings in `void.config.ts`, validated from the built `dist/wrangler.json` at deploy time. Only keys Cello accepts pass. One D1 database and one R2 bucket per app: a second `r2_buckets` entry fails the deploy at validation. The person-facing guide is [Store uploaded files](/backend/files-storage). ## Gate uploads yourself @@ -11,11 +11,11 @@ Declare file storage with `r2_buckets`. Uploaded images and video are not profan ## Browse files in Console -Console → your app → **Data → R2** opens the app's single `r2_buckets` binding directly. You can browse folders, preview text (up to 256 KiB) and images inline, download (up to 64 MiB), upload (up to 64 MiB), create folders, and delete with confirmation. Reads use the same scoped credentials as your app; writes go through celld and are recorded in the agent action log. The binding list comes from the deployed manifest in your bucket, not the local build directory. +Console → your app → **Data → R2** opens the app's single `r2_buckets` binding directly. You can browse folders, preview text (up to 256 KiB) and images inline, download (up to 64 MiB), upload (up to 64 MiB), create folders, and delete with confirmation. Reads use the same scoped credentials as your app; writes go through Cello and are recorded in the agent action log. The binding list comes from the deployed manifest in your bucket, not the local build directory. ## Expose Durable Object state read-only -Console → your app → **Data → Durable Objects** lists every `durable_objects` binding's instances (read-only; celld exposes no generic storage API for an instance). Selecting an instance shows what the app's own `?read=1` handler returns for it. Implement that read-only branch without side effects: +Console → your app → **Data → Durable Objects** lists every `durable_objects` binding's instances (read-only; Cello exposes no generic storage API for an instance). Selecting an instance shows what the app's own `?read=1` handler returns for it. Implement that read-only branch without side effects: ```js if (new URL(request.url).searchParams.has("read")) { diff --git a/web/docs/agents/backend/kv.md b/web/docs/agents/backend/kv.md index 947ffd4..cbc906c 100644 --- a/web/docs/agents/backend/kv.md +++ b/web/docs/agents/backend/kv.md @@ -15,7 +15,7 @@ cloudflare: { }, ``` -`kv_namespaces` is an accepted deploy key, so the namespace deploys on every account. Binding keys are validated at deploy time. See [Store uploaded files](/backend/files-storage). Celld creates the namespace on first use; a typo opens a silent empty namespace, so double-check the id. +`kv_namespaces` is an accepted deploy key, so the namespace deploys on every account. Binding keys are validated at deploy time. See [Store uploaded files](/backend/files-storage). Cello creates the namespace on first use; a typo opens a silent empty namespace, so double-check the id. ## Use it diff --git a/web/docs/agents/backend/sandboxes.md b/web/docs/agents/backend/sandboxes.md index 3048ace..6c22f8a 100644 --- a/web/docs/agents/backend/sandboxes.md +++ b/web/docs/agents/backend/sandboxes.md @@ -7,7 +7,7 @@ description: Code-execution sandboxes are not available on Outer — do not ship ## Know why it cannot run -Void sandboxes (`getSandbox(id)`, `sandbox.run/files/fetch`) are isolated Linux containers fronted by a Durable Object. They need Cloudflare Containers: a container runtime on every machine that can start the app's image. Outer runs each app as a celld worker fleet: plain processes under cgroup and network isolation, no Docker/Podman daemon on the app host. A sandbox has nowhere to start. The `containers` wrangler key passes Outer's deploy validation, so the failure would come at runtime, not at deploy. Do not ship sandbox code expecting the deploy gate to catch it. +Void sandboxes (`getSandbox(id)`, `sandbox.run/files/fetch`) are isolated Linux containers fronted by a Durable Object. They need Cloudflare Containers: a container runtime on every machine that can start the app's image. Outer runs each app as a Cello worker fleet: plain processes under cgroup and network isolation, no Docker/Podman daemon on the app host. A sandbox has nowhere to start. The `containers` wrangler key passes Outer's deploy validation, so the failure would come at runtime, not at deploy. Do not ship sandbox code expecting the deploy gate to catch it. ## Do this instead diff --git a/web/docs/agents/deploy/pipeline.md b/web/docs/agents/deploy/pipeline.md index eeb329b..73b9df6 100644 --- a/web/docs/agents/deploy/pipeline.md +++ b/web/docs/agents/deploy/pipeline.md @@ -1,6 +1,6 @@ --- title: Follow the deploy pipeline -description: Move commits through queue, build, gate, migrations, and celld deploy. +description: Move commits through queue, build, gate, migrations, and Cello deploy. --- ## Move through each pipeline step @@ -11,7 +11,7 @@ description: Move commits through queue, build, gate, migrations, and celld depl 4. Run `bun run build`; wrangler validation rejects unknown config keys by name (full list: [Accepted config keys](/agents/platform/config-keys)). 5. Pass the moderation gate; nothing uploads before it passes. 6. Apply D1 migrations scoped by key: before upload when a live version exists, otherwise upload, wake, then migrate. -7. Deploy with celld, then poll fleet health; a failed step or health check keeps the previous version serving. +7. Deploy with Cello, then poll fleet health; a failed step or health check keeps the previous version serving. 8. Expect wiped worktrees: sleep, failed builds, and deletes remove everything except `node_modules`. ## Watch a deploy to its terminal state diff --git a/web/docs/agents/frontend/website.md b/web/docs/agents/frontend/website.md index e12b577..b17701f 100644 --- a/web/docs/agents/frontend/website.md +++ b/web/docs/agents/frontend/website.md @@ -42,7 +42,7 @@ export const POST: APIRoute = async () => { 4. Declare new bindings on `Cloudflare.Env` in `src/env.d.ts`. 5. Keep server routes few and small: at most one or two against D1. -## Ship config and schema the celld way +## Ship config and schema the Cello way 1. Edit `astro.config.mjs` (`celld-config` integration), never hand-write `dist/wrangler.json`. 2. Read derived keys from `dist/wrangler.json` after `bun run build`. diff --git a/web/docs/agents/platform/celld.md b/web/docs/agents/platform/cello.md similarity index 87% rename from web/docs/agents/platform/celld.md rename to web/docs/agents/platform/cello.md index bf9cbd7..f6b167b 100644 --- a/web/docs/agents/platform/celld.md +++ b/web/docs/agents/platform/cello.md @@ -1,6 +1,6 @@ --- -title: Run inside the celld runtime -description: Follow celld fetch, state, binding, network, and memory rules. +title: Run inside the Cello runtime +description: Follow Cello fetch, state, binding, network, and memory rules. --- ## Obey the runtime contract diff --git a/web/docs/agents/platform/meta.ts b/web/docs/agents/platform/meta.ts index ecbf139..1196d01 100644 --- a/web/docs/agents/platform/meta.ts +++ b/web/docs/agents/platform/meta.ts @@ -4,5 +4,5 @@ export default defineMeta({ title: "Platform", icon: "server", order: 8, - pages: ["celld", "config-keys", "limits"], + pages: ["cello", "config-keys", "limits"], }); diff --git a/web/docs/agents/testing/previews.md b/web/docs/agents/testing/previews.md index 6f42ce4..e01467d 100644 --- a/web/docs/agents/testing/previews.md +++ b/web/docs/agents/testing/previews.md @@ -17,7 +17,7 @@ Trial a change before it goes live: commit with `preview: true` to deploy the sa ## Run the preview loop 1. Commit with `preview: true` to refresh the app's one preview. -2. Expect the same pipeline as live: install, build, moderation gate, migrations from scratch, then celld deploy. +2. Expect the same pipeline as live: install, build, moderation gate, migrations from scratch, then Cello deploy. 3. Expect an empty namespace: the preview fleet starts with fresh D1/KV/R2 state and never touches live data. 4. Share the preview URL for click-through; unlisted previews answer `noindex` like live. 5. Promote with `promote_preview` to fast-forward main and deploy normally. diff --git a/web/docs/frontend/install-on-phones.mdx b/web/docs/frontend/install-on-phones.mdx index d74633e..9c3e6ba 100644 --- a/web/docs/frontend/install-on-phones.mdx +++ b/web/docs/frontend/install-on-phones.mdx @@ -16,4 +16,4 @@ Two rules keep installs working: To rename the app on home screens, ask your builder to update the name and the page title. -For the technical detail, your builder reads [Run inside the celld runtime](/agents/platform/celld). +For the technical detail, your builder reads [Run inside the Cello runtime](/agents/platform/cello). diff --git a/web/docs/get-started/console-tour.mdx b/web/docs/get-started/console-tour.mdx index b1fd6ca..7060e61 100644 --- a/web/docs/get-started/console-tour.mdx +++ b/web/docs/get-started/console-tour.mdx @@ -87,7 +87,7 @@ Owner-only browsers over the app's live bindings: (back up now, download a dump, restore one). - **R2** — browse folders, preview text and images, download, upload, and delete. Reads use the same scoped credentials as the app; writes go - through celld and are recorded in the agent action log. + through Cello and are recorded in the agent action log. - **Durable Objects** — list instances (read-only). Selecting one shows what the app's own `?read=1` handler returns. Ask your builder to add that read-only branch so you can preview state here. diff --git a/web/docs/reference/tools.md b/web/docs/reference/tools.md index a3de3bf..844d925 100644 --- a/web/docs/reference/tools.md +++ b/web/docs/reference/tools.md @@ -17,13 +17,13 @@ Every Outer tool in `tools/list` order, rendered from the registry. Generated ## `docs` - **Access:** anyone (no token needed) -- **Description:** Read an Outer agent guide: quickstart, templates, ilha, void, website, celld, d1, storage, backups, kv, auth, cron, queues, websockets, sse, email, sandboxes, limits, moderation, custom-domains, export, previews or look. Read the ilha guide before writing any code. +- **Description:** Read an Outer agent guide: quickstart, templates, ilha, void, website, cello, d1, storage, backups, kv, auth, cron, queues, websockets, sse, email, sandboxes, limits, moderation, custom-domains, export, previews or look. Read the ilha guide before writing any code. **Input:** | Property | Type | Required | Description | | --- | --- | --- | --- | -| `topic` | string | yes | Which agent guide to read: quickstart, templates, ilha, void, website, celld, d1, storage, backups, kv, auth, cron, queues, websockets, sse, email, sandboxes, limits, moderation, custom-domains, export, previews or look. | +| `topic` | string | yes | Which agent guide to read: quickstart, templates, ilha, void, website, cello, d1, storage, backups, kv, auth, cron, queues, websockets, sse, email, sandboxes, limits, moderation, custom-domains, export, previews or look. | ## `whoami` diff --git a/web/pages/console/_islands/actions/data-do.ts b/web/pages/console/_islands/actions/data-do.ts index 77612b7..95d0875 100644 --- a/web/pages/console/_islands/actions/data-do.ts +++ b/web/pages/console/_islands/actions/data-do.ts @@ -1,5 +1,5 @@ // Durable Objects viewer actions: one registered entry per query the DO -// panel performs. Read-only end to end — celld exposes no generic storage +// panel performs. Read-only end to end — Cello exposes no generic storage // read for a DO instance, so the preview is the app's own `?read=1` // response and stays blank when the fleet is asleep or the object has no // read handler. @@ -71,7 +71,7 @@ const doListInstances: ConsoleAction<{ slug: string; class: string }, DoInstance name: "do_list_instances", title: "List Durable Object instances", description: - "List the instances of one Durable Object class (id + scope) via `celld cell list`. Reserved celld-internal classes are skipped. Works while the fleet is asleep.", + "List the instances of one Durable Object class (id + scope) via `cello cell list`. Reserved cello-internal classes are skipped. Works while the fleet is asleep.", inputSchema: { type: "object", properties: { diff --git a/web/pages/console/_islands/actions/data-r2.ts b/web/pages/console/_islands/actions/data-r2.ts index b253b79..b175e89 100644 --- a/web/pages/console/_islands/actions/data-r2.ts +++ b/web/pages/console/_islands/actions/data-r2.ts @@ -1,6 +1,6 @@ // R2 browser actions: one registered entry per query/mutation the R2 panel // performs. Reads are S3 under `fleets/{slug}/r2//` with scoped -// creds; writes and deletes go through `celld r2 put` / `celld r2 delete` +// creds; writes and deletes go through `cello r2 put` / `cello r2 delete` // and are audited (client "Console"). import { request } from "./http.ts"; diff --git a/web/pages/console/_islands/data/do/view.tsx b/web/pages/console/_islands/data/do/view.tsx index e24f061..e66c598 100644 --- a/web/pages/console/_islands/data/do/view.tsx +++ b/web/pages/console/_islands/data/do/view.tsx @@ -4,7 +4,7 @@ // Outer differences: fetches go through the registered data-do actions, // the probe runs on selection (not embedded per row — a class with many // instances lists fast while the fleet still answers each probe -// best-effort), and the empty copy states that celld has no generic DO +// best-effort), and the empty copy states that Cello has no generic DO // storage API: apps opt in to previews by implementing `?read=1`. import { atom, watch } from "ilha"; @@ -147,7 +147,7 @@ function DoInstancePanel({

{body}

- Read-only. celld keeps an instance's storage in its cell; this preview + Read-only. Cello keeps an instance's storage in its cell; this preview is the app's own ?read=1 response.

@@ -360,7 +360,7 @@ function DoBrowser({ slug, binding }: { slug: string; binding: DoBinding }) { )}

- Durable Object storage has no generic read API in celld. This viewer + Durable Object storage has no generic read API in Cello. This viewer lists instances and shows each app's own ?read=1{" "} response — implement that read-only branch to preview state.

From cdd50879ae3fcba24f411a83209b6e7f5648d592 Mon Sep 17 00:00:00 2001 From: Ryuz Date: Thu, 19 Nov 2026 09:20:31 +0100 Subject: [PATCH 7/7] config: give the default cello-bin test an empty PATH resolve_bin falls back to /usr/local/bin:/usr/bin:/bin when PATH is unset, so the test failed on any host with cello installed (including the Outer image). --- crates/outer/src/config.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/outer/src/config.rs b/crates/outer/src/config.rs index 6dea47f..8286605 100644 --- a/crates/outer/src/config.rs +++ b/crates/outer/src/config.rs @@ -1682,7 +1682,12 @@ mod tests { #[test] fn cello_bin_defaults_to_cello() { - let cfg = Config::from_vars(&vars(&[("OUTER_STORE", "memory")])).unwrap(); + // An empty PATH: without one, resolve_bin falls back to the system + // PATH and finds an installed /usr/local/bin/cello. + let empty = tempfile::tempdir().unwrap(); + let path = empty.path().to_string_lossy().into_owned(); + let cfg = Config::from_vars(&vars(&[("OUTER_STORE", "memory"), ("PATH", path.as_str())])) + .unwrap(); assert_eq!(cfg.runtime.cello_bin, "cello"); let cfg = Config::from_vars(&vars(&[ ("OUTER_STORE", "memory"),