Module 02 Activity
Scenario
The structure decision is made and it is a graph. Now it has to be designed on paper, before any node body exists.
What you build
A complete graph design as data - state fields, nodes, edges and the condition on every edge - plus the two checks that design makes possible.
Steps
- List the state fields with their types and, for each, which node owns it.
- List the nodes, one line each, describing exactly what changes in the state. If a description needs the word 'and', split the node.
- List every edge with its condition. Fixed edges say 'always'.
- Check every cycle has a counter in the state and a ceiling in a router.
- Check every node with a side effect, and confirm no retry path can reach it twice.
- Implement the graph and confirm each node is testable with a plain dictionary, no graph required.
Evidence to hand in
- The design as data: state, nodes, edges with conditions.
- The two structural checks with their results.
- The implemented graph.
- One node test that constructs a dictionary and asserts on the returned update.
Review checklist
- Every node description is one job - no 'and'.
- Every edge carries a condition, including the fixed ones.
- Every cycle has a counter and a ceiling.
- Every side-effecting node is identified, and the retry path is checked against it.
- At least one node test runs without constructing a graph.
