Skip to content

Add signed BTC provider-v2 for Locks payment-only policies - #127

Merged
dzdidi merged 5 commits into
masterfrom
feat/graph-stage2-provider-v2
Nov 5, 2026
Merged

dzdidi merged 5 commits into
masterfrom
feat/graph-stage2-provider-v2

Conversation

@dzdidi

@dzdidi dzdidi commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds signed BTC-only provider-v2 APIs for Locks payment-only policies:

  • POST /v2/invoices and POST /v2/invoices/status
  • exact create replay and cross-version invoice identity
  • authoritative invoice and payment deadlines
  • atomic encrypted intent/outbox persistence
  • immutable first-threshold payment evidence plus mutable current observation
  • closed persisted provider-v2 status
  • migration 0024_provider_v2_contract.sql
  • explicit signed wire vectors for absent and populated status samples

This is additive. Existing v1 behavior remains unchanged. No dependency, generated-binding, or version changes are included.

Independent exact-SHA review

Internal independent review task t_9179f94c approved unchanged commit d98f3e93fa02281d6df0c888250f8abd002d9d1a (tree 05a6b7503281bb129dce36beb7a298ce4b29e3ee). Contract attachment SHA-256: 8cd97bbe1b8cce8d6f2c35b7653e01b04b2ca551d9d8bef3daa6dfeb1f5c36d6.

Review verification:

  • PostgreSQL 16 focused invoices, migrations, and payment-observation suite: 74 passed, 0 failed, 0 ignored
  • Full paykit-server-e2e: 240 passed, 0 failed; 3 pre-existing live-adapter tests ignored and not executed
  • cargo test --locked -p paykit-server -- --test-threads=1: 486 passed, 0 failed, 0 ignored
  • cargo fmt --all -- --check: passed
  • cargo clippy --locked --workspace --all-targets -- -D warnings: passed
  • cargo doc --locked --workspace --no-deps: passed
  • exact identity, patch-digest, git diff --check, and git show --check gates: passed

Review caveats

  • Approval applies only to exact commit and tree above. Any edit, rebase, conflict resolution, generated-file change, or version bump requires fresh independent review.
  • README.md is a known merge hotspot against newer master. server.rs and persistence/invoices.rs overlap open PR feat: allowance intake in production #122; this PR does not absorb PR feat: allowance intake in production #122's USDT/allowance work.
  • Ignored live-adapter tests require external Pubky/Electrum infrastructure and were not run.

Rollout boundaries

No production migration, deployment, release, tag, or external-adapter operation is performed by this PR. Migration 0024 is published unchanged and must be applied through human-controlled deployment. Locks payment-only integration remains blocked on human merge of this provider PR, immutable provider release, and human merge of Graph Stage 1 PR #120.

@dzdidi
dzdidi requested a review from ben-kaufman November 4, 2026 20:05
@dzdidi
dzdidi requested a review from ben-kaufman November 4, 2026 21:17
@dzdidi
dzdidi requested a review from ben-kaufman November 4, 2026 22:14

@ben-kaufman ben-kaufman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The expiry and payment-drain issues are fixed. Looks good.

@dzdidi
dzdidi merged commit 3076580 into master Nov 5, 2026
4 checks passed
@dzdidi
dzdidi deleted the feat/graph-stage2-provider-v2 branch November 5, 2026 11:34
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.

2 participants