Skip to content

Naming corpus test: the eight .sc designs it skipped are built and checked - #20793

Merged
bherbruck merged 2 commits into
tangency-labs:mainfrom
TRget88:naming-corpus-sc-designs
Nov 22, 2026
Merged

bherbruck merged 2 commits into
tangency-labs:mainfrom
TRget88:naming-corpus-sc-designs

Conversation

@TRget88

@TRget88 TRget88 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Change

The naming corpus test builds every design kept in the repository twice. It checks three things. Both builds must give each face and edge the same name in the same place. Every name a feature stores must still find its face or edge. A design saved as JSON, opened and saved again, must be the same bytes, so a design kept in Git changes only where the design changed (same text on every save, issue 626).

The test looked for .solidcraft files in tests/action_matrix/designs and crates/engine/src/tests/fixtures. Both folders hold only .sc files, the extension new designs have used since designs save as .sc, PR 7325. So their eight designs were never built, and none of these checks covered them.

The test now lists the .sc files of both folders. It opens any design file through doc.open, which reads a container and a JSON design alike. All eight designs pass every check.

Five of the eight take about 5 to 12 s to build, so the list of heaviest designs is measured again. The test hands those designs out first, so a slow design does not start last and hold up the end of the run. The old list was out of date. oracle/77-fillet-variable-linear took 35.6 s and now takes 1.0 s. Seven designs not on the list took 7 to 30 s. The new list has the 23 designs that took over 3.5 s. Every other design took under 3 s.

Changes a default: no

Test change: the test looked for .solidcraft files in two folders that hold only .sc files. Its list of heaviest designs was measured before seven slow designs came in and before oracle 77 got 35 times faster.

Validation

All runs were on Windows 10 with the ci profile, in a worktree with its own build folder.

  • cargo test --profile ci -p solidcraft-cli --test naming_corpus fails as it does on main, now with "4 of 179 design(s)". That is 171 designs as before plus the eight. None of the four failures is a new design.
    • oracle/83-boundary-loop-thicken does not load. That is why the test is in tests/KNOWN_FAILING_TESTS, and it stays there.
    • Three fuzzer seeds in examples/regressions do not load either (seeds 73, 158 and 185). They come from the boolean tolerance work on fuzzer failures, issue 10. Seeds 73 and 185 already have ignored engine tests for the same failures. The known-failing listing hides them in this test.
    • The test took 64.8 s while other builds were running on the machine.
  • cargo xtask ci at this branch, on main at a550f2e with the gate fix, 20675 applied (that main stopped the gate before the tests). The format and clippy steps pass. The test step fails 51 tests. 26 of them fail the same way on that main on Windows. The other 25 are timing and local HTTP tests in other crates (agent chat, plugins, render, a file replace that waits for a reader, a cancelled computation), and they failed while other builds loaded the machine. This PR changes only the naming corpus test file, which none of them uses.

The results of the eight designs come from a local copy of the test (not committed). It printed each design's counts and timed load and build with one worker. For each design, every stored name finds its face or edge, the two builds name everything alike, and the JSON save, opened and saved again, is the same bytes. None of the four containers holds binary data, so the same-bytes check runs on all eight.

Design File Named faces and edges Stored names found One build
demo/crazy-geom-cuts container 142 3 of 3 0.2 s
demo/logo-up-down-join container 42 1 of 1 0.2 s
demo/pi-case JSON 251 9 of 9 4.9 s
demo/pi-case-0.8 JSON 433 18 of 18 6.8 s
fixtures/battery-tpu-case JSON 253 20 of 20 5.0 s
fixtures/battery-tpu-case-v2 JSON 437 29 of 29 8.2 s
fixtures/cubeish-chamfer-too-large container 112 9 of 9 0.3 s
fixtures/revolve-360-cut container 138 1 of 1 12.1 s

The heaviest list comes from the same local copy, run with one worker on every design that took over 5 s in a full parallel run (38 designs). The slowest design not on the new list took 2.9 s.

Screenshots of the behavior (when observable)

There is nothing to show in the app. This changes one test only.

Integration status

Based on upstream main at a550f2e, with no conflicts. Newer main commits do not touch this file. The PR that cuts cargo xtask test to 10 minutes, 19676 also edits HEAVIEST. It leaves oracle/77-fillet-variable-linear out of the corpus because that design took 35.6 s, but it now builds in 1.0 s. Whichever PR lands second needs a small merge in this list.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Updated design-file handling to recognize container files and JSON files using current and older extensions.
  • Documentation

    • Clarified which design-file formats can be opened.
    • Updated the design benchmark list and build-time measurements.

