Commit b928837
feat(fire): add --exit-criteria + --idempotency-key flags (cueapi #632 + #683 parity)
Extends the existing fire command with two flags covering recently-shipped
server features. --send-at was already there from a prior port (#618).
--exit-criteria (repeatable, max 20)
§14 work-verification-light required-assertion keys (cueapi #632).
Receiver MUST report values for every key under outcome.assertions;
missing keys mark the execution verification_failed. Pass empty
string '' once to opt out of cue-level required_assertions for this
fire (server distinguishes [] = explicit opt-out from None = use
cue-level).
--idempotency-key (≤256 chars)
Opaque dedup key (cueapi #683 Phase 2). Same key + same body within
24h returns the cached execution; same key + different body returns
409 idempotency_key_conflict.
Implementation pin (caught earlier on cueapi-python #33 + cueapi-mcp #29):
idempotency_key is a BODY field on cues fire, NOT the Idempotency-Key
header. Server's FireRequest schema diverges from the messaging primitive's
header-based idempotency. Help text + load-bearing test pin this so a
future refactor doesn't 'simplify' to header-based (which would silently
not work — server FireRequest is extra='forbid' for unknown body fields,
ignores headers in body parsing).
Tests added (3):
- test_fire_help: pins all 5 flags appear in --help (--payload-override,
--merge-strategy, --send-at, --exit-criteria, --idempotency-key)
- test_fire_exit_criteria_repeatable_via_help: validates click parser
accepts repeated --exit-criteria flags
- test_fire_help_pins_idempotency_key_as_body_field: load-bearing pin
against future header-refactor
185/185 tests pass (was 183; 2 new + parser-validation added inline).
Source: drift audit handoff/cueapi-package-drift-2026-05-06; Backlog
rows "Parity port: PR #632 → cueapi-cli" + "PR #683 not in backlog
(folded in same-day)". Triggered by cueapi-main confirming bandwidth
on cueapi-cli lane this session ([CC-CUEAPI-DOC-DEBT-CLOSED-DISCIPLINE-
CODIFIED]).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 582815a commit b928837
2 files changed
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
467 | 490 | | |
468 | 491 | | |
469 | 492 | | |
470 | 493 | | |
471 | 494 | | |
472 | 495 | | |
473 | 496 | | |
| 497 | + | |
| 498 | + | |
474 | 499 | | |
475 | 500 | | |
476 | 501 | | |
| |||
483 | 508 | | |
484 | 509 | | |
485 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
486 | 521 | | |
487 | 522 | | |
488 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
154 | 184 | | |
155 | 185 | | |
156 | 186 | | |
| |||
0 commit comments