Decompose the reviewed architecture specs into taskgraph-managed tasks: - 2 setup tasks (project init, test infrastructure) - 4 schema tasks (enums, node attrs, edge attrs, graph schemas) - 1 error hierarchy task - 6 graph tasks (FlowGraph class, 3 construction paths, queries, validation) - 5 analysis tasks (type-compat, build-type-edges, ordering, template-validation, defaults) - 5 component tasks (Operation, Sequential, Parallel, Conditional, Map) - 2 host config tasks (GraphologyHostConfig, ReactiveHostConfig) - 4 reactive tasks (WorkflowRoot, node-status, max-concurrency, retry-semantics) - 3 review tasks (foundation, reactive-and-hosts, complete-library) - 5 meta cluster tasks (schema, graph, component, reactive, analysis layers) - 1 API exports task Validated with taskgraph: zero cycles, 38 tasks, 12 parallel generations. Critical path: 12 tasks through reactive execution layer.
1.7 KiB
1.7 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | ||
|---|---|---|---|---|---|---|---|---|---|
| graph/validation | Implement graph validation functions (validateSchema, validateGraph, validate) | pending |
|
narrow | low | component | implementation |
Description
Implement the validation functions that check graph integrity. These never throw — they collect issues and return structured error arrays. This follows the returning (not throwing) contract per error-handling.md.
Acceptance Criteria
validateSchema<NodeAttrs>(graph, NodeAttrsSchema): ValidationError[]— checks each node's attributes against the TypeBox schema usingValue.Errors(), returnsValidationError[]validateGraph(graph): GraphValidationError[]— checks for cycles, dangling references, orphan nodes, status inconsistencies; returnsGraphValidationError[]validate(graph): AnyValidationError[]— runs both schema and graph validation, returns combinedAnyValidationError[]- All validation functions use the "collect all errors" pattern — never throw, never short-circuit
GraphValidationErrorcategories:cycle(with cycle paths),dangling-reference(with source/target),orphan-node(with node key),status-inconsistency(with node/parent status details)- Unit tests: valid graph returns empty array, each category of error detected, multiple errors collected
References
- docs/architecture/error-handling.md — validation result types, collecting errors
- docs/architecture/analysis.md — validateGraph, validate functions
- docs/architecture/flowgraph-api.md — validate convenience method
Notes
To be filled by implementation agent
Summary
To be filled on completion