Skip to content

spec(automation): token-wallet v3 -- the TRINET 1:1:1 split (Closes #13084) - #13085

Merged
cursor[bot] merged 5 commits into
masterfrom
claude/trinet-payment-distribution-4670d9
Nov 9, 2026
Merged

cursor[bot] merged 5 commits into
masterfrom
claude/trinet-payment-distribution-4670d9

Conversation

@gHashTag

@gHashTag gHashTag commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #13084

What

specs/automation/token-wallet.t27 v3 records the owner's TRINET formula of 2026-11-02 in the
three-unit trade that already exists there (owner decision 2026-10-23), instead of a second spec:

Unit v2 name v3 name Goes to
1 SHARE_HOUSE SHARE_PROVIDER whoever supplies the service (for the bot: still the house)
2 SHARE_BOUNTY SHARE_FUND creators, .t27 developers, builders, operations, reserves
3 SHARE_REFERRAL SHARE_REFERRAL the first-line referrer only (REFERRAL_DEPTH 1)

Owner decisions in this PR (2026-11-02):

  • The 1:1:1 split above, with unit three paid to the first line only.
  • A client who came from nobody pays the same three units, and unit three goes to the fund.
    Nothing is held.

Agent default, not an owner rule: a charge of zero, or one that is not a whole number of
units, is refused (SPLIT_REFUSED_AMOUNT). It is never split into zeros, and nothing is debited.

The spec calls the following (charged is what the client paid):

  • trade_split_status(charged) returns SPLIT_OK or SPLIT_REFUSED_AMOUNT.
  • trade_may_debit(charged) gates every accrual.
  • provider_accrual(charged) returns unit one.
  • fund_accrual(charged, has_referrer) returns one unit, or two when there is no referrer.
  • referral_accrual(charged, has_referrer, line) goes through referral_line_pays(line), so
    the first-line rule constrains the real accrual and not only a helper.

The split does not depend on the unit. The spec never prices, promises or mints $TRI.

Receipts

Binary t27c-bootstrap@0.5.2+bc19b54e6 (built from master bc19b54), nice -n 10, no forced
exit code. Each run was in the owner's Terminal on 2026-11-02.

Run Input Result
head specs/automation/token-wallet.t27 at 28a7971, sha256 f72f8230... 15 of 15 pass, rc 0, vacuous 0 of 15 (1 comptime-verified)
base the v2 spec the old seal named, sha256 fede3e15... 11 of 11 pass, rc 0
negative control head with REFERRAL_DEPTH = 2, sha256 a236331a... rc 1, 14 pass, exactly 1 FAIL: "only the first line above the client accrues unit three"

The command was t27c test-report <input>. The negative control fails the first-line test and
no other test, and it fails rather than blocks, so the test constrains the accrual.

Seal: I re-saved it with t27c seal specs/automation/token-wallet.t27 --save from the same
binary, at commit f3db3d3, with these values:

  • spec_hash sha256:f72f8230...;
  • tests 15 of 15, 0 failed, 0 vacuous, forced false;
  • seal_schema 2.

The seal has no home path and no twin.

Not in this PR

  • The live bot is not changed. 999-multibots-telegraf still vendors v1. Migrating it needs
    its own plan and approval.
  • Still open with the owner:
    • fund budget;
    • refunds;
    • where the three units come from;
    • the value of a unit;
    • how this relates to the pool.t27 job split.
  • Two policy questions need the owner's decision before anyone calls this split live or
    payable.

CI context

These reds are not from this PR:

This PR stays a draft, with no auto-merge.

🤖 Generated with Claude Code


Note

Low Risk
Spec and seal updates only; no host or billing code changes, though v3 defines future payment-split semantics reviewers should treat as policy.

Overview
Bumps automation::token_wallet to v3 and re-seals it (seal_schema 2, 15/15 tests on t27c-bootstrap@0.5.2). This is a spec-only change; the live bot is still documented as vending v1.

The three-unit trade is renamed to the TRINET 1:1:1 model: SHARE_PROVIDER, SHARE_FUND, and SHARE_REFERRAL, with REFERRAL_DEPTH 1 so only the direct referrer can earn unit three. New split APIs gate debits and accruals: invalid charges (zero or not divisible by TRADE_UNITS) return SPLIT_REFUSED_AMOUNT via trade_split_status / trade_may_debit instead of zero-filled splits; fund_accrual takes the referral unit when the client has no referrer so the full charge is still conserved.

Tests cover first-line referral rules, conservation with/without a referrer, and refusal behavior. Header comments record owner v3 policy (2026-11-02) and what remains open before any host implements the split.

Reviewed by Cursor Bugbot for commit 100bdb0. Bugbot is set up for automated code reviews on this repo. Configure here.

)

