Skip to content

docs: fix README statements that disagree with the code - #94

Merged
lesnik512 merged 1 commit into
mainfrom
docs/fix-facts
Oct 3, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
docs/fix-facts

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

The README described some behavior differently from what the code does. README-only change.

Changes

  • Quick Start said the middleware "enforces" AckPolicy.MANUAL at runtime. _classify in middleware.py (~line 171) returns _PassThrough() for any non-MANUAL policy, as the next README paragraph already says. Now: required for concurrent processing; other policies pass through untouched.
  • commit_batch_size was documented as "Max messages per commit batch" and the example comment said "completed tasks". _commit_scheduler.py:73 commits when pending_len >= batch_size, where pending_len counts absorbed tasks (_pending_state.py:128-133), so it is a trigger threshold on pending tasks and a commit can include more.
  • How It Works referred to flush_timeout_sec; the public kwarg is rebalance_flush_timeout_sec (middleware.py:262).
  • KafkaConcurrentHandler and KafkaBatchCommitter were presented as core concepts but are not exported from __init__.py; the section now says they are internal.
  • Removed version-history wording ("Before 0.6.4...") and the "Migration from < 0.x" section. Its try/finally on CancelledError advice moved under Shutdown.
  • Plainer wording for the signal-handler feature bullet and the direct ack()/nack()/reject() limitation; removed a redundant closing sentence in Other limitations.

Both README Python blocks byte-compile; the Quick Start ran end to end under TestKafkaBroker (with KafkaBroker(...) replaced by KafkaBroker()).

Checklist

  • Lint and format pass (ruff)
  • Type check passes (ty)
  • Tests pass and new behavior is covered
  • Build succeeds (uv build) if packaging or build config changed
  • Repo metadata stays consistent across the three surfaces (GitHub description, pyproject description, profile blurb) if this touches packaging

- MANUAL is required for concurrent processing; other policies pass
  through instead of being enforced.
- commit_batch_size is a trigger threshold on pending tasks, not a max.
- The rebalance flush timeout kwarg is rebalance_flush_timeout_sec.
- Mark KafkaConcurrentHandler and KafkaBatchCommitter as internal.
- Drop version-history wording and the migration section; keep the
  try/finally advice under Shutdown.
- Plainer wording on signals and direct ack/nack/reject calls.
@lesnik512
lesnik512 merged commit 753cd3b into main Oct 3, 2026
11 checks passed
@lesnik512
lesnik512 deleted the docs/fix-facts branch October 3, 2026 10:16
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