Repository navigation
refactor(graph): use shared engine for gate traversals - #3316
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
The code looks good at cf887a4, and all 22 checks pass, including check:layering, depgraph:test and the Mutation Affected run on this head. I did not run check:layering or pnpm depgraph at head and at the merge base. So the claims of an identical layering summary, depgraph cycle list and ownership sets are not yet proven. Please post that comparison, or a note that it matches, and this is ready. No conflicts. Nothing else blocks merge. Not blocking, and you can take or leave these: (1) the old findCyclePath in scripts/layering/model.ts could return a different cycle than genCycles(componentGraph).next() for an SCC of 3 or more nodes with chords, and collectCycles in scripts/depgraph/model.ts dedupes by member set, so the depgraph cycle list may shift; a test on a 3-node SCC with a chord and a cycle-list diff against the merge base would settle it; (2) the Is there a smaller shape? I looked and found none. importGraphFromResolvedEdges overlaps a little with collapseEdges, but collapsing to the strongest kind before a kind filter would drop pairs whose only kind is the weaker one, so the separate filtered dedupe makes sense. The cubic-dev-ai thread on the presentation policy test (#3316 (comment)), the one on the graph being built once per call (#3316 (comment)) and the one on edgeKind ownership (#3316 (comment)) are all fixed at this head, so you can resolve them. |
cf887a4 to
98b6e83
Compare
|
Addressed the broader review in The explicit comparison caught a real cycle-representative difference: the library’s first cycle changed the contracts type cycle and the Limrun dynamic cycle. The helper now builds the first-outgoing-edge subgraph inside each SCC and uses library DFS from the lexical root. Inside an SCC the old DFS reaches its first back edge before backtracking, so this preserves its representative without restoring a traversal implementation.
Two chorded three-file fixtures cover both a cycle through the root and a cycle closing below it. The latter failed before the fix; both pass now. An exhaustive comparison of all 512 three-node directed graphs in both edge orders (1,024 cases) also matches the old helper. Temporary tracked violations still fail specifically with Removed the unused
|
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
The code looks good at 8ed2225. The chord fixture in scripts/depgraph/model.test.ts no longer has the extra type and dynamic edges, and the test name now says value-cycle. The leftover EdgeKind re-export is gone, and edgeKind lives once in scripts/depgraph/import-graph.ts. Your posted comparison (edges, cycle list, layering output and ownership sets) closes the evidence gap from the last review, and the two chorded three-node tests match the old findCyclePath result when traced by hand. Evidence limits: I could not confirm two @statelyai/graph 2.4.0 behaviors, because it is not installed in my checkout: that getSubgraph keeps the parent's edge order, and that genDFS(graph, stringId) yields only reachable nodes in preorder. The equivalence depends on both, and your identical cycle-list comparison is the evidence for them. I did not rerun that comparison. The four earlier review threads are fixed at this commit. Smoke Tests and Mutants (snapshot-occlusion) are still running, and nothing has failed. Smoke Tests cover the device and daemon route, which this diff does not touch. Mutants (snapshot-occlusion) selects its tests through scripts/mutation/ownership.ts and modules.ts, so this PR overlaps that job; if it goes red, please check whether ownership changed. No conflicts. |
|
Summary
WORKSPACE_SPECIFIERnormalizes extracted specifiers. The eager-closure BFS from refactor(eager-closure): tolerate a pure split in the no-growth rule (#2469) #3298 remains as explicitly requested. The NUL edge-ID collision fix/test already exists on main; no runtime dependency added.relatedscope caused the expensive canary lane.snapshot-occlusionreplaces it without raising timeouts: prior successful headcf887a45ecompleted in 19:14 versuskernel-errorscancellations at 30:18/30:20. Failed attempts produced no shard report for per-mutant diagnosis.Validation
8ed2225f0811ad2932c34daf08942dfa20907a17:pnpm check:affected --runpassed every runnable check; new CI pending.bf2246499a: all 10,182 resolved edges, 22 depgraph cycles, layering stdout and seven ownership sets (3,813 assignments) match exactly.R4 value-import-cycleandR6 type-spine-inversion, then were removed. Chord fixture now claims value-cycle selection only; independent type/dynamic fixtures cover those kinds. Review responses contain the comparison details.