Repository navigation
fix(core): stop stdlib helpers warning about their own internals - #7
Merged
Merged
Conversation
holes.counterbore via patterns.cutAt printed "fuse #N: fuse produced no new material" once per placement, and placeOn raised the extrude-plane hint whose preferred fix is placeOn itself. The extrude hint told user code from stdlib code by looking for /stdlib/ in the call stack. That holds when core runs from source, so tests never saw it, but not once core is bundled into the worker, the MCP server or the website. Replace it with an explicit asStdlibInternal() scope: the fuse guard skips (and doesn't number) fuses made inside it, and the extrude hint and pen-axis advisory treat it as stdlib origin. Scoped: placeOn's and extrudeCentered's extrudes, and the cutter-building fuses in counterbore, teardrop, bearings.seat and the motor mount plates (whose boss fuse never adds material). counterbore no longer fuses a shaft that lies wholly inside its pocket. When the pocket is as deep as the plate, it says once that there is no seat for the screw head, which is the actual problem. Bump extension and mcp-server to 1.29.1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
master shipped 1.29.1 (string params) and 1.29.2 (docs), so this fix moves to 1.29.3: extension, mcp-server, plugin manifest, and a CHANGELOG entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
master shipped the skill-path fix as 1.29.3, so this fix moves to 1.29.4 (extension, mcp-server, plugin manifest, CHANGELOG). Co-Authored-By: Claude Opus 5.5 <[email protected]>
master shipped the coplanar-face fix as 1.29.4, so this fix moves to 1.29.5 (extension, mcp-server, plugin manifest, CHANGELOG). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two stdlib helpers raised warnings about their own internal operations, which read to agents and users as mistakes they had made:
holes.counterbore("M4", { plateThickness: 4 })used throughpatterns.cutAtprintedfuse #N: fuse produced no new material…once per placement (website/examples/pi-mount/plate.shape.ts,examples/stdlib/pcb-standoff-plate.shape.ts).placeOn(drawing, "YZ", { into: "+X", distance: 5 })raised the extrude-plane hint whose preferred fix isplaceOnitself (website/examples/bracket/bracket.shape.ts).Cause
The extrude hint told user code from stdlib code by looking for
/stdlib/in the call stack. That holds when core runs from source, which is why tests never caught it, but not once core is bundled into the worker, the MCP server or the website: every frame points at one file.The counterbore case is separate. In a plate no thicker than the pocket is deep (M4: 4.2 mm), the shaft lies wholly inside the pocket, so the fuse really does add nothing.
Fix
asStdlibInternal()/inStdlibInternal()scope instdlib/warnings.ts. It is explicit, so bundling doesn't break it.fuse #Nstill matches their own.fuse()calls.placeOnandextrudeCentered, and the cutter-building fuses inholes.counterbore,holes.teardrop,bearings.seatand the motor mount plates. The mount plates'bossfuse never adds material.placeOn'ssketchOnPlanestays outside the scope, because the drawing is the user's and the pen-axis advisory still applies to it.counterboreno longer fuses a shaft that lies inside its pocket. When the pocket is as deep as the plate, it says once that the head pocket cuts straight through and leaves no seat for the screw head. The returned geometry is unchanged.Visible change: the pi-mount example (M4 counterbores in a 4 mm plate) goes from four
fuse #Nwarnings to one warning about the missing seat. That warning is accurate, so the example's thickness may be worth raising above 4.2 mm.Tests
The new regression tests fail on the old code and pass with this change. The OCCT tests run against real OCCT.
placement.test.ts:placeOnandextrudeCenteredwith the stack stubbed to look bundled, plus a control that a user's ownsketchOnPlane("YZ").extrude(5)still warns.holes.test.ts: a thin plate gives one "no seat" warning and no fuse warning. A 6 mm plate gives no warnings and the right volume removed. A user's own no-op fuse is stillfuse #1.executor.test.ts: the fuse guard ignores fuses inside the scope and doesn't number them.pnpm lintis clean andpnpm testpasses (60 files, 1173 tests).Extension and mcp-server are bumped to 1.29.5 (master has already taken 1.29.1–1.29.4), with a CHANGELOG entry and the plugin manifest.
🤖 Generated with Claude Code