Skip to content

cli: invite code create and invite wave create - #3071

Merged
colinmegill merged 3 commits into
edgefrom
cli-invite-create
Oct 16, 2026
Merged

colinmegill merged 3 commits into
edgefrom
cli-invite-create

Conversation

@colinmegill

Copy link
Copy Markdown
Member

Observable change: two new CLI commands that mint invites through the existing Node routes, with no server change:

  • polis invite code create: POST /api/v3/zinvites/0 with conversation_id (Node resolves the conversation from conversation_id);
  • polis invite wave create: POST /api/v3/treevite/waves.

Each sends exactly one request (no retries or redirects), then reads back what it created: the new code must appear exactly once, and the new wave row must match the returned wave. A lost response, a server error, an unknown success shape, a parent-wave 400 that can arrive after inserts, or a failed read-back exits 7 with outcome unknown. An owner refusal exits 4 with advice that matches the route: conversation codes are owner-only, waves also admit a moderator on the owner's site. Also catalogues polis_err_creating_zinvite_not_conversation_owner.

Tests: bash scripts/test-polis-cli.sh (fmt, clippy -D warnings, 252 tests, including loopback cases for lost responses, 5xx, read-back mismatch and refusals).

🤖 Generated with Claude Code

colinmegill and others added 3 commits October 15, 2026 19:08
Adds two commands that mint invites through the existing Node routes:
`polis invite code create` (POST /api/v3/zinvites/0, the conversation named by
conversation_id) and
`polis invite wave create` (POST /api/v3/treevite/waves). Each sends one
request and then reads back what it created: the new code must appear exactly
once, and the new wave row must match the returned wave. A lost response, a
server error, an unknown success shape or a failed read-back exits 7
(outcome unknown, no automatic retry); an owner refusal exits 4. No server
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
@colinmegill
colinmegill merged commit 0429fbd into edge Oct 16, 2026
27 checks passed
@colinmegill
colinmegill deleted the cli-invite-create branch October 16, 2026 02:23
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.

1 participant