feat: v2 modules — behavioral group - #20
Merged
Merged
Conversation
Migrated to the patterns-as-modules template:
- memento: History caretaker (undo stack + named checkpoints);
config_checkpoints mini-project (validate-or-rollback, atomic batches);
pickle CWE-502 warning preserved in docs/examples.md
- observer: Signal with explicit failure policy (propagate or on_error
isolation); order_events mini-project (independent subscribers,
dead-letter quarantine)
- state: StateMachine (transition table, guards, step log);
order_lifecycle mini-project (order FSM, data guards, audit log)
Each unit: pattern/ + docs/{fundamentals,implementation,examples}.md +
examples/<project>/ + isolated tests; legacy variant files removed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Migrated to the module template (pattern/ + docs/ + examples/ + tests/): - strategy: StrategyRegistry; promotions mini-project (registered pricing rules, best-rule engine, comparison report) - template_method: Skeleton (fixed spine, injected steps, with_steps); report_pipeline mini-project (CSV/Markdown variants off one baseline) - visitor: Operation (singledispatch family with strict default); doc_exporters mini-project (markdown/plain-text/word-count over one tree) Legacy variant files and tests removed per the loader contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Four behavioral units rebuilt to the v2 module template (pilot shape):
- command: Undoable/UndoStack in pattern/; editor_undo mini-project
(insert/delete/replace with undo, redo, command log)
- interpreter: tuple-tree Interpreter (depth-capped) + hardened safe_eval
preserved in pattern/; flag_rules mini-project (rules-as-data engine)
- iterator: iterate_pages generator in pattern/; paginated_client
mini-project with observably lazy fetching
- mediator: Field in pattern/; checkout_form mini-project (promoted
cascading-rules domain)
Each: docs/{fundamentals,implementation,examples}.md, isolated behavioral
tests, legacy variant files removed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…at/v2-behavioral-3' into feat/v2-behavioral
…mediator, memento, observer, state, strategy, template_method, visitor) Assembles feat/v2-behavioral-1/-2/-3. Also: last shape-fragile resource test split into module-doc + synthetic legacy variant coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ing, mediator re-scoped StrategyRegistry/History refuse silent duplicates; safe_eval operator table pinned, ZeroDivisionError wrapped, single live MAX_DEPTH knob; mediator's Form base moves the machinery into pattern/; comparison boundaries, docs accuracy, and mutation gaps closed. 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 (4/6): ten behavioral units on the module template — command (editor_undo), interpreter (flag_rules, security-hardened safe_eval preserved + mutation-pinned), iterator (paginated_client), mediator (checkout_form on a Form mediator base), memento (config_checkpoints), observer (order_events), state (order_lifecycle), strategy (promotions), template_method (report_pipeline), visitor (doc_exporters).
Review findings fixed and re-verified: registry house rule (StrategyRegistry, History.checkpoint), safe_eval operator table mutation-proofed + single live MAX_DEPTH knob + ValueError contract, mediator re-scoped so pattern/ carries the machinery, comparison-boundary and mutation-gap tests. Merge-ready verdict.
make checkgreen: 475 tests.🤖 Generated with Claude Code