docs: fix drift, broken samples, and inconsistencies across the docs set#125
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deep audit of all 23 doc pages, each cross-referenced against
src/,architecture/, andpyproject.toml. Every code sample's imports/symbols/kwargs/defaults were verified; internal links + anchors all resolve;mkdocs build --strictpasses; thetesting.mdexamples were run against the fake broker.High (correctness)
how-it-works.md— a foreign-publish outage nacks viaretry_strategy; the lease-expiry recovery path applies only to a mis-composed publisher chain (_OutboxConfigError). The old text had this backwards and contradictedarchitecture/relay.mdand the Kafka tutorial.testing.md— the publisher example was missing the requiredsession=and would raiseTypeError(the publisher path is not session-patched likebroker.publish). Also therows == 1assertion 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-bearingoutbox_lease_ckCHECK; 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_timeoutconsistency sweep —instrumentation-seamssix→seven events (+ list + comparison-table row),setup-prometheus-opentelemetrythree→four OTel counters,observabilitycounting reframed onto a consistent event basis.Judgment calls (maintainer ruling)
installation.md,first-outbox-app.md, andCLAUDE.md, to matchrequires-python = ">=3.11,<4", the classifiers, and CI.OutboxResponsereframed 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,testingfragments),relaymissingawait,subscribervalidation-file attribution (config.py, notfactory.py),timerspast-datedactivate_atexample +activate_atclock-skew note,checklist63-byte-guard wording (binds on the longest index name, not the channel),messaging-servicetimer_idwording,publisherbroker.requestnote,index.mdrouter 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.mdcorrected — an undersized pool does not blockstart()(it schedules loops viaadd_task); the loops stall on checkout at runtime. The user doc was already correct.🤖 Generated with Claude Code