返回 CodeWhale
TELEMETRY.md
根目录 / docs / TELEMETRY.md
1 # Codewhale product telemetry
2
3 > 阅读简体中文版:[zh_hans/TELEMETRY.md](zh_hans/TELEMETRY.md)
4
5 **Usage analytics are on by default in the current source.** The first
6 interactive launch gives a localized, nonblocking disclosure naming **Codewhale**
7 as the sole first-party collector, with a direct route to turn counting off. Notice version `6`
8 describes this policy; displaying it is not recorded as human acceptance.
9 Missing an older acceptance record does not turn a fresh installation off.
10 Existing explicit opt-outs remain off across upgrades, and unreadable privacy
11 state fails closed. Environment and CLI kill switches still take precedence.
12
13 Read the disclosure with `codewhale config telemetry`. Turn usage off in
14 `/settings` or run `codewhale config set telemetry false`. Turning it back on
15 in Settings or with `codewhale config set telemetry true` updates the existing
16 durable preference and privacy records for new sessions. The compatibility
17 command `codewhale config telemetry --accept-notice 5` remains available, but
18 is not required for a fresh installation. Collection never includes work content or credentials.
19
20 Counts are stored exclusively in Codewhale's first-party Cloudflare Analytics Engine ingest; no third-party analytics processor is used.
21 Source readiness does not establish a deployment, an activated processor,
22 an egress receipt, or a retention setting.
23
24 Codewhale does not collect conversations, code, prompts, files, file/repo/branch
25 names, model content, or credentials. It sends no per-turn or per-tool timeline.
26 It does send the closed, aggregate schema below: version and platform classes,
27 session duration/outcome, feature/error counters, and a random install id that
28 rotates every 90 days.
29
30 **There is now a real endpoint.** An enabled session sends its batches to the
31 first-party ingest service at `https://telemetry.codewhale.net/v1/telemetry`,
32 which is the shipped default for `telemetry_endpoint`. What that service is,
33 what it stores, and what it structurally cannot store is spelled out in "What
34 the endpoint does" below.
35
36 **To send nothing anywhere, turn telemetry off** (see "Turning it off"). To stay
37 enabled but contact nobody, set `telemetry_endpoint = ""`: batches are then
38 appended to `$CODEWHALE_HOME/telemetry/dryrun.jsonl` on your own machine, byte
39 for byte what the server would have received, and no HTTP client is ever
40 constructed. That file is how you audit this document against reality.
41
42 This document is the schema. It is not a summary of the schema: a test in
43 `crates/telemetry` parses the field names out of this file and asserts set
44 equality against the structs the serializer actually uses, so a field that is
45 here and not in the code — or in the code and not here — fails the build.
46
47 Local saved sessions and `codewhale metrics` remain available with telemetry
48 disabled and require no account or hosted reporting service. Disabling telemetry
49 does not disable local usage receipts.
50
51 ## Turning it off
52
53 There are two off switches and they do different things. Both stop collection
54 completely; only one of them erases anything.
55
56 ```sh
57 codewhale config set telemetry false # opt out: stops collection and erases state
58 CODEWHALE_TELEMETRY=0 codewhale # kill switch: stops collection, erases nothing
59 DO_NOT_TRACK=1 codewhale # the same kill switch, by the common convention
60 codewhale --telemetry false # the same kill switch, for one command
61 ```
62
63 **`telemetry = false` in the config file is the opt-out.** It is a floor:
64 `--telemetry true` and `CODEWHALE_TELEMETRY=1` both lose to it, because a
65 setting you can undo by accident from a wrapper script is not a setting. It
66 deletes the random install id, deletes every spool, truncates every dry-run
67 record, and writes a tombstone. Appends, identity/state writes, and delivery all
68 share the wipe's ordering lock, so once opt-out returns no pre-opt-out write or
69 POST remains in flight. If any part of that wipe fails, the tombstone is still
70 there and no spool can be sent — a failed wipe fails closed. Every later
71 run re-asserts the same tombstone for as long as the setting stands, so it
72 survives. Turning telemetry back on in `/settings` records that explicit preference
73 in both existing privacy registers; a fresh launch can then clear the tombstone. Nothing buffered before that point is
74 ever sent.
75
76 **The environment variable and the flag are kill switches, not opt-outs.**
77 Telemetry is off for the run, nothing is written, nothing is sent — and
78 nothing on disk is touched or deleted. That is deliberate: a harness or agent
79 that sets `CODEWHALE_TELEMETRY=0` for one command must not silently discard the
80 install id and the dry-run records of the person who owns the machine. If you
81 want the erasing kind, use the config file.
82
83 `CODEWHALE_TELEMETRY` (and its `DEEPSEEK_TELEMETRY` alias) accepts
84 `0`, `1`, `true`, `false`, `yes`, `no`, `on`, `off`, `enabled`, `disabled`.
85 A value this list cannot read also resolves to off — a typo in a kill switch
86 must never resolve to "on".
87
88 The first-run notice is not shown when telemetry is already persistently off or
89 a run-scoped kill switch is active. The notice never rewrites a
90 `telemetry = false` you put there yourself.
91
92 A repo-local `.codewhale/config.toml` can set neither `telemetry` nor
93 `telemetry_endpoint`, and a workspace `.env` can set neither. Someone else's
94 repository cannot turn your telemetry on or aim it at a host of their choosing.
95
96 ## Where it lives, and how much of your disk it uses
97
98 Everything is under `$CODEWHALE_HOME/telemetry/` (`0700`), every file `0600`:
99
100 | file | role |
101 |---|---|
102 | `spool/<nonce>.jsonl` | one running process's pending events: a header line (schema, notice and app version, release sha, surface, whether a terminal), then one JSON object per line |
103 | `spool/<nonce>.lock` | held by that process while it runs; a spool whose lock is free belongs to a process that has ended |
104 | `buffer.jsonl.lock` | the sibling ordering lock shared by writes, delivery, arming, and wipe |
105 | `buffer.jsonl` | left over from older versions; only ever emptied, never written or sent |
106 | `dryrun.jsonl` | where batches go when the endpoint is configured empty |
107 | `state.json` | the last app version seen and the last flush attempt |
108 | `install_id.json` | the random install id and when it was minted |
109 | `disabled` | the tombstone; present means nothing is appended or sent |
110
111 The nonce is random, names a file on your disk and is never sent. Each spool and
112 `dryrun.jsonl` is a ring capped at 512 records (the header counts as one) or
113 256 KiB, whichever comes first, with the oldest events dropped. The documented
114 footprint ceiling is therefore **256 KiB for each running process, 256 KiB for
115 `dryrun.jsonl`, and at most four leftover spools of ended processes kept after
116 each TUI, `exec` or `serve` start**, plus a few hundred bytes of metadata.
117
118 The install id is a random v4 UUID. It is never derived from your hostname,
119 MAC address, `machine-id`, home directory, username, or executable path — a
120 derived id is a device fingerprint that survives reinstall and re-identifies
121 you across your own opt-out. It is regenerated whenever
122 `$CODEWHALE_HOME/telemetry/` is cleared, which opting out does automatically,
123 and in any case every 90 days.
124
125 There is no factory-reset command in Codewhale, so this document does not
126 claim one.
127
128 ## When anything is sent, and where
129
130 Nothing is collected or sent when a persistent opt-out or run-scoped kill
131 switch is in force, or when privacy state is unreadable. TUI and `exec` sessions have one network flush point at a normal end: an attempt
132 during shutdown, bounded at three seconds. That flush sends only the process's
133 own spool, under that process's own surface and version, and deletes it before
134 the request is made. Short CLI commands such as `config`, `doctor`, and `auth`
135 do not wait for that network request. They record `session_end`, seal the event
136 to their own spool with a much shorter bound, and return; the next TUI, `exec`
137 or `serve` start sends what they left (below). An explicitly empty endpoint
138 finalizes its local dry-run batch immediately.
139
140 A session that is ended early makes one more bounded attempt, so its usage is
141 not lost with it. When a terminating signal (interrupt, terminate, hang-up, or
142 console close) reaches a TUI, `exec` or `serve` session, and when `exec` ends
143 because the program reading its output has closed the pipe, the session records
144 `session_end` with exit class `signal`, then makes one send attempt bounded at
145 one and a half seconds, alongside the process's own shutdown work. A second
146 signal ends the process at once without waiting. This is the same single `POST`
147 of the same fields, never retried. Short CLI commands stay local-only on this
148 path too.
149
150 A session that ends without any report (killed outright, a power loss, a crash
151 before the handler runs) leaves its spool behind. When a later TUI, `exec` or
152 `serve` session starts, it sends the leftovers once: at most four, newest first,
153 one `POST` per leftover session, each carrying that session's own surface and
154 app version and this installation's current install id and send time. Each
155 leftover is deleted before its request is made and is never retried. A leftover
156 older than seven days, one beyond the newest four, one written by a build with a
157 different schema or notice version, and any line that fails the schema bounds is
158 deleted without being sent. Consent and the opt-out tombstone are checked
159 before anything is read and again before each request, and the request runs on
160 its own thread so it never delays your session. Opting out deletes every spool.
161 Opting back in starts without any spool from before.
162
163 There is no mid-session flush, per-turn flush, or per-tool-call
164 flush. Every network flush re-resolves your setting from disk
165 immediately beforehand, so `codewhale config set telemetry false` written from
166 another terminal stops the flush of a session that is already running, including
167 one that is being terminated.
168
169 A flush is **one `POST`** to the resolved endpoint — by default
170 `https://telemetry.codewhale.net/v1/telemetry`. The request carries a
171 `content-type: application/json` header, a
172 `user-agent: codewhale-telemetry/<app_version>`, and the batch body. That is
173 all: no cookies (the HTTP client is built without a cookie jar to disable), no
174 redirects (refused outright), no `Authorization` header, no custom headers, and
175 no query string. The response body is discarded unread; only the status class is
176 looked at.
177
178 `https://` is required. Plain `http://` is accepted only for a loopback host, so
179 you can point the client at a recorder of your own and read the wire form
180 directly; no environment variable overrides that refusal. An endpoint the client
181 refuses turns telemetry off for the run rather than falling back to a different
182 destination.
183
184 Any failure — DNS, connect, TLS, timeout, non-2xx — drops the batch. There is
185 no retry, no backoff, and no re-queue. A permanently offline machine attempts at
186 most once per flush point and never grows a queue.
187
188 ---
189
190 ## Event schema
191
192 `SCHEMA_VERSION = 4`. `notice_version = 6` identifies the disclosed default-on
193 policy; it does not assert human consent or that a notice was seen. Schema 4
194 adds the `model_usage` and `tool_usage` events and the `ci` session source.
195 Schema-3 batches with `notice_version = 5` are still accepted without them, which
196 is what the web and desktop control-plane relay sends. The closed
197 v2 contract still accepts only `consent_version = 4`, retaining its original
198 explicit opt-in meaning. Fields cannot be mixed between versions. All schemas
199 are first-party only; the unchanged v1 contract refuses
200 new fields, surfaces, and `product_usage` events.
201
202 Every field is an integer, a boolean, or a **closed enum string**, except exactly four bounded strings: `app_version`, `git_sha`, `panic_site`, and `model_usage.model`, which is closed against the bundled model catalog. Each of the four has a written rule and a check on the drain path. **There is no free-form string type in this schema, and no open-keyed map.** That is the property that makes red line 3 enforceable rather than aspirational.
203
204 ### Batch envelope — sent on every POST
205
206 ```jsonc
207 {
208 "schema_version": 4,
209 "notice_version": 6,
210 "sent_at": "2026-08-03T18:04:11Z", // RFC3339 UTC, second precision
211 "install_id": "3f2a…", // uuid v4, rotates every 90 days
212 "app_version": "0.9.12",
213 "git_sha": null, // non-null only for SHA-stamped builds
214 "surface": "tui",
215 "os": "macos",
216 "arch": "aarch64",
217 "libc": "none",
218 "tty": true,
219 "events": [ … ]
220 }
221 ```
222
223 | Field | Type | Source anchor | Rule |
224 |---|---|---|---|
225 | `schema_version` | `u32` | const in `crates/telemetry/src/event.rs` | Bumped on any field add/remove/retype. Never reused. Pinned by a golden snapshot test. |
226 | `notice_version` | `u32` | policy constant in `crates/telemetry/src/event.rs` | Exactly `6` for schema 4; identifies the disclosed opt-out policy, not a human acceptance record. |
227 | `sent_at` | RFC3339 | `chrono::Utc::now()` | Second precision. Per-**batch** only — events carry no timestamps at all. |
228 | `install_id` | uuid v4 | `crates/telemetry/src/envelope.rs` | Random, never derived, rotated every 90 days. See "Where it lives" above. |
229 | `app_version` | string | `env!("CARGO_PKG_VERSION")`, as at `crates/telemetry/src/lib.rs:112` | Must match `^\d+\.\d+\.\d+(-[0-9A-Za-z.]+)?$`. |
230 | `git_sha` | string \| null | `option_env!("CODEWHALE_RELEASE_BUILD_SHA")` — a **new** rustc-env | First 12 hex chars. Emitted **only** when `codewhale_build_support::release_build_sha` saw a valid full SHA in `CODEWHALE_BUILD_SHA`, the legacy `DEEPSEEK_BUILD_SHA`, or `GITHUB_SHA`, in that precedence order. `null` for every unstamped build, with no runtime lookup of any kind. **Never** `CODEWHALE_BUILD_COMMIT` — that falls back to `git_commit` and is the builder's private HEAD. **Never** `Thread.git_sha` (`crates/state/src/lib.rs:93`) — that is the user's workspace commit and a red line, one identifier away by name. |
231 | `surface` | enum | explicitly set by the emitting client | `tui \| exec \| cli \| app-server \| mcp-server \| serve \| website \| web-app \| desktop \| control-plane \| vscode-extension`. Runtime metrics keep their existing collector. Browser product counts use the same closed envelope. A declared surface is not proof its client is deployed. `vscode-extension` is an extension client of this schema, deliberately generic the way `web-app` and `desktop` are: the editor's own name and version are **not** collected. Widening this whitelist changes no field, so the schema version is unchanged. |
232 | `os` | enum | `std::env::consts::OS`, as at `crates/cli/src/update.rs:41` | Whitelist: `linux \| macos \| windows \| freebsd \| android \| other`. |
233 | `arch` | enum | `std::env::consts::ARCH` | `x86_64 \| aarch64 \| other`. |
234 | `libc` | enum | `cfg!(target_env)` — **compile time** | `gnu \| musl \| none`. Runtime detection reads distro vendor strings; compile-time is free and leaks nothing. |
235 | `tty` | bool | `std::io::IsTerminal`, as at `crates/telemetry/src/envelope.rs:196` | `stdin().is_terminal() && stdout().is_terminal()`. |
236 | `events` | array | the process's spool | Every element is one of the six events below and nothing else. Capped at 200 events or 64 KiB per batch; events beyond either cap are dropped with the spool, never carried to a later flush. |
237
238 **`os_major` is not collected.** Reading it costs unsafe FFI on two platforms plus a file parser on a third, in the one crate whose entire value is being small enough to audit — and `os`, `arch`, and `libc` are free and answer the platform question. It may be reconsidered if the stored data ever shows that the OS-version cut is what triage is missing; a hunch is not that evidence.
239
240 ### Which surfaces emit
241
242 Every runtime surface uses the same `decide` and flush recheck: readable privacy
243 state, resolvable home, valid endpoint, and no persistent opt-out or run kill
244 switch. Missing preferences default on. The interactive TUI shows the disclosure;
245 headless commands never synthesize consent. Existing runtime events and counters
246 are unchanged and go only to Codewhale's first-party ingest.
247
248 ### An embedder declares the server it started
249
250 A client that starts `codewhale serve` may name itself, so its sessions are not
251 counted as anonymous `serve` traffic from nobody in particular. It sets
252 `CODEWHALE_TELEMETRY_SURFACE` to a value in the `surface` whitelist before
253 spawning the server; the extension client uses `vscode-extension`.
254
255 Three properties of that read are deliberate:
256
257 - **`serve` only.** The variable is inherited by descendant processes, and an
258 agent's shell command runs `codewhale` descendants carrying this environment.
259 Only the branch that *is* the embedder's own server consults it, so a nested
260 `codewhale exec` cannot report itself as the embedder.
261 - **`tui` is refused**, and `serve --mcp` still reports `mcp-server`: nothing
262 starts the interactive terminal UI on a user's behalf, and a server is not an
263 MCP server because an embedder said so.
264 - **An unrecognised name is dropped, not repaired.** A value outside the
265 whitelist falls back to `serve` rather than failing startup or being guessed
266 at; the field is a label, and the default is the honest one.
267
268 This changes how an embedder's sessions are *labelled*. It does not change
269 whether anything may be collected: the server resolves that itself, from the
270 same durable config, the same setup state, and the same `CODEWHALE_TELEMETRY`
271 run-scoped kill switch. An embedder cannot enable collection where the user has
272 turned it off, and a durable opt-out in one client is a durable opt-out for every
273 client on the machine, because they share one home and one install identity.
274
275 The extension client is the worked example: it holds a single on/off setting and
276 passes `CODEWHALE_TELEMETRY=0` when the user turns reporting off. It contains no
277 payload builder, no buffer, and no transport of its own — so its sessions share
278 the home's `install_id` rather than minting a second one, and one installation is
279 one install in every count derived from that id.
280
281 Because that switch is run-scoped rather than a durable opt-out, turning it off
282 stops the engine this extension starts and leaves the shared buffer and identity
283 alone: those belong to every surface on the machine, not to one window, and
284 clearing them would silently change what the user's terminal sessions do. A user
285 who wants reporting stopped and cleared everywhere does that once, with
286 `codewhale config set telemetry false`.
287
288 Website and application clients use `product_usage`, with notice version `5`,
289 a random browser-local v4 ID rotated after 90 days, `os = other`, `arch = other`,
290 `libc = none`, `tty = false`, and `git_sha = null`. They do not inspect the browser
291 fingerprint. Their configured same-origin proxy forwards only this bounded JSON
292 to the first-party ingest, with no incoming cookies, headers, URLs, or identities.
293 The browser endpoint is inert if unconfigured. Browser opt-out clears pending
294 counts and local identity; actions taken while disabled are never backfilled.
295 Product usage settings belong in the app and runtime; marketing privacy details
296 and any website opt-out belong on the privacy page.
297
298 ### Event: `install_or_upgrade`
299
300 Emitted once when `state.json`'s `last_version` differs from `app_version`.
301
302 ```jsonc
303 { "event": "install_or_upgrade", "kind": "upgrade", "previous_version": "0.9.3" }
304 ```
305
306 | Field | Type | Source | Rule |
307 |---|---|---|---|
308 | `kind` | enum | derived | `install` (no prior record) \| `upgrade` \| `downgrade`. |
309 | `previous_version` | string \| null | `$CODEWHALE_HOME/telemetry/state.json` **only** | Same regex as `app_version`. Never derived from session history or config mtimes — those files have a different privacy contract. |
310
311 ### Event: `session_start`
312
313 ```jsonc
314 { "event": "session_start", "source": "interactive" }
315 ```
316
317 `source` is `SessionSource` (`crates/state/src/lib.rs:34-41`) stringified by `session_source_to_str` (`:1909-1917`): `interactive | resume | fork | api | unknown | ci`.
318 `ci` replaces the others whenever `CI` or `GITHUB_ACTIONS` is set to a true
319 value, including the Codewhale GitHub Action, so automated runs are never
320 counted as people. Only that boolean environment fact is read.
321
322 ### Event: `session_end`
323
324 The workhorse. Everything a session accumulated ships here, once.
325
326 ```jsonc
327 {
328 "event": "session_end",
329 "duration_bucket": "1m_10m",
330 "exit_class": "clean",
331 "cold_start_bucket": "250_1000",
332 "providers": ["deepseek", "custom"],
333 "counters": { "turns": 14, "tool_calls": 61, "fleet_dispatch": 0, "workflow_run": 0,
334 "subagent_spawn": 2, "mcp_server_connected": 0, "memory_search": 0,
335 "approval_modal_shown": 0, "approval_auto_allowed": 0,
336 "command_palette_open": 3 },
337 "errors": { "auth_preflight_failed": 0, "provider_http_4xx": 0, "provider_http_5xx": 1,
338 "tool_denied_by_policy": 0, "tool_timeout": 0, "network_error": 0 },
339 "turn_wall": { "lt_5s": 9, "5_30s": 4, "30_120s": 1, "gte_120s": 0 }
340 }
341 ```
342
343 **`counters` and `errors` are `#[derive(Serialize)]` structs of named `u32` fields, not maps.** Every field is serialized including zeros. The key set is closed by the compiler: adding a counter requires editing `crates/telemetry/src/event.rs`, which is where the doc-match test lives.
344
345 **`duration_bucket`** — `chrono` delta from `app.session_started_at` (`crates/tui/src/tui/app.rs:1889`). Half-open, seconds: `lt_1m` (`d < 60`), `1m_10m` (`60 ≤ d < 600`), `10m_60m` (`600 ≤ d < 3600`), `gt_60m` (`d ≥ 3600`).
346
347 **`exit_class`** — `clean | signal | panic | error`. **Derived from an explicit `AtomicU8`, never from an exit code.** A turn exits `0` or `1` whatever its termination reason, so the code cannot carry the class. The atomic is set by the panic hook (`crates/tui/src/lib.rs:1582`), by the signal task when the first signal arrives, by `exec` when its output pipe closes, and on the clean path from `RunTerminationReason::is_success()` (`crates/engine/src/core/runtime_contract/termination.rs:34-36`) — `error` otherwise.
348
349 **`cold_start_bucket`** — from `startup_trace::elapsed_ms()`, which reads `PROCESS_START` directly and is independent of the startup summary's buffer clear (`crates/runtime/src/startup_trace.rs:39-45`). Boundaries: `lt_250`, `250_1000`, `1000_3000`, `gte_3000`. Absent on non-TUI surfaces.
350
351 **`providers`** — sorted, deduplicated array of `ProviderKind::as_str()` (`crates/config/src/provider_kind.rs:295`, a `&'static str` from a closed enum; `Custom` yields the literal `"custom"`). **The API takes `ProviderKind` by value, never `&str`.** Do not call `ProviderKind::parse` or `parse_config_identity` (`:300`, `:330`) — those are for config-table resolution. **Do not read** `provider_identity_for_persistence()` (`crates/tui/src/tui/app.rs:5049`), `provider_id_for_persistence()` (`:5058`), `ExecStreamMeta.provider_id` (`crates/app-server/src/exec_agent.rs`), or `PlannedTurnRoute.effective_provider_label` (`crates/engine/src/turn_route_plan.rs:189-193`) — all four return the customer's own `[providers.<name>]` table key when the route is Custom. This is the single most likely leak in the feature: it is one field away from the natural seam and `/status` already prints it (`crates/tui/src/commands/groups/config/status.rs:24-28`). **Custom, private, and local model ids are never sent** — `crates/runtime/src/safe_label.rs:11-15` documents that a custom model id can be a path, a URL, or a deployment id that is itself a credential; only lowercased model ids matching the bundled public catalog are emitted in `model_usage` below (everything else maps to `"other"`).
352
353 **`counters`** — closed field set. Every bump happens at the **call site**, never inside a conditionally-entered handler:
354
355 | field | source anchor |
356 |---|---|
357 | `turns` | `record_model_turn_telemetry` in `crates/engine/src/core/engine.rs`, called once per turn the engine runs, before the zero-usage early return, so a turn that reported no tokens still counts. The engine counts on every surface (terminal UI, `exec`, `serve`, desktop), so an `exec` or `serve` session reports the turns it ran. It counts turns of the session's own engine only: a sub-agent's or an RLM call's child engine adds no session turn, though its model usage rows still count. The terminal UI no longer counts a turn itself. Autonomous continuation turns and review turns are turns the engine runs and count. Compared with the earlier terminal-UI count, shell-command turns (`!` commands), rejected submissions, history purges and turns that failed before the model was called no longer count. The call site never lives inside a conditionally entered handler such as the turn-end hook. |
358 | `tool_calls` | `execute_tool_with_lock` in `crates/engine/src/core/engine/tool_execution.rs` — surface-agnostic, fires for exec and CLI too |
359 | `fleet_dispatch` | `create_queued_run_with_descriptor` in `crates/engine/src/fleet/manager.rs` — the single funnel that `create_run` and `create_queued_run` both land in; counting at either caller would double-count a plain `fleet run`. |
360 | `workflow_run` | bumped in `WorkflowTool::execute` (`crates/engine/src/tools/workflow/mod.rs`) only after `parse_workflow_action` returns an `Ok(WorkflowAction)`, never from `input["action"]`. The JSON Schema `enum` in `WorkflowTool::input_schema` is what is published *to the model* — a declaration, not a guard; the real parse also accepts `spawn\|wait\|list\|inspect\|stop\|abort`, and its reject arm (`Invalid workflow action '…'`) embeds the model string verbatim, so a rejected action is never counted. |
361 | `subagent_spawn` | `spawn_subagent_from_input` in `crates/engine/src/tools/subagent/mod.rs`, after the sub-agent has been registered; surface-agnostic, so `exec` and `serve` count it too. A refused spawn is not counted. |
362 | `mcp_server_connected` | bumped when a server snapshot's `.connected` is true, in `snapshot_from_config` (`crates/engine/src/mcp.rs`); never `name`, `command_or_url`, or `error` — server names are user-chosen and routinely internal infra |
363 | `memory_search` | `tool_name == "memory_search"` (the tool registered in `crates/engine/src/tools/native_memory.rs`), counted at the same `execute_tool_with_lock` choke point |
364 | `approval_modal_shown` | the `Event::ApprovalRequired` arm of `run_event_loop` (`crates/tui/src/tui/ui/event_loop.rs`; the event is defined in `crates/engine/src/core/events.rs`) |
365 | `approval_auto_allowed` | `tool_ask_rule_decision_for_context` in `crates/engine/src/core/engine.rs`. Count only. Never `matched_rule`, `reason()`, the command, or argv — `auto_allow` patterns are user-authored command strings (`crates/execpolicy/src/command_safety.rs:35/309`) |
366 | `command_palette_open` | the palette key path in `run_event_loop` (`crates/tui/src/tui/ui/event_loop.rs`) and `handle_context_menu_action` in `crates/tui/src/tui/mouse_ui.rs` |
367
368 **`errors`** — closed field set. Every value is a **variant discriminant**, never `err.to_string()`:
369
370 | field | source anchor |
371 |---|---|
372 | `auth_preflight_failed` | discriminant of `CredentialReadiness` (`crates/workflow/src/fleet_preflight.rs:37-58`) / `ProviderAuthClass` (`crates/engine/src/provider_readiness.rs:32`). Discriminant only — `Missing { detail }` carries free text |
373 | `provider_http_4xx` | `status.as_u16() / 100 == 4`, captured at `crates/engine/src/client/chat.rs:595` and `:673` **before** the `bail!`. One row per field, because the doc-match test reads this table field for field |
374 | `provider_http_5xx` | `status.as_u16() / 100 == 5`, same capture points |
375 | `tool_denied_by_policy` | the `permission_denied` arm of the 8-variant match at `crates/engine/src/core/engine/tool_execution.rs:512-531` |
376 | `tool_timeout` | the `timeout` arm, same match |
377 | `network_error` | `retry_reason_label_and_human()`'s `&'static str` half, `crates/engine/src/client.rs:2659` |
378
379 Why discriminants and nothing else: `ToolError::PathEscape`'s `Display` *is* an absolute path (`crates/tools/src/lib.rs:61`); `fim.rs:48-50`'s `Display` *is* a literal source fragment the model emitted; `secrets/src/lib.rs:50`'s `Display` carries the secret store's absolute path; every `LlmError` variant carries the raw provider HTTP body verbatim (`crates/engine/src/llm_client/mod.rs:327`), and a 400 from a content filter routinely echoes the prompt.
380
381 **`turn_wall`** — a per-session histogram of counts, never per-turn events. `lt_5s`, `5_30s`, `30_120s`, `gte_120s`. Recorded by `observe_turn_secs` next to the `turns` bump in `record_model_turn_telemetry`; the duration is the time from the engine starting the turn to the turn settling, and the same sub-agent and RLM exclusion as `turns` applies. The sum of its four buckets equals `turns`.
382
383 ### Event: `panic`
384
385 Appended **synchronously** by the panic hook, because a `session_end` may never be written.
386
387 ```jsonc
388 { "event": "panic", "site": "crates/tui/src/lib.rs:1582:5" }
389 ```
390
391 `site` comes from `panic_info.location()` (`crates/tui/src/lib.rs:1597-1600`) or `Location::caller()` (`crates/util/src/utils.rs:523`). **Allowlist reduction, not optional:** emit verbatim only if `file()` starts with `crates/`; otherwise emit the literal `"<dep>"`. Must match `^crates/[A-Za-z0-9_/.-]+\.rs:\d+:\d+$` or `^<dep>$`. There is no `--remap-path-prefix` in this repo (no `.cargo/config.toml`; `Cargo.toml:69-74` sets only `lto`/`strip`/`codegen-units`), so a panic inside a registry dependency yields `/Users/<builder>/.cargo/registry/src/…/ratatui-0.29.0/src/…` — the **build machine's username**, shipped from every user's binary.
392
393 **The panic message is never sent.** The hook at `crates/tui/src/lib.rs:1590-1596` builds `msg` from the payload; telemetry must not read it. A slicing panic embeds the entire string being sliced, and this tree slices user and model text in dozens of places.
394
395 ### Event: `product_usage`
396
397 One aggregate of explicit product interactions, with every field a saturating
398 `u32`, including zero values. No page paths, URLs, referrers, search terms,
399 account/session IDs, text, or action timestamps are permitted. Clients flush
400 aggregate counts on page exit or when hidden, rather than each action.
401
402 ```jsonc
403 {
404 "event": "product_usage",
405 "counters": {
406 "page_view": 1,
407 "docs_view": 0,
408 "install_copy": 0,
409 "download": 0,
410 "signup": 0,
411 "login": 0,
412 "session_create": 0,
413 "session_resume": 0,
414 "turn_submit": 0,
415 "turn_complete": 0,
416 "settings_open": 0,
417 "integration_connect": 0,
418 "error_shown": 0
419 }
420 }
421 ```
422
423 `page_view` counts a page view and `docs_view` a documentation view; `install_copy`
424 and `download` count installation actions. `signup` and `login` count successful
425 authentication actions, never identity. `session_create`, `session_resume`,
426 `turn_submit`, and `turn_complete` count their named product actions.
427 `settings_open`, `integration_connect`, and `error_shown` are counts only:
428 never the selected setting, integration name, error body, or work content.
429 An event's availability depends on the emitting client; zero is not proof a
430 feature was exercised or available.
431
432 ### Event: `operations_summary`
433
434 Anonymous service health aggregates from the existing control-plane signal ledger.
435 Exactly these six saturating `u32` fields are accepted, only on `control-plane`.
436 This requires an explicit operator delivery/processor configuration, independently
437 of the end-user analytics choice. Each batch uses a fresh random v4 `install_id`;
438 there is no user/account/session join. No per-request rows, routes, request
439 digests, IDs, error text, traces, or timing series are permitted. `requests` and
440 `errors` count requests and failures; `duration_ms_total` and `duration_ms_max`
441 are aggregate latency values; `probes` and `probes_failed` count health probes.
442
443 ```jsonc
444 {
445 "event": "operations_summary",
446 "requests": 10,
447 "errors": 1,
448 "duration_ms_total": 1500,
449 "duration_ms_max": 300,
450 "probes": 2,
451 "probes_failed": 0
452 }
453 ```
454
455 ### Event: `model_usage`
456
457 One event per provider and model a session used, sent with `session_end`.
458 It is how Codewhale decides which providers and models to support first, which
459 to make defaults, and whether prompt caching is working.
460
461 ```jsonc
462 {
463 "event": "model_usage",
464 "provider": "deepseek",
465 "model": "deepseek-v4-flash",
466 "counters": {
467 "turns_ok": 12,
468 "turns_failed": 1,
469 "turns_interrupted": 0,
470 "input_tokens": 418230,
471 "output_tokens": 9120,
472 "cache_read_tokens": 380001,
473 "cache_write_tokens": 0
474 },
475 "turn_wall": { "lt_5s": 3, "5_30s": 8, "30_120s": 2, "gte_120s": 0 }
476 }
477 ```
478
479 `provider` follows the `providers` rule of `session_end`. `model` is the
480 lowercased model id **only when it appears in the public model catalog bundled
481 with Codewhale**; any other name (custom, local, fine-tuned or private models,
482 and `[providers.<name>]` routes) is sent as `other`. Token counts are the
483 provider's own usage numbers for the main conversation; `input_tokens` includes
484 cache reads. Turn counts are by outcome, and `turn_wall` buckets each turn's
485 wall time as `session_end` does. A session reports at most 16 provider and model
486 pairs; later pairs are counted under `other`. No per-turn timeline is sent.
487
488 ### Event: `tool_usage`
489
490 One event per tool a session called, sent with `session_end`. It is how
491 Codewhale decides which built-in tools to invest in, fix or retire.
492
493 ```jsonc
494 { "event": "tool_usage", "tool": "read_file", "calls": 41, "errors": 2 }
495 ```
496
497 `tool` is a first-party tool name from this closed list, `mcp` for any MCP
498 server tool, or `other` for any other tool (plugins and configured tools):
499 `agent`, `apply_patch`, `authenticate`, `automation_adopt`, `automation_create`,
500 `automation_delete`, `automation_list`, `automation_pause`, `automation_read`,
501 `automation_resume`, `automation_run`, `automation_update`, `bash`,
502 `code_execution`, `context_archive_search`, `create_goal`, `edit`,
503 `edit_file`, `exec_shell`, `execute_tools`, `fetch_url`, `file_search`,
504 `fim_edit`, `get_goal`, `git_blame`, `git_commit_plan`, `git_diff`, `git_fetch`,
505 `git_log`, `git_merge_tree`, `git_review_scope`, `git_show`, `git_status`,
506 `github_close_issue`, `github_close_pr`, `github_comment`,
507 `github_issue_context`, `github_pr_context`, `github_report_draft`,
508 `github_report_read`, `grep_files`, `handle_read`, `image_ocr`,
509 `list_dir`, `load_skill`, `lsp`, `memory_search`, `notify`,
510 `pandoc_convert`, `pr_attempt_list`, `pr_attempt_preflight`, `pr_attempt_read`,
511 `pr_attempt_record`, `present`, `read`, `read_file`,
512 `read_media`, `remember`, `request_plugin_install`, `request_user_input`,
513 `retrieve_tool_result`, `revert_turn`, `review`, `rlm`, `run_tests`,
514 `run_verifiers`, `send_later`, `session_search`, `show_data`, `speech`,
515 `start_mcp_server`, `task_cancel`, `task_create`, `task_gate_run`, `task_list`,
516 `task_read`, `task_shell_wait`, `terminal_cancel`, `terminal_reset`,
517 `terminal_run`, `terminal_send`, `terminal_wait`, `todo_write`, `tool_search`,
518 `tui_help`, `update_goal`, `validate_data`, `wait_for_dev_server`,
519 `web.run`, `web_search`, `workflow`, `write`, `write_file`.
520 An action-family call (`Git`, `Run`, `Web`, `tasks`, `automation`, `github`)
521 is reported under its per-action name, for example `git_status` or
522 `task_gate_run`.
523 `errors` counts calls that returned an error, never the error text or the
524 arguments.
525
526 ### What the endpoint does — a shipping gate, not a footnote
527
528 This section was a gate on configuring any non-loopback endpoint. The endpoint is now configured by default, so this is a description of a service that exists rather than a promise about one that might.
529
530 **What it is.** `https://telemetry.codewhale.net/v1/telemetry` — a Cloudflare Worker named `codewhale-telemetry-ingest`, whose complete source is in this repository at [`telemetry-ingest/`](../telemetry-ingest/). It is the single schema and storage authority; browser applications may use a same-origin proxy that forwards only the body. There is no telemetry queue or additional runtime collector. It is write-only: nothing in the Worker can read back what was stored, and querying happens out of band: the owner's token against Cloudflare's SQL API, or the separate private [`telemetry-stats/`](../telemetry-stats/) Worker, which reads the dataset in place through an account binding with no token. The hostname is deliberately self-describing, so anyone inspecting their own network traffic can tell what it is from the name alone.
531
532 **What it stores.** Everything in this document and nothing else, in Workers Analytics Engine — one row per event. The validator in `telemetry-ingest/src/schema.ts` is a **closed** field set: an unknown key anywhere in a batch rejects the whole batch with `400`. A future client bug that starts attaching a path, a prompt, or a provider table name gets refused by the server rather than quietly stored. `telemetry-ingest/test/schema-doc.test.ts` parses the field names and enum spellings back out of *this file* and asserts set equality against the validator, and `telemetry-ingest/test/ingest.test.ts` posts the Rust client's own pinned golden batch and asserts it is accepted byte for byte — so this document, the client, and the endpoint cannot drift apart without a red test.
533
534 Batches are **IP-stripped at ingest**. No IP is stored, logged, or joined to `install_id` — and that is structural rather than a setting anyone could flip. An Analytics Engine row is exactly `_sample_interval`, `blob1`–`blob20`, `dataset`, `double1`–`double20`, `index1`, and `timestamp`. Every one of those columns is written by the Worker's own `writeDataPoint` call; there is no implicit column, so **there is no IP, country, or geo column** — no slot one could occupy even if the code wanted it there. And the code cannot want it:
535
536 - The handler reads exactly **two** request headers — `content-type` and `content-length`. Nothing else, ever.
537 - It never touches the request's `cf` property, so country, colo, city, region, ASN, timezone, and coordinates are never in scope.
538 - The function that builds every stored row cannot see the request at all; its input type is the validated batch body.
539 - Nothing logs. `invocation_logs` is off in `wrangler.jsonc` — Cloudflare describes those as "enriched with information available to Cloudflare in the context of the invocation", which is exactly the class of automatic per-request record this service will not keep — and there is no `console.*` call in the source.
540 - Rate limiting is keyed on `install_id` from the validated body, never on a network address. An IP-keyed limiter would mean this Worker handles IPs. It is the weaker limiter and it is the right trade.
541 - `telemetry-ingest/test/no-ip.test.ts` reads the shipped source as text and fails the build if any address or geo name appears, if the set of headers read grows past two, if a `console.*` call is added, or if a `Response` is ever constructed with a body.
542
543 **Retention: three months.** That is Cloudflare's fixed window for Analytics Engine and it is not configurable, so it is a ceiling rather than a policy — there is no setting that could make it longer. Separately from the ingest Worker, which stays write-only, the owner runs a private stats page behind Cloudflare Access that shows aggregate charts only (never install ids) read in place from Analytics Engine, and a daily rollup keeps per-day totals with no install ids in our own Cloudflare storage beyond three months while raw rows still age out at three months. No third-party analytics processor receives or stores these batches.
544
545 **Every response is a bare status with an empty body** — `204` accepted, `400` schema violation, `404`/`405` wrong path or method, `413` oversized, `415` wrong content type, `429` rate-limited, `500` internal. The endpoint cannot echo back what it received or what it holds, and because the client drops the batch on anything that is not 2xx, a rejection is invisible to you by construction and a server error can never surface as a client-visible failure.
546
547 `install_id` rotates client-side every 90 days (`rotated_at` in `install_id.json`), so no single identifier spans a long history. This costs longitudinal accuracy and the docs say so: **no count derived from `install_id` is a user count.** It is a lower bound on distinct machine-installs in a window, and it undercounts a returning user across a rotation.
548
549 **Turning it off deletes what was kept locally, not what was already sent.** `codewhale config set telemetry false` erases the install id, every spool, and the dry-run records on your machine, and stops anything further. Rows already accepted by the endpoint are keyed only by a rotating random id that is now gone; first-party rows age out with the three-month window. The client has no remote deletion API and does not claim that local opt-out erases delivered records.
550
551 ### What the owner reads back — observed active installs
552
553 The headline product metric derived from this data is **observed active installs**: the number of distinct rotating anonymous install ids that produced a `session_start` event on a UTC day. That is the whole definition of that metric. It is not a count of people, not a count of accounts, and not a count of total installs — the id is per installation, rotates every 90 days, and is deleted on opt-out, so no number derived from it can be any of those things. The private stats page also charts active installs and sessions by version, surface and OS, aggregate turns and tool calls, tool calls and errors by tool, model turns and tokens by provider and catalog model, and the native and website funnels; see [`telemetry-stats/README.md`](../telemetry-stats/README.md).
554
555 The exact owner command is checked into the repository, so the routine query is reviewable code rather than SQL pasted from a chat:
556
557 ```sh
558 cd telemetry-ingest
559 CF_ACCOUNT_ID=... CF_API_TOKEN=... npm run report:active-installs
560 ```
561
562 It prints the daily series, a 7-day trend over complete UTC days, the freshness of the newest ingested event, and — with the numbers, in both text and `--json` output — the coverage caveats: clients older than the telemetry feature, opted-out installs, and non-emitting environments (kill switches, fleet workers, offline shutdowns, dropped flushes) are invisible, so every count is a lower bound; and because ids rotate, week-over-week comparisons are not a retention metric. The report's read path is itself tested: the install id appears only inside an aggregate, no payload column is selected, and the wording can never drift into calling the result users. (`npm run report:dau` remains as a compatibility alias for the same report.)
563
564 ### What is never collected — the public red-line list
565
566 Prompts; completions; tool arguments; diffs; patches; file contents; filenames; absolute or relative paths; git remotes; repo names; branch names; workspace commit SHAs; memory entries; chat history; API keys, tokens, cookies, or `Authorization` headers (including any boolean asserting a key exists); model ids that are not in Codewhale's bundled public model catalog (custom, local, fine-tuned or private model names are sent only as `other`); custom provider table names; MCP server names, commands, URLs, or tool names; plugin and configured tool names; approval rule text; error message bodies; panic message text; per-event timestamps; keystrokes; clipboard; screenshots; microphone; camera; location; and any third-party ad or analytics SDK — there are none in the runtime binary and none may be added.
567
568 Two named traps for the implementer. `crates/state/src/lib.rs` persists `git_sha`, `git_branch`, `git_origin_url`, `cwd`, and `path` on the threads table (`:93, :399, :653`): a payload builder that accepts a `Thread` or `ThreadMeta` and derives `Serialize` breaches the contract in one line. **Never derive `Serialize` over an existing state type** — build every telemetry struct from scratch with explicit fields. And `crates/core/src/lib.rs:1389-1398` is the one place in the tree where the word `telemetry` sits inside a JSON object next to `prompt`, `base_url`, and `has_api_key`. It is the object someone will copy. Do not.
569
570 ---
571
572 ## Website funnel aggregates in the source candidate
573
574 The website extension uses `FUNNEL_SCHEMA_VERSION = 5` and notice version `7`.
575 The Rust runtime remains on `SCHEMA_VERSION = 4`, notice `6`; existing browser
576 schema `3`, notice `5`, and legacy schemas `1` and `2` retain their original
577 contracts. Displaying a newer notice never overrides an opt-out or establishes
578 human acceptance. Schema 5 is first-party only.
579
580 The schema-5 envelope has the same twelve keys as the runtime envelope. Its
581 surface is exactly `website`, `git_sha` is null, `os` and `arch` are `other`,
582 `libc` is `none`, and `tty` is false. It accepts one to 200 aggregate events;
583 each event is either the unchanged thirteen-counter `product_usage` or the
584 new `funnel_usage`. Every funnel counter below is required and is an unsigned
585 32-bit integer. Unknown fields or values outside the closed contract reject
586 the entire batch. The following JSON belongs only to the website extension;
587 it is not a new Rust runtime event.
588
589 ```json
590 {
591 "event": "funnel_usage",
592 "counters": {
593 "home_view": 0,
594 "install_view": 0,
595 "quickstart_view": 0,
596 "contribute_view": 0,
597 "install_intent": 0,
598 "install_confirmed": 0,
599 "star_exit": 0,
600 "issue_exit": 0,
601 "help_wanted_exit": 0,
602 "guide_exit": 0,
603 "docs_search": 0,
604 "docs_search_empty": 0,
605 "docs_search_result": 0,
606 "quickstart_confirmed": 0
607 }
608 }
609 ```
610
611 The first four counters describe fixed page categories. `install_intent`
612 counts successful installer clipboard writes. `install_confirmed` counts an
613 explicit reader confirmation after running the version check, and
614 `quickstart_confirmed` counts a reader confirmation after checking the answer
615 against the cited file lines. These are self-reported interactions, not verified
616 physical installations, model executions or useful outcomes. The four exit
617 counters count links toward GitHub stars, issues, help-wanted work and the
618 contributing guide. The three search counters count search interactions, empty results
619 and result selections without sending search text or result URLs.
620
621 No page URL, query, locale identifier, referrer, account, content, credential or
622 website-to-CLI identifier is added. Website and runtime rotating IDs remain
623 independent; reports never join them. Existing opt-outs, bounded storage,
624 no-retry delivery and the website privacy control remain in force. Counts are
625 not unique visitors: repeated interactions can count more than once, dropped
626 flushes can lose data, and the ingest has no exactly-once or replay-deduplication
627 contract.
628
629 `telemetry-ingest/schema/website-funnel-v5.schema.json` is generated from the
630 existing validator. Analytics Engine stores the counter object in the existing
631 aggregate JSON column; the twenty positional columns are unchanged. Existing
632 schema-3/4 product counters remain separate historical series and must not be
633 silently reinterpreted as the new funnel measures.
634
635 ### What the installation and task measures establish
636
637 The installer writes a local checksummed `.codewhale-install.sha256` receipt;
638 it sends no installation-completion event. Runtime `install_or_upgrade` with
639 `kind=install` records first initialization of enabled telemetry state, which
640 can happen on an older installation after opting in or losing local state.
641 It is an observed launch proxy, not a count of all installations or people.
642
643 Runtime `model_usage` with `turns_ok > 0` establishes observed technical model
644 turn completion. It does not establish the first-ever primary task or its
645 usefulness. Provider responses with no reported usage can be omitted, same-process
646 child activity can contribute, and a late cancellation can follow the current
647 counter increment. Batch timestamps describe delivery rather than exact task
648 time. Reports state these limits and keep browser self-confirmations separate.
649
650 The owner report uses existing first-party Analytics Engine rows or explicitly
651 labelled offline receipts. Native cohorts use only native IDs and enough
652 follow-up history; incomplete cohorts are unavailable rather than zero. Public
653 GitHub first-issue and first-merged-PR cohorts use a separately complete public
654 history export and produce aggregate output. They have no visitor attribution
655 and no GitHub identity is sent in telemetry.
656
657 ### Rollout remains a separate action
658
659 These contracts and local tests are source-candidate evidence. They do not
660 establish a configured or deployed collector, accepted production traffic or
661 conversion improvement. After explicit deployment authorization, deploy the
662 backward-compatible ingest before the website emits schema 5. Old ingest
663 rejects schema 5; the website must treat `{ accepted: false }` as non-acceptance,
664 even if its local forwarding route returned HTTP 200. Neither deploy is
665 authorized by this documentation or by a passing local test.
666
667 ### Run the owner reports without changing collection
668
669 Run these from `telemetry-ingest/`. Offline fixtures are explicitly synthetic
670 and establish report arithmetic only:
671
672 ```sh
673 npm run report:funnel -- --input test/golden/funnel-report-synthetic.json
674 npm run report:contributions -- --input test/golden/contributions-synthetic.json
675 npm run report:funnel -- --sql --from 2026-10-01T00:00:00Z --to 2026-11-01T00:00:00Z
676 ```
677
678 Without `--input` or `--sql`, the funnel report uses the existing operator's
679 `CF_ACCOUNT_ID` and `CF_API_TOKEN` to query the existing Analytics Engine SQL
680 API. It does not write credentials or deploy anything. Dates are UTC,
681 `--from` is inclusive, and `--to` is exclusive; the default covers the previous
682 30 complete UTC days. Queries stop at a bounded row limit and fail rather than
683 silently calling a truncated result complete. `--sql` prints a query plan only,
684 without credentials or a network request. Local tests do not qualify those
685 queries against the hosted SQL service.
686
687 The offline format is `codewhale-funnel-receipt-v1`, with a labelled `source`,
688 `coverage` containing `from`, `to`, `complete` and `accepted_only`, plus
689 `website_rows` and `native_rows`. The synthetic fixture shows the normalized
690 shape. Raw local buffers are not accepted as received-traffic evidence. The
691 report prints source, coverage, freshness, counts and caveats, and never
692 prints the native rotating IDs it uses internally.
693
694 Website output contains fixed interaction counters only. It does not divide
695 site-wide installer copies by install-page views or claim that one caused the
696 other. Native follow-up is separate: its denominator is distinct observed
697 native IDs with `install_or_upgrade(kind=install)` and a full seven-day
698 follow-up before the report boundary. Its numerator is those same IDs with an
699 observed `model_usage(turns_ok > 0)` during that follow-up. Sampled or incomplete
700 native coverage and an empty eligible cohort make the fraction unavailable,
701 not zero. An ID with an observed CI start is excluded in full because aggregate
702 model rows cannot be assigned to that particular session. This fraction is
703 neither human retention nor website conversion.
704
705 Without `--input`, the contribution report reads the canonical public
706 repository through the operator's existing authenticated `gh` CLI. It verifies
707 that the repository is public, reads all issue and pull-request pages within
708 100 pages per endpoint, and refuses to produce a cohort if pagination has not
709 finished. The report counts earliest issue creation and earliest PR merge by
710 public author separately, excludes bots and deleted authors, and emits only
711 aggregate daily counts. It does not use GitHub's mutable first-time-contributor
712 badge as historical proof. `--from` and `--to` filter the resulting cohorts,
713 not the history needed to establish them. No public author handles or API
714 response content are printed or sent to telemetry. A complete accessible
715 export still cannot recover deleted history or become an atomic snapshot.
716
716 lines MARKDOWN