Skip to content

id: implement #5751 invite terms extension — InviteBody target/uses/depth/redeemer/parent, postcard versioning, 512-byte budget #12983

Open

Description

@dezren39

Refs #5751, #12922.

Scope

Implement step 1 of the #5751 design record's implementation shape (§5): extend the signed invite event's body with the delegation terms the record specifies. Today InviteBody (pkgs/id/crates/id-directory/src/invites/event.rs) is a fixed-layout format carrying only inviter / ticket_digest / group / role / expires_ms — none of the §2–§4 terms exist in code yet, and every later #5751 step (redemption journaling, per-link listing) plus the #5959 §7 capability_pin term (#12922) attaches to this terms object.

  • Extend InviteBody (postcard, versioned, per id: design: Wire format & transport adapters — postcard schema, non-UDP carriers, relays/proxies #5674): target (group, or world + its fronting group), uses_cap: Option<u32> + redemption counting, depth_remaining: u8, parent_digest: Option<[u8; 32]>, redeemer: Option<[u8; 32]>.
  • Enforce the §1 budgets: event body ≤ 512 bytes as a hard parser limit (an over-budget body is refused at decode), and the paste form ≤ 512 chars at mint.
  • Defaults per §3/§4: source invites under open delegation mint depth_remaining = 1 (policy may raise to at most 3), moderator-grant invites default 0; link invites default to 7-day expiry and a 25-use cap unless the inviter sets otherwise.
  • The existing fixed-layout events are the v1 wire form: the versioned body must keep reading them (or name the migration explicitly) — do not silently break invites already minted.

Dependency / ordering

This is the prerequisite slice for #12922 (invite capability_pin term): the pin is one optional field in the terms object this issue creates. #12922's redemption side additionally rides #12921 (baseline store + release-record resolution).

Test oracles

  • Round-trip: a body carrying every term encodes/decodes byte-identically; a v1 fixed-layout event still parses.
  • Budget: a body encoded over 512 bytes is refused at decode; mint refuses a paste form over 512 chars.
  • Terms: redeemer-pinned invite refuses a different redeemer and accepts the pinned one; depth never increases along a re-mint (child depth < parent depth); default expiry/use-cap land when the inviter sets neither.

Design of record: #5751 §1–§5. Filed by Lane HH (archer) from the #12922 premise check, 2026-11-23: #12922 named this terms object as its home and no tracking issue existed for it.

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · Lane HN (archer) claiming this slice.

    Premise check: issue open, no live claim (only the bot link comment above), #5751 design record closed/landed. Plan: extend InviteBody per §5 step 1 — versioned postcard body carrying target / uses_cap / depth_remaining / parent_digest / redeemer, 512-byte decode budget + 512-char paste budget at mint, §3/§4 defaults, v1 fixed-layout events still parse. One PR with the declared test oracles (round-trip, budget refusal, terms enforcement).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions