Skip to content

feat(api): failRun dead_letter flag — client-forced dead-letter - #11

Open
addadi wants to merge 1 commit into
nullclaw:mainfrom
addadi:feat/fail-dead-letter-flag
Open

feat(api): failRun dead_letter flag — client-forced dead-letter#11
addadi wants to merge 1 commit into
nullclaw:mainfrom
addadi:feat/fail-dead-letter-flag

Conversation

@addadi

@addadi addadi commented Aug 22, 2026

Copy link
Copy Markdown

Fixes #8

POST /runs/{id}/fail accepts optional "dead_letter": true → skip max_attempts check, take dead-letter branch immediately (reason=client_requested, next_eligible=impossible, claim SQL excludes). Default false — existing behavior unchanged.

For deterministic errors (config/definition problems) that can never succeed on retry.

Stacked on #9 — includes its test-wiring + compile/leak fixes so the 2 new unit tests run in this branch. Will rebase to just the feature once #9 merges.

Verified locally: zig build clean, 20 unit tests pass, e2e 96 passed / 0 failed.

POST /runs/{id}/fail accepts optional "dead_letter": true → skip
max_attempts check, take dead-letter branch (reason client_requested,
next_eligible=impossible, claim SQL excludes it).

Use case: deterministic errors (config/definition problems) can never
succeed on retry. Without this, a task with max_attempts NULL retries
forever, or burns its full attempt budget on an error that is not
transient.

Also wires module tests into zig build test (previously 0 collected):
main.zig test block imports store/api/domain/config; fixes latent
compile errors (compat Dir wrap, ObjectMap.deinit(alloc)) and arena
leaks in 3 auth tests.
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.

Deterministic errors burn max_attempts — need client-forced dead-letter

1 participant