feat: v2 modules — structural group - #19
Merged
Merged
Conversation
Structural batch 1 of the patterns-as-modules refactor: - adapter: pattern/ DelegatingAdapter; examples/payment_gateways (one checkout over two mismatched vendor SDKs, failure conventions unified) - bridge: pattern/ Transport protocol + notifiers (PR #14 seed promoted); examples/notification_center (per-team transport routing) - composite: pattern/ generic Composite/HasTotal with honest interfaces; examples/org_chart (headcount+cost rollups in one pass) - three docs files per unit; legacy variant files removed Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Structural batch 2/2 of the patterns-as-modules refactor:
- decorator: pattern/ ships logged/timed/retry/rate_limited (ParamSpec-typed,
effects injected); examples/resilient_client stacks them on a flaky client
and pins the ordering policy
- facade: place_order checkout facade promoted to pattern/ (rollback intact,
honest saga boundary); examples/order_checkout batch-processes orders
through the one door
- flyweight: pattern/ ships InternPool with an immutability guard;
examples/glyph_styles holds ~30k glyphs on 2 shared styles
- proxy: pattern/ ships stackable LazyProxy/ProtectionProxy/MeteringProxy;
examples/db_gateway composes all three over one expensive connection
- each unit: docs/{fundamentals,implementation,examples}.md with the
classic-form contrast and cited external usages; legacy variant files and
tests removed
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… feat/v2-structural
…rator, facade, flyweight, proxy) Assembles feat/v2-structural-1 + -2. Also: fleet example-imports-pattern check upgraded to an AST import walk; legacy sandbox test moved onto the synthetic legacy fixture. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nPool guard, fleet examples test _MISSING sentinel caches falsy subjects; strict interning recurses into containers; bridge 2x3 asserted + registry house rule; all legacy sandbox tests on the synthetic fixture; parametrized run of every module unit's examples; facade rollback releases on any charge failure. 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 (3/6): seven structural units on the module template — adapter (payment_gateways), bridge (notification_center), composite (org_chart), decorator (resilient_client, ParamSpec-typed), facade (order_checkout), flyweight (glyph_styles), proxy (db_gateway).
Also: fleet example-imports check upgraded to an AST import walk; parametrized sandbox test running every module unit's examples; LazyProxy
_MISSINGsentinel and recursive InternPool immutability guard (review findings); registry house rule (refuse duplicates unlessreplace=True) applied consistently.Reviewed (2 HIGH + 8 MEDIUM fixed and re-verified; merge-ready).
make checkgreen: 371 tests.🤖 Generated with Claude Code