MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / edgeArm

Function edgeArm

ui/src/lib/steps-model.ts:320–330  ·  view source on GitHub ↗

* The one arm of one decision a connector is, when EVERY site behind it * agrees. A connector with a site that runs under no condition is not * exclusively an arm — the step happens either way — and one whose sites * disagree is several stories; both stay plain lines rather than claim a side.

(info: StepEdgeInfo)

Source from the content-addressed store, hash-verified

318 * disagree is several stories; both stay plain lines rather than claim a side.
319 */
320function edgeArm(info: StepEdgeInfo): WireStepDecision | null {
321 let found: WireStepDecision | null = null;
322 for (const link of info.links) {
323 for (const site of link.sites) {
324 if (!site.decision) return null;
325 if (found === null) found = site.decision;
326 else if (found.branch !== site.decision.branch || found.arm !== site.decision.arm) return null;
327 }
328 }
329 return found;
330}
331
332/**
333 * Sibling connectors out of one box that are arms of ONE fork, marked as the

Callers 1

markDecisionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected