Commit Graph

4 Commits

Author SHA1 Message Date
Pluto-XI 9be2c68dfe surface.offset_surface: portable worker-guard flag; test the no-wrap path
Replace the GCC/Clang-only weak symbol with a plain flag the shim defines
(at namespace scope, external linkage) and the worker's main() sets when it
is linked with its NLib --wrap wrappers. Verified the non-Linux branch by
forcing it on Linux: the worker builds without __wrap_ symbols and refuses
every extension step; the regression now asserts that per platform.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 11:53:05 -06:00
Pluto-XI d2c45e1733 surface.offset_surface: review nice-to-haves (guards, worker, dispatch, docs)
FFI guards now refuse only what C++ cannot handle, each probed against the
isolated worker:
- drop the 1e6 coordinate cap, the 1e-3 transform-scale floor, the 1e3
  extension-distance cap and the 1e-6 revolution generator minimum (offset
  callers only; surf_of_revolution_p1's in-process calls keep it);
- orders: cap 64 (caller array bound; upstream refuses >3 before writing);
  UB-116 moves into the worker on the actual compound distance, so zero
  offsets are compared;
- box guard follows CalculateBoundingBox level by level against each
  offset's own m_pSurface instead of only the innermost base.
Remaining refusals are UB-107 and HANG-6, the latter by a 20,000-call
arc-length work bound (normal searches: <=45) instead of the deadline.

Worker: a timeout is rerun once with 60 s before it is a harness failure;
off Linux it is built without GNU ld --wrap and the shim refuses extension
steps instead of running them unguarded.

Dispatch: new BaseOffset op compares GetBaseSurface()->CreateOffsetSurface
through SmSurface* (4 fixtures, 81 generated over every base kind).
Generator covers magnitudes 1e-9..1e150, tiny revolutions, zero/negative
scales and orders up to 8 (484 such cases pass, 41,252 values).

nurb_of documented: a NURB-less revolution base is UB upstream before
GetOrCreateGwNurbPointer runs. nurbs.b_spline_surface_p1 note counts fixed.

surface.offset_surface: 3066 cases, 2853 pass, 0 failed, 213 deferred;
6000 seeds: 6066 cases, 5620 pass, 0 failed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 11:25:27 -06:00
Pluto-XI c27d08a933 surface.offset_surface: exclude main's UB-107/UB-32 inputs; record results
Two generated cases became reachable once surface_p3..p5 landed and hit
upstream undefined behaviour already filed on main:

- UB-107: CreateExtendedSurface retries a failed in-place N_SrfExtendByDist
  on half-written arrays. The offset worker wraps N_SrfExtendByDist and
  N_SrfCopy and rejects a read of such a surface (candidate discarded at
  generation, never counted as a pass).
- UB-32: ST_surxsdr's degree-1 reflection fallback reads Rw[ii][kby+2] past
  its row. As nlib.srf_adv_p1 does, the generator keeps reflection
  extensions of a degree-1 NURB to C-max.

Also relabel the offset arm of the surface cache box callback as a dispatch
gap (surface_p6 has landed; the callback lacks a kernel and the guesses),
and refresh face_p2 / intersector headers.

difftest --green: 174 units, 98 passed, 76 partial, 0 failed.
surface.offset_surface: 3062 cases, 2849 pass, 0 failed, 213 deferred
(surface_point_solve_p3); 6000 seeds: 6062 cases, 5611 pass, 0 failed.
Promoted: topology.face_p2 (offset deferrals 112 -> 0), topology.brep_data
(46 -> 0), blend.fillet_custom_solver (401 pass), surface.surface_p7,
nurbs.b_spline_surface_p1, mass.integrator.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 19:43:19 -06:00
Pluto-XI 9ab0e97fc8 Merge main and repair offset surface review findings
Resolve dispatcher conflicts; bound nesting, preserve exact replay, and guard invalid C++ extension searches in an isolated oracle. Keep numerical results unchanged. Offset default and 6000-seed comparisons pass with genuine foreign-unit deferrals.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-14 20:44:58 -06:00