Skip to content

rust(feat): bulk annotation updates - #752

Merged
evan-sift merged 7 commits into
rust/mcp-user-defined-functionsfrom
rust/bulk-annotations
Aug 27, 2026
Merged

rust(feat): bulk annotation updates#752
evan-sift merged 7 commits into
rust/mcp-user-defined-functionsfrom
rust/bulk-annotations

Conversation

@evan-sift

@evan-sift evan-sift commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Description

update_annotation now updates one or more annotations in a single call. It takes a required annotation_ids list (1 to 1000 ids) and applies the same change set to every id.

Archiving goes through one BatchArchiveAnnotations request. Unarchiving clears each annotation's delete date through per-annotation UpdateAnnotation requests with a bounded fan-out, the mechanism the API documents for restoring an annotation (the dedicated unarchive RPCs are not implemented by the service). Field changes are likewise one UpdateAnnotation per annotation with the same fan-out. When is_archived is combined with field updates, the updates run first, then the archive or unarchive.

Failure handling is explicit rather than all-or-nothing: per-annotation failures come back in failures with the id, code, and message next to the successful results, a backend-wide failure stops later batches and reports the untouched ids in not_attempted, and any partial failure sets the tool result's isError flag. next_step tells the agent which ids are safe to retry.

Stack note: the bundled agent skill and the 0.5.0 changelog for this whole stack land at the tip (#763).

Verification

  • cargo test -p sift_mcp on this branch: 430 passed, 0 failed. New tests cover batch construction, per-id failure mapping, not_attempted reporting on backend-wide failure, archive ordering with combined field updates, bounded fan-out concurrency with order preservation, and parameter validation (empty list, empty ids, over-limit list, no updatable field).
  • cargo fmt --all -- --check: clean.
  • Live end-to-end against a development org (2026-08-26): bulk update, batch archive, per-annotation unarchive (verified both directions on two annotations, zero failures), and the create gate all exercised through an MCP client driving the built server.
  • Rebased into the MCP tool stack (base rust/mcp-user-defined-functions).

@evan-sift
evan-sift force-pushed the rust/bulk-annotations branch from a70ae50 to 2475d86 Compare August 26, 2026 07:56
@evan-sift
evan-sift changed the base branch from main to rust/mcp-user-defined-functions August 26, 2026 07:56
@evan-sift evan-sift changed the title feat(rust): bulk annotations rust(feat): bulk annotation updates Aug 26, 2026
@evan-sift
evan-sift force-pushed the rust/mcp-user-defined-functions branch from 10cd137 to d23b02f Compare August 26, 2026 08:20
@evan-sift
evan-sift force-pushed the rust/bulk-annotations branch 2 times, most recently from 2475d86 to e325a9c Compare August 26, 2026 08:20
@evan-sift
evan-sift marked this pull request as ready for review August 26, 2026 08:21
@evan-sift
evan-sift requested a review from lineville August 26, 2026 08:21
@evan-sift
evan-sift force-pushed the rust/bulk-annotations branch from e325a9c to bc03eb9 Compare August 26, 2026 17:28
@evan-sift
evan-sift force-pushed the rust/mcp-user-defined-functions branch from 1d4b281 to 57dbeaf Compare August 27, 2026 04:40
@evan-sift
evan-sift force-pushed the rust/bulk-annotations branch from bc03eb9 to f0d6aee Compare August 27, 2026 04:40
@evan-sift
evan-sift force-pushed the rust/mcp-user-defined-functions branch from 57dbeaf to 1c714d8 Compare August 27, 2026 19:20
@evan-sift
evan-sift force-pushed the rust/bulk-annotations branch from f0d6aee to 8dfa82c Compare August 27, 2026 19:20
Co-authored-by: Liam Neville <liam@siftstack.com>
@evan-sift
evan-sift merged commit 8573279 into rust/mcp-user-defined-functions Aug 27, 2026
12 of 13 checks passed
@evan-sift
evan-sift deleted the rust/bulk-annotations branch August 27, 2026 19:39
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.

2 participants