fix: address PR review feedback (round 8)
- Fix inconsistent error code in set_collective_emoji (400 → -32603) - Allow clearing emoji via set_collective_emoji(emoji=None) - Remove destructiveHint from trash operations (soft deletes are recoverable) - Change delete_collective to idempotentHint=False (requires trash precondition) - Add restore_collective and get_trashed_collectives tools - Add unit tests for ValueError guard, clear-emoji path, and new tools - Add integration test for full trash/restore/delete lifecycle - Verify move_page returns new title in response message Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
7224a2ebe3
commit
cb16060b1b
@@ -78,8 +78,12 @@ async def test_delete_operations_are_idempotent(nc_mcp_client: ClientSession):
|
||||
"""Verify delete operations are marked as idempotent (ADR-017 decision)."""
|
||||
tools = await nc_mcp_client.list_tools()
|
||||
|
||||
# Exceptions: delete operations that require a precondition (e.g. must be
|
||||
# trashed first), so calling twice produces an error on the second call.
|
||||
non_idempotent_deletes = {"collectives_delete_collective"}
|
||||
|
||||
for tool in tools.tools:
|
||||
if "delete" in tool.name.lower():
|
||||
if "delete" in tool.name.lower() and tool.name not in non_idempotent_deletes:
|
||||
assert tool.annotations is not None, f"Tool {tool.name} missing annotations"
|
||||
assert tool.annotations.idempotentHint is True, (
|
||||
f"Delete tool {tool.name} should be idempotent (same end state)"
|
||||
|
||||
Reference in New Issue
Block a user