Skip to content

feat(queue): permanent versus transient consumer errors, and a dead_letters table on every target - #310

Merged
aRustyDev merged 9 commits into
mainfrom
feat/queue-dead-letters
Nov 18, 2026
Merged

aRustyDev merged 9 commits into
mainfrom
feat/queue-dead-letters

Conversation

@aRustyDev

@aRustyDev aRustyDev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #53

FR-21: a consumer's error is now permanent or transient, a message that can never succeed is set aside at once, a transient one is delivered again with a growing delay and set aside at its fourth delivery, and a body that is not an event is set aside as it came instead of being acknowledged and dropped. What is set aside is one table, dead_letters, read by GET /internal/dead-letters, on all four contract targets. M2's notification consumer should copy this policy.

Built on worker 0.9 (#303), which gives the Worker a message's delivery count (MessageExt::attempts()).

What changed

thrust-ports ConsumerError::{Permanent, Transient}; EventConsumer::handle returns it; EventConsumer::dead_letter is how an adapter writes one (an adapter holds no SystemScope). The policy for every adapter: MAX_DELIVERIES (4), retry_delay (5, 10, 20 s, capped at 60), disposition, and settle / settle_dead_letter, which are the Worker's decisions written where they are tested natively
core consumer_error: an exhaustive match on CoreError, no wildcard, so a new variant needs a decision. record_dead_letter stamps the time, mints an id when the queue gave none, and replaces a NUL with U+FFFD (Postgres cannot store one)
dead_letters migration 0020 (id = the queue's own message id, so a redelivery is one row; attempts nullable, because Cloudflare's DLQ restarts the count), memory and Postgres adapters, GET /internal/dead-letters behind the admin token
in-process queue native-memory, native-pg and worker-memory: retry with backoff, then set aside. A sleep is injected, so the tests record delays instead of waiting
Worker consumes the events queue and the DLQ behind it. Setting aside sends a DeadLetterMessage to the DLQ and the Worker's own DLQ consumer writes the row, so one writer makes every row. The old dropping undecodable queue message is gone. Four wrangler configs declare both queues; deploy_parity.py holds them to the same shape and max_retries to MAX_DELIVERIES
fuzz DeadLetterMessage::parse reads outside text: a harness, five seeds and fuzz_replay_ tests with must-fail controls

Where this differs from the issue

  • The migration is 0020, not 0002 (taken) and not 0019 (feat(issues): clean a description once in the use-cases and store its text and policy #305 took it while this was open).
  • The Worker test is named worker_bindings_undecodable_message_is_dead_lettered, because the bindings pass selects that prefix; the issue's name would have run in no pass.
  • Q-0006.5 was already answered, so it gets "Implemented", not a second answer.
  • attempts is nullable.
  • A transient error's last delivery is set aside by the consumer itself, keeping its error. Cloudflare's max_retries (3, the same four deliveries) is only the backstop.
  • The Worker writes the row through the DLQ consumer, not from the events handler, so a failed database write is delivered again instead of lost.

One change outside the queue

scripts/preview-config.py's isolated profile (#304) accepted production's queue shape exactly: one EVENTS producer and four variables. This branch adds EVENTS_DLQ and THRUST_EVENTS_DLQ to the template, so on the rebased tree 40 of test_preview_config.py's isolated runs failed. The profile now requires both producers and the variable, and still writes the events producer alone: a Preview consumes nothing, so it sets nothing aside. A third producer, a missing DLQ producer and a missing variable are refused and named. It is its own commit.

What was run

The branch has been rebased once onto #304 to #306 and then had main merged in twice (force-push is blocked here): the first merge brought #307 to #309 and the lettre fix #312, the second #315 (transaction-scoped migration locking). Both merges were clean apart from postgres/src/lib.rs (#308's Migration<'static> type with this branch's twentieth entry) and the G-46 row of status.md (main's row, byte for byte, then G-47).

On the final tree (d41af77), on this Mac, with wrangler 4.151.2 and worker-build 0.9.0:

  • cargo nextest run --workspace: 4770 passed. fmt, native clippy (-D warnings), wasm32 clippy of the Worker crates: clean.
  • Postgres and SMTP adapter suites (--profile adapters, Docker): 92 of 92, including the generated parity model (two new operations and a burst step) and the migration ledger tests against the real 0020.
  • Contract suite: native-memory, native-pg and worker-memory main 74 of 74; worker-cf main 74 of 74 and bindings 6 of 6. scripts/check-contract-counts.sh agrees (74 / 6; stage 2: 68 / 4).
  • Planted defect mutant_invalid_is_transient on native-memory: killed by exactly permanent_consumer_error_is_dead_lettered_without_retry, the other 73 pass.
  • cargo deny check (advisories, bans, licenses, sources): ok. This is the job that failed on the first CI run of this PR, on lettre 0.11.23, which fix(deps): move lettre to 0.11.24, which fixes six SMTP advisories that fail cargo deny #312 fixed on main; the first merge brought the fix in. scripts/check-cargo-lock.sh: ok.
  • Earlier, on the rebased tree before the merges: every step of the deps job (1 to 16 and 18, the OpenAPI diff in Docker; step 17 downloads a Linux actionlint, and the repo's own lint-actionlint.sh with the native binary passes, its control included), and every command of the ci-scripts job in test.yml except test-deploy-target.sh, below. test_preview_config.py (also on the final tree): 1483 passed, 0 failed.
  • CI on the first push, before the lettre fix: every job passed but security / deny (ci run 44368874336), including all contract cells of every target and ci-scripts, so test-deploy-target.sh passes on the runner.

Run before the rebase onto #304 to #306 and not repeated after it (the tests they control pass on the rebased tree, as above, but the planted defects were not put back in): the Worker hand controls (acknowledge-and-drop restored in the Worker: exactly the two new contract tests fail; Invalid treated as transient on worker-cf: exactly the one test fails), and the planted defects of the memory and Postgres adapter tests, the settle tests and consumer_errors.rs, each killed.

What was not run, or not shown

docs/src/testing/status.md G-47 lists these; the first three matter most.

  1. test-deploy-target.sh fails on this Mac, with a JSONDecodeError in one of its fakes. It fails the same 68 checks on an unmodified archive of main and on this branch, so it is the machine and not this change. On the runner it passed (first CI run).
  2. No cargo-fuzz campaign has been run on DeadLetterMessage::parse (it needs nightly and cargo-fuzz, which are yours to install). The committed seeds are replayed on every run.
  3. The Worker's path ran on local workerd, not on Cloudflare, and stage 2 has not been run against a deployed Worker. A queue has one consumer, so before the first deploy, check that nothing else is attached to the staging and production dead-letter queues: the Worker now consumes them.
  4. A message near Cloudflare's 128 KB limit cannot be wrapped in a DeadLetterMessage; it reaches the table by the queue's own backstop, with no count and no reason.
  5. The transient path is not tested over HTTP (there is no route that makes the consumer fail transiently): its 5, 10 and 20 s are held by the in-process queue's model and by settle's table.
  6. A dead letter whose own write fails four times is lost; the in-process queue counts it (lost_count) and nothing reads the count yet.

One known misclassification, kept and documented in ADR-0070: a history row for a work item the adapter does not have is a foreign-key error, so it is transient. It is delivered four times and then set aside with its reason, which costs three retries and loses nothing.

Review notes

Seven commits, each one a place to split if the diff is too large: policy and classification, the table and route, the in-process queue, the Worker, the contract tests, the docs, the preview-config fix; then two merges of main. ADR-0070 has the policy table and what it settled.

🤖 Generated with Claude Code

aRustyDev and others added 7 commits November 18, 2026 12:55
…d say what each means for the message

`EventConsumer::handle` returned `Result<(), String>`, so every failure looked alike: a queue adapter could not know that an event
with no `project_id` can never succeed (Stage 2 delivered one four times before the queue gave up) while a database that was down
might. It now returns `ConsumerError`, `Permanent` or `Transient`.

The policy that follows from the kind is one pair of functions in `thrust-ports`, for every queue adapter to call: `disposition`
(ack, deliver again after a delay, or dead-letter) and `retry_delay` (5 s doubled for every delivery, never more than 60 s).
`MAX_DELIVERIES` is 4, the first delivery and the three retries the Worker's `max_retries = 3` allows.

Core classifies in `consumer_error`: an error about the message (`Invalid`, `NotFound`, the authorization ones, `TooLarge`) is
permanent, one about something the consumer needed (`Internal`, which every port error arrives as, `Upstream`, `RateLimited`,
`Conflict`) is transient. Its `match` names every variant with no wildcard arm. One known misclassification is documented on it: a
history row for a work item the adapter does not have comes back as a backend error, so it is retried and then dead-lettered.

`DeadLetter` joins `Envelope` in `thrust-contracts`; nothing writes or reads one yet. Nothing yet acts on the kinds either: the
queue adapters still ignore or retry as before, which the commits after this one change.

Tested: the disposition of every answer on every delivery count 1..=6 against a table the test owns, and properties over the whole
range of `u32` for the delay and the limit; every `CoreError` variant against its kind, a property that the kind never depends on the
error's text, and the two events the issue names (no `project_id`; a backend error of the memory adapter) through the real consumer.
Controls, each killed (exit 100): a permanent answer retried, an off-by-one at the limit, the limit raised to five, no cap on the
delay, a finished message dead-lettered; permanent and transient swapped in either direction, the reason dropped, `Invalid`
transient.

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ead on `GET /internal/dead-letters`

A message the consumer sets aside now has somewhere to go. `dead_letters` (migration 0020) holds one row per message: the queue's own
id when it has one (so a message delivered again lands on the row it made), when it was set aside, the topic, the event's id when the
body decoded, the body as it arrived, why, and how many times it was delivered (NULL for a message Cloudflare's own dead-letter queue
moved, because that queue starts the count again). It has no tenant: a body that does not decode names none.

Ports: `Database::insert_dead_letter` (idempotent on `id`, the first write stands) and `dead_letters` (newest first, ties broken by
`id` in byte order, which Postgres is asked for with `COLLATE "C"`), both untenanted like the outbox's. `EventConsumer::dead_letter`
is the one way a queue adapter writes one, because an adapter holds no `SystemScope` and `scripts/check-deps.sh` keeps it that way.

Core: `record_dead_letter` stamps the time and, when the queue has no id, mints one. It also replaces a NUL in any text with U+FFFD:
Postgres cannot store a NUL in `text`, a body is whatever a producer sent, and a message whose dead-letter write fails is delivered
again, fails again and is lost, which is what a dead letter exists to prevent. The change is made there, once, so both adapters
answer alike.

`GET /internal/dead-letters` (the admin token, test routes on) lists them, so one contract test can read every target.

The number is 0020 because 0019 is `0019_description_stripped.sql` (issue #48, #305), which landed on main while this was being
built; the issue's own 0002 was taken long before. The Postgres ledger test plants made-up migrations, and since #305 it numbers them
from 9000, so a real 0020 does not collide with them and that test needs no change here (an earlier version of this work moved its
numbers up by one, as was done when 0018 was added; that is no longer needed and was dropped in the rebase).

Nothing sets a message aside yet: the queue adapters still ignore or retry as before, which the next commits change.

Tested: the memory adapter against a reference model over sequences (ties in time, ids that differ in case, a limit, a reset); the
generated parity model of the Postgres adapter gets the same two operations and five new step classes, and its hermetic check that the
generator reaches every class fails when it cannot make a tie, a redelivery or a listing; a round trip of arbitrary text through the
core write, NULs included. Controls, each killed: a second write that replaces the first, a repeated id answering true, oldest first,
ties in ascending id order, no limit, one row too many; a NUL kept in the body, the error or the topic, the queue's id ignored, the
time or the attempts or the event id dropped. These were run before the rebase onto #305; the same tests are re-run on the rebased
tree before the pull request is opened (see its body).

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…off and sets the rest aside

`MemoryQueue` ran the consumer and threw its answer away (`let _ = c.handle(&env).await`), so on native-memory, native-pg and
worker-memory a message that failed was neither retried nor recorded. It now follows the policy of `thrust_ports::disposition` after
every answer: a done message is finished; a transient error is delivered again after `retry_delay` (5, 10, 20 s), up to four deliveries;
a permanent error, or the fourth transient one, is set aside through `EventConsumer::dead_letter` with the message's envelope as its
body, the topic it was sent to, the event's id, why, and how many times it was delivered.

The write of a dead letter gets the same policy: a transient failure is tried again after the same waits, and a write that fails four
times is given up on and counted (`MemoryQueue::lost_count`), because an in-process queue has nowhere else to put the message.

The adapter has no timer, so the wait is brought by the composition root: `MemoryQueue::with_sleep`. The native server passes
`tokio::time::sleep`. Without one a retry follows at once, which is what the hermetic tests and the Worker's in-memory target need (a
task that waits seconds does not outlive the request there), so no existing caller changes.

Tested by a model of the queue against a reference written out in the test (four deliveries, waits of 5, 10 and 20 s, the same for the
write of the letter) over generated answers, with failing writes and with and without a sleep. Controls, each killed: every answer taken
as done, the delivery count skipping one, no wait, a dead letter with an id of its own, without its topic, its event id or its reason,
holding the payload only, with one delivery too many, a lost message not counted, a failed write not tried again, a write that gives
up taken as done.

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…d-letter queue instead of dropping or retrying it blind

The Worker retried every failure after a flat 5 s, whatever it was, and acknowledged and dropped a body that was not an event, so a
message that could never succeed was delivered four times before Cloudflare's own limit moved it, and one that was not an event was
lost with a log line. It now follows the same policy as the in-process queue, and the Worker is a thin shell around the decisions.

Decisions, in `thrust-ports` and tested natively: `settle` decodes the body, asks the consumer, and applies `disposition`: a body that
is not an event is set aside at once, exactly as it came, with no event id, and the consumer is never asked about it; an event the
consumer accepts is done; a permanent error is set aside; a transient one is delivered again after 5, 10 and 20 s and set aside on the
fourth delivery. `settle_dead_letter` is the other queue's side: a message the Worker set aside becomes the row it describes, and a
message Cloudflare moved there itself becomes a row under its own id with no count of deliveries (that queue starts the count again).

The Worker consumes both queues, told apart by `THRUST_EVENTS_DLQ`. It reads each message on its own (`raw_iter`, so one body that is
not a string no longer fails the batch), counts deliveries with `MessageExt::attempts()` (workers-rs 0.9), and acts on the answer:
acknowledge, deliver again after the delay, or send a `DeadLetterMessage` to the dead-letter queue and acknowledge. If that send fails
the message is not acknowledged, so it is delivered again, and the queue's own `max_retries` moves the original there if that keeps
failing, which the consumer of that queue turns into a row all the same. A Worker that does not know the dead-letter queue's name sets
nothing aside, so a misconfiguration cannot make a message go round.

`DeadLetterMessage` is the wire type on that queue, in `thrust-contracts`. It parses text that any producer's message can be, so it has
a fuzz harness, committed seeds and `fuzz_replay_` tests with their must-fail controls (rust-test-fuzz), and properties that run on every
`cargo nextest run`. A cargo-fuzz campaign has not been run: it needs nightly and cargo-fuzz.

Configuration: all four Worker configs get the `EVENTS_DLQ` producer, a consumer on the dead-letter queue (`max_retries = 10`, and no
dead-letter queue of its own, which miniflare refuses), and `THRUST_EVENTS_DLQ`; the local config also gets the `dead_letter_queue` on
the events consumer that only the deploy template had. The deploy parity test now checks the topology in both files (the dead-letter
queue is produced to and consumed, its consumer has none, the var names it) and that the events consumer's `max_retries` allows
`MAX_DELIVERIES`, read from the ports source; 8 new controls, all run under GNU sed as well as BSD sed.

The `queue-raw` probe puts raw text on the events queue binding: `/internal/inject-event` takes only a valid envelope, so it is the one
way to reach the branch for a body that does not decode.

Not run here: the Worker against a real queue (the contract tests of the next commit do that), and
`.github/scripts/tests/test-deploy-target.sh`, which fails on this machine on a clean `main` too.

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…once on every target, and an undecodable message set aside on the Worker

Two tests, one for each way a message used to be lost or retried blind.

- permanent_consumer_error_is_dead_lettered_without_retry (all four targets): an event with no `project_id`, which FR-21 and S2-9 name
  as the example, is set aside after ONE delivery with its error naming the field, and the body in the row decodes to the envelope.
  A second poison event is injected after it and the first still appears once, so a redelivered message cannot make a second row.
  `/internal/dead-letters` is added to the admin gate test (no token, wrong token: 401), because a dead letter carries an event body.
- worker_bindings_undecodable_message_is_dead_lettered (worker-cf `bindings` pass): the `queue-raw` probe sends text that is not an
  envelope straight to the events queue, and the row for it must appear with a null `event_id` and `attempts == 1`. Named
  `worker_bindings_*` because that prefix is what the `bindings` pass selects; the issue's `worker_undecodable_*` would run in no pass.

Counts move by one test each: contract.sh EXPECT_MAIN 73 -> 74 and EXPECT_BINDINGS 5 -> 6 (the admin-gate lines go into an existing
test, so they add none); stage2-contract.sh main 67 -> 68 and bindings 3 -> 4, and its header says why the bindings pass now needs the
dead-letter queue that wrangler.stage2.toml got in the previous commit. scripts/check-contract-counts.sh reads the numbers back.

The planted defect is `mutant_invalid_is_transient` (an invalid message is treated as transient), forwarded by thrust-server and
listed in scripts/mutants.sh. Under it the message is delivered again after 5 s, 10 s and 20 s and set aside at its fourth delivery,
so the 15 s wait in the new test fails: the row is killed.

Verified on this Mac (wrangler 4.151.2, worker-build 0.9.0):
- native-memory, native-pg, worker-memory and worker-cf `main`: 74 of 74. worker-cf `bindings`: 6 of 6.
- the mutant, native-memory and worker-cf: each fails exactly the one test meant for it.
- ack-and-drop put back in the Worker handler, by hand: it fails exactly the tests meant for it. The Worker is not in mutants.sh,
  which builds native-memory only, so both Worker controls were run by hand (the same precedent as G-39).

Not run: stage 2 against a deployed Worker (it needs the staging account).

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…le and what was not shown

The policy is now one thing on every target, so the pages that described the old behaviour (a flat 5 s retry, an undecodable body
acknowledged and dropped, a dead-letter queue nothing read) say what it is now.

- ADR-0070: an FR-21 paragraph in the round-29 section, and an "Update - issue #53" with the policy table and what it settled: the
  kind is chosen in core by an exhaustive match on CoreError, with one known misclassification (a history row for a work item the
  adapter does not have is a foreign-key error, so it is transient: delivered four times and set aside with its reason, not lost);
  MAX_DELIVERIES is 4 and the deploy parity test holds both wrangler configs to it; the policy lives in thrust-ports; a dead letter
  is a row whose id is the queue's own id, with `attempts` nullable because Cloudflare's DLQ restarts the count; the Worker sends a
  DeadLetterMessage and consumes the dead-letter queue itself so one writer makes every row; a dead letter whose own write fails four
  times is lost; a queue has one active consumer.
- QUESTIONS.md Q-0006.5 was already answered, so it gets "Implemented (issue #53)" and not a second answer; PLAN.md marks the row.
- architecture/infra.md (the queue-consumer paragraph is rewritten), architecture/app.md (the ports table), flows/app.md (the
  `/internal/dead-letters` route and the Failures paragraph) and architecture/deploy.md (the Worker now consumes the dead-letter
  queue, so check that nothing else is attached before the first deploy). patterns.md says an adapter writes a dead letter through
  `EventConsumer::dead_letter` because it holds no SystemScope.
- features.md, evidence-and-controls.md, techniques/mutation.md and defect-matrix.md (X5) list `mutant_invalid_is_transient` and
  the two new contract tests.
- testing/status.md G-47 records what is covered and six things NOT shown: no cargo-fuzz campaign on DeadLetterMessage::parse (needs
  nightly and cargo-fuzz, the owner's to install; the committed seeds are replayed by `fuzz_replay_` on every run); the Worker's
  path ran on local workerd, not on Cloudflare, and stage 2 has not been run against it; a message near Cloudflare's 128 KB limit
  cannot be wrapped and reaches the table by the queue's own backstop with no count and no reason; the transient path is not
  tested over HTTP (its 5, 10 and 20 s are held by the in-process queue's model with a recording sleep, and by `settle`'s table); a
  dead letter whose own write fails four times is lost and nothing reads the count; and test-deploy-target.sh fails on the
  development Mac on an untouched main, so CI is its first verdict.

Verified: the book builds (mdbook with mdbook-mermaid) and its own check scripts, self-test included, pass.

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…and variable, and still gives a Preview the events producer alone

#304 added the `isolated` profile of scripts/preview-config.py, which accepts production's queue shape only as written: exactly one
producer, EVENTS, and exactly four variables. This branch adds a second producer (EVENTS_DLQ) and a variable (THRUST_EVENTS_DLQ) to the
production template, so on the rebased tree `test_preview_config.py` failed 40 of its isolated runs ("isolated N: succeeds: got 1,
wanted 0"): every isolated Preview would have been refused.

The decision, which the profile exists to force: a Preview consumes nothing (production consumes), so it sets nothing aside, so it has
no use for the dead-letter producer or the variable that names the dead-letter queue. The profile now requires the template to have
exactly the EVENTS and EVENTS_DLQ producers and the five variables, and still writes the events producer alone, under the PR's own queue
name, with the variables it already wrote. A third producer, a missing dead-letter producer and a missing THRUST_EVENTS_DLQ are refused
and named, as an unknown binding always was. The check that a Preview's queue is not production's now covers every production queue.

Tests (test_preview_config.py, 1483 passed, 0 failed; was 40 failed before the change to the script): each of the 40 generated isolated
runs now also holds the producer list to the events producer alone; three refusals are new. Control: the same test run against a copy of
the script with the producer-shape check removed fails exactly the two producer refusals (the variable refusal still passes, as it
should), so those checks can fail.

Not run: a real Preview deploy of an isolated target (it needs the PR's provisioned resources and the account).

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@aRustyDev
aRustyDev temporarily deployed to preview-control-plane November 18, 2026 18:21 — with GitHub Actions Inactive
aRustyDev added a commit that referenced this pull request Nov 18, 2026
…at fail cargo deny (#312)

`cargo deny check advisories` began to fail on 2026-11-18 against lettre 0.11.23, the version main locks (thrust-adapters-selfhosted,
the SMTP adapter, used by thrust-server). Six advisories, all fixed in 0.11.24:

- STARTTLS response injection lets a man-in-the-middle forge SMTP replies (RUSTSEC-2026-0560; only `Tls::Required` and
  `Tls::Opportunistic` connections, not implicit TLS)
- missing dot-stuffing after a bare LF or CR allows SMTP command injection
- a panic on an EHLO reply line of only white space
- messages for an address with a quoted local part are sent to a different address
- a panic on a mailbox display name containing CR or LF
- unbounded buffering of an SMTP reply

It was found because the `security / deny` job runs only when a pull request changes Cargo.lock; #310 did (dev-dependency edges inside the
workspace), and the job failed there on lettre alone. Any pull request that touches the lockfile fails the same way until this lands.

The change is one package: `cargo update -p lettre`, with the one unrelated line it also rewrote (tempfile's getrandom, 0.4.3 to 0.3.4)
put back, so the diff is lettre's version and checksum. `scripts/check-cargo-lock.sh` agrees the lockfile is what cargo writes.

Verified on this Mac:
- `cargo deny check`: advisories, bans, licenses and sources all ok. The control is the same check on lettre 0.11.23, which failed with
  those six errors in CI run 44368874336.
- the SMTP adapter's own tests against a real server in Docker (`smtp_sink`, 7 tests, which include STARTTLS required with the relay's
  certificate checked, implicit TLS, a wrong login, the server's own refusals): 7 of 7 pass on 0.11.24.

Not run: the rest of CI (it runs on the pull request).

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
aRustyDev and others added 2 commits November 18, 2026 14:11
Main moved four commits while #310 was open (#307, #308, #309 and the lettre fix #312), and two files conflicted:

- crates/adapters/postgres/src/lib.rs: #308 made `Migration` borrow its strings (`Migration<'a>`), and this branch added migration 0020 to
  the list. The list is `[Migration<'static>; 20]`: #308's type, this branch's twentieth entry.
- docs/src/testing/status.md: #309 rewrote the G-46 row and this branch added G-47 after it. G-46 is main's row, byte for byte
  (compared with `diff`), and G-47 follows it.

Merged, not rebased, because a force-push is blocked on this repository and #310 is already published.

The lettre bump of #312 comes in with the merge, which is what turns the `security / deny` job green on this branch (it failed on lettre
0.11.23 alone).

Checked on the merged tree before this commit: no conflict markers left, `scripts/check-contract-counts.sh` (74, 6; stage 2: 68, 4),
`cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings` and the wasm32 clippy of the Worker crates. The
test batteries are re-run on the merge commit and listed in the pull request.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Main moved once more while the previous merge was being tested: #315 (transaction-scoped migration locking) changed
crates/adapters/postgres/src/lib.rs and the ledger test of the selfhosted adapter. It merges without a conflict: this branch's change to
those files is the twentieth entry of the migration list and nothing in the locking code.

The Postgres-affecting checks and the Worker build are re-run on this merge commit before it is pushed (see the pull request).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@aRustyDev
aRustyDev temporarily deployed to preview-control-plane November 18, 2026 19:20 — with GitHub Actions Inactive
@aRustyDev
aRustyDev merged commit 98e3f43 into main Nov 18, 2026
54 checks passed
@aRustyDev
aRustyDev deleted the feat/queue-dead-letters branch November 18, 2026 19:43

This branch was previously deployed

1 inactive deployment
preview-control-plane — d41af773 Deployed Nov 18, 2026 by aRustyDev via reconcile #165
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.

feat(queue): permanent versus transient consumer errors; undecodable messages to the DLQ; native dead_letters table

1 participant