docs(deck): note owner reassignment on move; add archived-preservation test
Round-2 review polish on PR #885: - Document in the deck_move_card_to_board tool that the move reassigns the card owner to the calling user and resets the done timestamp (both are limitations of Deck's move route), so an LLM reading only the tool description isn't misled about preserved fields. - Fix the done integration-test docstring to say "done state (not timestamp)". - Add test_move_card_to_board_preserves_archived_status to lock in the documented archived-preservation behaviour. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
798a00d89d
commit
7a39767482
@@ -154,7 +154,7 @@ async def test_move_card_to_board_remaps_labels(
|
||||
async def test_move_card_to_board_preserves_done_status(
|
||||
nc_client: NextcloudClient, two_boards_with_stacks: tuple
|
||||
):
|
||||
"""A card marked done keeps its done timestamp across a cross-board move."""
|
||||
"""A card marked done keeps its done state (not timestamp) across a move."""
|
||||
source_board_id, source_stack_id, target_board_id, target_stack_id = (
|
||||
two_boards_with_stacks
|
||||
)
|
||||
@@ -185,6 +185,33 @@ async def test_move_card_to_board_preserves_done_status(
|
||||
assert after.done is not None, "done status was cleared during the move"
|
||||
|
||||
|
||||
async def test_move_card_to_board_preserves_archived_status(
|
||||
nc_client: NextcloudClient, two_boards_with_stacks: tuple
|
||||
):
|
||||
"""An archived card stays archived across a cross-board move."""
|
||||
source_board_id, source_stack_id, target_board_id, target_stack_id = (
|
||||
two_boards_with_stacks
|
||||
)
|
||||
|
||||
suffix = uuid.uuid4().hex[:8]
|
||||
card = await nc_client.deck.create_card(
|
||||
source_board_id, source_stack_id, f"Archived card {suffix}"
|
||||
)
|
||||
await nc_client.deck.archive_card(source_board_id, source_stack_id, card.id)
|
||||
|
||||
await nc_client.deck.move_card_to_board(
|
||||
source_board_id=source_board_id,
|
||||
source_stack_id=source_stack_id,
|
||||
card_id=card.id,
|
||||
target_board_id=target_board_id,
|
||||
target_stack_id=target_stack_id,
|
||||
)
|
||||
|
||||
after = await nc_client.deck.get_card(target_board_id, target_stack_id, card.id)
|
||||
assert after.stackId == target_stack_id
|
||||
assert after.archived is True, "archived state was lost during the move"
|
||||
|
||||
|
||||
async def test_move_card_to_board_rejects_stack_not_on_target_board(
|
||||
nc_client: NextcloudClient, two_boards_with_stacks: tuple
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user