resolve mechanical architecture review issues (C-01,C-02,C-03,W-01,W-09,W-10,W-12)
- C-01: fix broken README link (call-graph-runtime.md → call-graph.md)
- C-02: add CallEdgeAttrs union type alias in schema.md
- C-03/W-12: rename TypedEdgeAttrs → OperationEdgeAttrs for consistent
{GraphType}EdgeAttrs naming pattern, update all references
- W-01: standardize terminology — prerequisites=structural/graph,
preconditions=reactive/computed, rename WorkflowNode.prerequisites
to preconditions, rename computePrerequisites to computePreconditions
- W-09: update ADR-001/002/003 status from Proposed to Accepted
- W-10: clarify call graph mutation API — addCall creates triggered
edges automatically, addDependency creates depends_on edges
- update review checklist with resolved items
This commit is contained in:
@@ -182,18 +182,20 @@ The node key is `requestId`. This matches the call protocol's correlation mechan
|
||||
|
||||
## Edge Attribute Schemas
|
||||
|
||||
### TypedEdgeAttrs (Operation Graph)
|
||||
### OperationEdgeAttrs (Operation Graph)
|
||||
|
||||
```typescript
|
||||
const TypedEdgeAttrs = Type.Object({
|
||||
const OperationEdgeAttrs = Type.Object({
|
||||
compatible: Type.Boolean({ description: "Whether the source output schema is compatible with the target input schema" }),
|
||||
compatibilityDetail: Type.Optional(Type.String({ description: "Human-readable description of compatibility or mismatch" })),
|
||||
});
|
||||
type TypedEdgeAttrs = Static<typeof TypedEdgeAttrs>;
|
||||
type OperationEdgeAttrs = Static<typeof OperationEdgeAttrs>;
|
||||
```
|
||||
|
||||
Type-compatibility edges carry a boolean `compatible` flag and optional detail. This allows the operation graph to include both compatible edges (green paths) and incompatible edges (red paths) for diagnostics.
|
||||
|
||||
**Naming note**: Previously named `TypedEdgeAttrs`. Renamed to follow the `{GraphType}EdgeAttrs` pattern used by `CallEdgeAttrs` and `TemplateEdgeAttrs`.
|
||||
|
||||
### TriggeredEdgeAttrs (Call Graph)
|
||||
|
||||
```typescript
|
||||
@@ -212,6 +214,14 @@ type DependencyEdgeAttrs = Static<typeof DependencyEdgeAttrs>;
|
||||
|
||||
Data dependency edges also carry no additional attributes. Future extensions may include `dataPath` (which field of the output feeds which field of the input).
|
||||
|
||||
### CallEdgeAttrs (Call Graph Union)
|
||||
|
||||
```typescript
|
||||
type CallEdgeAttrs = TriggeredEdgeAttrs | DependencyEdgeAttrs;
|
||||
```
|
||||
|
||||
A union type used as the edge attribute type parameter for call graphs (`FlowGraph<CallNodeAttrs, CallEdgeAttrs>`). Call graph edges can be either `triggered` (parent-child) or `depends_on` (data dependency), distinguished by their edge type. The union type follows the `{GraphType}EdgeAttrs` naming pattern consistent with `OperationEdgeAttrs` and `TemplateEdgeAttrs`.
|
||||
|
||||
### TemplateEdgeAttrs (Workflow Templates)
|
||||
|
||||
```typescript
|
||||
@@ -267,13 +277,13 @@ Two specialized serialization types, one for each graph type:
|
||||
```typescript
|
||||
const OperationGraphSerialized = SerializedGraph(
|
||||
OperationNodeAttrs,
|
||||
TypedEdgeAttrs,
|
||||
OperationEdgeAttrs,
|
||||
Type.Object({}), // No graph-level attributes
|
||||
);
|
||||
|
||||
const CallGraphSerialized = SerializedGraph(
|
||||
CallNodeAttrs,
|
||||
Type.Union([TriggeredEdgeAttrs, DependencyEdgeAttrs]),
|
||||
CallEdgeAttrs,
|
||||
Type.Object({}), // No graph-level attributes
|
||||
);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user