Skip to content

docs: fix 22 inaccuracies from the 2026-06-12 docs audit (I1–I22)#64

Merged
lesnik512 merged 1 commit into
mainfrom
docs/fix-audit-inaccuracies-i1-i22
Jun 12, 2026
Merged

docs: fix 22 inaccuracies from the 2026-06-12 docs audit (I1–I22)#64
lesnik512 merged 1 commit into
mainfrom
docs/fix-audit-inaccuracies-i1-i22

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

Fixes all 22 inaccuracy-severity findings from planning/active/2026-06-12-docs-audit-findings.md — docs that are stale or misleading but not flatly broken. Each correction was verified against current source (post-#61/#63).

ID Page(s) Fix
I1 how-it-works Illustrative fetch CTE: real ORDER BY (next_attempt_at, id), deliveries_count increment, "simplified" note on the partial-index OR shape
I2 how-it-works, timers NOTIFY skipped only when genuinely future-dated; a past activate_at still notifies
I3 installation Base install ships no async Postgres driver; the asyncpg DSNs need one
I4 add-kafka-relay Listener rationale: the Step 5 console consumer uses the HOST listener from inside the broker container, not the DOCKER listener
I5 add-kafka-relay Tutorial 1's cleanup destroys its --rm Postgres container — recovery note added
I6 subscriber min_fetch_interval is the jittered idle-backoff base + queue-full wait, not a "floor when the queue has work"
I7 subscriber, troubleshooting start() only schedules tasks; pool exhaustion = repeating reconnect ERRORs + starved dispatch, not a hang at start()
I8 dlq, observability dlq_written always emits exception_type (None when absent)
I9 dlq Add missing from sqlalchemy import MetaData
I10 schema-validation Note the second validation pass over the DLQ table
I11 publisher Terminal write runs on the worker's autocommit connection, not the user session
I13 fastapi Broker middlewares go through OutboxRouter(middlewares=[...])
I14 setup-prometheus Constructor kwarg is middlewares, not broker_middlewares
I15 observability dispatched/acked/nacked_terminal/lease_lost event-catalog rows corrected to actual tags
I16 instrumentation-seams "Four events" → three (the empty-fetch idle counter is fetched with count=0)
I17 comparison Drop the unreachable "channel name too long" NOTIFY-loss mode (make_outbox_table raises first)
I18 subscriber, troubleshooting, checklist Server-side budget is max_workers + 2 (pool +1 plus the raw LISTEN conn); pool formula +1 kept
I19 alembic astext_type=sa.Text() (qualified)
I20 alembic validate_schema() is opt-in — fails a /health probe or CI gate, never runs at broker.start()
I21 observability Seven subscriber emission points (with dlq_written)
I22 setup-prometheus OTel recorder also emits messaging.publish.messages + the three messaging.outbox.* instruments

Notes

Test plan

  • just docs-build (mkdocs build --strict) passes
  • Each source-dependent claim (CTE ORDER BY / increment, _base_tags subscriber, lease_lost phases, OTel instrument set, dlq_written exception_type, max_workers + 2, middlewares kwarg) verified against current code
  • Sweeps clean: no leftover broker_middlewares, "six emission points", or "four events" in docs

🤖 Generated with Claude Code

Corrects stale/misleading (but not flatly broken) docs from
planning/active/2026-06-12-docs-audit-findings.md, each verified against
current source:

- I1  how-it-works: illustrative fetch CTE — real ORDER BY (next_attempt_at,
      id), deliveries_count increment, "simplified" note on the OR shape
- I2  how-it-works/timers: NOTIFY skipped only when genuinely future-dated;
      a past activate_at still notifies
- I3  installation: base ships no async driver; asyncpg DSNs need it
- I4  add-kafka-relay: listener rationale — Step 5 consumer uses the HOST
      listener from inside the broker container, not the DOCKER listener
- I5  add-kafka-relay: T1 cleanup destroys the --rm Postgres container;
      recovery note added
- I6  subscriber: min_fetch_interval is the jittered idle-backoff base +
      queue-full wait, not a floor "when the queue has work"
- I7  subscriber/troubleshooting: start() only schedules tasks; pool
      exhaustion = repeating reconnect ERRORs + starved dispatch, not a hang
- I8  dlq/observability: dlq_written always emits exception_type (None when
      absent)
- I9  dlq: add missing `from sqlalchemy import MetaData`
- I10 schema-validation: note the second pass over the DLQ table
- I11 publisher: terminal write runs on the worker autocommit conn, not the
      user session
- I13 fastapi: broker middlewares go through OutboxRouter(middlewares=[...])
- I14 setup-prometheus: kwarg is `middlewares`, not `broker_middlewares`
- I15 observability: dispatched/acked/nacked_terminal/lease_lost catalog rows
- I16 instrumentation-seams: "four events" → three (empty-fetch == fetched)
- I17 comparison: drop unreachable "channel name too long" NOTIFY-loss mode
- I18 subscriber/troubleshooting/checklist: server-side budget is
      max_workers + 2 (pool +1 plus the raw LISTEN conn); pool formula +1 kept
- I19 alembic: astext_type=sa.Text() (qualified)
- I20 alembic: validate_schema is opt-in — fails a /health probe or CI gate,
      doesn't run at broker.start()
- I21 observability: seven subscriber emission points (with dlq_written)
- I22 setup-prometheus: OTel recorder also emits messaging.publish.messages
      and the three messaging.outbox.* instruments

I12 (testing.md "_FakeRow dicts") was already resolved as collateral of the
B3 fix in #63. Bugs (B1–B14) shipped in #63; improvements (P1–P25) remain
open triage. mkdocs build --strict passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit 25e2fa5 into main Jun 12, 2026
3 checks passed
@lesnik512 lesnik512 deleted the docs/fix-audit-inaccuracies-i1-i22 branch June 12, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant