Skip to content

solidcore: tests use the one fixes preset instead of copied flag lists - #17567

Merged
bherbruck merged 9 commits into
tangency-labs:mainfrom
brett19:preset-tests-call-core-fixes
Nov 16, 2026
Merged

bherbruck merged 9 commits into
tangency-labs:mainfrom
brett19:preset-tests-call-core-fixes

Conversation

@brett19

@brett19 brett19 commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #14246

Three solidcore tests each hand-copied the same flag list (37 flags when written, 34 on main now) as "SolidCraft's core::fixes()", so a flag retirement had to edit all three. Most #14246 merge conflicts come from these copies. This PR makes them read the solidcore-side copy of the preset, tests/kernel_cases/fixes.json, which the kernel rig, the corpus tests and the ops tests already read. It also adds the four flags the preset turns on that fixes.json was missing, and adds a test that keeps fixes.json equal to the preset.

Changes a default: no
Test change: the copied flag lists in issue_1476_swept_bar_shell.rs, issue_1818_mated_shell_wall.rs and issue_1950_shell_analytic_edges_face_owned.rs are replaced by the preset (kernel_cases/fixes.json). Where a preset flag the old list lacked changes a pinned case, that flag is turned off explicitly with its reason (measured flag by flag, below). No expected value, bound or test input changes.

What changes

  • tests/support/solidcraft_fixes.rs (new): solidcraft_fixes() reads kernel_cases/fixes.json. It fails on a name the kernel no longer has, so a retirement must also take the name out of the file. solidcore-convert's corpus test already enforces this.
  • The three tests drop their copies and call it. issue_2365_nxn_setback_corners.rs and issue_2656_blend_regressions.rs also call it now: they added closed_smooth_pole_tangent_limit (and face_swap_uv_transposes_trims, fillet_chamfer_corner) to fixes.json by hand, and those names are in the file now. They also gain the preset's other new names (MEASURED): issue_2365 gets face_swap_uv_transposes_trims, fillet_chamfer_corner and brep_ray_classifies_current_trims, and issue_2656 gets brep_ray_classifies_current_trims. All 27 tests in the two files pass unchanged, and none is #[ignore]d. Their docs say so.
  • fixes.json now means core::fixes(), which the new smlib test enforces, rather than a capture of the configuration one rig run used.
  • kernel_cases/fixes.json gets the four flags crates/smlib/src/core.rs fixes() turns on that it lacked: face_swap_uv_transposes_trims, closed_smooth_pole_tangent_limit, fillet_chamfer_corner, brep_ray_classifies_current_trims. Checked before the change: these were exactly the preset's flags missing from the file, and the file had none the preset doesn't turn on. issue_2656_blend_regressions.rs and issue_2365_nxn_setback_corners.rs already added three of them on top of the file by hand.
  • crates/smlib/src/core.rs: one new #[cfg(test)] test, the_kernel_corpus_fix_list_is_this_preset, asserts that fixes.json names exactly the flags fixes() turns on (sorted; a duplicate fails too). From now on, a flag change in the preset that doesn't update fixes.json fails. No library code changes. smlib already depends on solidcore and reads the file with include_str!, so there is no dependency cycle. It lives in smlib because solidcore can't see core::fixes() (that would be a cycle); it is test-only and adds no app logic.

Flags that move a pinned case (MEASURED)

For both affected files, one run per extra flag: the preset with that flag turned off, and the old 37-flag list with that flag turned on. Each was run with shell_edges_on_analytics_exact off and on (700 runs, goldens profile, server2).

test flag effect with the whole preset handling
issue_1476 (both SolidCraft-fixes tests) offset_keep_cavity_regions on the original base it refused the shell (Unsupported "point-solve geometry owners must identify one edge or face each", #17393: the operand named every entity alike). Since main's #17064 the operand names each entity apart, and at this head the flag makes no difference (1299.482307072064, 16 lines, on or off, with shell_edges_on_analytics_exact off or on) nothing: the tests run the whole preset. Measured at the merged head with the flag on: V = 1299.482307072064 and 16 lines, the same as the old list gives
issue_1950 shelled_plate_with_solidcraft_fixes linear_sweep_arc_is_cylinder the extruded half circle is a cylinder rather than a surface of extrusion, so the shell measures 10400.213233570486 against the pinned operand's 10400.2127997564 (+8.3e-8 against the closed form, within the test's 1e-6) off in that test, with the reason
No other flag in the preset moved either value (700-run sweep on the original base; the two flags re-measured at the merged head). With linear_sweep_arc_is_cylinder off in 1950, every value is the same as under the old list. issue_1818 passes under the whole preset unchanged.

