Skip to content

docs(adr): give ADR 003 a Capability delegation section - #1824

Merged
thiras merged 1 commit into
mainfrom
docs/adr-003-capability-delegation-section
Aug 26, 2026
Merged

thiras merged 1 commit into
mainfrom
docs/adr-003-capability-delegation-section

Conversation

@yigitdot

Copy link
Copy Markdown
Contributor

Seventeen comments across six crates cite ADR 003 §Capability delegation, and adr/003-payments.md has no heading by that name. A reader who opens the ADR and searches for it finds nothing.

The material is all there, spread across three sections: ### Redemption and Close (register-on-first-redemption), ### Revocation (the expiry gate and the stop-serving signal), and ### EIP-712 Voucher Signature under "Capability type" (the owner-signed struct). The ## Decision preamble also defines the capability object and the two delegation tiers, but carries no heading of its own.

This adds a ### Capability delegation section that states what a capability is and what delegation bounds, then cross-links those three sections. The prose stays where it is, and none of the 17 citation sites change — the citations become correct once the heading exists, and re-pointing each one would need a per-site judgment about which of the three it meant.

The section sits between the ## Decision preamble that introduces the capability object and ### Deposit Economics, which reasons about oversubscribed signer caps.

No new decision, so architecture.md needs no update.

Verification

  • make -C adr check-book-list check-refs — book list in sync; no bare ADR references; all cross-links carry an anchor; 1684 anchor links resolve across 43 files
  • pre-commit run markdownlint --files adr/003-payments.md — passed
  • cargo doc --no-deps — clean, zero warnings

Closes #1823

🤖 Generated with Claude Code

Comments across the crates cite ADR 003 §Capability delegation, and the ADR
carries no heading by that name. The material is spread across Redemption and
Close, Revocation, and the Capability type under EIP-712 Voucher Signature.

The new section states what a capability is and what delegation bounds, then
cross-links those three sections. The prose stays where it is.

Closes #1823

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@thiras
thiras requested a review from alpergundogdu August 26, 2026 07:21

Copy link
Copy Markdown
Contributor

Comprehensive review of this PR (docs-only, +14 lines to adr/003-payments.md). No issues found. Everything checked out:

Anchors & linking

  • All four cross-links resolve in the file at the PR head: #redemption-and-close, #revocation, #eip-712-voucher-signature, #deposit-economics.
  • The new ### Capability delegation heading is unique in the file, so the #capability-delegation anchor the 17 citation sites imply is unambiguous.

Factual accuracy against existing canon

  • The capability struct { signer, spending_cap, pool_id, expiry } matches both the ## Decision preamble and the Solidity CAPABILITY_TYPEHASH.
  • Register-on-first-redemption storing {cap, expiry, spent} matches Redemption step 1.
  • "The expiry is the only time bound the contract applies at redemption" restates the exact claim already made in both the Redemption and Revocation sections — no drift.
  • The stop-serving-signal characterization (refuses future service, does not void earned vouchers) matches the Revocation section in substance.
  • Oversubscription (sum of caps may exceed the deposit) is consistent with Deposit Economics.
  • "The owner keeps sole control of topUp and closePool" verified against contracts/src/PaymentPool.sol — both revert NotPoolOwner for non-owners.

Citation sites

  • Exactly 17 ADR 003 §Capability delegation citations across exactly six crates (cli, client-pull, e2e, incentive, node, protocol), matching the PR description. All are prose citations, so none need re-pointing.

Conventions

  • Present-tense canon, no changelog voice, ASD-STE100 style (short sentences, active voice, one idea per sentence).
  • Heading level and placement are consistent: ### sibling of ### Deposit Economics under ## Decision, positioned right before the section that reasons about oversubscribed caps.

The section introduces no new decision and contradicts nothing in the ADR or the contract, so the "no architecture.md update" call is correct. LGTM.


Generated by Claude Code

@thiras
thiras merged commit 597457e into main Aug 26, 2026
25 checks passed
@thiras
thiras deleted the docs/adr-003-capability-delegation-section branch August 26, 2026 19:50
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.

docs(adr): ADR 003 §Capability delegation is cited 17 times but no such section exists

3 participants