1.9 KiB
1.9 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | |
|---|---|---|---|---|---|---|---|---|
| graph/queries | Implement graph query methods (topologicalOrder, ancestors, descendants, call graph queries) | completed |
|
moderate | low | component | implementation |
Description
Implement the query methods on FlowGraph that delegate to graphology and graphology-dag, plus the call-graph-specific observability queries.
Acceptance Criteria
topologicalOrder(): string[]— delegates tographology-dag.topologicalSort, throwsCycleErrorif cycles exist (should never happen after validated construction)hasCycles(): boolean— delegates tographology-dag.hasCyclefindCycles(): string[][]— delegates to graphology cycle detection (debugging)ancestors(nodeId): string[]— delegates tographology-dag.ancestorsdescendants(nodeId): string[]— delegates tographology-dag.descendantspredecessors(nodeId): string[]— delegates tograph.inNeighborssuccessors(nodeId): string[]— delegates tograph.outNeighborsreachableFrom(nodeIds): Set<string>— custom BFS/DFS traversal from starting nodes- Call graph queries:
filterByStatus(status): string[],getRoots(): string[],children(requestId): string[],duration(requestId): number,lineage(requestId): string[] filterByStatus: O(n) filter overforEachNode()— documented as sufficient for expected sizesgetRoots(): returns nodes withparentRequestId === undefinedlineage(): ancestor chain from root to target- Unit tests for each query method with known graph structures
References
- docs/architecture/flowgraph-api.md — query methods, call graph queries
- docs/architecture/operation-graph.md — query delegation to graphology-dag
- docs/architecture/call-graph.md — observability queries
Notes
To be filled by implementation agent
Summary
To be filled on completion