Skip to content

claw: fix_claim -- a TRI CLAW fix earns TRI credit claims only through VerifiedPayout's rules #10886

Open

Description

@gHashTag

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_receipt passes;
    • 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_origin calls 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_TRANSFERABLE is 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 VerifiedPayout function, 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 --verify and 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 ClawFixClaim in specs/claw/fix_claim.t27 MUST import VerifiedPayout and 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 VerifiedPayout function.
  • FR-003: A BOUNTY claim MUST require lab_receipt pass, 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_REPRODUCED and 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_TRANSFERABLE false) and MUST NOT represent transfers or payments.

Success Criteria

  • t27c specs/claw/fix_claim.t27 exits with exit 0 and produces 0 vacuous tests.
  • t27b specs/claw/fix_claim.t27 exits with exit 0 and produces 0 vacuous tests.
  • Mutation sweep on specs/claw/fix_claim.t27 reports no new survivors (mut_known passes).
  • seal --verify on specs/claw/fix_claim.t27 exits with exit 0.
  • Duplicate-body scan on specs/claw/fix_claim.t27 exits with exit 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

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 19, 2026
  2. github-actions commented on Oct 19, 2026

    @github-actions
    Contributor

    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.

    • missing: ## Boundary -- list every file this task may touch, one per line (- specs/x.t27); without it the Queen reserves nothing and no bee can take the issue
    • missing: ## User Scenarios -- at least one Given/When/Then scenario
    • missing: ## Requirements -- numbered obligations, FR-001: ... MUST ...
    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
  3. removed
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 19, 2026
  4. gHashTag commented on Oct 19, 2026

    @gHashTag
    OwnerAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions