You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add parent_edge_id to TraceEdge for lightweight tree reconstruction
Reviewed concern that flat edge list doesn't express hierarchy.
Added parent_edge_id (nullable) to TraceEdge instead of full tree field.
Seed edges have parent_edge_id: null; child edges reference the edge
that reached their from_id. Enables O(1) tree reconstruction without
duplicating node payloads. Full tree field deferred to v2 (#240).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@@ -430,6 +436,8 @@ These questions were resolved during review (PR #234). Deferred items are tracke
430
436
431
437
10. **PR-TRACE-1 split** — **Split into PR-TRACE-1a (core BFS + budget + paths) and PR-TRACE-1b (pruning + collapsing + cross-service).** Core BFS correctness and pruning heuristics are different review surfaces.
432
438
439
+
11. **Flat edge list hierarchy** — **`parent_edge_id` on TraceEdge, not a full `tree` field.** A flat `edges` list requires agents to reconstruct the call tree from `from_id`/`to_id` pairs, which is cognitively expensive for 30+ edges. However, a full `tree` field duplicates structural data (tree nodes reference IDs in `nodes` dict, but the nesting itself is redundant with `from_id`/`to_id`). The lighter approach: each `TraceEdge` carries `parent_edge_id` (nullable, references the incoming edge to its `from_id`; null for seed edges). This is O(1) per edge, enables tree reconstruction when needed, and doesn't duplicate node payloads. A full nested `tree` field is deferred to v2 if agents demonstrate they need it — tracked in #240.
0 commit comments