fix: address PR review feedback (round 7) and fix CI

- Rename collectives_update_collective to collectives_set_collective_emoji
  (more precise since only emoji is settable)
- Use standard JSON-RPC error code -32603 (INTERNAL_ERROR) instead of -1
- Handle UnicodeDecodeError when reading page content via WebDAV
- Replace brittle 'Welcome' content assertion with length check

Fixes CI: test_update_operations_not_idempotent no longer matches the
renamed tool, which is correctly idempotent (no ETag involved).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-03-26 23:18:42 +01:00
co-authored by Claude Opus 4.6
parent 85119bde91
commit 7224a2ebe3
2 changed files with 15 additions and 15 deletions
+5 -5
View File
@@ -71,7 +71,7 @@ async def test_collectives_tools_available(nc_mcp_client: ClientSession):
expected_tools = [
"collectives_get_collectives",
"collectives_create_collective",
"collectives_update_collective",
"collectives_set_collective_emoji",
"collectives_trash_collective",
"collectives_delete_collective",
"collectives_get_pages",
@@ -116,12 +116,12 @@ async def test_collectives_list(
logger.info(f"Found {data['total']} collectives")
async def test_collectives_update_emoji(
async def test_collectives_set_collective_emoji(
nc_mcp_client: ClientSession, temporary_collective: dict
):
"""Test updating a collective's emoji."""
"""Test setting a collective's emoji."""
result = await nc_mcp_client.call_tool(
"collectives_update_collective",
"collectives_set_collective_emoji",
{"collective_id": temporary_collective["id"], "emoji": "📖"},
)
assert result.isError is False
@@ -242,7 +242,7 @@ async def test_collectives_get_landing_page_content(
assert data["content"] is not None, (
"Landing page should have auto-generated content"
)
assert "Welcome" in data["content"], "Landing page should contain welcome text"
assert len(data["content"]) > 0, "Landing page should have non-empty content"
logger.info(f"Landing page content: {len(data['content'])} bytes")