Overlap with #17452

None left in code: issue_1476 no longer touches offset_keep_cavity_regions. Whichever of the two PRs lands second only needs to take the flag's name out of fixes.json, which the new smlib test enforces.

Pre-existing, not changed here

issue_1476_swept_bar_shells_with_solidcraft_fixes and ..._and_edges_on_analytics_exact are #[ignore]d. They already fail on main and still do at this head: the old list, and the preset, give 1299.482307072064 and 16 lines, against pins of 1299.482314966473 and 16/18 lines. #17021 tracks this. Their pins are left as they are.

Validation

Adding the four flags reaches every consumer of fixes.json: solidcore's tests, solidcore-ops' corpus tests and kernel rig, and solidcore-convert's corpus tests. All of them were run on head e98cf46 (1acfda5 after it changes only doc comments; fmt re-checked) (merged main, server2, goldens profile), and nothing moved:

  • cargo clippy -p solidcore --all-targets -D warnings: clean
  • cargo nextest run -p solidcore: 6654 tests run, 6654 passed, 52 skipped. This covers every solidcore test that reads fixes.json.
  • cargo nextest run -p solidcore-ops -p solidcore-convert: 778 passed, 11 skipped (corpus, blend, rollover and split tests).
  • Kernel rig (solidcore-ops --test kernel_cases -- --ignored, the whole corpus with fixes.json): ok, 3 passed.
  • The three tests with --include-ignored: issue_1818 4/4 and issue_1950 2/2 pass. issue_1476 passes 2/4; the 2 that fail are the #[ignore]d pins tracked in solidcore: ignored test issue_1476 edges_on_analytics_exact fails on main (volume pin, 16 vs 18 lines) #17021 (above), which fail the same way on main.
  • cargo fmt --all --check (root and solidcore), cargo clippy -p solidcraft-smlib --all-targets --profile ci -D warnings: clean
  • cargo test -p solidcraft-smlib --lib core::tests: 6 passed, including the_kernel_corpus_fix_list_is_this_preset and every_upstream_fix_is_on_unless_shown_broken.
    Gate scope: test-only change (case 5) plus the rig and the ops/convert suites, because fixes.json configures them. The smlib edit is a #[cfg(test)] test only. SolidCraft's app suites are left to CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt

Summary by CodeRabbit

  • Tests
    • Expanded kernel regression coverage with additional fix cases.
    • Standardized SolidCraft fix configuration across shell, blend, and setback regression tests.
    • Added a consistency check to ensure the configured fix names match the listed preset.
    • Existing expected shell measurements and regression values remain unchanged.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The changes add a shared SolidCraft fix preset for regression tests, update five tests to use it, add four names to the preset list, and test that the list matches the flags enabled by fixes().

Changes: SolidCraft Fix Preset

Layer / File(s) Summary
Define the shared preset
solidcore/crates/solidcore/tests/kernel_cases/fixes.json, solidcore/crates/solidcore/tests/support/solidcraft_fixes.rs
The JSON list adds four fix names. The support helper reads the list and enables each recognized flag on a default UpstreamFixes value.
Use the shared preset in regression tests
solidcore/crates/solidcore/tests/issue_1476_swept_bar_shell.rs, solidcore/crates/solidcore/tests/issue_1818_mated_shell_wall.rs, solidcore/crates/solidcore/tests/issue_1950_shell_analytic_edges_face_owned.rs, solidcore/crates/solidcore/tests/issue_2365_nxn_setback_corners.rs, solidcore/crates/solidcore/tests/issue_2656_blend_regressions.rs
The tests use the shared helper instead of local preset definitions or inline flag setup. Two tests explicitly disable flags for initial measurements.
Check fix-name consistency
crates/smlib/src/core.rs
A test compares sorted names from kernel_cases/fixes.json with the sorted names of flags enabled by fixes().

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

Merge Risk: Minimal · previous review 1acfd

This change only affects regression-test configuration and adds a check that the preset stays aligned with the kernel fixes. No production behavior changes, and the reported test runs pass. Merge risk is minimal.

Security architecture risk: Minimal · up to 1acfd

