fix(executions): mark_verified actually sends valid+reason; add replay()#25
Merged
Merged
Conversation
Two changes, both in ExecutionsResource:
(1) **Bug fix — mark_verified silently dropped both kwargs.** The prior
implementation accepted ``valid`` and ``reason`` as keyword args but
always sent ``json={}``. The server treats absent body as
``valid=true``, so the default-arg path produced the right outcome
by accident — but every caller passing ``valid=False`` or
``reason="..."`` got ``verified_success`` instead of their intent,
silently. The fix builds the body explicitly:
body = {"valid": valid}
if reason is not None:
body["reason"] = reason
Pinned by 4 regression tests:
- default-arg sends ``{"valid": True}`` (not ``{}``)
- ``valid=False`` lands in body
- ``reason="..."`` lands in body
- ``reason=None`` is omitted (not serialized as null)
(2) **New: ``ExecutionsResource.replay(execution_id)``** — POST
/v1/executions/{id}/replay. Closes one of the
``endpoints_missing`` entries from cueapi-python #24's parity
manifest. Server-side already shipped on prod; this is pure SDK
catch-up.
Returns the server's response dict unchanged (new execution_id,
scheduled_for, status, triggered_by="replay", replayed_from).
Tests: 5 new (12 → 17 total). All pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This was referenced May 4, 2026
govindkavaturi-art
approved these changes
May 4, 2026
Member
govindkavaturi-art
left a comment
There was a problem hiding this comment.
Genuine bug fix on mark_verified — the previous version sent json={} and ignored the valid/reason params, so callers couldn't actually mark verifications failed. Plus replay() addition. Approve.
This was referenced May 4, 2026
mikemolinet
added a commit
that referenced
this pull request
May 9, 2026
…t recent ports (#36) Manifest was 3 days stale; many endpoints listed as missing have been ported since the last audit. Moved from endpoints_missing → endpoints_covered (with PR refs): - POST /v1/cues/{id}/fire (PR #23; in-flight kwargs in #33) - POST /v1/executions/{id}/replay (PR #25) - GET /v1/executions/claimable (PR #23) - POST /v1/executions/{id}/claim (PR #23) - POST /v1/executions/claim (PR #23) - GET /v1/workers + DELETE /v1/workers/{id} (PR #26) - GET /v1/usage (PR #26) - POST /v1/agents + GET/PATCH/DELETE /v1/agents/{ref} + GET /v1/agents/{ref}/webhook-secret + GET /v1/agents/{ref}/inbox + /sent (PR #27) - POST /v1/messages + GET/read/ack (PR #28) Added in-flight refs (open PRs): - GET /v1/agents/roster (in-flight PR #35; cueapi #630 parity) - GET /v1/agents/{ref}/presence (in-flight PR #35; cueapi #662 parity) - send_at + exit_criteria + idempotency_key kwargs on fire (PR #33) - send_at kwarg on messages.send (PR #34) New endpoints_missing items (post-audit): - POST /v1/agents/{ref}/webhook-secret/regenerate (destructive; tracked) - DELETE /v1/messages bulk (cueapi #650; bounded by cueapi-cli upstream) - POST /v1/executions/{id}/live-claim (cueapi #664; handler-runtime, not SDK) New "in_flight_ports_2026_05_07" section listing all 4 currently-open SDK PRs with PR-overlap notes (PR #30/#33 lane-flagged with cueapi-main). Bumped sdk_version_at_audit 0.1.3 → 0.2.x. This refresh closes the Backlog row "Refresh cueapi-python parity-manifest.json" filed earlier today (Self-flag 2026-05-07). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Two changes, both in
ExecutionsResource:(1) Bug fix —
mark_verifiedsilently dropped both kwargsThe prior implementation accepted
validandreasonas keyword args but always sentjson={}:The server treats absent body as
valid=true, so the default-arg path produced the right outcome by accident. But every caller passingvalid=Falseorreason=\"...\"gotverified_successinstead of their intent, silently. No exception, no warning, no test caught it.The fix builds the body explicitly:
Pinned by 4 regression tests so a future refactor can't regress to the bug:
{\"valid\": True}(not{})valid=Falselands in bodyreason=\"...\"lands in bodyreason=Noneis omitted (not serialized asnull)(2) New:
client.executions.replay(execution_id)Closes one of the
endpoints_missingentries from cueapi-python #24's parity manifest. Server-sidePOST /v1/executions/{id}/replayalready shipped on prod; this is pure SDK catch-up.Returns the server's response dict unchanged (new
execution_id,scheduled_for,status,triggered_by=\"replay\",replayed_from).Tests
5 new (12 → 17 total). All pass.
No hosted-PR dependency
Both server-side endpoints already shipped. Pure SDK fix + catch-up.
Backlog row
Will be added per the parity discipline. The followup PR (workers + usage resources) ships in a separate branch to keep this PR's scope tight on the bug fix + single endpoint add.
How the bug was found
Surfaced while surveying cueapi-python's surface for parity work — comparing the SDK's
mark_verifiedagainst the cueapi-clicueapi executions verifycommand I just shipped (cueapi-cli #31). The CLI explicitly tested--valid/--invalid/--reasonbranches; comparing back to the SDK exposed that the SDK had silently been broken on those paths.🤖 Generated with Claude Code