TRget88 and others added 2 commits November 21, 2026 19:05
…ecked

The test looked for .solidcraft files in tests/action_matrix/designs and in
the engine's test fixtures, but both folders hold only .sc files. Their eight
designs were never built, so neither the naming checks nor the same-bytes
check covered them. The test now lists their .sc files and opens any design
file through doc.open, which reads a container and a JSON design alike. All
eight pass.

The list of heaviest designs is measured again. Five of the new designs take
about 5 to 12 s. Oracle 77 now takes 1 s instead of 35.6 s, and seven designs
added since then take 7 to 30 s without being listed. The test hands the
listed designs out first, so the slow ones no longer start last.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re taken

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The naming corpus now uses the engine’s design extension and container-path check. Its loading documentation covers .sc files and older extensions containing a container or JSON. The HEAVIEST list now contains 23 designs and revised timing details.

Changes: Design corpus updates

Layer / File(s) Summary
Design file recognition
apps/solidcraft-cli/tests/naming_corpus.rs
Demo-design and engine-fixture scans use solidcraft_engine::io::DESIGN_EXT. The load container-file check uses is_design_container_path, and its documentation describes .sc files and older extensions containing a container or JSON.
Heavy design work list
apps/solidcraft-cli/tests/naming_corpus.rs
The HEAVIEST list expands from six to 23 designs. Its documentation describes updated load and build timings and timing-selection criteria. The list continues to determine work order.

Estimated code review effort: 2 (Simple) | ~8 minutes

Merge Risk: Minimal · up to c3e33

This updates the naming corpus test to cover the previously skipped .sc designs and refreshes the heavy-design schedule. It does not affect production behavior, and no merge-blocking risk was found.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the change: the naming corpus test now builds and checks the eight .sc designs it previously skipped. It matches the description and objectives, and it is specific enough for a teammat…
Description check Passed The description covers the change, the validation runs, and the integration status. It explains the problem, the test changes, and the refreshed HEAVIEST list. It also states the 'Changes a default' l…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Existing Defaults Unchanged Passed The check fails only if the PR changes a UX default: a default setting or preference, a command's usual-use behaviour, the UI's default layout or behaviour, or a shortcut. The PR changes one file, `ap…
Full details: Title check

Explanation

The title names the change: the naming corpus test now builds and checks the eight .sc designs it previously skipped. It matches the description and objectives, and it is specific enough for a teammate scanning history to understand the primary change.

Full details: Description check

Explanation

The description covers the change, the validation runs, and the integration status. It explains the problem, the test changes, and the refreshed HEAVIEST list. It also states the 'Changes a default' line and the required test change reason. The Screenshots section says there is nothing to show, which the template allows for changes without observable behavior. The Change section does not define the tool or project for a newcomer, and the test-change reason is given in the Change section rather than a separate required line. These are minor gaps, so the description is mostly complete.

Full details: Existing Defaults Unchanged

Explanation

The check fails only if the PR changes a UX default: a default setting or preference, a command's usual-use behaviour, the UI's default layout or behaviour, or a shortcut. The PR changes one file, apps/solidcraft-cli/tests/naming_corpus.rs (confirmed with git diff --name-status against the review base). The diff has three parts: - The design-path extension for two test folders changes from a hard-coded "solidcraft" to solidcraft_engine::io::DESIGN_EXT. - The load helper in the test now uses is_design_container_path. This is test harness code, not the CLI's doc.open behaviour. - The HEAVIEST scheduling list is updated. It only sets the order in which the test builds designs. The comment says it "never" changes results. No user-facing command, setting, layout, shortcut, or default changes. The description's Changes a default: no is consistent with the diff. The kernel or geometry results of the eight newly included designs are outside this check's scope, and the test does not change them.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 312917b and c3e33e4.

Files selected for processing: 1

  • apps/solidcraft-cli/tests/naming_corpus.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@bherbruck bherbruck added approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) ready to merge reviewed, every ask addressed; merge once CI is green labels Nov 22, 2026
@bherbruck
bherbruck added this pull request to the merge queue Nov 22, 2026
Merged via the queue into tangency-labs:main with commit db35f84 Nov 22, 2026
120 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) ready to merge reviewed, every ask addressed; merge once CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants