Skip to content

Document v2 receiver trustline preflight and token errors - #15

Merged
techrebelgit merged 2 commits into
mainfrom
docs/trustline-preflight-and-token-errors
Sep 27, 2026
Merged

techrebelgit merged 2 commits into
mainfrom
docs/trustline-preflight-and-token-errors

Conversation

@armandocodecr

@armandocodecr armandocodecr commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Reflects Trustless-Work/trustlesswork-core-api#42, now merged.

Changes

  • Receiver trustline preflight (api/v2/core-concepts.md): which addresses each endpoint checks before building the transaction, and the ESCROW_RECEIVER_TRUSTLINE_MISSING (422) response with its real Problem Details shape (extensions.missing, with trustline-missing / account-missing reasons).
    • Single-release deploy / update: roles.receiver, plus roles.platform when platformFee > 0.
    • Multi-release deploy: every milestone receiver, plus the fee-earning platform.
    • Multi-release update: only the fee-earning platform, since the payload's milestones are ignored on-chain.
    • Multi-release manage-milestones: every new milestone receiver.
  • Token errors (api/v2/core-concepts.md): errors raised by the escrow's token contract now surface as TOKEN_* codes, with their HTTP status and the error-page URL pattern. Before this, a fund signer without a trustline got ESCROW_PLATFORM_FEE_TOO_HIGH; it now gets TOKEN_TRUSTLINE_MISSING.
  • Short pointers to both sections in the single- and multi-release deploy / fund / update / manage-milestones sections, in constitution.md (Article IV.2) and in the SKILL.md trustline gotcha.
  • Removed receiverMemo from the deploy and update payload examples and from the type rules. It is hidden from the API's Swagger on those inputs (commit 2acface). The versioned read response still returns it, so that example is unchanged.

scripts/check-consistency.sh passes.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c93e4ce3-60cf-4002-84fe-758888dd3e21


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor

I patched the trustline timing wording directly on this PR branch in 950ad7b.

The constitution now states the narrower invariant: an address must already hold the asset trustline when that address is validated/introduced. That preserves valid flows where a trustline is created after the escrow itself was deployed but before a future receiver is added via manage-milestones, while still requiring funders to have the trustline before fund.

No other PR content was changed. The Docs consistency Action still fails before executing any steps, so that remains a separate CI issue rather than a docs finding.

@techrebelgit techrebelgit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against the merged Core API trustline preflight/error attribution behavior, including the corrected trustline timing invariant in 950ad7b. Content is aligned with implementation.

@techrebelgit
techrebelgit merged commit 80e2467 into main Sep 27, 2026
3 of 4 checks passed
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.

2 participants