feat: add cueapi executions replay / verify / verification-pending#31
Conversation
govindkavaturi-art
left a comment
There was a problem hiding this comment.
Replay/verify/verification-pending commands with proper terminal-state semantics. The 409 "in-flight" handling on replay surfaces the right error message instead of dumping HTTP code. Approve.
|
@mikemolinet — this PR is approved but has conflict with main since #28 ( Action: rebase onto main, keep both class definitions / both command groups. git fetch origin main
git rebase origin/main
# In tests/test_cli.py: keep BOTH _AgentsClient AND your test class
# In cueapi/cli.py: keep BOTH the agents group from #28 AND your additions
git add -u
git rebase --continue
git push --force-with-leaseI'll re-merge as soon as it's green. Sorry for the cascade — it's the cost of merging the agents group first; the rest of your stack just needs a quick rebase. ✅ |
8dd4e43 to
2091ca9
Compare
2091ca9 to
f5cdd6f
Compare
…38) Updates `parity-manifest.json` to reflect the 8-PR parity wave landed today. `commands_covered` block extended with the new commands (now 35 total): - 3 new executions subcommands (replay / verification-pending / verify) from PR #31 - 9 new agents commands (messaging primitive identity surface) from PR #28 - 4 new messages commands (messaging primitive lifecycle) from PR #29 - 2 new workers commands (list / delete) from PR #33 - 2 new `key webhook-secret` subcommands from PR #33 - `--send-at` flag on `cueapi fire` from PR #37 (in flight, depends on hosted #618) `command_drift`: - `cueapi create`: 6 new flags moved missing → covered (--require-payload-override, --required-keys, --delivery, --alerts, --catch-up, --verification, --on-success-fire). Only `--transport` remains in missing — flagged as refactor scope, not a simple flag-add. - `cueapi update`: 9 new flags moved missing → covered. missing_flags now empty. - `cueapi fire`: new entry capturing the 3 covered flags including --send-at. - `cueapi executions get`: missing_display cleared (PR #589 ported in #26). - `cueapi executions list`: 4 new filters moved missing → covered (no remaining gap). `endpoints_missing`: - All 8 entries from the seed manifest cleared except `POST /v1/worker/heartbeat`. - That endpoint stays in missing with documented rationale: cueapi-worker is the canonical wrapper with proper heartbeat-loop semantics. Direct CLI registration is redundant. Decision documented in the manifest entry + cueapi workers group docstring. `ported_pr_history`: - 9 entries with merge timestamps, replacing the pre-port forward-looking notes. - Each entry cross-references the cueapi-cli PR + the hosted PR (when applicable) + the merge timestamp for forensics. `cli_version_at_audit`: bumped 0.1.x → 0.2.x to reflect the new surface area. `last_full_audit`: kept at 2026-05-04 (this update is the post-merge snapshot of the 2026-05-04 audit, not a fresh audit). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Drains 3 entries from cueapi-cli #25's
endpoints_missing:cueapi executions replay <id>cueapi executions verification-pending <id>cueapi executions verify <id> [--valid | --invalid] [--reason \"...\"]All three slot into the existing
cueapi executionsgroup — no new top-level surface, the manifest gap closes by adding subcommands.Design notes
verifyis tri-state forvalid.--validsendsTrue,--invalidsendsFalse, neither sends an empty body. The empty-body path matches the server's pre-schema legacy callers (server treats absent body asvalid=true). Pinned bytest_executions_verify_default_omits_valid_fieldso a refactor can't silently start always-sending the field.--reasonlength cap (500) enforced client-side. The user gets a clean error before any HTTP round-trip. Matches the server's hard limit fromVerifyRequest.replaycarries forwardpayload_override. Server-side behavior (handled inreplay_executionatapp/routers/executions.py); the CLI surfaces the newexecution_idso users can chain commands.Helpful 409 messages.
replay409 produces "in flight" / "in progress" copy instead of raw status code (matches server'sexecution_in_flighterror code).verify409 produces "cannot transition from current outcome_state."Tests
12 new (36 → 48 total). Mock-based body capture using the same
_FakeClientpattern as PR #26-#30. Pinned behaviors:replayPOSTs empty bodyreplay409 in-flight produces helpful errorverification-pendingPOSTs empty bodyverifydefault sends{}(novalidkey)verify --invalidsends{valid: false, reason: \"...\"}verify --validsends{valid: true}--reason>500 rejected client-side with clear messageexecutions --helpincludes the 3 new subcommandsAll 48 pass locally.
No hosted-PR dependency
All 3 endpoints already shipped on prod (per
app/routers/executions.py). Pure CLI catch-up.Test plan
python3 -m pytest tests/test_cli.py -q→ 48 passedcueapi executions replay <terminal-exec-id>→ returns new execution_idcueapi executions replay <in-flight-exec-id>→ 409 with helpful copycueapi executions verification-pending <id>→ outcome_state=verification_pendingcueapi executions verify <id>→ outcome_state=verified_successcueapi executions verify <id> --invalid --reason \"x\"→ outcome_state=verification_failedParity Impact
Closes 3 entries from
endpoints_missingin cueapi-cli #25'sparity-manifest.json:POST /v1/executions/{id}/replayPOST /v1/executions/{id}/verification-pendingPOST /v1/executions/{id}/verifyManifest update follows after #25 merges to main.
Companion PRs
cueapi agentscommand groupcueapi messagescommand group🤖 Generated with Claude Code