Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
5e65ed9
docs(evaluate): NDExpr / np.evaluate state-of-the-DSL plan + the prob…
Nucs Sep 7, 2026
53602da
feat(evaluate): NDExpr Phase 0 — parity fixes G1-G8/G10 + the evaluat…
Nucs Sep 8, 2026
939d063
feat(evaluate): NDExpr Phase 1 — typed vector emission (lane masks) +…
Nucs Sep 8, 2026
dcbe707
feat(evaluate): NDExpr Phase 3 — per-root compiled program, CompiledE…
Nucs Sep 8, 2026
7b3c8a5
test(interop): ndarray.flags + value-fidelity + advanced-scenario cov…
Nucs Sep 9, 2026
6a1d0c4
feat(interop): non-tensor OrtValue readers (sequence/map/string) + 3 …
Nucs Sep 9, 2026
5e3d6c3
feat(dtype): finfo/iinfo.dtype return DType; interop dtype maps take …
Nucs Sep 12, 2026
831b664
feat(math): np.hypot — correctly-rounded Borges FMA with a SIMD fast …
Nucs Sep 12, 2026
10a49f6
feat(indexing): np.piecewise + fix `!` operator on non-contiguous lay…
Nucs Sep 12, 2026
7192172
feat(indexing): np.putmask — the position-cursor sibling of np.place
Nucs Sep 12, 2026
d1d86c2
feat(math): window functions bartlett/blackman/hamming/hanning/kaiser
Nucs Sep 12, 2026
9a368db
test(oracle): differential-fuzz coverage for hypot/piecewise/putmask/…
Nucs Sep 12, 2026
1b82a7c
feat(interop): NumSharp.Interop.ParquetNet — NDArray <-> Apache Parquet
Nucs Sep 12, 2026
ff84f7f
docs: Getting & Setting Values guide, API TOC refresh, ScipySharp plan
Nucs Sep 12, 2026
2713086
chore(benchmark): add the Iteration Techniques menu entry (option 14)
Nucs Sep 12, 2026
3710d26
feat(examples): NumSharp.GistExamples — 10 gist NumPy ports + Karpath…
Nucs Sep 12, 2026
69849e1
test(examples): parity gates for the gist ports (managed + pythonnet-…
Nucs Sep 12, 2026
000039c
chore(gitignore): ignore the local outputs/ run-artifact directory
Nucs Sep 12, 2026
ea91017
feat(math): np.divmod / np.fmod / np.remainder — the divmod family (N…
Nucs Sep 12, 2026
355d695
feat(math): np.trapezoid + np.gradient — bit-exact numerical integrat…
Nucs Sep 12, 2026
23c4521
fix(math): np.gradient non-uniform edges compute in float64 for reduc…
Nucs Sep 12, 2026
ab69cf8
fix(math): complex128 true-division bit-exact vs NumPy (Smith recipro…
Nucs Sep 12, 2026
3622a6e
feat(statistics): np.histogram family — histogram / histogram_bin_edg…
Nucs Sep 12, 2026
cb74b5f
fix(math): np.trapezoid bit-exact on non-C-contiguous f16/complex128 …
Nucs Sep 12, 2026
d1520ed
test(copy): pin np.copy/ascontiguousarray-of-broadcast contiguity par…
Nucs Sep 12, 2026
58cd55d
fix(math): complex128 power by an INTEGER exponent bit-exact vs NumPy…
Nucs Sep 12, 2026
7c3e14d
fix(statistics): np.histogram family — mixed-dtype column promotion, …
Nucs Sep 12, 2026
a43dc6f
fix(statistics): np.percentile/quantile/median family — bit-exact Num…
Nucs Sep 12, 2026
dbc0b3b
fix(math): complex128 multiply bit-exact vs NumPy (fused simd_cmul port)
Nucs Sep 12, 2026
70a7173
feat(math): np.float_power — power at a minimum float64 precision (Nu…
Nucs Sep 13, 2026
66f4092
feat(math): np.heaviside — the Heaviside step function, bit-exact vs …
Nucs Sep 13, 2026
ea95208
feat(shape): np.broadcast_shapes / apply_along_axis / apply_over_axes…
Nucs Sep 13, 2026
11d5b6f
feat(math): np.spacing — distance to the adjacent float away from zer…
Nucs Sep 13, 2026
c400ba2
feat(bitwise): np.packbits / np.unpackbits — bit-exact NumPy 2.4.2 pa…
Nucs Sep 13, 2026
f247063
feat(math): np.binary_repr / np.base_repr — scalar integer to string …
Nucs Sep 13, 2026
6180915
feat(math): np.signbit + np.fix — sign-bit predicate & round-toward-z…
Nucs Sep 13, 2026
7f58f01
feat(math): np.frexp / np.ldexp — mantissa/exponent decomposition fam…
Nucs Sep 13, 2026
9af8fa3
test(oracle): wire np.frexp / np.ldexp into the differential-fuzz corpus
Nucs Sep 13, 2026
80dde0a
feat(bitwise): np.bitwise_count — population count of |x| to uint8, b…
Nucs Sep 13, 2026
6a19340
feat(math): np.gcd / np.lcm — number-theoretic integer binary ufuncs,…
Nucs Sep 13, 2026
08d5d13
test(oracle): wire np.signbit / np.fix / np.bitwise_count into the di…
Nucs Sep 13, 2026
1dae35a
feat(math): np.sinc — normalized sinc sin(pi*x)/(pi*x), bit-exact Num…
Nucs Sep 13, 2026
68081a7
feat(logic): np.array_equiv + np.array_equal equal_nan — the array-eq…
Nucs Sep 13, 2026
ac95ae8
fix(reduce): NEP50 accumulator widening on the flat size-<=1 sum/prod…
Nucs Sep 13, 2026
42cffc4
docs(interop): document the ParquetNet NDArray read surface — full XM…
Nucs Sep 13, 2026
4b16555
docs: CLAUDE.md — record the recent np.* feature batch in the API ref…
Nucs Sep 13, 2026
074d4d0
test(oracle): retire the complex-multiply divergence excuse & tighten…
Nucs Sep 13, 2026
a0013f2
feat(logic): np.may_share_memory / np.shares_memory — the memory-over…
Nucs Sep 13, 2026
0be4fc4
feat(creation): np.logspace / np.geomspace — the log-scale linspace f…
Nucs Sep 13, 2026
7fd70a3
test(oracle): un-excuse the now-fixed cumprod size-<=1 NEP50 widening…
Nucs Sep 13, 2026
63a0795
test(logic): np.shares_memory — pin the validated flag-state & candid…
Nucs Sep 13, 2026
281fece
fix(creation): np.geomspace — NaN start propagates NaN to every eleme…
Nucs Sep 13, 2026
5f020a0
feat(math): np.fabs — the float-only absolute value, bit-exact NumPy …
Nucs Sep 13, 2026
45c6840
Merge branch 'exprs' — NDExpr / np.evaluate Phases 0, 1 and 3 (parity…
Nucs Sep 13, 2026
670afdd
perf(evaluate): NDExpr structural program cache + 0-d inputs as kerne…
Nucs Sep 13, 2026
b53f5e5
perf(logic): fused early-exit fast path for np.array_equal / np.array…
Nucs Sep 13, 2026
f3490fd
refactor(math): np.fabs rides a dedicated UnaryOp.Fabs, not a shared …
Nucs Sep 13, 2026
4664f6b
test(oracle): classify np.array_equiv in the surface-coverage gate (s…
Nucs Sep 13, 2026
1f18c44
docs(evaluate): plan the NDExpr capabilities beyond ndexpr-evaluate.m…
Nucs Sep 13, 2026
6373a4c
feat(indexing): np.put_along_axis — the setter twin of take_along_axis
Nucs Sep 13, 2026
bdd4df0
feat(dtypes): np.typename — type-code → description lookup (numpy/lib…
Nucs Sep 13, 2026
81f1713
docs(indexing): note put_along_axis's inherited OOB-order divergence …
Nucs Sep 13, 2026
bea2f60
coverage(inventory): catalog the NumPy submodules the scan was struct…
Nucs Sep 13, 2026
acbf571
feat(math): np.real_if_close — collapse a near-real complex array to …
Nucs Sep 13, 2026
2ba16e7
fix(io): faithful Python str repr in PyLiteral for non-printable char…
Nucs Sep 13, 2026
ee366e6
feat(math): np.i0 — modified Bessel I₀, bit-exact NumPy 2.4.2 at ever…
Nucs Sep 13, 2026
dfd0608
test(math): harden np.real_if_close with validation-surfaced edge cases
Nucs Sep 13, 2026
60df106
feat(dtypes): NPY_TYPES identity enum + DType.type_num, platform-reso…
Nucs Sep 13, 2026
179b2f6
Merge branch 'onnxruntime' into master (local)
Nucs Sep 13, 2026
fda311c
feat(math): np.unwrap — phase unwrapping, bit-exact NumPy 2.4.2, fuse…
Nucs Sep 13, 2026
1755e1b
feat(math): np.emath module — automatic-domain sqrt/log/log2/log10/lo…
Nucs Sep 13, 2026
144da76
docs(math): refine np.emath complex-path parity claim after 897-case …
Nucs Sep 13, 2026
5316a61
feat(ma): numpy.ma masked-array module — MaskedArray type + ufunc-wra…
Nucs Sep 13, 2026
1b0d0d6
feat(ma): masked reductions, operators, creation, constructors, extre…
Nucs Sep 13, 2026
f7058a5
feat(ma): masked extras — average/median/dot/set-tests/sort/unique + …
Nucs Sep 13, 2026
34e6b0f
fix(ma): mean result dtype matches NumPy (float32->float64, float16->…
Nucs Sep 13, 2026
01392bc
fix(ma): mixed MaskedArray/NDArray operators + astype/asarray (castin…
Nucs Sep 13, 2026
60a0ea6
docs(website): add "Fundamentals and usage" section — one NumSharp ar…
Nucs Sep 14, 2026
566fd30
feat(ma): masked set operations — intersect1d/union1d/setxor1d/setdiff1d
Nucs Sep 14, 2026
d58207e
docs(website): add "Advanced usage and interoperability" section — on…
Nucs Sep 14, 2026
994134c
docs(advanced): show C# 14 extension members for extending the np/NDA…
Nucs Sep 14, 2026
2b57d07
docs(website): executable tests for every Fundamentals example + doc↔…
Nucs Sep 14, 2026
1fcaea0
feat(collections): ConcurrentOrderedDict at List/ConcurrentDictionary…
Nucs Sep 14, 2026
e425740
docs(ma): add numpy.ma parity audit & gap register
Nucs Sep 14, 2026
9071b53
fix(round): np.round/around decimals!=0 — port PyArray_Round (negativ…
Nucs Sep 14, 2026
fad2cbe
feat(collections): ConcurrentOrderedDict hardened thread-safety contr…
Nucs Sep 14, 2026
d2f0467
docs(website): add "NumSharp: the absolute basics for beginners" (Num…
Nucs Sep 14, 2026
539e9c0
feat(collections): ConcurrentOrderedDict memory analysis — measured f…
Nucs Sep 14, 2026
6bc7d4a
docs(website): add "NumSharp quickstart" (NumPy quickstart conversion)
Nucs Sep 14, 2026
36fc1ae
docs+test: executable doc-test coverage for the beginners + advanced …
Nucs Sep 14, 2026
1cb0411
docs(quickstart): name apply_along_axis/bincount/corrcoef + document …
Nucs Sep 14, 2026
ab96ae7
perf(ndexpr): mark NDLogAddExpMath + NDHypotMath per-element kernels …
Nucs Sep 14, 2026
0c47162
feat(evaluate): NDExpr C6 macro/decision combinators — 40 fused compo…
Nucs Sep 14, 2026
0f8f8f7
feat(ma): close audit backlog §6 items 1–5,7 — ~34 module funcs + ~30…
Nucs Sep 14, 2026
b3a912b
feat(vectorize): np.vectorize + np.frompyfunc — wrap a C# delegate as…
Nucs Sep 14, 2026
aee243c
feat(ma): the MaskedArray indexer (audit §6 item 6, the keystone) + p…
Nucs Sep 14, 2026
1d1a226
feat(ma): quick wins — frombuffer/fromfunction/hsplit/ndenumerate + M…
Nucs Sep 14, 2026
ea1abf7
feat(ma): masked cov/corrcoef — pairwise-complete covariance (audit §…
Nucs Sep 14, 2026
9857741
feat(ma): masked convolve/correlate + apply_over_axes (audit §1.C) — …
Nucs Sep 14, 2026
201e4e2
feat(ma): apply_along_axis — the last implementable §1.C gap; np.ma n…
Nucs Sep 14, 2026
c1712be
docs(collections): ConcurrentOrderedDict compact-table discovery — me…
Nucs Sep 14, 2026
2e46e74
docs(collections): ConcurrentOrderedDict — measured O(1) proof, cross…
Nucs Sep 14, 2026
1b652ba
docs(ndexpr): correct C6 combinator count 40 -> 39 and record the ver…
Nucs Sep 14, 2026
71bf2f5
docs(collections): ConcurrentOrderedDict — per-member complexity, eve…
Nucs Sep 14, 2026
4368c95
perf(evaluate): make Elu/Softplus SIMD-vectorize on the float32 hot p…
Nucs Sep 14, 2026
3a82d65
docs(collections): compact-table discovery — concurrency gun proves t…
Nucs Sep 14, 2026
060809a
feat(ma): close the last tractable np.ma audit findings — polyfit, ma…
Nucs Sep 14, 2026
8906619
chore(evaluate): move C6 combinators off master to the exprs branch
Nucs Sep 14, 2026
6e2869e
feat(collections): ConcurrentOrderedCompactDict — the compact open-ad…
Nucs Sep 14, 2026
6509f07
feat(ma): close the return-type-impedance + last-param np.ma findings…
Nucs Sep 14, 2026
b89f714
docs(collections): COD vs COCD — every member of both shipping types …
Nucs Sep 14, 2026
d815adf
feat(ma): close the instance conversion/export surface + REAL hard-ma…
Nucs Sep 14, 2026
bcf924f
fix(collections): AddRange floor-forced COW no longer compounds capac…
Nucs Sep 14, 2026
6987944
feat(ma): close flatten_mask/make_mask_descr/mr_ — three __all__ name…
Nucs Sep 14, 2026
cd39ef5
docs(site): persist DocFX TOC expand/collapse state for a sliding 48h…
Nucs Sep 14, 2026
89b719d
fix(site): never restore a TOC collapse onto the active page's branch
Nucs Sep 14, 2026
90b75fd
fix(site): persist a TOC toggle on the same click, not a later frame
Nucs Sep 14, 2026
7cabac1
feat(ma): byte-exact masked str/repr + masked_print_option + last ins…
Nucs Sep 14, 2026
fcdacd2
perf(reduce): SIMD widening flat Sum for int32→int64 / uint32→uint64
Nucs Sep 14, 2026
1d82eac
fix(ma): scalar-strong binary promotion + copy/choose/product instanc…
Nucs Sep 14, 2026
79e148c
docs(ma): correct instance-member count via a re-verified surface dif…
Nucs Sep 15, 2026
0c5d72c
fix(core+ma): arctan2(complex) crash, ma shift dtype regression, ma m…
Nucs Sep 16, 2026
77e419b
feat(examples): Unity gravity-sandbox game with a NumSharp-backed N-b…
Nucs Sep 16, 2026
2b67f29
feat(examples): falling-sand powder game on a NumSharp mass-conservin…
Nucs Sep 17, 2026
6847cd7
feat(examples): standalone terminal Player to launch the falling-sand…
Nucs Sep 17, 2026
25e8536
feat(examples/fallingsand): high-resolution 1000x500 — Unity default …
Nucs Sep 17, 2026
02da9dd
docs(examples): add RUNDOWN.md summarizing the two NumSharp physics g…
Nucs Sep 17, 2026
d837ded
feat(examples/fallingsand): templates via icons, brushes + size/shape…
Nucs Sep 17, 2026
0d57514
docs(examples): RUNDOWN — record the falling-sand fun pass (templates…
Nucs Sep 17, 2026
846f53a
test(oracle): add complex128 coverage to out_where, aliasing, meshgrid
Nucs Sep 18, 2026
ff7283f
test(oracle): complex128 pair-iteration coverage (nditer_pair, np.bro…
Nucs Sep 18, 2026
35dd5eb
test(oracle): expand Decimal differential coverage to the full decima…
Nucs Sep 18, 2026
d41eb4a
feat(out/where): expose min/max out=/where=, extend the oracle, fix K…
Nucs Sep 18, 2026
cfc149d
test(out/where): strengthen the family-smoke assertions from one elem…
Nucs Sep 18, 2026
db4ab83
fix(indexing): boolean PARTIAL-mask selection OWNS its result (owndat…
Nucs Sep 18, 2026
60024b4
fix(exceptions): raise NumPy's ValueError (not NumSharpException) for…
Nucs Sep 18, 2026
6cf21af
feat(collections): OrderedDict — lean lock-free insertion-ordered ind…
Nucs Sep 18, 2026
cf511e2
feat(collections): ConcurrentPointingDict — experimental "pointing" v…
Nucs Sep 18, 2026
b14ff3a
test(oracle): commit the np.ma masked-array differential corpus + clo…
Nucs Sep 18, 2026
ae43ba1
fix(math): complex-input rejection raises NumPy's exact TypeError for…
Nucs Sep 18, 2026
3ad4360
fix(exceptions): IncorrectTypeException derives from TypeError so ufu…
Nucs Sep 18, 2026
59f9932
feat(out/where): the last three ufunc gaps — left_shift/right_shift, …
Nucs Sep 18, 2026
e7f7384
test(oracle): np.ma corpus pass 2 — deeper assertions (edge layouts +…
Nucs Sep 18, 2026
3ceb6fa
test(oracle): coverage-expansion plan P0-P3 executed — instance/emath…
Nucs Sep 18, 2026
d35955a
test(oracle): dtype-spread validation — scan all oracles against NumS…
Nucs Sep 18, 2026
e3d5b77
docs(collections): propose ConcurrentOrderedDictionary for System.Col…
Nucs Sep 18, 2026
13b7e0d
Expand coverage inventory and dashboard scopes
Nucs Sep 18, 2026
2df6bf7
Update .gitignore
Nucs Sep 18, 2026
9a2d388
build(submodule): add SciSharp/TensorSharp2 reference at refs/TensorS…
Nucs Sep 18, 2026
abc0235
feat(indices): make np.indices/indices_sparse long-friendly (int[]/lo…
Nucs Sep 18, 2026
4bfcde5
docs: modernize C# array literals to collection expressions `[]` / tu…
Nucs Sep 18, 2026
8a8318f
test(indices): .NET-friendliness tests + docfx example coverage; fix …
Nucs Sep 18, 2026
6a88d55
docs: reorganize navigation and honor TOC expansion defaults
Nucs Sep 18, 2026
6c190f1
Update main.js
Nucs Sep 18, 2026
b779d95
docs: normalize em-dashes to hyphens across docfx content
Nucs Sep 18, 2026
2ea7ba6
refactor(ma): rename MaskedArray -> NDMaskedArray (ND* convention); n…
Nucs Sep 23, 2026
5635182
refactor(collections): *Dict -> *Dictionary rename completed, Concurr…
Nucs Sep 23, 2026
4499d3e
docs(collections): double-pass follow-ups to 5635182d - clone deviati…
Nucs Sep 23, 2026
b7d9093
fix(ci): PR #631 green on all three OSes: argsort heap overrun, ARM64…
Nucs Sep 23, 2026
fe756f9
test(collections): prove 10 open bugs in OrderedDictionary + Concurre…
Nucs Sep 23, 2026
035f24f
docs(collections): handover to revalidate and fix the 10 pinned order…
Nucs Sep 23, 2026
6ee94ae
fix(ci): PR #631 macOS arm64 residue: NumPy's arm64 wheel fuses legac…
Nucs Sep 23, 2026
33a4d2c
ci(interop): pin live NumPy's CPU dispatch below AVX-512 on the ubunt…
Nucs Sep 23, 2026
5f2821d
ci(interop): log the runner's vector ISA next to NumPy's effective di…
Nucs Sep 23, 2026
256224d
docs(interop): ONNX Runtime gap review - 13 probe-verified findings (…
Nucs Sep 23, 2026
8df2598
wip(oracle): leak-audit coverage completion - inventory cross-referen…
Nucs Sep 23, 2026
dc32aec
fix(collections): OrderedDictionary - no lost updates (full fences), …
Nucs Sep 23, 2026
c3ebaed
fix(collections): ConcurrentOrderedDictionary removals are comparer-e…
Nucs Sep 23, 2026
4539456
wip(oracle): leak-audit session 2 - catalogue + property/field read g…
Nucs Sep 23, 2026
b1a8211
fix(fuzz-soak): keep host-defined complex results out of the recomput…
Nucs Sep 23, 2026
45c7913
fix(ci): OpenBLAS verify scripts read captures via here-strings; `ech…
Nucs Sep 23, 2026
77b967d
fix(leaks): leak-audit completion - np.ma hand scopes, histogram [NDS…
Nucs Sep 23, 2026
2180151
Merge branch 'leak-audit-completion' into journey4
Nucs Sep 23, 2026
2adf21d
ci(signing): fold verify-signing into the `test` job's ubuntu leg; th…
Nucs Sep 23, 2026
bed56ee
ci(fuzz-soak): 1 fixed + 9 fresh random seeds (was 5 + 5); the split …
Nucs Sep 23, 2026
f12a03f
ci(interop): fold package-consumer-smoke into the interop-test job as…
Nucs Sep 23, 2026
3ef6b0e
ci(interop): fold the ONNX Runtime and ML.NET suites into interop-tes…
Nucs Sep 23, 2026
fe30edf
fix(complex): np.abs(complex128) is NumPy's FUSED simd_cabsolute (was…
Nucs Sep 23, 2026
54bb26d
perf(casting): ToMuliDimArray<T> copies in one pass - SIMD strided/tr…
Nucs Sep 23, 2026
cc8d56c
test(interop): arm64 NumPy fuses pocketfft's multiply-adds - rfft and…
Nucs Sep 23, 2026
9019f9d
docs(fft): arm64 NumPy's pocketfft contraction PROVEN byte for byte (…
Nucs Sep 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
269 changes: 254 additions & 15 deletions .claude/CLAUDE.md

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions .claude/skills/oracle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ in `test/NumSharp.Tests.Oracle/Fuzz/`. (Two *sibling* oracles — flags & layout
| Harness | `test/NumSharp.Tests.Oracle/Fuzz/{BitDiff,Shrinker}.cs` | Bit-exact compare (NaN tokenized *except* the contractual complex-unary NaN sign; Decimal by value) / shrink to 1 element. |
| Harness | `test/NumSharp.Tests.Oracle/Fuzz/MisalignedRegistry.cs` | The excused, documented divergences (`Classify(...)` → reason string). |
| Harness | `test/NumSharp.Tests.Oracle/Fuzz/{OracleSurfaceCoverageTests,OracleCoverageStrengthTests,Journey3TouchedOracleCoverageTests}.cs` | Coverage gates: public-surface inventory / ≥4-cases-per-op / 186 journey3 callables. |
| Harness | `test/NumSharp.Tests.Oracle/Fuzz/{UndisposedIntermediateTests,NativeAllocationChokepointTests,ScopeAudit}.cs` | **Oracle-FREE leak gates that replay the same corpus through `OpRegistry`** — buffer-pool balance + raw-alloc chokepoint. Adding an op enters these too (see gotchas). |
| Harness | `test/NumSharp.Tests.Oracle/Fuzz/{UndisposedIntermediateTests{,.Families,.Backend,.Catalogue,.Properties},NativeAllocationChokepointTests,ScopeAudit}.cs` | **Oracle-FREE leak gates that replay the same corpus through `OpRegistry`** — buffer-pool balance over the ordinary/masked/index tiers + every error path, a backend (OpenBLAS) pass, a direct catalogue, a property/field read gate, and the raw-alloc chokepoint. Adding an op enters these too (see gotchas). |
| Harness | `test/NumSharp.Tests.Oracle/Fuzz/{LeakSurfaceCoverageTests,LeakCatalogue{,.NDArray,.Masked}}.cs` | The leak COMPLETENESS gate (every public member — ApiInventory modules, operators, object surfaces — must be leak-MEASURED somewhere) + the catalogue of direct invocations for members no corpus row reaches. |
| Harness | `test/NumSharp.Tests.Oracle/Fuzz/{BlasBackendDeltaTests,MatmulParityPin,BlasEngineAutoInstallGuard}.cs` | Managed/OpenBLAS two-pass delta + the host-pin (BLAS-off by default). |
| Corpus | `test/NumSharp.Tests.Oracle/Fuzz/corpus/**/*.jsonl` | The committed corpus (**~118K rows across 68 files** at 2026-09; grows per regeneration). The csproj glob `Fuzz\corpus\**\*.jsonl` copies it — incl. any `regressions/` — to test output. |

Expand All @@ -71,7 +72,14 @@ in `test/NumSharp.Tests.Oracle/Fuzz/`. (Two *sibling* oracles — flags & layout
≥1 changing axis; all 186 journey3-touched callables have a direct case. A new unclassified API fails here.
- **`UndisposedIntermediateTests` / `NativeAllocationChokepointTests`** — **oracle-free leak gates** that reuse the
corpus + `OpRegistry` to assert the buffer pool balances (zero-leak) and that no raw native-alloc site escapes the
chokepoint allowlist. (`ScopeAudit`/`[TestCategory("ScopeAudit")]` is the shared pool-counter harness.)
chokepoint allowlist. (`ScopeAudit`/`[TestCategory("ScopeAudit")]` is the shared pool-counter harness.) Four
shared, run-once measurements: the corpus sweep (ordinary + `ma_*` + `index_*` tiers, success AND error paths), the
backend pass (ordinary tiers with OpenBLAS threads=1; `Inconclusive` without a library), the `LeakCatalogue`
(direct invocations, harness-error on an entry that cannot run) and the property/field read gate.
- **`LeakSurfaceCoverageTests`** — the leak COMPLETENESS gate: every member of the public surface (ApiInventory
`[ModuleName]` modules, the operators of the array types and of `DType`/`NDArrayFlags`/`poly1d`, the object
surfaces) must be credited by a MEASUREMENT of one of the four runs — declared-but-unmeasured never counts. **A new
public API fails here until it gains corpus rows or a catalogue entry.**
- **`BlasBackendDeltaTests`** — replays only the ~1.7K BLAS-affected ordinary cases twice (managed vs OpenBLAS),
deduplicates identical outcomes, byte-checks the real flips against NumPy on the pinned host.
- **`MetamorphicTests`** — NumPy-free invariants (round-trips / involutions), no oracle needed.
Expand Down Expand Up @@ -164,6 +172,11 @@ is in **`references/add-op.md`** — read it when adding an op. In brief:
Fix the leak (`[NDScoped]`/dispose the intermediate), don't add a `KnownEscapes` entry. `NativeAllocationChokepointTests`
separately fails if your op adds a raw `NativeMemory.*`/`Marshal.AllocHGlobal` site outside the chokepoint allowlist —
route scratch through the pools.
- **Adding ANY public member enters the leak COMPLETENESS gate.** `LeakSurfaceCoverageTests` fails on a public
method/operator/indexer that no run measured. Corpus rows credit it automatically (success path); a member no
corpus row reaches needs an `E(...)` entry in `LeakCatalogue*.cs` (`T(...)` for one that always raises; `backend: true`
for LAPACK-only). A new property is read automatically unless its owner needs a read target (`ReadTargetsFor`); a new
operator on an object type also needs the type in `LeakSurface.OperatorOwners` (the gate names it if missing).
- **Some tiers go `Inconclusive` off-Windows, not red.** `unary/nan/precision/fft/numpy_f32_kernels` (via
`RunHostLibmCorpus`) and the host-pinned `matmul_parity`/`random_parity_host`/`generator_parity_host` record bytes
reproducible only on win-amd64 (CRT libm, SIMD widths, the exact BLAS build). Off-Windows they assert `Inconclusive`,
Expand Down
3 changes: 2 additions & 1 deletion .claude/skills/oracle/references/add-op.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ If a case is red, go to `references/triage.md`.
> through `OpRegistry` and asserts the buffer pool balances — the `KnownEscapes` registry is empty, so if your op
> strands a pooled intermediate it goes red **even with bit-exact values**. Run `FullyQualifiedName~UndisposedIntermediateTests`
> too, and fix any leak in the op (dispose the intermediate / `[NDScoped]`) rather than allowlisting it. See
> `references/triage.md` → "A red that is NOT a value divergence".
> `references/triage.md` → "A red that is NOT a value divergence". Its corpus rows also credit the new public member
> in the leak COMPLETENESS gate (`LeakSurfaceCoverageTests`); an API with no corpus route needs a `LeakCatalogue` entry.

## 6. What you do NOT need to do

Expand Down
21 changes: 18 additions & 3 deletions .claude/skills/oracle/references/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,21 @@ The op corpus + `OpRegistry` are reused for a DIFFERENT claim — no NumPy refer
every result disposed and asserts the buffer pool's takes==returns. A surplus take is an undisposed intermediate; a
surplus return is an out-of-pool result buffer. The `KnownEscapes` registry is now **EMPTY** — every op is gated at
ZERO — so an op that leaks a pooled buffer fails here even when its values are bit-exact. `[DoNotParallelize]`
(reads process-global pool counters, shared with `ScopeAudit.cs`).
(reads process-global pool counters, shared with `ScopeAudit.cs`). Three corpus FAMILIES are replayed —
ordinary op tiers, masked-array tiers (`ma_*`, `.Families.cs`) and index tiers (`index_*`) — each on its success
AND error paths (a NumPy-raising case must throw without stranding a buffer). Floors sit 5% under the measured
counts (2026-09-23: 213,264 success + 9,123 error paths, identical net10.0/net8.0).
- `UndisposedIntermediateTests.Backend.cs` — the same ordinary tiers with OpenBLAS installed (threads=1): the LAPACK
family (NSE without a backend), the BLAS seams, the Interop glue. `Inconclusive` where no library loads.
- `UndisposedIntermediateTests.Catalogue.cs` + `LeakCatalogue{,.NDArray,.Masked}.cs` — direct invocations of every
public member NO corpus row reaches (np.* conveniences, Array-API linalg forms, ndarray/`NDArray<T>`/`NDMaskedArray`
methods, all operators, object surfaces + indexers), measured with the same protocol against a shared
`LeakFixture`. `T(...)` = always raises (error path); an entry that cannot run is a harness error (red).
- `UndisposedIntermediateTests.Properties.cs` — every public property/field read (settable ones round-trip written)
on targets built INSIDE the measured region, so a getter caching an allocation on its owner is caught.
- `LeakSurfaceCoverageTests.cs` — the COMPLETENESS gate: every `LeakSurface` member (ApiInventory modules + operators
+ object surfaces, 1,348 members) must be credited by a MEASUREMENT of one of the four runs above. Declared but
unmeasured never counts; GC-inconclusive counts (never red); backend-skipped counts only where no library loads.
- `NativeAllocationChokepointTests.cs` — the STATIC complement: every raw `NativeMemory.*` / `Marshal.AllocHGlobal` /
`VirtualAlloc*` site in `NumSharp.Core` must be a known chokepoint (allowlist pins file → site count). A new raw
allocation fails until it is routed through the pools or consciously allowlisted. Needs the source tree
Expand All @@ -145,8 +159,9 @@ The op corpus + `OpRegistry` are reused for a DIFFERENT claim — no NumPy refer
- `OpenBugs.FuzzGate.cs` — `MisalignedRegistryTightnessTests` (each excuse branch pinned from both sides — a gross
regression in the neighbouring cell must NOT be excused) + `FuzzGateRegressionTests` (real bugs the tightening
exposed, fixed-in-src or pinned `[OpenBugs]`).
- `fuzz_random.py` — the nightly-soak seeded fuzzer (`.github/workflows/fuzz-soak.yml`), ~1M fresh cases/night;
shrunk failures get pinned under `Fuzz/corpus/regressions/`.
- `fuzz_random.py` — the nightly-soak seeded fuzzer (`.github/workflows/fuzz-soak.yml`): one fixed seed (a
deterministic canary) + nine fresh random seeds × 200K cases, ~1.8M fresh cases/night; shrunk failures get
pinned under `Fuzz/corpus/regressions/`.

## Where the corpus lives and how it reaches tests

Expand Down
9 changes: 9 additions & 0 deletions .claude/skills/oracle/references/triage.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ names the op and the take/return imbalance, not a byte diff. Fix the leak in the
`[NDScoped]`), never add a `KnownEscapes` entry. `NativeAllocationChokepointTests` is the static twin: a new raw
`NativeMemory.*`/`Marshal.AllocHGlobal` site fails until pooled or allowlisted.

Two more `ScopeAudit` reds, neither a value divergence:
- **`EveryInventoryMember_IsLeakAudited`: "N surface members are not leak-audited".** A public member no run
measured. Give it corpus rows, or an `E(...)` entry in `LeakCatalogue*.cs` (see the SKILL.md gotcha). The message
says when an entry is DECLARED but never ran — that is the next item, not a missing entry.
- **`Catalogue_EveryEntry_…`: "catalogue entries could not run".** An entry's warm invocation threw (fix its
arguments), or a `T(...)` entry started returning (the member now succeeds — make it an ordinary `E(...)`). An
entry's own lifetime bugs read as escapes too: return every array the entry owns (the harness disposes results) and
never return a fixture array or a member's OWN field (report its size instead).

## Ledger

The complete, human-readable divergence ledger is `test/NumSharp.Tests.Oracle/Fuzz/README.md`. Keep it and
Expand Down
7 changes: 7 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ e6fd25438ba488038494c60a2333b2850501ff64
# (submodule git mv + BCL-snapshot R100 renames) + rewrite all path references
# across docs/code. Mechanical, no logic change.
1e7a0c86c313b4913833bbe2f46517a352d08bcd

# Rename the ordered concurrent maps *Dict -> *Dictionary (ConcurrentOrderedDictionary,
# ConcurrentOrderedCompactDictionary, OrderedDictionary) + their tests/benchmark/probes/ledger
# references, and delete the experimental ConcurrentPointingDict. Mechanical rename, no logic
# change. Caveat: git re-attributes this commit's few genuinely NEW doc lines (e.g. the proposal's
# naming note) to neighbouring older lines; `git blame --no-ignore-revs-file` shows their true origin.
5635182d1df03bfb6c3e46a0b077593641f6eb6e
Loading
Loading