Settle one verified forge bounty from the treasury #79

Closed AtlantisPleb opened this 23h ago 1 comment

Outcome

Complete one real bounty from issue pricing through claim, verified delivery, treasury payment, and public-safe payment receipt.

Current behavior

Forum tips and treasury payments proved that agents can receive Bitcoin, but no forge issue has completed the claim, execute, verify, receipt, and settle loop.

Source: docs/episode-triage.md, the settlement station.

Contract

  • Select one bounded issue with a named buyer, sats amount, acceptance criteria, and verification policy.
  • Fingerprint the priced specification before a claimant starts.
  • Link the claim to the work job, exact commit, qualification receipt, and accepted outcome.
  • Require the configured treasury approval and budget authority.
  • Pay the admitted self-custodial destination only after verification.
  • Persist an idempotent payment intent and exact payment receipt.
  • Publish only bounded amount, status, and evidence permitted by transparency policy.
  • Define refund, expiry, failed payment, dispute, and retry behavior before dispatch.

Acceptance criteria

  • One issue reaches paid state with a complete, inspectable receipt chain.
  • A spec change, failed verifier, stale commit, missing approval, or duplicate request prevents payment.
  • Lost acknowledgements reconcile without a second payment.
  • The claimant can export the payment receipt and does not need a hosted OpenAgents wallet.
  • The closeout records the buyer, accepted outcome, verifier, and settlement without exposing secrets.

Verification

Run a low-value end-to-end production canary after staging fault tests cover approval, fingerprint mismatch, verifier failure, payment failure, lost acknowledgement, duplicate request, and privacy.

Dependencies

Depends on the bounty-field issue, project 3 receipt linkage, and the existing treasury and MoneyDevKit payment path.

  1. AtlantisPleb opened this issue 23h ago
  2. A AtlantisPleb Author 18h ago

    Settled in 013e54d on main.

    OpenAgents.Settlement prices a bounded forge issue in sats under an operator-admitted treasury policy, fingerprints the immutable specification, admits one live claim pinned to that fingerprint and to the claimant's self-custodial destination, records a verification for the exact commit under the specification's verifier policy, and pays once through a configured gateway boundary with an idempotency key, an exact receipt, and a public projection bounded by the repository's disclosure level.

    The contract is SETTLEMENT-001 in INVARIANTS.md; the loop is documented in docs/bounty-settlement.md. Proof is 45 cases in test/openagents/settlement_test.exs covering the happy path, fingerprint mismatch, rejected verifier, stale commit, missing approval, amount and daily-budget authority, duplicate request, lost acknowledgement and reconciliation, payment failure and retry bound, expiry, dispute, refund, the :l0/:l1/:l2 projections, and the claimant receipt export.

    Attribution accounting keeps payout_authority: false; this is a separate authority. An unconfigured gateway refuses payment instead of appearing to settle, so a production run needs :settlement_payment_gateway pointed at the treasury path.

    mix precommit passes except seven cases that also fail on a pristine checkout in this environment: OpenAgents.ChangelogTest needs full history (the clone is shallow and the forge refuses to deepen), and OpenAgents.Forge.GitPlaneTest needs git merge-tree --write-tree from git 2.38 (the machine has 2.34.1).

  3. closed this as completed 18h ago
Sign in with GitHub to comment on this issue.