feat: v2 modules — modern group - #21
Merged
Merged
Conversation
Migrate both units to the module template: pattern/ (WorkerPool with both shutdown disciplines; AtomicWrite + temporarily), docs/ (fundamentals with classic-form contrast, implementation guide, cited external examples), mini-projects (feed_fetcher with per-item failure capture; atomic_deploy with ExitStack rollback), isolated behavioral tests. Legacy variant files removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Migrate three modern units to the patterns-as-modules template:
- dependency_injection: ReminderService with Protocol seams in pattern/;
invoice_reminders mini-project with adapters + a real composition root
- registry: typed Registry[T] with explicit duplicate/unknown-key policies;
export_plugins mini-project with a separate-module plugin demonstrating
the import-time caveat
- repository: Invoices Protocol port + InMemoryInvoices fake + domain
services in pattern/; invoice_ledger mini-project with a sqlite adapter
and one contract test suite parametrized over both backends
Each: docs/{fundamentals,implementation,examples}.md, isolated behavioral
tests, legacy variant files removed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e sqlite, backpressure pinned Mechanism tests kill both discipline-collapse mutations; SqliteInvoices commits (file-backed reopen test); pytest-timeout 30s; backpressure and sentinel accounting asserted; AtomicWrite atomicity via os.replace spy; duplicate-add contract decided (refused, both backends); docs snippets runnable as written. Co-Authored-By: Claude Fable 5 <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.
Phase 3 (5/6): five modern units on the module template — async_producer_consumer (feed_fetcher; both shutdown disciplines now mechanism-tested), context_manager (atomic_deploy; atomicity pinned via os.replace spy), dependency_injection (invoice_reminders), registry (export_plugins; import-time caveat demonstrated), repository (invoice_ledger; one contract suite over fake + durable sqlite).
Review findings fixed and re-verified by mutation (7/7 killed): observable shutdown switch, sqlite commits with file-backed durability test, backpressure bound observed on the real queue, duplicate-add contract unified across backends, pytest-timeout so async regressions fail rather than hang.
make checkgreen: 519 tests.🤖 Generated with Claude Code