Skip to content

feat: v2 modules — behavioral group - #20

Merged
SuperElectron merged 6 commits into
stagingfrom
feat/v2-behavioral
Aug 27, 2026
Merged

feat: v2 modules — behavioral group#20
SuperElectron merged 6 commits into
stagingfrom
feat/v2-behavioral

Conversation

@SuperElectron

Copy link
Copy Markdown
Owner

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

🤖 Generated with Claude Code

SuperElectron and others added 6 commits August 27, 2026 11:53
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>
…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>
@SuperElectron
SuperElectron merged commit eb25cac into staging Aug 27, 2026
@SuperElectron
SuperElectron deleted the feat/v2-behavioral branch August 27, 2026 19:47
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