docs(mem): pin growth postures and outbox delivered-or-reclaimable semantic
Review 004 items 10+11: the two recorded mem growth postures (subscribe backlog drain unbounded on the consumer side; O(live-rows) claim scan with full-row clones) and the outbox's 'processed means delivered-or-reclaimable' semantic, pinned in engine-mem.md. The debug_assert arm was declined: the dropped ack/retry booleans also refuse benignly on legitimate in-closure handle ops, so it cannot separate a visibility lapse from a deliberate first-party outcome.
This commit is contained in:
1 parent
7700079158
commit
f2f5e03d7c
2 files changed
+77
-11
No files matched your search
@@ -1,7 +1,7 @@
|
||||
---
|
||||
id: mem-doc-growth-outbox-notes
|
||||
name: Pin mem's growth postures and outbox semantics in the spec (review 004 items 10+11)
|
||||
status: pending
|
||||
status: completed
|
||||
depends_on: []
|
||||
scope: narrow
|
||||
risk: trivial
|
||||
@@ -60,8 +60,38 @@ Doc-only plus at most one `debug_assert!` — no behavioral change.
|
||||
|
||||
## Notes
|
||||
|
||||
> To be filled by implementation agent
|
||||
- Neither `engine-mem.md` growth nor outbox section existed — both
|
||||
were added (the review's "carry into the growth section" assumed a
|
||||
touch that creates them). Growth postures placed after the
|
||||
asymmetry-classification table; the outbox semantic as a
|
||||
`### Outbox semantics` subsection under "Mapping the contract"
|
||||
(the table's scheduler/outbox row pointed there).
|
||||
- The `debug_assert!` was **not** added (implementer's call, either
|
||||
was offered): a debug assertion that the dropped ack/retry
|
||||
booleans landed would also fire on legitimate in-closure handle
|
||||
ops — a delivery closure that calls `ack`/`retry`/`fail` on the
|
||||
boxed `JobHandle` (all available per ADR-019) makes the outer
|
||||
`ack_row`/`retry_row` refuse benignly, so the assertion would
|
||||
false-positive on valid flows and cannot distinguish a visibility
|
||||
lapse from a deliberate first-party outcome without re-reading the
|
||||
row's state (noise > value, debug-only). The doc sentence carries
|
||||
the semantic; it also names the in-closure-op case the assertion
|
||||
could not have separated.
|
||||
|
||||
## Summary
|
||||
|
||||
> To be filled on completion
|
||||
Doc-only change, no behavioral code. `docs/architecture/engine-mem.md`
|
||||
gained: a `### Outbox semantics` subsection pinning "processed means
|
||||
delivered-or-reclaimable" for the no-heartbeat outbox (`run_once`
|
||||
returns `true` even when the ack/retry application refuses — at-least-once
|
||||
reclaim is the recovery), and a `## Growth postures (review 004 items
|
||||
10–11)` section with the two recorded postures anchored to
|
||||
`stream.rs:314-331` (subscribe drains the full backlog into pending
|
||||
before the first yield; pending grows at publish rate for a stalled
|
||||
consumer) and `queue.rs:122-181` (O(total-live-rows) claim scan with
|
||||
full-row clones — blessed ephemeral-tier economics). Frontmatter
|
||||
`last_updated` refreshed. Verified: `RUSTDOCFLAGS="-D warnings" cargo
|
||||
doc --no-deps` clean; `cargo test -p alkstore-mem` green (102 unit +
|
||||
26 suite + 1 doctest — outbox tests exercise the pinned `run_once`
|
||||
arms); `cargo clippy -p alkstore-mem --all-targets -- -D warnings`
|
||||
and `cargo fmt --check` clean.
|
||||
Reference in new issue
Block a user