Skip to content

docs: fix drift, broken samples, and inconsistencies across the docs set#125

Merged
lesnik512 merged 1 commit into
mainfrom
docs/audit-drift-fixes
Jul 5, 2026
Merged

docs: fix drift, broken samples, and inconsistencies across the docs set#125
lesnik512 merged 1 commit into
mainfrom
docs/audit-drift-fixes

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Deep audit of all 23 doc pages, each cross-referenced against src/, architecture/, and pyproject.toml. Every code sample's imports/symbols/kwargs/defaults were verified; internal links + anchors all resolve; mkdocs build --strict passes; the testing.md examples were run against the fake broker.

High (correctness)

  • how-it-works.md — a foreign-publish outage nacks via retry_strategy; the lease-expiry recovery path applies only to a mis-composed publisher chain (_OutboxConfigError). The old text had this backwards and contradicted architecture/relay.md and the Kafka tutorial.
  • testing.md — the publisher example was missing the required session= and would raise TypeError (the publisher path is not session-patched like broker.publish). Also the rows == 1 assertion published to a handler-registered queue, where sync-mode dispatch acks/deletes the row → rows == []; switched to an unconsumed queue.
  • alembic.md — the initial migration omitted the load-bearing outbox_lease_ck CHECK; a copy-paste built a table missing a constraint the broker depends on. Placement matches Alembic's rendered autogenerate output.

Medium (accuracy)

  • add-kafka-relay.md — default outage budget corrected ~13-14 min~8-9 min (10 attempts, 1+2+…+256s ≈ 8.5 min).
  • drain_timeout consistency sweepinstrumentation-seams six→seven events (+ list + comparison-table row), setup-prometheus-opentelemetry three→four OTel counters, observability counting reframed onto a consistent event basis.

Judgment calls (maintainer ruling)

  • Python floor 3.13+ → 3.11+ in installation.md, first-outbox-app.md, and CLAUDE.md, to match requires-python = ">=3.11,<4", the classifiers, and CI.
  • OutboxResponse reframed around session lifetime, not "FastAPI-specific" (it works anywhere the session outlives the handler return); broken link text fixed.

Low (~11)

Snippet-completeness fixes (undefined vars in schema-validation, messaging-service, fastapi, relay, testing fragments), relay missing await, subscriber validation-file attribution (config.py, not factory.py), timers past-dated activate_at example + activate_at clock-skew note, checklist 63-byte-guard wording (binds on the longest index name, not the channel), messaging-service timer_id wording, publisher broker.request note, index.md router table reordered to lead with the newcomer path, and the "Both seams" OTel example switched to spans-only to drop a dead unscraped meter path.

Outside docs/

architecture/subscriber.md corrected — an undersized pool does not block start() (it schedules loops via add_task); the loops stall on checkout at runtime. The user doc was already correct.

🤖 Generated with Claude Code

Audit of all 23 doc pages cross-referenced against src/, architecture/, and
pyproject. Fixes grouped by severity:

High (correctness):
- how-it-works: a foreign-publish outage nacks via retry_strategy, not lease
  expiry (lease-expiry recovery is only for a mis-composed publisher chain).
- testing: publisher example now passes the required session= (the publisher
  path is not session-patched like broker.publish); rows assertion uses an
  unconsumed queue since a consumed row is acked/deleted in sync mode.
- alembic: add the load-bearing outbox_lease_ck CHECK to the initial migration
  (placement matches Alembic's rendered autogenerate output).

Medium (accuracy):
- add-kafka-relay: default outage budget is ~8-9 min, not ~13-14 (10 attempts,
  1+2+..+256s ~= 8.5 min).
- drain_timeout sweep: instrumentation-seams six->seven events (+list+table),
  setup-prometheus-opentelemetry three->four OTel counters, observability
  counting reframed onto a consistent event basis.

Judgment calls (maintainer ruling):
- Python floor 3.13+ -> 3.11+ (installation, first-outbox-app, CLAUDE.md) to
  match requires-python and CI.
- OutboxResponse reframed around session lifetime, not FastAPI-specific.

Low: snippet-completeness fixes (undefined vars in schema-validation,
messaging-service, fastapi, relay, testing fragments), relay missing await,
subscriber validation-file attribution, timers past-dated example + activate_at
skew note, checklist 63-byte-guard wording, messaging-service timer_id wording,
publisher broker.request note, index table reordered to lead with the newcomer
path, and the "Both seams" OTel example switched to spans-only to drop a dead
unscraped meter path.

Also corrects architecture/subscriber.md: an undersized pool does not block
start() (the user doc was already correct).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit 8e0d777 into main Jul 5, 2026
5 checks passed
@lesnik512 lesnik512 deleted the docs/audit-drift-fixes branch July 5, 2026 07:58
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