fix: address PR review feedback (round 5)

- Validate OCS envelope in trash_collective, delete_collective, trash_page
- Guard _unwrap_ocs against non-OCS responses with informative OCSError
- Remove _get_ocs_headers() indirection, use class constants directly
- Split headers: _OCS_HEADERS (GET) vs _OCS_HEADERS_JSON (with body)
- Fix docstring claiming emoji param is required when it is optional
- Rename misleading test, add test for non-OCS envelope handling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-03-26 13:49:28 +01:00
co-authored by Claude Opus 4.6
parent 95edd9ba8e
commit aa46c6147b
3 changed files with 52 additions and 34 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ def configure_collectives_tools(mcp: FastMCP):
Args:
collective_id: ID of the collective
emoji: New emoji for the collective (required)
emoji: New emoji for the collective
"""
client = await get_client(ctx)
try: