Skip to content

test(ets): cover separately built map and numeric keys - #87

Merged
mremond merged 1 commit into
mainfrom
infinitary-batch/3ea0b8cb
Nov 24, 2026
Merged

mremond merged 1 commit into
mainfrom
infinitary-batch/3ea0b8cb

Conversation

@mremond

@mremond mremond commented Nov 24, 2026

Copy link
Copy Markdown
Member

Why

ETS once missed rows when a program looked them up with an equal map, float, or big integer built separately.

What changed

  • This change only adds a test; it does not change how ETS works.
  • The test inserts a row, rebuilds its key, and checks that native Nera and BEAM both find the row.

Before and after

Before: The original native probe missed five equal keys; the earlier closure-equality fix restored all five.

After: One test now checks 24 hits and 24 misses across set, bag, and duplicate_bag tables on both runtimes.

There is no screen change; the lookup results are recorded as text.

Checked

Live validation: Demonstrated for this version. 2 of 2 scenarios driven live in the product.

Scenario Result Evidence
Look up equal and distinct keys in all three table types. ✅ Passed live Across 12 cases, native Nera found the row for every equal key and missed every distinct key.
Repeat the same lookups on BEAM. ✅ Passed live OTP 29 returned exactly the same results as native Nera.
  • Original native lookup probe: All five previously missed keys found their entries.
  • Repeated fixture runs: Ten passes each on default native schedulers, one native scheduler, and OTP 29.
  • Local project gate: 2,256 Rust and 544 Erlang tests passed; two Erlang tests needed external modules.
  • Changelog review: The earlier fix is under closure equality; the changelog stays unchanged because this change only adds coverage.
How it was checked

Built the release compiler and runtime; ran strict lint, the workspace tests, the allocator check, the native fixture suite, and the stack trace check.

Compiled the regression on OTP 29 with warnings treated as errors.

Risk

Risk: low in every dimension.

Full risk assessment
Dimension Level Why
Blast radius low One end-to-end fixture and one test inventory entry.
Behavior low No change to runtime behavior.
Undo low Reverting removes only the fixture and its inventory entry.
Evidence low Matching native and BEAM results, repeated fixture runs and a passing project gate.
Sensitivity low The fixture uses anonymous, in-memory tables.
Novelty low Uses the existing Erlang fixture runner.
Dependencies low No packages added or updated.

This change only adds a test; it does not change how ETS works.

The test inserts a row, rebuilds its key, and checks that native Nera and BEAM both find the row.
@mremond
mremond merged commit bc55086 into main Nov 24, 2026
2 checks passed
@mremond
mremond deleted the infinitary-batch/3ea0b8cb branch November 24, 2026 09:09
@github-actions github-actions Bot added this to the 0.1.1 milestone Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant