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
lesnik512 added a commit that referenced this pull request Jun 13, 2026
All findings resolved: B1–B14 (#63), I1–I22 (#64), and P1–P25 + the 4
source-side notes (#72). Move active → archived with status: shipped and
PR provenance.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lesnik512 added a commit that referenced this pull request Jun 13, 2026
…hive findings (#72)

* docs: resolve docs-audit improvements P1–P25 + 4 source-side notes

Closes the open tail of the 2026-06-12 docs audit (bugs B1–B14 shipped in
#63, inaccuracies I1–I22 in #64; this is the improvements + source-side
remainder). Every source-referenced claim was verified against the code.

Docs (P1–P25):
- index.md: sync the on-page index with mkdocs nav (tutorials,
  instrumentation seams, prometheus/otel setup, new Operations section).
- installation.md: document the `all` extra.
- how-it-works.md: self-contained DLQ snippet; retarget "Relay tutorial"
  link to the actual tutorial.
- basic.md: say to save the module as app.py.
- tutorials: schema-validation "what's next" pointer; `faststream[cli,kafka]`.
- relay.md: import OutboxMessage alias; document the unstarted-foreign-broker
  WARNING + fail-and-retry safety net; correct the _OutboxConfigError row
  fate (lease-expiry retry, not retry_strategy); fix the misplaced
  NotImplementedError comment.
- timers.md: timer_id dedups only live rows (partial index); fix the
  undefined-`order` snippet.
- subscriber.md: document multi-queue subscribers + connection budget +
  same-queue competition; MANUAL silent-return = terminal reject warning.
- publisher.md: "publisher's" not "decorator's" static headers; make the
  chained example coherent (FastAPI-context session note, no undefined
  symbols); duplicate-delivery-on-crash caveat.
- fastapi.md: document dlq_table/metrics_recorder/routers not exposed on
  OutboxRouter (no router workaround); clarify "fresh session per delivery";
  self-contained quickstart stubs.
- schema-validation.md + alembic.md: compare_server_default=False caveat
  (a green validate_schema does not prove server defaults exist).
- observability.md: `sum by (destination)` on per-queue PromQL; correct the
  `fetched` footnote (skipped when inflight full; first-queue tag only).
- checklist.md: real ExponentialRetry kwarg names (the shorthand raised
  TypeError if copied).

Source-side docstring/comment fixes (no logic change):
- testing.py: "list of _FakeRow records" not "list of dicts"; fix the
  `test_broker.fake_client.dlq_rows` accessor comment; correct the
  TestOutboxBroker docstring (future-dated rows fire immediately in sync
  mode — it contradicted the already-correct module docstring).
- publisher/usecase.py: de-duplicate the _REJECT_RELAY_MSG wording.

Verified: mkdocs build --strict clean (all links/anchors resolve); lint-ci
clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: archive the 2026-06-12 docs-audit findings (shipped)

All findings resolved: B1–B14 (#63), I1–I22 (#64), and P1–P25 + the 4
source-side notes (#72). Move active → archived with status: shipped and
PR provenance.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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