docs(rfc): x402-trust-score v0.2 — normalize subscores + decouple agent/provider weight - #2
Open
jlromeiro wants to merge 1 commit into
Open
docs(rfc): x402-trust-score v0.2 — normalize subscores + decouple agent/provider weight#2jlromeiro wants to merge 1 commit into
jlromeiro wants to merge 1 commit into
Conversation
…nt/provider weight Resolves the §12 "Provider weighting policy" open issue from v0.1. Major changes: - All subscores (P1, P2, D2, H1, R1) normalized to 0-100 before weighting, so published weights match effective contribution. - H1 uses Laplace (add-one) smoothing so new pubkeys with zero observed disputes don't inherit a perfect hygiene score from absence of evidence. - Decoupled global_trust_score(pubkey) (agent behavior) from weight(p) (operator credibility). v0.1 mixed them through weighted_avg(provider_score * weight), which let attestation volume dominate agent score. - Explicit weight(p) formula with active-cohort median, cap (default 3x active-median), and conditional floor (default 0.3 gated on reach + no-disputes-30d). - Conditional renormalization rule (§5.1.3) for inactive subscores with inactive_until_<feature> status marker exposed in /info. - cross_provider_bonus preserved binarily so small operators retain network leverage (their presence increments N by 1 regardless of volume). - pubkey_reach_threshold (default 25), cap_multiple_of_active_median, and active_window_days are governance-tunable parameters published in /info. - Idle decay window 30d -> 60d for cron/batch/sazonal agent workloads. - Added reference values table (§5.1.5) for sanity check across top/mid/new agents in Phase 1 (H1 inactive) and Phase 1.5+ (H1 active). Code implementation deferred to a separate PR (this PR is spec-only). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Kilo Code Review could not run — your account is out of credits. Add credits or switch to a free model to enable reviews on this change. |
This was referenced May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Spec-only PR. Bumps
docs/rfc/x402-trust-score.mdfrom v0.1 → v0.2 (still DRAFT, public comment open until 2026-06-30 per the spec header).No code changes in this PR. Implementation will land in a separate PR after the spec stabilizes.
Why v0.2
v0.1 had three correctness/auditability issues identified in review:
weight(p)undefined — §12 listed it as an open issue, but the spec implicitly mixed agent score with operator weight viaweighted_avg(provider_score * weight), allowing attestation volume to dominate the agent score./report, which isn't built yet (seedocs/superpowers/specs/2026-05-12-trust-score-cross-op-roadmap.mdgap analysis). The spec did not say what to do when a subscore's required infrastructure is missing.Key changes (v0.2)
global_trust_score(pubkey)andweight(p)explicitly decoupled. Agent behavior and operator credibility are computed independently and never multiplied together.weight(p)formula (§5.2):tier_base · log10(1 + attested_count_30d) · sqrt(months_in_network), with a cap atcap_multiple_of_active_median × median_over_active_cohortand a conditional floor for production operators with real reach and clean recent history.active_cohortdefined precisely — median is computed only over providers with positive raw weight,productiontier, recent activity, and reach abovepubkey_reach_threshold. Prevents dormant operators from collapsing the median to zero./reportis built), the broker MUST renormalize remaining weights to sum to 1.0 and expose per-subscore status in/infoviainactive_until_<feature>markers.cross_provider_bonuspreserved binarily — a small operator's attestation incrementsactive_in_n_providersby 1 regardless of volume. This is the structural mechanism that keeps small operators relevant.pubkey_reach_threshold(default 25),cap_multiple_of_active_median(3),floor_weight(0.3),active_window_days(7) — all published as governance parameters inGET /info.provider_weight_policy, tunable via the public change-window without an RFC bump.Impact on operators (large vs small)
cross_provider_bonusis binary, so being the Nth operator a pubkey transacts with carries the same +0.1 increment as any other. This is the BR-first / tier-2-friendly mechanism the protocol needs to attract small operators.Test plan
This PR is spec-only, so "tests" are correctness checks against the spec text:
GET /infoJSON examples in §5.1.3 and §5.2.3 are well-formed.Code
A follow-up PR will update
index.js,lib/detection.js,lib/agent-status.js,lib/ratelimit.js, and the broker scaffolding (when extracted perdocs/superpowers/specs/2026-05-12-trust-score-cross-op-roadmap.mdPhase 1) to match this spec. Not in scope here.🤖 Generated with Claude Code