release-crate-docs: crate docs final pass — doc gate green with -D warnings posture recorded in AGENTS.md, warn(missing_docs) adopted on the four published crates (audit probe 0; Error enum+fields, sqlite substrate fuzz-surface fns filled), accuracy pass fixed core drifts (trim_to wake nuance, ADR-023 §2 domain rules + shared paragraph, QueueOpts gloss, MemStore::new exception) and engine postures (eleven-vs-ten tx-method count, spawn_blocking rationale via sync substrate, one-host cross-process honesty element), spec-side aligned (pg locks family + row-backed wording, mem clock-accessor home), two boundary-wording dispositions recorded for release-contract-window-close (try_recv arms, 8000-byte <= reading), queue round-trip doctest landed in alkstore-mem crate docs; task -> completed with Notes + Summary

This commit is contained in:
glm-5.3-flash committed 2026-10-11 00:08:01 +00:00
1 parent 5f5f6741d5
commit 8e27f4b64b
22 files changed
+289 -49

No files matched your search

+117 -9
View File
@@ -1,7 +1,7 @@
---
id: release-crate-docs
name: Crate docs final pass — rustdoc across the four published crates
status: pending
status: completed
depends_on: []
scope: moderate
risk: low
@@ -50,17 +50,17 @@ polish.
## Acceptance Criteria
- [ ] `cargo doc --no-deps` (workspace) zero warnings; the
- [x] `cargo doc --no-deps` (workspace) zero warnings; the
`-D warnings` doc gate posture recorded
- [ ] Missing-docs audit recorded (public items × 4 crates); gaps
- [x] Missing-docs audit recorded (public items × 4 crates); gaps
filled; the `#![deny(missing_docs)]` decision made and recorded
- [ ] Core doc text spot-checked against core-contract.md; engine
- [x] Core doc text spot-checked against core-contract.md; engine
lib-doc posture claims spot-checked against deployment.md —
drifts fixed or recorded
- [ ] The doc-hidden fuzz re-exports documented as fuzz/test-only at
- [x] The doc-hidden fuzz re-exports documented as fuzz/test-only at
all three engine roots
- [ ] The example decision made (landed or recorded not-taken)
- [ ] Workspace gates green (`cargo build`, `cargo test`, clippy
- [x] The example decision made (landed or recorded not-taken)
- [x] Workspace gates green (`cargo build`, `cargo test`, clippy
`-D warnings`, fmt)
## References
@@ -77,8 +77,116 @@ polish.
## Notes
> To be filled by implementation agent
- **`#![deny(missing_docs)]` decision**: **`#![warn(missing_docs)]`**
adopted at the four published crate roots instead of deny — with
rationale: the standing merge gate (`cargo clippy --all-targets --
-D warnings`) promotes rustc lints to errors anyway, so the lint is
*enforced* while plain `cargo build`/`cargo test` remain unblocked
mid-task (a deny attribute fails every build the moment a pub item
lacks text, punishing incremental work). Recorded as the standing
posture in AGENTS.md's Verification Commands section alongside the
doc-gate line.
- **Doc gate posture recorded**: `RUSTDOCFLAGS="-D warnings" cargo
doc --no-deps` — zero warnings, added to AGENTS.md's Verification
Commands block as the doc gate.
- **Missing-docs audit results** (full-surface probe via
`RUSTFLAGS='-Wmissing_docs' RUSTDOCFLAGS='-Wmissing_docs' cargo doc
--no-deps`, probe reports 0 after fixes): every public item across
the four crates carries doc text. Gaps found and filled: the
`Error` enum's own doc + its four struct-variant fields
(`alkstore/src/error.rs`); the sqlite substrate's two fuzz-surface
functions (`substrate/queue_ops.rs` — their source-side docs had
never been written; the pg/mem scheduler twins already had them).
- **Core doc fixes against core-contract.md** (drifts fixed): (1)
`StreamHandle::trim_to`'s flat "trim emits no wake" corrected to the
contract's exact row — no *dedicated wake and no notify*, with the
SQLite `data_version` spurious-hint nuance (a trim commit does wake
the watcher, contract-legal); (2) the ADR-023 §2 numeric-domain
rules were missing from every affected method's doc text — added the
extent rules (`claim_batch`/`read_since`/`read_from_consumer` and
their tx twins: `n/limit <= 0` → empty value), duration rules
(`try_lock`/`renew`: `ttl <= 0` rejects, opaque `Err`), the
boundary-totality rule for `trim_to`'s horizon, and the shared
domain-rule paragraph (store.rs module doc, per ADR-023 §2's own
amendment text); (3) the `QueueOpts` "trusted as given" gloss drew
the wrong criterion (opts-struct constants it names *are*
trait-surface arguments) — reworded to the domain table's real
boundary (enumeration by call-site kind); (4) store.rs's
constructor prose gained the ADR-024 §4 `MemStore::new()` exception
clause (amended into the contract 2026-10-10).
- **Engine doc fixes**: (1) "all eleven `*_tx` methods" was an
off-by-one — the trait carries ten `*_tx` ops plus `commit`;
reworded in both `alkstore-sqlite/src/tx.rs` and
`alkstore-postgres/src/tx.rs` module docs; (2) the SQLite
`spawn_blocking` rationale misstated the driver property (rusqlite
`Connection` *is* `Send`; the honest reason is that the substrate is
sync machinery — std threads, blocking iterators) — reworded in
`alkstore-sqlite/src/lib.rs` + `store.rs` per engine-sqlite.md; (3)
the SQLite lib doc gained the missing third element of ADR-016 §3's
mandated single-host prose — one-host cross-process *supported*
(`data_version` is cross-process by nature), matching deployment.md;
(4) cosmetic: a malformed doc-comment indent line on `PgOpts::max_size`.
- **Spec-side alignments** (code docs + ADR win, spec aligned to
match): `docs/architecture/engine-postgres.md` now lists `locks` in
the schema-family enumeration and rewords "advisory-lock-semantics
TTL locks" to the ADR-008 §7 row-backed realization;
`docs/architecture/engine-mem.md` gained the one-clock-accessor line
(no server clock to defer to) that the mem lib doc's wasm identity
and `clock.rs` already cited — the claim now has its spec home.
- **Recorded, not fixed — two boundary-wording drifts for
`release-contract-window-close`** (the task that owns the class-1
window's last dispositions): (1) `EventReceiver::try_recv`'s error
arms (`Database` or `Closed`) are claimed in core doc text but not
yet pinned in contract text — that task's §2 already decides
`Err(Closed)` mirroring `WakeReceiver::try_recv` (mem-test-pinned),
so the doc text is a forward-claim of the decided disposition, left
as-is; (2) the notify payload boundary: ADR-004/core-contract say
"≤ 8000 bytes" loosely, but the engine (POC + test-pinned against a
live server) rejects a serialization of exactly 8000 bytes — the
server's NUL-inclusive budget — so acceptance is ≤ 7999; the pg
engine's docs state the truthful predicate; a normative-spec
wording amendment is the window task's call.
- **Example decision: landed** — the honest-ephemeral engine is the
zero-config one, so `alkstore-mem`'s crate docs now carry the
contract round-trip example (a compile-checked doctest:
`MemStore::new()` → `queue` → `enqueue` → `claim_one` →
`job().id`/`JobState` asserts), with a pointer that the other
engines' round-trip is identical via their `open` form. The mem
lib's architecture paragraph dropped its `crate::state`/`crate::wakes`
intra-doc links (private modules — the private-intra-doc-link
warning class) in favor of plain code spans.
- **Fuzz re-exports (AC 4)**: verified all six `#[doc(hidden)]`
re-exports at the three engine roots carry the four-part
fuzz/test-only disclosure, name the correct module of origin, and
match the re-exported function's semantics — no changes needed.
- Status of record: 2026-10-11, gates green (`cargo build`, `cargo
test` incl. the new doctest, `cargo clippy --all-targets -- -D
warnings`, `cargo fmt --check`, `RUSTDOCFLAGS="-D warnings" cargo
doc --no-deps`, missing-docs probe 0).
## Summary
> To be filled on completion
The release doc pass over the four published crates: `RUSTDOCFLAGS="-D
warnings" cargo doc --no-deps` is now the standing doc gate (recorded
in AGENTS.md) and the workspace builds docs with zero warnings (8
baseline rustdoc-warning classes fixed: broken `Error::*` links,
redundant explicit links, bracket-escape escapes, and a
private-intra-doc link). The `#![warn(missing_docs)]` enforcement
posture landed on all four crate roots (clippy gate enforces);
audit-probe reports zero undocumented public items after filling the
`Error` enum/field docs and the sqlite substrate's fuzz-surface fn
docs. Accuracy spot-checks ran core docs against core-contract.md and
engine lib-doc posture claims against deployment.md/ADR-016/ADR-024:
eight drifts fixed (trim_to wake nuance, the full ADR-023 §2
numeric-domain doc text + shared paragraph, the QueueOpts gloss, the
`MemStore::new()` constructor exception, the eleven-vs-ten tx-method
count, the SQLite `Send`-misstatement rationale, the missing
one-host-cross-process honesty element, a cosmetic indent), two
spec-side alignments made (pg locks table family + row-backed
wording; mem clock-accessor spec home), and two boundary-wording
dispositions recorded for `release-contract-window-close`
(`try_recv` arm pinning; the 8000-byte boundary's "≤" reading). The
example decision landed: alkstore-mem's crate docs carry the
zero-config queue round-trip doctest (green in the workspace test
run). All workspace gates re-verified green.