Repository navigation
claw: fix_claim -- a TRI CLAW fix earns TRI credit claims only through VerifiedPayout's rules #10886
Copy link
Copy link
Open
Labels
Description
What
The owner's direction for TRI CLAW: shared compute fixes the system's bugs, and the work is paid in TRI.
TRI CLAW already produces the evidence for such a fix:
lab_receipt.t27: whether a hand-run lab check is evidence about the patch;red_origin.t27: whether a red check is the PR's own or master's;mut_known.t27: whether a sweep has no new survivor.
No spec yet turns that evidence into a payment claim. Without one, every reward would be decided by hand, which is the case specs/verified/payout.t27 exists to prevent: "no verified result, no normal reward".
Change (t27 only)
New specs/claw/fix_claim.t27 (module ClawFixClaim). It imports VerifiedPayout and restates none of its rules. For one TRI CLAW fix, it returns the claims the fix earns, one per payment kind:
- BOUNTY, to the author of the fix. It uses
bounty_payable(closes_task, merged, verified, already_paid). The fix is verified only when:lab_receiptpasses;- the red it fixes is inherited, not the fix's own break.
- PROVIDER_FEE, to whoever ran the lab check. It uses
receipt_award(run_admitted, attributable_fresh, agrees_with_run). A receipt that disagrees with the admitted run is slashed. - VERIFIER_FEE, to an independent reproducer. It needs
attestation_level >= ATT_REPRODUCED. The verifier must be neither the author nor the provider. - EXECUTOR_FEE, to the agent run that made the fix, with the same verified gate as the bounty.
Anti-gaming rules
- No pay for fixing your own break. A fix for a red that
red_origincalls the PR's own earns no bounty. - No self-verification. A verifier who is also the author or the provider earns no fee.
- Each payment once. A claim already paid is not paid again.
- Unknown means none. An unknown kind, origin or verdict earns nothing. When in doubt, nothing is claimed.
What it does not claim (FACTS.md section 6, FINANCE_AND_COMPLIANCE.md section 3)
- Claims are ledger credit, not transfers (
CREDIT_TRANSFERABLEis false). - Any value flow needs
value_flow_allowed, which requires a device-bound identity. - The TON chain of record is still DESIGN: no contract, vault or bridged token exists. The spec therefore returns a claim, never a payment.
- No price, no return and no promise of income for compute. Only the founder, Dmitrii Vasilev, mints.
Success Criteria
- Every claim path goes through a
VerifiedPayoutfunction, with no rule copied. - Each of the four anti-gaming rules has a negative-control test.
- On the lab:
- t27c and t27b pass every test with 0 vacuous;
- the module's own mutation sweep has no new survivor (
mut_known); seal --verifyand the duplicate-body scan are clean.
Refs #10885 (lab_receipt, red_origin, mut_known), #8613 (payment kinds).
User Scenarios
- Given a TRI CLAW fix with a passing lab receipt, an inherited red origin, and no prior payment, when the fix is merged and verified, then the system returns a BOUNTY claim for the fix author and an EXECUTOR_FEE claim for the agent run.
- Given a lab receipt that disagrees with the admitted run, when the provider fee is evaluated, then the receipt is slashed and no PROVIDER_FEE claim is returned.
- Given a verifier who is also the fix author, when the verifier fee is evaluated, then no VERIFIER_FEE claim is returned.
Requirements
- FR-001: The module
ClawFixClaiminspecs/claw/fix_claim.t27MUST importVerifiedPayoutand MUST NOT restate any of its rules. - FR-002: For a single TRI CLAW fix, the module MUST return claims for BOUNTY, PROVIDER_FEE, VERIFIER_FEE, and EXECUTOR_FEE, each using the corresponding
VerifiedPayoutfunction. - FR-003: A BOUNTY claim MUST require
lab_receiptpass, inherited red origin (not the fix's own break), merged status, and not already paid. - FR-004: A PROVIDER_FEE claim MUST require admitted run, attributable fresh receipt, and agreement with the run; a disagreeing receipt MUST be slashed.
- FR-005: A VERIFIER_FEE claim MUST require
attestation_level >= ATT_REPRODUCEDand the verifier MUST be neither the author nor the provider. - FR-006: An EXECUTOR_FEE claim MUST use the same verified gate as the BOUNTY claim.
- FR-007: The module MUST enforce all four anti-gaming rules: no pay for fixing own break, no self-verification, each payment once, unknown means none.
- FR-008: All returned claims MUST be ledger credit only (
CREDIT_TRANSFERABLEfalse) and MUST NOT represent transfers or payments.
Success Criteria
t27c specs/claw/fix_claim.t27exits withexit 0and produces 0 vacuous tests.t27b specs/claw/fix_claim.t27exits withexit 0and produces 0 vacuous tests.- Mutation sweep on
specs/claw/fix_claim.t27reports no new survivors (mut_knownpasses). seal --verifyonspecs/claw/fix_claim.t27exits withexit 0.- Duplicate-body scan on
specs/claw/fix_claim.t27exits withexit 0. - Four negative-control tests exist, one for each anti-gaming rule, all passing.
Boundary
- specs/claw/fix_claim.t27
- specs/verified/payout.t27
- specs/hosting/credit.t27
- specs/docs/chapters/rules.t27
- specs/port/scripts/tri_loop/claims.t27
- docs/system/rules.md
- scripts/tri_loop/claims.py
Reactions are currently unavailable
Activity
github-actions commentedon Oct 19, 2026
Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.
- specs/x.t27); without it the Queen reserves nothing and no bee can take the issueFR-001: ... MUST ...exit 0, or a backticked commandgHashTag commentedon Oct 19, 2026
Reopened by the self-heal of #11007. The issue-shape gate closed this issue with a queued run that judged an older body from its event payload; the current body passes
gen/c/policy/issue_shape.c, and the gate's own contract is that a passing body stays open. If the work is in fact finished or obsolete, close it as completed.