Skip to content

feat(colony-config): post-flair / user-flair / removal-reason / member-note CRUD#76

Merged
jackparnell merged 1 commit into
mainfrom
feat/colony-config-methods
Jun 16, 2026
Merged

feat(colony-config): post-flair / user-flair / removal-reason / member-note CRUD#76
jackparnell merged 1 commit into
mainfrom
feat/colony-config-methods

Conversation

@arch-colony

Copy link
Copy Markdown
Collaborator

Colony config CRUD — completes the moderation parity

Follow-up to #75 (colony-moderation methods). The four curated config collections a colony's mods manage were web + MCP only until the server added JSON endpoints (THECOLONYC-374); this adds the matching client methods, closing the SDK-parity gap from THECOLONYC-373.

14 methods on ColonyClient, AsyncColonyClient, and MockColonyClient, each a 1:1 wrapper over /api/v1/colonies/...:

Area Methods
Post flairs list_post_flairs, create_post_flair, delete_post_flair
User flairs list_user_flairs, create_user_flair, delete_user_flair, assign_member_flair, clear_member_flair
Removal reasons list_removal_reasons, create_removal_reason, delete_removal_reason
Member notes list_member_notes, add_member_note, delete_member_note

Post-flair / removal-reason / member-note management needs general mod authority; user-flair management needs the granular can_manage_flair permission (server-enforced). colony accepts a slug or UUID, resolved like join_colony.

Tests / docs

  • tests/test_colony_config.py — sync (urllib mock), async (httpx.MockTransport), and MockColonyClient; each asserts exact method + resolved path + JSON body. All three source files 100% covered; 887 passed.
  • README "Colony config" table + example; the stale "not in the SDK" note removed. CHANGELOG under Unreleased (no version bump — still batching for the next release).

ruff + ruff format --check + mypy src/ clean. Non-breaking, additive. Refs THECOLONYC-373/374.

🤖 Generated with Claude Code

…r-note CRUD

Completes the colony-moderation parity from #75: the four config
collections that were web + MCP only now have client methods, since the
server added JSON endpoints (THECOLONYC-374). Adds 14 methods to
ColonyClient, AsyncColonyClient, and MockColonyClient, each a 1:1
wrapper over /api/v1/colonies/...:

- post flairs: list/create/delete_post_flair
- user flairs: list/create/delete_user_flair + assign/clear_member_flair
- removal reasons: list/create/delete_removal_reason
- member notes: list_member_notes / add_member_note / delete_member_note

Post-flair / removal-reason / member-note management needs general mod
authority; user-flair management needs granular can_manage_flair
(server-enforced). colony accepts a slug or UUID (resolved like
join_colony).

Tests: tests/test_colony_config.py (sync via urllib mock, async via
httpx.MockTransport, mock fake) — all three source files 100% covered;
887 passed; ruff + mypy clean. README + CHANGELOG (Unreleased) updated;
the stale 'not in the SDK' note removed.

Refs THECOLONYC-373/374.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jackparnell jackparnell merged commit e955eaa into main Jun 16, 2026
7 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