The changes centralize regression-test configuration without changing production fix defaults or exposing a new runtime interface. No introduced or worsened security, ownership, rollback, or failure-containment risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the main change: the three solidcore tests stop copying flag lists and use one shared preset (kernel_cases/fixes.json). It is specific and matches the changeset. The title says "fixes …
Description check Passed The description follows the template well. It states the change in plain terms and names the problem (copied flag lists that drift). It has the required 'Changes a default: no' line. It includes the r…
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 passes. The PR changes no UX default. The diff inventory (git diff --name-status) lists eight files. Seven are solidcore test files, test support code, or the test fixture `kernel_cases/fi…
Full details: Title check

Explanation

The title names the main change: the three solidcore tests stop copying flag lists and use one shared preset (kernel_cases/fixes.json). It is specific and matches the changeset. The title says "fixes preset" where the description uses "SolidCraft's preset" and calls it fixes.json, which is a small wording gap, not a mismatch.

Full details: Description check

Explanation

The description follows the template well. It states the change in plain terms and names the problem (copied flag lists that drift). It has the required 'Changes a default: no' line. It includes the required 'Test change:' line with a reason for the replaced and altered test expectations. It gives detailed validation with commands, counts, and measured values. It also covers the screenshot section's intent: the change is test-only with no observable app behavior, and the author states the gate scope. The 'Changes a default' line and the explanation of the test change are present. The template's Title guidance is not a section in the body, so it is not required here. Minor gaps: the description does not include a Screenshots section or a statement that none applies, and the integration status section is not filled in (upstream commit and PR status are referenced only in the validation head commit, not in an integration status block).

Full details: Existing Defaults Unchanged

Explanation

The check passes. The PR changes no UX default. The diff inventory (git diff --name-status) lists eight files. Seven are solidcore test files, test support code, or the test fixture kernel_cases/fixes.json. The eighth is crates/smlib/src/core.rs. Its only hunk adds a #[cfg(test)] test, the_kernel_corpus_fix_list_is_this_preset, which asserts that fixes.json lists exactly the flags fixes() enables. No library or application code changes. The changes to fixes.json add four flags to a test fixture. This affects what solidcore's test rigs run. It does not change core::fixes() or any user-facing setting. The check excludes kernel and geometry results under solidcore/, and the pinned-value adjustments in the tests are of that kind. The description states Changes a default: no, which matches the code. No preference, shortcut, UI layout, or command behaviour changes.

Finishing Touches

Generate unit tests (beta)

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

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3269e94 and 1acfda5.

Files selected for processing: 8

  • crates/smlib/src/core.rs
  • solidcore/crates/solidcore/tests/issue_1476_swept_bar_shell.rs
  • solidcore/crates/solidcore/tests/issue_1818_mated_shell_wall.rs
  • solidcore/crates/solidcore/tests/issue_1950_shell_analytic_edges_face_owned.rs
  • solidcore/crates/solidcore/tests/issue_2365_nxn_setback_corners.rs
  • solidcore/crates/solidcore/tests/issue_2656_blend_regressions.rs
  • solidcore/crates/solidcore/tests/kernel_cases/fixes.json
  • solidcore/crates/solidcore/tests/support/solidcraft_fixes.rs

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

brett19 and others added 4 commits November 15, 2026 23:20
issue_1476_swept_bar_shell, issue_1818_mated_shell_wall and
issue_1950_shell_analytic_edges_face_owned each hand-copied 37 flags as
SolidCraft's core::fixes(); every flag retirement had to edit all three.
They now read tests/kernel_cases/fixes.json through a shared support
module, which fails on a name the kernel no longer has.

fixes.json gains the four flags the preset turns on and the file lacked
(face_swap_uv_transposes_trims, closed_smooth_pole_tangent_limit,
fillet_chamfer_corner, brep_ray_classifies_current_trims), and a smlib
test keeps the file equal to the flags fixes() turns on.

The two "without the flag" legs (issue_1476's SolidCraft-fixes test and
issue_1950's) turn shell_edges_on_analytics_exact off explicitly: the
preset has it on, the old copied list did not.

Part of tangency-labs#14246.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
…measure

Under the whole preset two flags the copied list lacked change these
cases, measured flag by flag (each preset-minus-one and
old-list-plus-one run):

- issue_1476: offset_keep_cavity_regions refuses the shell ("point-solve
  geometry owners must identify one edge or face each"; the operand names
  every entity alike, tangency-labs#17393). Off in its two
  SolidCraft-fixes tests. With it off, the preset gives the same shell as
  the old list (1299.482307072064, 16 lines, both with and without
  shell_edges_on_analytics_exact).
- issue_1950: linear_sweep_arc_is_cylinder makes the extruded half circle
  a cylinder, so the shell measures 10400.213233570486 instead of the
  pinned operand's 10400.2127997564. Off in its SolidCraft-fixes test.
  No other flag in the preset moves either value.

Part of tangency-labs#14246.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
…e-fixes

# Conflicts:
#	solidcore/crates/solidcore/tests/issue_1476_swept_bar_shell.rs
#	solidcore/crates/solidcore/tests/issue_1818_mated_shell_wall.rs
#	solidcore/crates/solidcore/tests/issue_1950_shell_analytic_edges_face_owned.rs
…ed helper

Both added flags by hand on top of kernel_cases/fixes.json
(closed_smooth_pole_tangent_limit; face_swap_uv_transposes_trims and
fillet_chamfer_corner). fixes.json now lists them, so the extras go and
both tests call support/solidcraft_fixes.rs. Comments in issue_1476 and
issue_1950 say why shell_edges_on_analytics_exact is turned off there,
and the 1950 volume offset is given both absolute and relative.

Part of tangency-labs#14246.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
brett19 and others added 3 commits November 16, 2026 01:04
…e-fixes

# Conflicts:
#	solidcore/crates/solidcore/tests/issue_1476_swept_bar_shell.rs
Since main's typed reader identities (tangency-labs#17064) the operand names each
entity apart, and offset_keep_cavity_regions no longer refuses the shell:
measured at this head, the preset gives 1299.482307072064 and 16 lines
with the flag on or off, with and without
shell_edges_on_analytics_exact. The helper that turned it off goes.

Part of tangency-labs#14246.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
…adds there

With fixes.json equal to core::fixes(), issue_2365 also runs
face_swap_uv_transposes_trims, fillet_chamfer_corner and
brep_ray_classifies_current_trims, and issue_2656 also runs
brep_ray_classifies_current_trims. Their docs say so; every test in
both files passes unchanged under them (solidcore nextest at e98cf46).

Part of tangency-labs#14246.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
@brett19
brett19 marked this pull request as ready for review November 16, 2026 00:49
@brett19
brett19 requested a review from a team as a code owner November 16, 2026 00:49
@brett19
brett19 requested review from bherbruck and removed request for a team November 16, 2026 00:49
@bherbruck bherbruck added ready to merge reviewed, every ask addressed; merge once CI is green approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) labels Nov 16, 2026
…e-fixes

# Conflicts:
#	solidcore/crates/solidcore/tests/issue_1476_swept_bar_shell.rs
#	solidcore/crates/solidcore/tests/issue_1818_mated_shell_wall.rs
#	solidcore/crates/solidcore/tests/issue_1950_shell_analytic_edges_face_owned.rs
@bherbruck
bherbruck added this pull request to the merge queue Nov 16, 2026
Merged via the queue into tangency-labs:main with commit 51644f6 Nov 16, 2026
56 checks passed
brett19 added a commit to brett19/solidcraft that referenced this pull request Nov 16, 2026
Takes main's side in the three shell tests, which now use the one fixes
preset (tangency-labs#17567) instead of copied flag lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
brett19 added a commit to brett19/solidcraft that referenced this pull request Nov 16, 2026
Conflicts in issue_1476, issue_1818 and issue_1950: main (tangency-labs#17567) replaced
the copied SolidCraft flag lists with the one fixes preset; main's side is
kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
brett19 added a commit to brett19/solidcraft that referenced this pull request Nov 16, 2026
…o flags/scone2

tangency-labs#17567 replaced the copied flag lists in the issue_1476, issue_1818 and
issue_1950 tests with the one fixes preset. This branch's only edits there
removed its retired flags from those lists, so main's versions are taken
whole. git grep finds no use of any retired field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
brett19 added a commit to brett19/solidcraft that referenced this pull request Nov 16, 2026
Conflicts came from tangency-labs#17567, which replaced the copied SolidCraft flag
lists in tests with the one fixes preset: those lists are dropped, as on
main. issue_1818 keeps this branch's removal of the flag-only test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
brett19 added a commit to brett19/solidcraft that referenced this pull request Nov 16, 2026
Resolves the preset conflicts with tangency-labs#17567 (tests use the one fixes preset)
and drops the retired flag from issue_2260's list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
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