- forwarder.rs's ListenerConnection doc corrected: NoTls is hardwired on every connection path (pooled, listener, reconnect) — the pooled path never rode the consumer's Config sslmode (a sslmode=require DSN fails at connect); grep-audited no other in-crate doc repeats the claim - PgOpts doc carries the corrected one-line TLS pointer (engine-crate- docs posture, ADR-016 §2) - deployment.md: new 'TLS posture (v1)' subsection (NoTls everywhere, sslmode=require DSN fails at connect, topology-level confidentiality is the v1 substitute, TLS a post-v1 deployment concern) and a new 'Consumer-obligation notes on engine options' section carrying the QueueOpts trusted-as-given note with code-verified per-field symptoms (max_attempts <= 0: never claimed, dead-lettered at the next claim call's pre-claim sweep; negative visibility: instantly-reclaimable claims; negative retention: every dead row at the next sweep_expired) plus the PgOpts::max_size 0-guard counter-case; frontmatter advanced - alkstore/src/opts.rs: QueueOpts struct doc mirrors the consumer-obligation note (ADR-023 §2 scoping: the domain table covers trait-surface arguments, not consumer-constructed constants) - cross-file doc sweep over the fix batch's touched files (forwarder, tx, scheduler, store) found no further doc-behavior mismatch - gates: cargo build / clippy --all-targets -D warnings / fmt --check all green (doc-only, no test touched)
7.3 KiB
7.3 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| pg-fix-docs-alignment | Doc alignment — TLS posture, QueueOpts consumer obligations (review 002 Finding 6 remainder) | completed |
|
single | trivial | isolated | implementation |
|
Description
The doc-alignment remainder of the wave-4 general review
(docs/reviews/002-wave-4-general-review.md §Finding 6 + §Minor
notes) — the items that live in docs rather than the code files the
other fix tasks own. (The scheduler and sweep_expired doc fixes are
NOT here — they ride pg-fix-scheduler-resilience and
pg-fix-dedupe-cleanup, their files' tasks.)
- TLS posture honesty: every connection (pooled
store.rs:161, listenerstore.rs:196) is hardwiredNoTls, butforwarder.rs:53-57's doc says the pooled path "rides the consumer's Config sslmode" — misleading; asslmode=requireDSN fails at connect. v1 TLS is effectively unavailable. Fix both ends: correct the forwarder doc to match the code, anddeployment.mdowns the statement (v1 shipsNoTlson all connection paths; TLS is a post-v1 deployment concern — the deployment matrix's honesty posture, ADR-016's spirit). Check the crate-level docs andPgOptsdocs for the same claim while there. - QueueOpts numeric consumer-obligation note: queue/
QueueOptsnumeric values are trusted unvalidated (negativemax_attempts/visibility/retention stamp into rows verbatim; zeromax_attemptsself-dead-letters into churn). The ADR-023 domain table pins extents/durations/boundaries only, so this is not a defect — but a one-sentence doc note (consumer-obligation, like the visibility-budgeting one) prevents surprise. Home:deployment.md(the budget/consumer-obligation section), with a mirror sentence inqueue.rs's oropts.rs's doc where the opts are documented. - Light mismatch sweep: re-read the pg engine's doc comments touched by the fix batch (forwarder, tx, scheduler, store) for any new doc-behavior mismatch the fixes introduced — the fix tasks correct their own sites, this is the cross-file consistency pass.
Doc-only task: no code behavior changes; gates must stay green.
Depends on pg-fix-forwarder-reconnect only because the forwarder
doc being corrected is in the file that task restructures — land after
it and correct against the settled code.
Acceptance Criteria
forwarder.rs's sslmode claim matches the code (NoTlshardwired); no other doc in the crate repeats the claimdeployment.mdstates the v1 TLS-unavailable posture on all connection pathsdeployment.md(plus the opts' doc home) carries the QueueOpts numeric consumer-obligation note- Cross-file doc sweep over the fix batch's touched files: no doc-behavior mismatch remains (grep-auditable claims spot-checked)
cargo build, clippy-D warnings, fmt clean (doc-only change; tests unaffected)
References
- docs/reviews/002-wave-4-general-review.md §Finding 6 + §Minor notes (TLS bullet, QueueOpts bullet)
- docs/architecture/deployment.md (the budget/consumer-obligation home; the visibility-budgeting note's precedent shape)
- docs/architecture/decisions/016-deployment-honesty.md (the honesty posture)
- docs/architecture/decisions/023-fourth-review-round.md (the domain table — why QueueOpts numerics are consumer-obligation, not defect)
Notes
Decisions of record the implementation made that the description didn't pin:
- The QueueOpts mirror landed in core's
alkstore/src/opts.rs, not the pg crate — the description offered "queue.rs's oropts.rs's doc where the opts are documented"; the pg crate'sopts.rsdocumentsPgOpts(noQueueOptsmention), andQueueOpts' doc home is core's opts module, which both engines' consumers read. The mirror (trusted-as-given numerics, pointer to deployment.md) went on theQueueOptsstruct doc there. The pgPgOptsdoc got a one-line TLS pointer instead (v1 hardwiresNoTlson every path; deployment.md carries the statement) — that is the engine-crate-docs posture ADR-016 §2 pins, andPgOptsis where a consumer meets the config split. - Per-field behaviors verified against code before writing the
symptoms (the review's "self-dead-letters into churn" was
imprecise):
max_attempts <= 0rows are never claimed — the claim statement'sattempts < max_attemptsconjunct excludes them and the pre-claim sweep (attempts >= max_attempts) dead-letters each at the next claim call on its queue; negativedead_letter_retention_sdeletes every dead row at the nextsweep_expired(died_at <= now - retentionwith retention < 0 is always true; the sweeper is caller-driven, retained in the doc's wording); negative/zerovisibility_timeout_sstamps past-deadline claims (instantly reclaimable). The SQLite engine'sresolution.rsstamps identically, so the "both engines" framing is verified, not asserted. - deployment.md gained a
Consumer-obligation notes on engine optionssection (after Connection budgets, before Durability knobs) rather than extending an existing list — the visibility-budgeting precedent lives in core-contract.md, and this document did not yet have an obligations home; the section closes the QueueOpts note and records the one counter-case (PgOpts::max_size's 0-guard,pg-fix-open-path's) so the trusted-as-given posture is bounded, not blanket. The TLS statement is aTLS posture (v1)subsection under Connection budgets.
Summary
Doc-only alignment landed (review 002 Finding 6's remainder):
alkstore-postgres/src/forwarder.rs— theListenerConnectiondoc no longer claims the pooled path "rides the consumer'sConfigsslmode"; it now statesNoTlsis hardwired on every connection path (pooled, listener, reconnect) and deployment.md owns the statement. Grep-audited: no other doc in the crate (crate docs,PgOpts,open) repeats the false claim —PgOptsgained the corrected TLS pointer.docs/architecture/deployment.md— newTLS posture (v1)subsection (NoTls everywhere;sslmode=requireDSN fails at connect; topology-level confidentiality is the v1 substitute; post-v1 concern; ADR-016 spirit) and newConsumer-obligation notes on engine optionssection (the QueueOpts numeric trusted-as-given note with the three verified per-field symptoms + themax_sizeguard counter-case);last_updatedfrontmatter advanced.alkstore/src/opts.rs—QueueOptsstruct doc carries the mirror sentence (trusted-as-given, the ADR-023 §2 scoping, pointer to deployment.md for symptoms).- Cross-file sweep (forwarder/tx/scheduler/store, the fix batch's
touched files): re-read the module docs against the settled
post-fix code — reconnect retry core, fanout release guard,
stale-generation reconcile (forwarder); commit-atomic wakes and
drop=rollback (tx); quarantine + retry + TTL-lapse posture (scheduler);
open-path guard and DSN-options append (store). No mismatch
beyond the TLS claim found; the review's scheduler/
sweep_expireddoc fixes had already landed with their own fix tasks. - Gates: workspace
cargo build,cargo clippy --all-targets -- -D warnings,cargo fmt --checkall green (doc-only change; no test touched).