2.5 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| mem-doc-growth-outbox-notes | Pin mem's growth postures and outbox semantics in the spec (review 004 items 10+11) | pending | narrow | trivial | isolated | implementation |
|
Description
Two recorded mem postures get their doc pins, per
docs/reviews/004-pre-release-general-review.md §"Findings recorded,
not fixed" items 10 and 11 (the review's "carry into the mem spec's
growth section when next touched" — this is that touch).
(a) Growth postures (item 10) — two honest sentences in
engine-mem.md's growth section:
- The subscribe path drains the full backlog into the receiver's
pending deque before the first yield, and pending grows at publish
rate for a stalled consumer (
stream.rs:314-331— the documented "drains to the tail then parks" shape, unbounded on the consumer side). - The claim path is an O(total-live-rows) scan with full-row clones
per claim (
queue.rs:122-181) — blessed economics for the ephemeral tier.
(b) Outbox outcome swallow (item 11) — outbox run_once drops the
ack/retry row-refs' booleans and returns Ok(true) even when delivery
outlived the visibility window and nothing landed (outbox.rs:104-122).
Inherent to the no-heartbeat outbox design (at-least-once reclaim is
the recovery). Pin the "processed means delivered-or-reclaimable"
semantic with a doc sentence in engine-mem.md's outbox section; add
the debug_assert! too if it adds value without noise — the review
offered either, implementer's call (record which and why).
Doc-only plus at most one debug_assert! — no behavioral change.
Acceptance Criteria
engine-mem.mdcarries the two growth-posture sentences, anchored to the code sites- The outbox "processed means delivered-or-reclaimable" semantic
is pinned (doc sentence;
debug_assert!per the recorded call) - Doc gate green (
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps); mem tests green (thedebug_assert!arm, if added, exercised by an existing outbox test)
References
- docs/reviews/004-pre-release-general-review.md §"Findings recorded, not fixed" items 10–11 (the findings, the blessed-economics framing)
- docs/architecture/engine-mem.md (the growth section, the outbox section)
- alkstore-mem/src/stream.rs:314-331, queue.rs:122-181, outbox.rs:104-122 (the anchored sites)
Notes
To be filled by implementation agent
Summary
To be filled on completion