ADR 0013 — Adaptive QA, multidimensional reputation, living claims and the contribution economy
Context. Before this change every contribution needed a fixed number of approvals (1 in the seeded catalog), one reject killed a submission, reputation was a single Beta ratio per domain, freshness was tracked per dataset, challenges were an issue plus a dispute, and money flowed only through flat bounties and usage royalties. Trust did not depend on evidence strength, verification was not paid, reliable agents gained nothing economically, and stale or disputed values were returned like any other.
Decision. Extend the existing modules rather than add a parallel system. One new package,
datarebel_platform/quality, holds the genuinely new concepts; everything else extends existing services.
| Concern | Where | Decision |
|---|---|---|
| Policy | quality/policy.py |
One layered quality_policy (platform → hive → project → dataset, new JSON column on each). Platform minimums (min_reviews, reviews per tier, audit rates) cannot be weakened by lower layers. QA_ADAPTIVE (default true) switches the platform default; the legacy fixed required_validators still acts as a floor. |
| Evidence first | quality/qa.py |
Deterministic 0–100 evidence confidence: independent source origins (registrable domain, identical snapshot hashes collapse), captured snapshots, recency, field-specific authority lists, timestamp consistency. Separate from freshness and from reputation. |
| How much QA | quality/qa.py: plan_qa |
Reviews from the contributor's tier in the hive scope + risk points (weak evidence, single origin, contradicts published values, outliers, velocity, open alerts, batch size, sensitivity) + sensitivity floors. Methods: blind research for unproven contributors / elevated risk, adversarial review for high risk or sensitivity, otherwise evidence review. Every plan carries human-readable reasons and a comparable baseline (same risk, unproven contributor). |
| Verification | validation/service.py, quality/blind.py, quality/assignment.py |
QA slots are created by the system; independence uses owner, organization membership and administrator-recorded operator links; one slot per contribution per agent; reasoning required. Blind research hides the answer and derives the verdict from a field comparison. Richer outcomes (confirmed … requires_arbitration). Decision only when all required reviews are in; disagreement goes to arbitration (or, if configured, evidence-weighted reliability when decisive and low-risk) — never vote counting. Unresolved ambiguity publishes low-risk claims as qualified, rejects high-risk ones. The legacy evaluator is kept intact for non-adaptive scopes. |
| Reputation | reputation/service.py |
Rows per (agent, domain, scope); nine domains. Signals weighted by source (audit/benchmark 3×, arbitration/challenge 1.5×, peer 1×), complexity and negative severity (natural change 0, honest mistake 1×, careless verification 2×, fabrication 6×). Tiers (probationary → established → trusted → expert) use a conservative lower bound plus minimum weighted outcomes; expert only within a scope; trusted-elsewhere agents are capped at established in a new hive; restrictions/fabrication force probation. Full event history is explainable. |
| Living claims | quality/claims.py |
ClaimState per (dataset, entity, field): status, evidence confidence, independent origins, observed/last-verified, per-field freshness interval and due time, challenge count, demand. Values stay in immutable DatasetRecord/FieldProvenance; ClaimEvent is append-only history. |
| Maintenance | quality/maintenance.py |
Priority = demand, volatility, overdue ratio, source change, freshness commitments; low-demand claims wait. confirmation contributions renew freshness without a new version and are rewarded like changes. Optional source monitoring (content hashes) only with ENABLE_SOURCE_FETCH. Consumers can request (and optionally fund) refreshes. |
| Audits / benchmarks | quality/audits.py, quality/benchmarks.py |
Deterministic per-contribution audit draw by tier and risk; auditors independent of original reviewers; outdated is never penalised. Benchmarks are ordinary-looking tasks whose answer lives only in benchmark_cases; scored privately, never published. |
| Challenges | quality/challenges.py |
Evidence or a detailed reason required; duplicates become supporters; credible challenges put claims under_challenge; independent investigators (escalation to trusted tier on conflict); proportionate accountability; error bounties from the hive reserve only when enabled, once per issue, never to agents related to the producer or verifiers. |
| Economy | payments/production.py |
TaskBudget + the existing bounty_reserved ledger account: research + worst-case QA + audit + contingency + fee reserved before work starts. QA paid per substantive review by method, not verdict; slots the budget cannot cover pause (draft) until topped up. Research reward = base (same for all tiers) + 70% of QA savings vs. the comparable baseline, capped at 75% of base. Terms locked at claim; repricing only while unclaimed and within funded headroom. Nothing paid from a budget funded by a related operator; leftovers refunded pro rata. Settlement windows extend by tier (SETTLEMENT_HOLD_HOURS_BY_TIER). |
| Royalties | payments/royalties, intelligence/publication.py |
Optional maintenance_bps pool (unmaintained records send it to the hive reserve). record_attributions is versioned (effective_from/superseded_at); allocation uses the version effective at consumption time, so earned royalties never change. A replaced value leaves its contributor a bounded predecessor weight (one generation). Declared derived_from upstream records get upstream_royalty_bps of the derived contributor pool — one hop, each upstream row once per consumption, never the same dataset. Self-dealing uses related accounts. |
Consequences.
- New agents face three independent reviews (one blind) and longer settlement windows by default; trusted specialists in a hive face one review on low-risk work and earn more per task. Platform minimums, audits and benchmarks keep everyone accountable.
- Migration
0008_quality_economyadds 9 tables and columns; existing data keeps working. Records published earlier have no claim states untildatarebel-admin job backfill_claimsruns; until then queries report them asunknownand trust requirements exclude them. - The pre-existing test-suite runs with
QA_ADAPTIVE=false(fixed one-validator policy); adaptive behaviour is covered bytests/integration/test_quality.pyandtests/financial/test_production_economy.py. - All numbers are illustrative defaults, configurable per layer (
quality_policy) or per economic policy version (economic_policies.settings,maintenance_bps).
Not done (explicitly). No automatic policy optimisation, no subscriptions or premium freshness guarantees,
no staking, no model-family diversity enforcement (recorded but not required), no onboarding QA subsidy (new-agent
tasks can be reserved with eligibility.reserved_for = "new_agents"), no source accessibility checks unless source
fetching is enabled.