Freeze the schema as v4: remove unemitted SignalName variants and Tag stubs #2

closed cmc opened this on 2026-09-04 03:56 UTC · milestone v0.5 — contract freeze

cmc 2026-09-04 03:56 UTC

SignalName in crates/signal-schema/src/lib.rs declares 29 variants. Only 11 are emitted by any collector: 4 git (CommitsWindow, CommitsToday, BranchCount, DaysSinceLastCommit), 2 terminal (KeysPerMin, SessionSeconds), and 5 hardware (CpuLoad, BatteryPct, Charging, BatteryDrawW, ThermalState). The other 18 have no producer.

Discriminants are append-only, so every dead variant becomes permanent once 1.0 ships. Before 1.0 removal is a schema bump; after 1.0 it is a breaking change.

Also Tag::bundle_id and Tag::ssh_host are todo!() panics with no callers.

Done when:

  • Unemitted variants are removed (or each has a producer and a test). Discriminants renumbered as needed; SCHEMA_VERSION bumped to 4 and documented as the 1.0 contract.
  • Tag::bundle_id and Tag::ssh_host are either implemented with validation and a test, or deleted until a collector needs them.
  • Tag::repo_path enforces the watched-root prefix its doc comment promises, or the comment is dropped.
  • The Swift SignalName enum, WireTests.swift, hardware_wire.rs, and the byte table in macos-collector/README.md are updated to match.

closed by commit b3a7c31400 by cmc: Freeze the schema as v4

2026-09-04 14:23 UTC