Skip to content

fix(v6.52.3): update_set keeps the set in its collection (ADR-259) - #316

Merged
cgbarlow merged 1 commit into
mainfrom
fix/update-set-keeps-collection
Oct 5, 2026
Merged

cgbarlow merged 1 commit into
mainfrom
fix/update-set-keeps-collection

Conversation

@cgbarlow

@cgbarlow cgbarlow commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Fixes #314.

Problem

Editing a set's name or description through MCP update_set (or CLI iris update set) dropped the set out of its collection. Both left collection_id out of the PUT body, and the backend stored a missing field as NULL. A later update_collection could then fail with "Thumbnail diagram does not belong to a set in this collection".

Fix

  • MCP and CLI. update_set and iris update set send the set's current collection_id back. They still refuse to move a set: a collection_id supplied by the caller is dropped, and moves stay with move_set.
  • Backend. On PUT /api/sets/{id}, a missing description, thumbnail_source, thumbnail_diagram_id, collection_id, system_prompt or mcp_system_context keeps its stored value. An explicit null still clears it, so move_set with no collection still un-groups a set. The web UI sends every field, so it is unaffected.
  • CLI, found on the way. iris update set --hierarchy-sort, --package-tab-default and --view-tab-default were accepted but never sent. They are now.
  • ADR-259, SPEC-259-A, changelog, and version bump to 6.52.3. No schema change, no new endpoint.

Tests

  • New end-to-end test (cli/tests/test_integration_smoke.py::TestSetUpdateEndToEnd): MCP update_set, update_collection and move_set against a real backend, with no mocked responses. It fails without the fix (collection_id comes back None) and passes with it.
  • Backend: 9 new tests for missing-versus-null on each field, including an uploaded thumbnail image.
  • The old MCP and CLI tests asserted that collection_id was absent from the body, which is what hid the bug. They now assert it is present.
  • Suites: backend 2245 passed and 9 skipped (full run), MCP 292 passed, CLI 72 passed, iris-client 70 passed. Surface parity script: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CGz89TSr9RHvWuGQtgcjFv

MCP update_set and CLI `iris update set` left collection_id out of the
PUT body, and the backend stored the missing field as NULL, so a plain
name or description edit un-grouped the set.

- MCP and CLI send the set's current collection_id back. A
  caller-supplied collection_id is still ignored (moves are move_set).
- PUT /api/sets/{id}: description, thumbnail fields, collection_id and
  the two prompts keep their stored value when missing from the body.
  An explicit null still clears them.
- CLI `update set` now sends --hierarchy-sort and the tab-default
  options, which it accepted but dropped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CGz89TSr9RHvWuGQtgcjFv
@cgbarlow
cgbarlow merged commit d5b80d9 into main Oct 5, 2026
2 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.

MCP update_set clears collection_id, so the set drops out of its collection

1 participant