Repository navigation
cli: invite code create and invite wave create - #3071
Merged
Merged
Conversation
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
colinmegill
force-pushed
the
cli-invite-create
branch
from
October 16, 2026 02:08
07e71d3 to
50c558c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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