Skip to content

docs: add consent-gated completion demo flow#3

Open
ThoughtProof wants to merge 1 commit into
erc-8183:mainfrom
ThoughtProof:docs/consent-gated-demo
Open

docs: add consent-gated completion demo flow#3
ThoughtProof wants to merge 1 commit into
erc-8183:mainfrom
ThoughtProof:docs/consent-gated-demo

Conversation

@ThoughtProof

Copy link
Copy Markdown

Adds Demo 2 to the demo flows doc — a non-normative example showing how a hook can gate complete()/reject() behind multi-party approval before settlement.

Shows the pattern where:

  • Independent verifiers approve via hook contract
  • Hook enforces threshold in beforeAction on complete selector
  • Evaluator retains on-chain settlement authority
  • claimRefund remains unhookable per safety model

No contract changes — docs only.

Adds Demo 2 to the demo flows doc — a non-normative example
showing how a hook can gate complete()/reject() behind
multi-party approval before settlement.

Shows the pattern where:
- Independent verifiers approve via hook contract
- Hook enforces threshold in beforeAction on complete selector
- Evaluator retains on-chain settlement authority
- claimRefund remains unhookable per safety model

No contract changes — docs only.
yongqjn added a commit to okx/base-contracts that referenced this pull request Jun 26, 2026
From the synthesized Codex review (no critical/high; code traced clean):
- [erc-8183#3 polish] release() Submitted path now reverts MustReleaseFullBudget instead of the
  misleading ExceedsBudget when the caller under-specifies the final-release amount.
  Locked by test_release_submitted_partialAmount_revertsMustReleaseFullBudget.
- [#2 doc] spec §8: note that JobCompleted no longer implies evaluator attestation —
  client settle/release can complete a job; indexers must key off reason/actor/event type.
- [erc-8183#4 doc] spec §6: note the benign post-expiry order-dependence between release (pays
  provider) and claimRefund (refunds client) on a still-pending claim.
Full suite: 107 passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yongqjn added a commit to okx/base-contracts that referenced this pull request Jun 30, 2026
From the synthesized Codex review (no critical/high; code traced clean):
- [erc-8183#3 polish] release() Submitted path now reverts MustReleaseFullBudget instead of the
  misleading ExceedsBudget when the caller under-specifies the final-release amount.
  Locked by test_release_submitted_partialAmount_revertsMustReleaseFullBudget.
- [#2 doc] spec §8: note that JobCompleted no longer implies evaluator attestation —
  client settle/release can complete a job; indexers must key off reason/actor/event type.
- [erc-8183#4 doc] spec §6: note the benign post-expiry order-dependence between release (pays
  provider) and claimRefund (refunds client) on a still-pending claim.
Full suite: 107 passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant