feat(cues): add bulk-delete subcommand (cueapi #650 parity)#46
Merged
Conversation
This was referenced May 9, 2026
Merged
a533d44 to
b9870ab
Compare
Adds `cueapi bulk-delete <id1> <id2> ...` — variadic args, max 100 IDs
per call. Wraps POST /v1/cues/bulk-delete (cueapi #650, "feat(cues): bulk
delete + stale-cue discovery filters").
Behavior:
- Per-ID atomic, NOT batch atomic — IDs that don't exist OR aren't
owned by the caller land in the response's `skipped` array (silent
skip on miss; no info leak about other tenants' cues).
- Cascade FK handles executions + dispatch_outbox cleanup server-side.
- Server requires X-Confirm-Destructive: true header (sent
automatically after the local --yes confirmation).
- --yes / -y skips the confirmation prompt for CI usage.
- Client-side cap of 100 IDs prevents server roundtrip on obvious
overruns; over-cap calls print error + early-return.
Output:
✓ N deleted
· M skipped (not found or not owned)
Truncates lists at 10 entries with "... and X more" tail for readability
on large bulk operations.
3 new tests:
- test_bulk_delete_help (pins --yes flag + 100 cap callout)
- test_bulk_delete_requires_at_least_one_id (variadic min)
- test_bulk_delete_rejects_more_than_100_ids_pre_request (client cap pin)
186/186 tests pass.
Source: drift audit handoff/cueapi-package-drift-2026-05-06; Backlog row
was filed as "messages bulk-delete" but the actual cueapi #650 is CUES
bulk-delete (mis-recall caught at port time). cueapi-main confirmed
cueapi-cli lane mine via [CC-CUEAPI-CLI-LANE-OPTION-B-YOURS].
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
b9870ab to
3c1551c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
cueapi bulk-delete <id1> <id2> ...— wrapsPOST /v1/cues/bulk-delete(cueapi #650). Variadic args, max 100 IDs per call.Behavior
skippedarray (silent skip on miss; no info leak about other tenants' cues).X-Confirm-Destructive: trueheader (sent automatically after the local--yesconfirmation passes).--yes/-yskips the confirmation prompt for CI usage.Output
Truncates lists at 10 entries with "... and X more" tail for readability on large bulk operations.
Tests
3 new tests:
test_bulk_delete_help— pins--yesflag + 100-cap callouttest_bulk_delete_requires_at_least_one_id— variadic minimumtest_bulk_delete_rejects_more_than_100_ids_pre_request— client-cap pin186/186 tests pass.
Source / Note
Drift audit
handoff/cueapi-package-drift-2026-05-06. The Backlog row I filed earlier today described this as "messages bulk-delete" — that was a mis-recall; cueapi #650 is cues bulk-delete + stale-cue discovery filters (cued the wrong noun in my audit). The stale-cue discovery filters (orphan / last-success-age / consecutive-failed) onGET /v1/cuesare a separate port — adding to a follow-up PR if not already covered by the existingcueapi listflag surface.cueapi-main confirmed cueapi-cli lane mine via
[CC-CUEAPI-CLI-LANE-OPTION-B-YOURS].Related
cueapi-action bulk-deleteonce this CLI port lands (Action wraps cueapi-cli; tracked on Backlog as upstream-bounded).client.cues.bulk_delete()/cueapi_bulk_delete_cuestool — separate Backlog rows; defer to follow-ups.🤖 Generated with Claude Code