diff --git a/bridge/src/main.ts b/bridge/src/main.ts index 7cd1c2d..c7b702a 100644 --- a/bridge/src/main.ts +++ b/bridge/src/main.ts @@ -423,6 +423,9 @@ const main = async () => { case "rpc.clientGone": void run(Providers.clientGone(fields)).catch(() => undefined); return; + case "providers.refreshUsage": + void run(Providers.refreshUsage(fields)).catch(() => undefined); + return; // What became of an offer (`ProviderContinuationService`): dropped, its run ended // before it started, or done with. case "continuation.clear": diff --git a/bridge/src/providers.ts b/bridge/src/providers.ts index 56b8e5a..e9d74da 100644 --- a/bridge/src/providers.ts +++ b/bridge/src/providers.ts @@ -463,3 +463,16 @@ export const clientGone = (fields: Record) => const caller = decodeCaller(fields); return policy.removeRpcClient(caller.authSessionId, caller.rpcClientId); }); + +/** + * `providers.refreshUsage`: a turn of the instance failed on its usage limit, so it reads its + * limits again, as `ProviderEventIngestor` does once it stored that terminal. + */ +export const refreshUsage = (fields: Record) => + Effect.gen(function* () { + const instances = yield* ProviderInstanceRegistry.ProviderInstanceRegistry; + const instanceId = ProviderInstanceId.make(String(fields.instanceId ?? "")); + const instance = yield* instances.getInstance(instanceId); + if (!instance?.snapshot.refreshUsage) return; + yield* instance.snapshot.refreshUsage.pipe(Effect.ignoreCause({ log: true })); + }); diff --git a/crates/server-threads/src/turns/run.rs b/crates/server-threads/src/turns/run.rs index dca9ee5..868aba5 100644 --- a/crates/server-threads/src/turns/run.rs +++ b/crates/server-threads/src/turns/run.rs @@ -129,6 +129,9 @@ struct State { runtime_lost: bool, /// The provider turn the terminal of a turn that failed to start names. failed_turn_id: String, + /// A terminal that failed on the usage limit was stored, so the instance reads its limits + /// again. + refresh_usage: bool, } fn lock(state: &Mutex) -> MutexGuard<'_, State> { @@ -222,6 +225,7 @@ async fn consume( children: Children::default(), runtime_lost: false, failed_turn_id: ids::failed_provider_turn(&session.driver, &run.attempt), + refresh_usage: false, })); let stream = turns.batcher.stream(Some(Priority { thread_id: run.thread_id.clone(), @@ -304,6 +308,19 @@ async fn consume( if let Err(error) = written { break Some(error); } + // Once the terminal is stored, as upstream's `ProviderEventIngestor` does, so the limits + // show without waiting for the next provider check. + if std::mem::take(&mut lock(&state).refresh_usage) { + let (turns, instance) = (turns.clone(), run.instance_id.clone()); + tokio::spawn(async move { + turns + .notify_running_bridge( + "providers.refreshUsage", + json!({ "instanceId": instance }), + ) + .await; + }); + } if let Some(attempt) = started_attempt { turns.deliver_parked_steers(&run.thread_id, &attempt); } @@ -593,6 +610,12 @@ fn ingest_delivered( }; let writers = vec![writer; events.len()]; write_events(transaction, batch, &mut events, &writers)?; + if delivered["type"] == "turn.terminal" + && delivered["status"] == "failed" + && delivered["failure"]["class"] == "usage_limit" + { + state.refresh_usage = true; + } let mut followed = ingest::follow_up(transaction, &run.input(), delivered, &events)?; if !followed.is_empty() { let writers = vec![writer; followed.len()]; diff --git a/crates/server/tests/fixtures/fake-claude.mjs b/crates/server/tests/fixtures/fake-claude.mjs index 6be4ef3..4491bd5 100644 --- a/crates/server/tests/fixtures/fake-claude.mjs +++ b/crates/server/tests/fixtures/fake-claude.mjs @@ -11,12 +11,17 @@ // - `BG-TIMER`: the same with `sleep 3600`, a timer upstream's adapter marks the agent waits on. // - `LIMIT`: fails the turn on Claude's usage limit (an API error with status 429). // - `SLOW`: starts answering and ends only when interrupted, as a long turn Stop ends. +// - `RATE `: reports the session window's use in a `rate_limit_event`, as the CLI does +// before it answers, then answers OK. +// +// `LIMIT` and `RATE` record when they reported, in milliseconds since the epoch. // - an empty prompt, which the SDK sends to resume a turn the CLI was told to pick up // (`CLAUDE_CODE_RESUME_INTERRUPTED_TURN`): answers RESUMED. // - anything else: answers OK. // // Every prompt and tool answer is a line of JSON in the file `FAKE_CLAUDE_LOG` names, which the -// command that runs it sets. +// command that runs it sets. With `FAKE_CLAUDE_USAGE` set, `get_usage` (the usage probe) answers +// with the session window's use the JSON file it names holds (`{ "fiveHour": 10 }`). import * as Fs from "node:fs"; import * as Readline from "node:readline"; @@ -29,6 +34,9 @@ if (args.includes("--version") || args.includes("-v")) { } const LOG = process.env.FAKE_CLAUDE_LOG; +const USAGE = process.env.FAKE_CLAUDE_USAGE; +/** When the session window resets: fixed, so every report of it agrees. */ +const RESETS_AT = "2099-01-01T00:00:00.000Z"; const record = (entry) => { if (LOG !== undefined) Fs.appendFileSync(LOG, `${JSON.stringify(entry)}\n`); }; @@ -309,6 +317,7 @@ const turn = async (message) => { record({ event: "prompt", text }); init(); if (text.includes("LIMIT")) { + record({ event: "limit", at: Date.now() }); result("API Error: 429 Rate limit reached.", { is_error: true, api_error_status: 429, @@ -317,6 +326,23 @@ const turn = async (message) => { }); return; } + const rate = /RATE (\d+)/.exec(text); + if (rate !== null) { + record({ event: "rate", at: Date.now() }); + send({ + type: "rate_limit_event", + rate_limit_info: { + status: "allowed", + rateLimitType: "five_hour", + utilization: Number(rate[1]) / 100, + resetsAt: Date.parse(RESETS_AT) / 1000, + }, + ...base(), + }); + assistant([{ type: "text", text: "OK" }]); + result("OK"); + return; + } if (text.includes("SLOW")) { assistant([{ type: "text", text: "WORKING" }]); slow = () => @@ -372,6 +398,14 @@ const control = (request) => { }); case "mcp_status": return respond(request, { mcpServers: [] }); + case "get_usage": { + if (USAGE === undefined) return respond(request); + const { fiveHour } = JSON.parse(Fs.readFileSync(USAGE, "utf8")); + return respond(request, { + rate_limits_available: true, + rate_limits: { five_hour: { utilization: fiveHour, resets_at: RESETS_AT } }, + }); + } case "interrupt": { respond(request); const end = slow; diff --git a/crates/server/tests/own_usage_limits.rs b/crates/server/tests/own_usage_limits.rs new file mode 100644 index 0000000..eeedf4e --- /dev/null +++ b/crates/server/tests/own_usage_limits.rs @@ -0,0 +1,384 @@ +//! How soon own mode's config stream carries a Claude instance's new usage limits, against +//! upstream's: a `rate_limit_event` the CLI reports during a turn, and a turn that fails on the +//! usage limit, after which upstream reads the limits again (`ProviderEventIngestor`) without +//! waiting for its next provider check. +//! +//! The agent is `fixtures/fake-claude.mjs`, whose usage probe (`get_usage`) answers with the use +//! a file holds, and whose `RATE` turns report a use of their own. No client reports activity, so +//! neither server checks its providers on its interval: every change the stream carries comes +//! from the turn. Each side waits for the new use on `subscribeServerConfig`, and both must +//! carry it, with the same windows. The delays are timed from when the fake CLI reported. +//! +//! ```sh +//! TERN_UPSTREAM_DIR= TERN_NODE= \ +//! TERN_HARNESS_DIR= T3CODE_PROVIDER_COMMIT_BATCHING=false \ +//! cargo test -p tern-server --test own_usage_limits -- --ignored differential --nocapture +//! ``` + +mod harness; + +use std::path::{Path, PathBuf}; +use std::sync::Arc; +use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; + +use futures_util::{SinkExt, StreamExt}; +use serde_json::{Value, json}; +use tern_server::bridge; +use tern_server::own::{self, Own}; +use tokio::sync::watch; +use tokio_tungstenite::tungstenite::Message; + +use harness::*; + +const DISPATCH: &str = "orchestration.dispatchCommand"; +const INSTANCE: &str = "claudeFake"; +const AGENT: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/tests/fixtures/fake-claude.mjs" +); +const THREAD: &str = "limits"; +/// How long a change may take to reach the stream before the side counts as never carrying it. +const PATIENCE: Duration = Duration::from_secs(60); + +/// The fake CLI's command for one side, which records into `log` and reads its usage from +/// `usage`. +fn agent_command(scratch: &Path, node: &Path, side: &str, log: &Path, usage: &Path) -> PathBuf { + let bin = scratch.join(format!("agent-bin-{side}")); + std::fs::create_dir_all(&bin).unwrap(); + let command = bin.join("claude"); + std::fs::write( + &command, + format!( + "#!/bin/sh\nFAKE_CLAUDE_LOG='{}' FAKE_CLAUDE_USAGE='{}' exec '{}' '{}' \"$@\"\n", + log.display(), + usage.display(), + node.display(), + Path::new(AGENT).display() + ), + ) + .unwrap(); + use std::os::unix::fs::PermissionsExt; + std::fs::set_permissions(&command, std::fs::Permissions::from_mode(0o755)).unwrap(); + command +} + +fn set_usage(usage: &Path, five_hour: u32) { + std::fs::write(usage, json!({ "fiveHour": five_hour }).to_string()).unwrap(); +} + +fn settings(command: &Path, claude_home: &Path) -> Value { + json!({ + "responseStreamingMode": "turn", + "providerInstances": { + INSTANCE: { + "displayName": "Claude (fake)", + "driver": "claudeAgent", + "config": { + "binaryPath": command, + "homePath": claude_home, + }, + }, + }, + }) +} + +/// The bridge own mode runs: from source, with the scratch home and only Node and the system +/// tools on its path, as the scratch upstream runs its providers. +fn bridge_command(node: &Path, checkout: &Path, scratch: &Path) -> bridge::Command { + let home = scratch.join("bridge-home"); + let tmp = scratch.join("bridge-tmp"); + std::fs::create_dir_all(&home).unwrap(); + std::fs::create_dir_all(&tmp).unwrap(); + let path = format!("{}:/usr/bin:/bin", node.parent().unwrap().display()); + let mut command = own::source_bridge(node, checkout) + .env("HOME", &home) + .env("PATH", path) + .env("TMPDIR", &tmp); + command.clear_env = true; + command +} + +fn message(index: usize, text: &str) -> Value { + json!({ + "type": "message.dispatch", + "commandId": format!("s-{THREAD}-m{index}"), + "threadId": format!("t-{THREAD}"), + "messageId": format!("m-{THREAD}-{index}"), + "text": text, + "attachments": [], + "createdBy": "user", + "creationSource": "web", + "dispatchMode": { "type": "start_immediately" }, + "deliveryIntent": "auto", + }) +} + +/// The fake instance's usage windows in a provider list, without when they were checked. +fn windows(providers: &Value) -> Option { + let provider = providers + .as_array()? + .iter() + .find(|provider| provider["instanceId"] == INSTANCE)?; + let windows = provider["usageLimits"]["windows"].as_array()?; + Some(Value::Array( + windows + .iter() + .map(|window| { + json!({ + "id": window["id"], + "usedPercent": window["usedPercent"], + "resetsAt": window["resetsAt"], + }) + }) + .collect(), + )) +} + +/// The session window's use the stream last carried. +fn five_hour(providers: &Value) -> Option { + windows(providers)? + .as_array()? + .iter() + .find(|window| window["id"] == "five_hour")?["usedPercent"] + .as_f64() +} + +/// Reads `subscribeServerConfig` in the background: the providers its last snapshot or status +/// update carried. +async fn watch_config(address: &str) -> watch::Receiver { + let mut socket = open(address).await; + start_stream(&mut socket, 1, "subscribeServerConfig", &json!({})).await; + let (sender, receiver) = watch::channel(Value::Null); + tokio::spawn(async move { + while let Some(Ok(message)) = socket.next().await { + let Message::Text(text) = message else { + continue; + }; + let value: Value = serde_json::from_str(&text).unwrap(); + for message in value.as_array().cloned().unwrap_or_else(|| vec![value]) { + match message["_tag"].as_str() { + Some("Ping") => { + let _ = socket.send(Message::text(r#"{"_tag":"Pong"}"#)).await; + } + Some("Chunk") if message["requestId"] == "1" => { + for item in message["values"].as_array().into_iter().flatten() { + match item["type"].as_str() { + Some("snapshot") => { + sender.send_replace(item["config"]["providers"].clone()); + } + Some("providerStatuses") => { + sender.send_replace(item["payload"]["providers"].clone()); + } + _ => {} + } + } + let ack = json!({ "_tag": "Ack", "requestId": "1" }); + let _ = socket.send(Message::text(ack.to_string())).await; + } + _ => {} + } + } + } + }); + receiver +} + +fn now_millis() -> u64 { + SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap() + .as_millis() as u64 +} + +/// Waits until the stream carries the session window at `percent`: when it did, in milliseconds +/// since the epoch, or `None` when it did not within [`PATIENCE`]. +async fn carried(config: &mut watch::Receiver, percent: f64) -> Option { + let reached = tokio::time::timeout( + PATIENCE, + config.wait_for(|providers| five_hour(providers) == Some(percent)), + ) + .await; + matches!(reached, Ok(Ok(_))).then(now_millis) +} + +/// How long after the fake CLI's `event` report `arrived` is. +fn since_report(log: &Path, event: &str, arrived: Option) -> Option { + let text = std::fs::read_to_string(log).unwrap_or_default(); + let at = text + .lines() + .filter_map(|line| serde_json::from_str::(line).ok()) + .find(|record| record["event"] == event)?["at"] + .as_u64()?; + Some(Duration::from_millis(arrived?.saturating_sub(at))) +} + +/// Waits until the thread has `runs` runs, none under way. +async fn quiet(db: &Path, runs: i64) { + let started = Instant::now(); + loop { + let settled: bool = rusqlite::Connection::open_with_flags( + db, + rusqlite::OpenFlags::SQLITE_OPEN_READ_ONLY, + ) + .and_then(|connection| { + connection.query_row( + "SELECT (SELECT COUNT(*) FROM orchestration_v2_projection_runs WHERE thread_id = ?1) >= ?2 \ + AND NOT EXISTS (SELECT 1 FROM orchestration_v2_projection_runs WHERE thread_id = ?1 \ + AND status IN ('preparing', 'queued', 'starting', 'running', 'waiting'))", + rusqlite::params![format!("t-{THREAD}"), runs], + |row| row.get(0), + ) + }) + .unwrap_or(false); + if settled { + return; + } + assert!(started.elapsed() < PATIENCE, "the thread did not settle"); + tokio::time::sleep(Duration::from_millis(100)).await; + } +} + +/// What one side's stream carried: how long each change took to arrive, and the windows after. +#[derive(Debug)] +struct Run { + rate: Option, + limit: Option, + windows: Option, +} + +async fn script(address: &str, db: &Path, usage: &Path, log: &Path) -> Run { + let mut config = watch_config(address).await; + // The first provider check reads the use the file holds. + assert!( + carried(&mut config, 10.).await.is_some(), + "the first check carried no usage: {}", + *config.borrow() + ); + let mut socket = open(address).await; + let create = json!({ + "type": "thread.create", + "commandId": format!("s-{THREAD}"), + "threadId": format!("t-{THREAD}"), + "projectId": format!("p-{THREAD}"), + "title": "Limits", + "createdBy": "user", + "creationSource": "web", + "modelSelection": { "instanceId": INSTANCE, "model": "claude-sonnet-4-6" }, + "runtimeMode": "full-access", + "interactionMode": "default", + "branch": null, + "worktreePath": null, + }); + let exit = call(&mut socket, 1, DISPATCH, &create).await; + assert_eq!(exit["_tag"], "Success", "{exit}"); + + // The CLI reports the window's use during the turn. + let exit = call(&mut socket, 2, DISPATCH, &message(0, "Report it. RATE 42")).await; + assert_eq!(exit["_tag"], "Success", "{exit}"); + let rate = since_report(log, "rate", carried(&mut config, 42.).await); + quiet(db, 1).await; + + // A turn fails on the usage limit, and the probe now reads the window full. + set_usage(usage, 100); + let exit = call(&mut socket, 3, DISPATCH, &message(1, "Go on. LIMIT")).await; + assert_eq!(exit["_tag"], "Success", "{exit}"); + let limit = since_report(log, "limit", carried(&mut config, 100.).await); + quiet(db, 2).await; + let windows = windows(&config.borrow()); + Run { + rate, + limit, + windows, + } +} + +fn shown(delay: Option) -> String { + delay.map_or_else( + || format!("never within {} s", PATIENCE.as_secs()), + |delay| format!("{:.0} ms", delay.as_secs_f64() * 1000.), + ) +} + +#[tokio::test(flavor = "multi_thread")] +#[ignore = "needs an installed upstream checkout and Node; see the file's comment"] +async fn differential() { + let checkout = PathBuf::from(std::env::var("TERN_UPSTREAM_DIR").expect("TERN_UPSTREAM_DIR")); + let node = PathBuf::from(std::env::var("TERN_NODE").expect("TERN_NODE")); + let scratch = scratch_dir(); + let root = scratch.join("workspace"); + std::fs::create_dir_all(root.join(THREAD)).unwrap(); + let upstream_usage = scratch.join("usage-upstream.json"); + let own_usage = scratch.join("usage-own.json"); + set_usage(&upstream_usage, 10); + set_usage(&own_usage, 10); + let upstream_log = scratch.join("agent-upstream.jsonl"); + let own_log = scratch.join("agent-own.jsonl"); + let upstream_command = + agent_command(&scratch, &node, "upstream", &upstream_log, &upstream_usage); + let own_command = agent_command(&scratch, &node, "own", &own_log, &own_usage); + let claude_home = scratch.join("claude-home"); + std::fs::create_dir_all(&claude_home).unwrap(); + let userdata = scratch.join("upstream/userdata"); + std::fs::create_dir_all(&userdata).unwrap(); + std::fs::write( + userdata.join("settings.json"), + settings(&upstream_command, &claude_home).to_string(), + ) + .unwrap(); + let path = format!("{}:/usr/bin:/bin", node.parent().unwrap().display()); + let upstream = start_upstream_with(&checkout, &node, &scratch, &[("PATH", path)]); + let upstream_db = upstream.base_dir.join("userdata/statev2.sqlite"); + let upstream_address = format!( + "ws://127.0.0.1:{}/ws?orchestrationProtocol=2#{}", + upstream.port, upstream.token + ); + let mut socket = open(&upstream_address).await; + let project = json!({ "type": "project.create", "commandId": format!("s-p-{THREAD}"), "projectId": format!("p-{THREAD}"), "title": THREAD, "workspaceRoot": root.join(THREAD) }); + let exit = call(&mut socket, 1, "projects.mutate", &project).await; + assert_eq!(exit["_tag"], "Success", "{exit}"); + drop(socket); + tokio::time::sleep(Duration::from_secs(1)).await; + + let own_base = scratch.join("own"); + harness::copy_database(&upstream_db, &own_base.join("userdata")); + let own_settings = settings_text(&upstream.base_dir).unwrap().replace( + &*upstream_command.to_string_lossy(), + &own_command.to_string_lossy(), + ); + std::fs::write(own_base.join("userdata/settings.json"), own_settings).unwrap(); + + let upstream_run = script( + &upstream_address, + &upstream_db, + &upstream_usage, + &upstream_log, + ) + .await; + let (own, own_address): (Arc, String) = start_own(&own_base).await; + own.attach_bridge(bridge_command(&node, &checkout, &scratch)); + let own_run = script(&own_address, own.db.path(), &own_usage, &own_log).await; + + eprintln!( + "a rate_limit_event reached the config stream in {} upstream, {} in own mode", + shown(upstream_run.rate), + shown(own_run.rate) + ); + eprintln!( + "a usage limit's new use reached the config stream in {} upstream, {} in own mode", + shown(upstream_run.limit), + shown(own_run.limit) + ); + assert!( + upstream_run.rate.is_some() && upstream_run.limit.is_some(), + "upstream did not carry the changes: {upstream_run:?}" + ); + assert!( + own_run.rate.is_some(), + "own mode did not carry the rate_limit_event" + ); + assert!( + own_run.limit.is_some(), + "own mode did not read the limits again after the usage limit" + ); + assert_eq!(upstream_run.windows, own_run.windows); +} diff --git a/docs/server-orchestration.md b/docs/server-orchestration.md index 8376641..381b7ff 100644 --- a/docs/server-orchestration.md +++ b/docs/server-orchestration.md @@ -593,6 +593,7 @@ The harness (`crates/server/tests/own_scheduled_tasks.rs`) seeds a scratch upstr - **Decision: upstream's provider services run in the bridge, as the source control providers do.** `ProviderRegistry` (each driver's status, models and usage limits, with its refresh schedule), `UsageLimitSources`, `ProviderAuthService` (sign-in flows per session), `ProviderInstallation`, `BackgroundPolicy` (the client activity leases and host power that gate background refreshes) and the model manifest refresh hold the drivers' own probes and CLIs, so they run where the drivers do, unchanged. The bridge serves their RPCs through `rpc.call` and `rpc.subscribe` with upstream's handlers from `ws.ts`, encoded with the RPC's schemas; Rust passes the caller's session and socket ids, which the sign-in flows and leases are kept by, and tells the bridge when a socket closes (`rpc.clientGone`). - **What Rust keeps.** The secret store and the settings, which the bridge asks for and is sent; the provider session directory (`providerSessions.*`), read from the projection rows, so a sign-in that changes a credential releases the sessions it makes stale; and MCP server sign-in, ported from `McpSignIn`, which finds the thread's live session in Rust and asks the bridge's session runtime (`session.mcpSignIn`). - **The config stream.** `subscribeServerConfig`'s snapshot carries the bridge's list, and the stream sends `providerStatuses` when the list changes, after 200 ms of quiet and only when it differs from the last one sent, as upstream's `PROVIDER_STATUS_DEBOUNCE_MS` does. The bridge sends the list whenever the registry changes it; a bridge that exits is started again only if it had answered once, and its next list follows. +- **Usage limits after a turn.** A provider's limits change in the bridge as its adapter reads them during a turn (Claude's `rate_limit_event`, Codex's rate limit updates), and the config stream carries them. A turn whose terminal fails on the usage limit also has its instance read its limits again once own mode stored the terminal, as upstream's `ProviderEventIngestor` does: Rust tells the bridge (`providers.refreshUsage`), which runs the instance's `snapshot.refreshUsage`. Without it the panel kept the use from before the limit until the next provider check, which waits for a client in use and its interval. `crates/server/tests/own_usage_limits.rs` times both against upstream on the config stream with the fake Claude CLI. - **A folder's catalog.** `server.refreshProviders` with `cwd` and an instance refreshes that folder's snapshot (`refreshWorkspaceSnapshot`); a worktree that is gone reads its project's folder, found through a thread that recorded it on a branch (`threads.worktreeProjectRoot`, since 11b). `workspaceSnapshotsOnDemand`, which shapes the answer for upstream's web client, is refused. - **Without a bridge**, as `tern-server --own` runs without `TERN_NODE`, the list is empty, `server.refreshProviders` answers `{providers: []}`, `server.reportClientActivity` answers nothing, and the rest fail with a `ProviderSetupError` that says the bridge is not running. - **The login shell's `PATH`.** Upstream's registry puts its login shell's `PATH` first before it probes the CLIs (`refreshPathFromLoginShell`), and the bridge runs that registry, so it finds what the user's shell finds; since PR 16a it also does so when it starts (`fixPath`). A harness that runs the bridge must give it a scratch `HOME` whose shell profiles set `PATH` to fake tools and `/usr/bin:/bin`, or it reaches the developer's real CLIs. Upstream's provider messages name its app ("… in T3 Code settings"); the packed bridge says tern ([The cutover](#the-cutover-in-own-mode)). diff --git a/scripts/run-harnesses.sh b/scripts/run-harnesses.sh index a5184f5..ec4d763 100755 --- a/scripts/run-harnesses.sh +++ b/scripts/run-harnesses.sh @@ -77,7 +77,7 @@ TAKES = { "own_devices::differential": 24, "own_subagents::differential": 24, "own_threads::differential": 24, "own_git_actions::differential": 22, "own_imports::differential": 22, "own_checkpoints::differential": 21, - "own_rollback::differential": 21, "own_switch::differential": 18, + "own_rollback::differential": 21, "own_switch::differential": 18, "own_usage_limits::differential": 12, "own_attachments::differential": 16, "own_turns::launch_titles": 10, "own_workspace::automatic_settlement": 10, "own_turns::idle_release": 6, "own_workspace::worktree_launches": 6, "own_workspace::terminals": 5,