Skip to content

Accept an explicit model on assembly.cable - #910

Merged
seveibar merged 11 commits into
mainfrom
codex/bullet-connectors-20261006
Oct 7, 2026
Merged

seveibar merged 11 commits into
mainfrom
codex/bullet-connectors-20261006

Conversation

@seveibar

@seveibar seveibar commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Add optional AssemblyCableProps.model for an explicit cable specification, for example <assembly.cable name="C1" from=".J1" to=".J2" model="adaptercable_a(jst_sh_pins4)_b(jst_ph_pins4)" />. Omit it to retain existing endpoint inference.

Existing standards, connector props, and CAD endpoint APIs are unchanged. Update the cable props test and required generated documentation.

Core integration: #4416.

@seveibar seveibar changed the title Add bullet connector and assembly cable props Support bullet connectors and named cable interfaces on imported CAD assemblies Oct 6, 2026
@seveibar seveibar changed the title Support bullet connectors and named cable interfaces on imported CAD assemblies Define bullet connectors and generic assembly adapter cables Oct 6, 2026
@seveibar seveibar changed the title Define bullet connectors and generic assembly adapter cables Define physical connector models and generic assembly adapter cables Oct 7, 2026
@seveibar seveibar changed the title Define physical connector models and generic assembly adapter cables Define model-based connector interfaces and generic adapter cables Oct 7, 2026
@seveibar seveibar changed the title Define model-based connector interfaces and generic adapter cables Accept an explicit model on assembly.cable Oct 7, 2026
@seveibar
seveibar marked this pull request as ready for review October 7, 2026 05:00
Comment on lines +57 to +69
test("assembly.cable accepts an explicit model without changing standard behavior", () => {
const input = {
name: "C1",
from: ".J1",
to: ".J2",
model: "adaptercable_a(jst_sh_pins4)_b(jst_ph_pins4)",
}
expect(assemblyCableProps.parse(input)).toEqual(input)
for (const model of ["", " ", 4, null])
expect(assemblyCableProps.safeParse({ ...input, model }).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.

A *.test.ts file may have AT MOST one test(...) call. The file assembly-cable.test.ts already contained at least one test(...) before this diff, and this change adds another one ("assembly.cable accepts an explicit model without changing standard behavior"). Per the style guide, once a second test is needed the tests must be split into multiple numbered files, e.g. assembly-cable1.test.ts, assembly-cable2.test.ts. Please move this new test into its own numbered file.

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

Fix in Graphite


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

@seveibar
seveibar merged commit 97c3299 into main Oct 7, 2026
9 checks passed
@seveibar
seveibar deleted the codex/bullet-connectors-20261006 branch October 7, 2026 05:14
@tscircuitbot

Copy link
Copy Markdown
Contributor

Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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.

2 participants