Files
flowgraph/tasks/error-hierarchy.md
glm-5.1 466b121f77 decompose architecture into 38 atomic tasks across 12 parallel generations
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.
2026-05-21 20:24:44 +00:00

2.2 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
error/hierarchy Implement FlowgraphError hierarchy with all error classes and validation result types pending
setup/project-init
narrow low component implementation

Description

Implement the complete error hierarchy per error-handling.md. This includes thrown error classes (for construction invariant violations) and structured result types (for validation functions that never throw).

Acceptance Criteria

  • src/error/index.ts exports all error classes and result types
  • FlowgraphError base class extending Error with name: "FlowgraphError"
  • ConstructionError extending FlowgraphError — base for construction-time errors
  • DuplicateNodeError extending ConstructionErrorkey property
  • DuplicateEdgeError extending ConstructionErrorsource, target properties
  • NodeNotFoundError extending ConstructionErrorkey property
  • CycleError extending ConstructionErrorcycles: string[][] property
  • InvalidInputError extending ConstructionErrorerrors: ValidationError[] property
  • InvalidTransitionError extending FlowgraphErrorrequestId, from: CallStatus, to: CallStatus properties
  • ValidationError interface — { type: "schema", nodeKey, field, message, value? }
  • GraphValidationError interface — { type: "graph", category: "cycle" | "dangling-reference" | "orphan-node" | "status-inconsistency", details: unknown }
  • TypeIncompatError interface — { type: "type-compat", sourceKey, targetKey, compatible: false, mismatches: TypeMismatch[] }
  • TypeMismatch interface — { path, expected, actual }
  • AnyValidationError union type — ValidationError | GraphValidationError | TypeIncompatError
  • Throwing vs returning contract clearly documented in JSDoc
  • Unit tests: each error class constructs correctly, result types validate, instanceof checks work

References

  • docs/architecture/error-handling.md — complete error hierarchy, throwing vs returning contract

Notes

To be filled by implementation agent

Summary

To be filled on completion