Owner formula of 2026-11-02: 3 units = 1 to the provider of the service
+ 1 to the fund (creators, .t27 developers, builders, operations,
reserves) + 1 to the first-line referrer.

- SHARE_HOUSE -> SHARE_PROVIDER, SHARE_BOUNTY -> SHARE_FUND (no host
  imports the old names)
- REFERRAL_DEPTH 1: only the direct referrer is paid
- a client with no referrer: unit three is held, paid to nobody
  (a default until the owner names its destination)
- the split stays unit-blind; the spec never prices, promises or
  mints $TRI
- 2 new tests (13 total); the seal is stale until a post-10-27 t27c
  re-saves it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag force-pushed the claude/trinet-payment-distribution-4670d9 branch from 2495fa7 to 8fa617b Compare November 2, 2026 04:17
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-11-02 04:18:13 UTC

Summary

Status Count
Total Open PRs 42
PRs with Failing Checks 38
PRs with All Checks Green 4
READY 3
FAILING 38
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 38 + 0 + 0 = 41, and there are 42 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e75b498e5e79 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

gHashTag and others added 2 commits November 2, 2026 12:20
…held default (Refs #13084)

Withdraws the agent default that held unit three for a client with no
referrer. Such a charge now answers SPLIT_POLICY_UNRESOLVED and may not be
debited until the owner decides. A charge that is zero or not whole units
answers SPLIT_REFUSED_AMOUNT instead of a split of zeros. Every accrual
goes through trade_split_status, and the referral accrual takes the
recipient's line, so the first-line rule constrains the amount itself.
Tests: a loop over lines 0..5 (exactly one line paid), conservation over
fifty accepted prices, refusals, and the unresolved no-referrer path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…und (Refs #13084)

Owner decision 2026-11-02: when the client came from nobody, unit three
goes to the fund. Every client pays the same three units and nothing is
held. SPLIT_POLICY_UNRESOLVED is removed; the split status depends on the
amount only. fund_accrual takes two units without a referrer;
referral_accrual pays nobody then. Conservation is tested for both cases.

Tests not executed (no free test cell); the seal is stale and not re-saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-saved from t27c-bootstrap@0.5.2+bc19b54e6 (built from master
bc19b54) at head 28a7971: spec_hash f72f8230..., tests 15 of 15,
0 failed, 0 vacuous, forced false. The previous seal (fede3e15...,
11 tests) described token-wallet v2.

Refs #13084

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-11-02 06:27:41 UTC

Summary

Status Count
Total Open PRs 45
PRs with Failing Checks 41
PRs with All Checks Green 4
READY 3
FAILING 41
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 41 + 0 + 0 = 44, and there are 45 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e75b498e5e79 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

This was referenced Nov 2, 2026
@cursor
cursor Bot marked this pull request as ready for review November 9, 2026 19:51
@cursor
cursor Bot enabled auto-merge (squash) November 9, 2026 19:53
Co-authored-by: Dmitrii Vasilev <gHashTag@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-11-09 21:13:27 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 47
PRs with All Checks Green 3
READY 0
FAILING 47
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 47 + 0 + 0 = 47, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b882be1e4933 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@cursor
cursor Bot merged commit cc940d6 into master Nov 9, 2026
34 of 42 checks passed
@cursor
cursor Bot deleted the claude/trinet-payment-distribution-4670d9 branch November 9, 2026 21:29
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.

spec(automation): token-wallet v3 -- the TRINET 1:1:1 split, provider / fund / first-line referrer

2 participants