GLOSSARY: a Handler implements evoq_command_handler #13

Manually merged
terra merged 3 commits from mercurius/evoq-3-glossary-handler into main 2026-12-01 07:06:13 +00:00
Member

Purpose (docs): the corpus's Handler entry matches what evoq ships. A desk's handler implements evoq_command_handler (evoq 1.31.1), and it returns {ok, [Event]}, not {ok, Event}, which had drifted.

Refs reckon-db-org/evoq#3 (the design's step 4: "the corpus glossary line").

One entry changes in GLOSSARY.md (### Handler):

  • the definition names the behaviour and the aggregate's command_handlers/0;
  • a Behaviour row: command_module/0, handle(State, Command);
  • Returns becomes {ok, [Event]} | {error, Reason}.

Also (folded from mcl-corpus#14, Refs #14):

  • skills/codegen/erlang/EVOQ_BEHAVIOURS.md:

    • a new §4 evoq_command_handler (callbacks, library functions, an example desk);
    • command_handlers/0 in the aggregate's optional callbacks;
    • the aggregate example now guards, then calls route/3, replacing a made-up maybe_x:execute/2 call;
    • a Quick Decision Guide row.

    §5-§25 are the old §4-§24, renumbered.

  • guides/FAQ_ADD_EVENT_SOURCING.md: command_handlers/0 in the optional list, and a row in the evoq-surface table. The worked example quotes mcl-whiteboard's real files, so it stays as it is. A code section showing the new desk shape is bigger than a few lines and stays with #14.

Purpose (docs): the corpus's Handler entry matches what evoq ships. A desk's handler implements `evoq_command_handler` (evoq 1.31.1), and it returns `{ok, [Event]}`, not `{ok, Event}`, which had drifted. Refs reckon-db-org/evoq#3 (the design's step 4: "the corpus glossary line"). One entry changes in `GLOSSARY.md` (### Handler): - the definition names the behaviour and the aggregate's `command_handlers/0`; - a `Behaviour` row: `command_module/0`, `handle(State, Command)`; - `Returns` becomes `{ok, [Event]} | {error, Reason}`. Also (folded from mcl-corpus#14, Refs #14): - `skills/codegen/erlang/EVOQ_BEHAVIOURS.md`: - a new §4 `evoq_command_handler` (callbacks, library functions, an example desk); - `command_handlers/0` in the aggregate's optional callbacks; - the aggregate example now guards, then calls `route/3`, replacing a made-up `maybe_x:execute/2` call; - a Quick Decision Guide row. §5-§25 are the old §4-§24, renumbered. - `guides/FAQ_ADD_EVENT_SOURCING.md`: `command_handlers/0` in the optional list, and a row in the evoq-surface table. The worked example quotes mcl-whiteboard's real files, so it stays as it is. A code section showing the new desk shape is bigger than a few lines and stays with #14.
GLOSSARY: a Handler implements evoq_command_handler; it returns a list of events
All checks were successful
corpus guard / shared-clone-commit (pull_request) Successful in 4s
f7ea6b4517
EVOQ_BEHAVIOURS and the event-sourcing FAQ name evoq_command_handler
All checks were successful
corpus guard / shared-clone-commit (pull_request) Successful in 4s
bbdcdcec88
EVOQ_BEHAVIOURS: section 8 is the process manager; dispatch/3 requires store_id
All checks were successful
corpus guard / shared-clone-commit (pull_request) Successful in 5s
corpus guard / shared-clone-commit (push) Successful in 4s
90d9fe4e3e
terra manually merged commit 90d9fe4e3e into main 2026-12-01 07:06:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-services/mcl-corpus!13
No description provided.