From b650b5eea92300a518ebf3d05735cb4482263586 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Tue, 3 Nov 2026 17:01:25 -0800 Subject: [PATCH] smlib: drop the per-kernel blend serial ranges and WR-641's flag, gone from solidcore solidcore#2388 keys the station memo by each definition's own identity (Kernel::blend_last_serial is gone), so kernels need no serial ranges of their own; solidcore#2617 removed fillet_through_extended_rail_end, its behaviour now without a flag. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- crates/smlib/src/core.rs | 11 +---------- crates/smlib/src/tests.rs | 13 ------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/crates/smlib/src/core.rs b/crates/smlib/src/core.rs index 1644b68a0..8f7fa4881 100644 --- a/crates/smlib/src/core.rs +++ b/crates/smlib/src/core.rs @@ -6,7 +6,6 @@ //! fork fixed in its own sources; each one turned on here says which fork commit it matches. use std::panic::{AssertUnwindSafe, catch_unwind}; -use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::{Mutex, PoisonError}; use solidcore::geom::attribute::{AttributeStore, ObjectKey}; @@ -153,7 +152,6 @@ pub(crate) fn fixes() -> UpstreamFixes { f.fillet_point_step_per_point = true; f.analytic_copy_keeps_parameterization = true; f.fillet_point_bigger_step_retry = true; - f.fillet_through_extended_rail_end = true; f.precise_properties_body_length_scale = true; f.offset_extension_from_base = true; f.corner_blend_stays_inside_neighbours = true; @@ -410,17 +408,10 @@ pub(crate) fn fixes() -> UpstreamFixes { #[cfg(test)] const HELD_BACK: &[&str] = &["fillet_refuse_rounds_breaking_through"]; -/// How far apart two kernels' procedural blend serials start. A body keeps the serials of the -/// kernel that made it and may be used on any other, whose memo of solved stations is keyed by -/// serial alone: the ranges keep one definition's stations from answering for another's. -pub(crate) const BLEND_SERIALS_PER_KERNEL: u64 = 1 << 40; - -/// A new kernel. Each takes the next range of blend serials, the first starting at 0. +/// A new kernel, with this backend's fixes. fn fresh() -> Kernel { - static MADE: AtomicU64 = AtomicU64::new(0); let mut k = Kernel::new(&KernelOptions::default()); k.fixes = fixes(); - k.blend_last_serial.set(MADE.fetch_add(1, Ordering::Relaxed).wrapping_mul(BLEND_SERIALS_PER_KERNEL)); k } diff --git a/crates/smlib/src/tests.rs b/crates/smlib/src/tests.rs index aaafbcdd3..e11cb55d9 100644 --- a/crates/smlib/src/tests.rs +++ b/crates/smlib/src/tests.rs @@ -485,19 +485,6 @@ fn bodies_move_between_kernels_and_calls_run_side_by_side() { } } -/// Each kernel has its own range of blend serials: a body keeps the serials of the kernel that -/// made it, and another kernel's memo of solved stations must not take them for its own. -#[test] -fn kernels_never_issue_the_same_blend_serial() { - let range = core::BLEND_SERIALS_PER_KERNEL as usize; - let ranges = core::run("outer", |outer| { - let inner = core::run("inner", |inner| Ok(inner.blend_last_serial.get() as usize)).unwrap_or_default(); - Ok([outer.blend_last_serial.get() as usize / range, inner / range]) - }); - let [outer, inner] = ranges.unwrap(); - assert_ne!(outer, inner); -} - /// A panic in a call running beside another costs neither: the panicking call's kernel is thrown /// away and the other call and later ones go on. #[test]