Skip to content

Accept payment accounting ADR#32

Merged
punk6529 merged 3 commits into
mainfrom
codex/payment-accounting-adr
Jun 10, 2026
Merged

Accept payment accounting ADR#32
punk6529 merged 3 commits into
mainfrom
codex/payment-accounting-adr

Conversation

@punk6529

@punk6529 punk6529 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Scope

Docs and roadmap/state only. This PR does not implement Solidity payment logic, tests, CI, or deployment scripts.

Issues

Validation

  • rg -n "^#|^##|^###" docs/adr/0003-payment-accounting.md docs/adr/README.md ops/ROADMAP.md ops/AUTONOMOUS_RUN.md
  • rg -n "P0-PAY-ADR|issues/24|issues/25|issues/26|issues/27|issues/28|issues/29|issues/30|issues/31|totalAuctionBidEscrow|totalRandomnessReserved|emergencyWithdrawable|forced ETH|failed withdrawal" docs/adr/0003-payment-accounting.md ops/ROADMAP.md docs/adr/README.md ops/AUTONOMOUS_RUN.md
  • git diff --cached --check
  • make check passed with 17 tests and known compiler/NatSpec warnings
  • powershell -ExecutionPolicy Bypass -File scripts\check.ps1 passed with 17 tests and known compiler/NatSpec warnings

Notes for Reviewers

  • ADR 0003 deliberately treats active highest bids and randomness provider funds as reserved balances, not surplus.
  • Withdrawal pause policy is limited here to payment-safety constraints; ADR 0004 will decide pause authority and governance actors.
  • Gate A and Gate B1 are marked In Progress rather than complete because remaining exit criteria still need formal closure.

Summary by CodeRabbit

  • Documentation
    • Added and marked ADR 0003 “Payment Accounting” as Accepted, defining the pull-payment credit ledger model, withdrawal and emergency rules, reserves, and required invariants.
    • Updated ADR index and README to reflect acceptance.
    • Updated roadmap with payment accounting gating, acceptance criteria, and test matrix additions.
    • Updated autonomous run/worklog and decision log entries to record ADR progression and related PR/work item states.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, push a new commit or reopen this pull request to trigger a review.

Copy link
Copy Markdown
Contributor Author

@claude please review this payment accounting ADR PR.

Focus areas:

This is intentionally docs/roadmap/state only; no Solidity implementation is in scope for this PR.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dc9f1467-42ad-4ca9-82d0-68d3870bf80e

📥 Commits

Reviewing files that changed from the base of the PR and between e160bda and 4ee5d8d.

📒 Files selected for processing (1)
  • ops/AUTONOMOUS_RUN.md
✅ Files skipped from review due to trivial changes (1)
  • ops/AUTONOMOUS_RUN.md

📝 Walkthrough

Walkthrough

This PR adds ADR 0003 "Payment Accounting" describing a pull-payment credit ledger and detailed accounting rules for minting, auctions, curator claims, withdrawals, emergency withdrawals, reserves, invariants, and events, and updates ADR index, roadmap, and autonomous run worklog to reflect ADR acceptance and implementation planning.

Changes

Payment Accounting ADR 0003 & Documentation

Layer / File(s) Summary
Payment Accounting ADR Design
docs/adr/0003-payment-accounting.md
ADR 0003 specifies a pull-payment ledger model with credit/reserve categories (Poster, Bidder, Curator, CuratorReserve, Protocol, AuctionBidEscrow, RandomnessReserve), accounting rules for fixed-price minting and auction bidding/settlement, curator reward claims, direct/forced ETH semantics, randomness reserve handling, withdrawal and emergency-withdrawal semantics, required ledger views and invariants, event schema, and test/rollout guidance.
ADR Index & Acceptance Status
docs/adr/README.md
ADR 0003 "Payment accounting" marked as Accepted with corresponding issue reference in the ADR index.
Roadmap & Implementation Planning
ops/ROADMAP.md
Gate B1 "P0 Protocol Decisions Accepted" advanced to "In Progress"; Payment accounting ADR added to "Protocol Decisions Required Before Implementation"; P0-PAY-ADR queue item added; P0-AUCT-002 and P0-PAY-001 dependency links updated; P0-PAY-001 expanded with accounting categories and acceptance criteria, and new test matrix rows for ledger totals, failed-withdrawal preservation, emergency surplus boundary, randomness reserve accounting, and forced/direct ETH.
Execution State & Worklog
ops/AUTONOMOUS_RUN.md
Repository state updated with active branch and timestamp; PR #23 (Auction custody ADR) marked merged with validation details; PR #32 (Payment accounting ADR) worklog added/expanded with status "Merge-ready", created issues (#24#31), validation checklist, and decision-log entries documenting the ADR lifecycle.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 I hopped through ledgers, gentle and spry,

Credits in burrows, coins stacked high,
No forced pushes, only withdrawals neat,
Escrows and reserves keep balances sweet,
A tidy ADR makes accounting spry.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: acceptance of the payment accounting ADR, which is the primary objective of this documentation PR.
Linked Issues check ✅ Passed The PR successfully implements all primary coding-related requirements from issue #24: ADR 0003 defines payment accounting model, credit categories, views/invariants, withdrawal semantics, payment flow rules, and event schema.
Out of Scope Changes check ✅ Passed All changes are scoped to documentation and state tracking: ADR 0003 acceptance, roadmap/index updates, and autonomous run worklog entries directly supporting the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/payment-accounting-adr

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[P0-PAY-ADR] Accept payment accounting design

1 participant