Skip to content

refactor!: tw-wire is usage only; quota and bodies go back to the desktop gateway - #152

Merged
fylorn merged 1 commit into
mainfrom
refactor/wire-is-usage
Sep 23, 2026
Merged

fylorn merged 1 commit into
mainfrom
refactor/wire-is-usage

Conversation

@fylorn

@fylorn fylorn commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

tw-wire was cut out to be shared with the server edition, but only one of its three parts is shared: the usage sniffer. The other two are used only by the desktop, and the server edition won't use them:

  • Body capture there is an audit pipeline with PII redaction, byte caps and S3 offload. That is a different thing from a bounded channel to a local store.
  • Quota there is its own.

A "shared" module with one user is a second place to change things, as tw-resil was.

  • quota → tw_gateway::quota; bodies → tw_gateway::bodies.
  • tw-wire keeps usage and depends on serde_json alone.
  • tw-gateway's crate-root re-exports of these types had no users. Callers now name the module.

The server edition's body_capture.rs gets a note on why it stays separate.

Breaking: tw_wire::{bodies, quota} moved into tw-gateway. The server edition uses only tw_wire::{Sniffer, Usage}, which are unchanged.

cargo fmt --check, cargo clippy --workspace --all-targets -D warnings and cargo test --workspace pass.

🤖 Generated with Claude Code

…ktop gateway

tw-wire was cut out to be shared with the server edition, and one of its
three parts is: the usage sniffer. The other two only the desktop uses,
and the server edition will not — its body capture is an audit pipeline
with PII redaction, byte caps and S3 offload, a different thing from a
bounded channel to a local store, and its quota is its own. A "shared"
module with one user is a second place to change things, as tw-resil
was.

- `quota` → `tw_gateway::quota`, `bodies` → `tw_gateway::bodies`.
- tw-wire keeps `usage` and depends on serde_json alone.
- The crate-root re-exports of these types in tw-gateway had no users;
  callers name the module.

BREAKING: tw_wire::{bodies, quota} are now in tw-gateway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn force-pushed the refactor/wire-is-usage branch from ac03d06 to 6caf52d Compare September 23, 2026 20:17
@fylorn
fylorn merged commit eeb1ce5 into main Sep 23, 2026
2 checks passed
@fylorn
fylorn deleted the refactor/wire-is-usage branch September 23, 2026 20:26
@fylorn fylorn mentioned this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant