Skip to content

feat(types): capability-request slice 1 — brief, buyer identity union, engagement_endpoint, quote_hash - #11

Open
lgalabru wants to merge 2 commits into
feat/openapi-jsonfrom
feat/commission-schemas
Open

feat(types): capability-request slice 1 — brief, buyer identity union, engagement_endpoint, quote_hash#11
lgalabru wants to merge 2 commits into
feat/openapi-jsonfrom
feat/commission-schemas

Conversation

@lgalabru

@lgalabru lgalabru commented Aug 2, 2026

Copy link
Copy Markdown
Member

Scarced side of jude's capability-request draft-00 ("RFQ flow") (scarce-studio thread 6873a1ec). Stacked on #10.

rfq.json

  • buyer_npub → optional; new optional buyer_solana_pubkey (base58 32-byte check; on-curve deferred to slice-2 signature verification). At least one identity required — in validate() and as a table CHECK.
  • New optional brief object — the pay-side intake interview's output: example_exchange (doubles as the delivery acceptance check), freshness (realtime | cached{ttl_seconds} | scheduled{cron}), upstream_dependencies[], volume, compute_class, state, interface. Validated fail-closed when present; errors carry brief.-prefixed paths.
  • Deliberately no wtp_band (ruling A: the reserve price never reaches studios pre-quote — it stays pay-side).

quote.json

  • engagement_endpoint required — the 402-gated URL acceptance opens the MPP session against (http/https, absolute).
  • quote_hash on the record: sha256 hex over the canonical JSON of the immutable commitment fields (id, rfq_id, price, milestones, timeline, payout_destination, channel, engagement_endpoint, policy_hash, expires_at — exact order documented in the schema). Derived at issue and on every row read, never stored, so it cannot go stale. Session terms hash-commit the quote through it: what is funded is provably what was quoted.

Store

Migration 0006 rebuilds rfqs + quotes (SQLite can't relax NOT NULL / add CHECK in place; both are projections). Upgrade path verified against a 0005-era db with live rows: backfill lands, FK re-points, CHECK fires.

Out of scope (slice 2)

buyer_signature verification — the canonical signing payload needs its own definition, not a rushed schema-PR rider.

just ci green: 167 tests (154 on base + 13 new). Schemas regenerated from the derives; OpenAPI at /openapi.json picks the new shapes up from the same registry.

🤖 Generated with Claude Code

…ngagement_endpoint, quote_hash

Commission-flow draft-00 (thread 6873a1ec), the scarced side of the seam:

- rfq: buyer_npub now optional; new optional buyer_solana_pubkey (base58,
  32-byte check) — at least one identity required, enforced in validate()
  and by a table CHECK. New optional brief object: the pay-side intake
  interview's structured output (example_exchange, freshness,
  upstream_dependencies, volume, compute_class, state, interface).
  Deliberately no wtp_band (ruling A: reserve price stays pay-side).
- quote: engagement_endpoint required (the 402-gated URL acceptance opens
  the MPP session against). quote_hash on the record: sha256 over the
  canonical JSON of the immutable commitment fields, derived at issue and
  on every row read, never stored — session terms hash-commit the quote.
- migration 0006 rebuilds rfqs + quotes (SQLite cannot relax NOT NULL or
  add CHECK in place); upgrade path with existing 0005-era rows verified.
- schemas regenerated; conformance + API tests extended (167 total).
…(RFQ) flow

Naming call from ludovic (thread 6873a1ec). No wire change: field names
were already neutral (brief, rfq, engagement_endpoint); this renames
prose, the schema title (Commission brief -> Capability brief), the
migration file, and one test. Pre-existing commission wording in
DESIGN/PLAN/GUIDELINES/ARCHITECTURE predates this PR and rides the next
docs touch.
@lgalabru lgalabru changed the title feat(types): commission-flow slice 1 — brief, buyer identity union, engagement_endpoint, quote_hash feat(types): capability-request slice 1 — brief, buyer identity union, engagement_endpoint, quote_hash Aug 2, 2026
lgalabru added a commit to solana-foundation/pay that referenced this pull request Aug 2, 2026
Drops "commission" from the pay-side capability-request flow to match
the studio-side rename (scarce/studio#11): tool fn and file
commission_capability -> request_capability, NewCommission ->
NewCapabilityRequest, CommissionAmount -> BudgetAmount, and all
consent/brief/error prose. search_catalog's miss-hint updated to point
at the new name. Kept "commission-flow draft-00" as-is where it names
the pre-existing design draft rather than the tool itself.
lgalabru added a commit to solana-foundation/pay that referenced this pull request Aug 3, 2026
Drops "commission" from the pay-side capability-request flow to match
the studio-side rename (scarce/studio#11): tool fn and file
commission_capability -> request_capability, NewCommission ->
NewCapabilityRequest, CommissionAmount -> BudgetAmount, and all
consent/brief/error prose. search_catalog's miss-hint updated to point
at the new name. Kept "commission-flow draft-00" as-is where it names
the pre-existing design draft rather than the tool itself.
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