feat(sidecar): protocol 14 — the Economics forwards (PLAN_REDESIGNS §11.2) #25

Merged
whitlocktech merged 1 commits from feat/protocol-14-economics into edge 2026-10-12 07:40:40 -05:00
Member

What & why

The sidecar half of PLAN_REDESIGNS.md §11.2.2 (spec: docs/rust-link/PROTOCOL.md §20.3).

This PR adds three thin forwards, built like /kits/uses: POST /economics/pay, POST /economics/balances and POST /economics/adjust. Each body is stamped with its own command (economics.pay / .balances / .adjust), so naming another command in the body can't turn a payment into an adjustment.

The plugin remembers a payment's key, and this process keeps nothing. The tally's balance and the economics.wiped event ride the feed like any other frame. PROTOCOL_VERSION stays 14 (D332).

How it was tested

  • cargo fmt, cargo clippy --locked --all-targets -- -D warnings: clean.
  • cargo test --locked: 69 passed. One test is new: protocol_14_economics_bodies_pass_through.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why The sidecar half of `PLAN_REDESIGNS.md` §11.2.2 (spec: `docs/rust-link/PROTOCOL.md` §20.3). This PR adds three thin forwards, built like `/kits/uses`: `POST /economics/pay`, `POST /economics/balances` and `POST /economics/adjust`. Each body is stamped with its own command (`economics.pay` / `.balances` / `.adjust`), so naming another command in the body can't turn a payment into an adjustment. The plugin remembers a payment's key, and this process keeps nothing. The tally's `balance` and the `economics.wiped` event ride the feed like any other frame. `PROTOCOL_VERSION` stays 14 (D332). ## How it was tested - `cargo fmt`, `cargo clippy --locked --all-targets -- -D warnings`: clean. - `cargo test --locked`: 69 passed. One test is new: `protocol_14_economics_bodies_pass_through`. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-12 07:16:10 -05:00
feat(sidecar): protocol 14 — the Economics forwards (PLAN_REDESIGNS §11.2)
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 4m7s
e720c21c09
POST /economics/pay, /economics/balances and /economics/adjust, thin
forwards like /kits/uses: each body is stamped with its own command and
passed to the plugin, which remembers a payment's key. Nothing is kept here.
The tally's `balance` and the `economics.wiped` event ride the feed like any
frame. Still protocol 14 (D332); one forward test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 4eac5297e8 into edge 2026-10-12 07:40:40 -05:00
whitlocktech deleted branch feat/protocol-14-economics 2026-10-12 07:40:41 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Rust-Link#25
No description provided.