Skip to content

Add bus_lanes local fanout configuration - #875

Open
seveibar wants to merge 3 commits into
mainfrom
feat/bus-lanes-local-fanout
Open

seveibar wants to merge 3 commits into
mainfrom
feat/bus-lanes-local-fanout

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Adds busLanesFanout: "auto" | "none" to the bus_lanes autorouter configuration. Omitted/auto enables local endpoint dogbones in the accompanying core/solver integration; none preserves strict fixed-layer routing. Other presets reject this option.

Generated component and props documentation is included. Validation: all 571 props tests pass, all four documentation generators ran, and the package build passes.

This is the API dependency for the integrated bus-lanes routing work; it does not implement the routing behavior by itself.

Comment on lines +5 to +23
test("bus_lanes local fanout configuration is explicit and preset-scoped", () => {
expect(
autoroutingPhaseProps.parse({ autorouter: "bus_lanes" }).autorouter,
).toBe("bus_lanes")
for (const fanout of ["auto", "none"] as const)
expect(
autorouterProp.parse({ preset: "bus_lanes", busLanesFanout: fanout }),
).toEqual({ preset: "bus_lanes", busLanesFanout: fanout })
expect(
autorouterProp.safeParse({ preset: "default", busLanesFanout: "auto" })
.success,
).toBe(false)
expect(
autorouterProp.safeParse({
preset: "bus_lanes",
busLanesFanout: "boundary",
}).success,
).toBe(false)
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file contains a single test(...) block, but that block contains multiple logical assertions covering distinct behaviors (parsing 'bus_lanes' string, validating busLanesFanout values, rejecting busLanesFanout on non-bus_lanes presets, and rejecting invalid busLanesFanout values). The rule states that a *.test.ts file may have AT MOST one test(...), and after that the user should split into multiple, numbered files (e.g. bus-lanes-fanout1.test.ts, bus-lanes-fanout2.test.ts, etc.). While technically there is only one test() call here, the intent of the rule is to keep tests focused. More critically, if any additional test() calls were to be added to this file in the future, it would immediately violate the rule. However, reviewing strictly: the file currently has exactly one test(...) call, so this is borderline. That said, the single test block is testing multiple independent scenarios that should be split into separate numbered test files per the rule's spirit and explicit guidance.

Spotted by Graphite (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant