Repository navigation
Commit d8471a6
authored
refactor(queue): extract decision-policy and read-model seams (#1124)
Extracts two parameter-driven seams from the 14,709-line ExactReviewQueue
module as pure moves: the decision/supersession policy cluster (decision
construction, source/branch authority reservations, ingress promotion,
publication revision/lineage, supersession and command-context predicates)
into exact-review-decision.ts, and the read model (lane/stage projection, Bay
projection, admitted items, stats/lane stats, backoff reasons, next-wake,
capacity) into exact-review-read-model.ts. Shared primitives live in
exact-review-queue-shared.ts; a capacity fallback uses injection to avoid a
runtime cycle. Everything remains re-exported through exact-review-queue.ts,
so no test or worker import changed.
The queue module drops 1,531 lines to 13,178. All 64 moved function bodies
are byte-identical (committed extract-and-diff evidence); the real local
Worker and Durable Object serve byte-identical normalized queue and status
responses on merge-base vs this head; verified in a Docker-backed Crabbox
local-container on the reviewed head with committed receipt.
The DO class, mutation/lease/dead-letter helpers, alarm execution, and the
side-effecting /stats handler stay in the queue module.1 parent 5439582 commit d8471a6
11 files changed
Lines changed: 3370 additions & 1636 deletions
File tree
- dashboard
- docs/proof/queue-policy-readmodel-extraction
- artifacts
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments