Skip to content

feat: v2 modules — modern group - #21

Merged
SuperElectron merged 4 commits into
stagingfrom
feat/v2-modern
Aug 27, 2026
Merged

feat: v2 modules — modern group#21
SuperElectron merged 4 commits into
stagingfrom
feat/v2-modern

Conversation

@SuperElectron

Copy link
Copy Markdown
Owner

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 check green: 519 tests.

🤖 Generated with Claude Code

SuperElectron and others added 4 commits August 27, 2026 11:51
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>
@SuperElectron
SuperElectron merged commit d35c406 into staging Aug 27, 2026
@SuperElectron
SuperElectron deleted the feat/v2-modern branch August 27, 2026 20:19
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