Skip to content

feat(cues): add bulk-delete subcommand (cueapi #650 parity)#46

Merged
mikemolinet merged 1 commit into
mainfrom
feat/cues-bulk-delete-port
May 11, 2026
Merged

feat(cues): add bulk-delete subcommand (cueapi #650 parity)#46
mikemolinet merged 1 commit into
mainfrom
feat/cues-bulk-delete-port

Conversation

@mikemolinet
Copy link
Copy Markdown
Collaborator

Summary

Adds cueapi bulk-delete <id1> <id2> ... — wraps POST /v1/cues/bulk-delete (cueapi #650). Variadic args, max 100 IDs per call.

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 passes).
  • --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

✓ Deleted N cue(s)
  ✓ cue_abc...
  ...

Skipped: M (not found or not owned)
  · cue_xyz...

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 --yes flag + 100-cap callout
  • test_bulk_delete_requires_at_least_one_id — variadic minimum
  • test_bulk_delete_rejects_more_than_100_ids_pre_request — client-cap pin

186/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) on GET /v1/cues are a separate port — adding to a follow-up PR if not already covered by the existing cueapi list flag surface.

cueapi-main confirmed cueapi-cli lane mine via [CC-CUEAPI-CLI-LANE-OPTION-B-YOURS].

Related

  • cueapi-action: adds cueapi-action bulk-delete once this CLI port lands (Action wraps cueapi-cli; tracked on Backlog as upstream-bounded).
  • cueapi-python / cueapi-mcp: would add client.cues.bulk_delete() / cueapi_bulk_delete_cues tool — separate Backlog rows; defer to follow-ups.

🤖 Generated with Claude Code

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>
@mikemolinet mikemolinet force-pushed the feat/cues-bulk-delete-port branch from b9870ab to 3c1551c Compare May 11, 2026 23:54
@mikemolinet mikemolinet merged commit ff923c4 into main May 11, 2026
5 checks passed
@mikemolinet mikemolinet deleted the feat/cues-bulk-delete-port branch May 11, 2026 23:56
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.

1 participant