Skip to content

[fix] preserve NaN-keyed map values and cycles (SLT-22) - #87

Closed
vt128 wants to merge 4 commits into
codex/fix-collection-pointers-20261107from
codex/slt-22-paired-map-entries-20261107
Closed

vt128 wants to merge 4 commits into
codex/fix-collection-pointers-20261107from
codex/slt-22-paired-map-entries-20261107

Conversation

@vt128

@vt128 vt128 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

NaN-keyed Go map entries could lose their original values during materialization, and a NaN key could hide a reference cycle from String safety checks. Capture key/value pairs with MapRange, keep deterministic ordering, and use the paired values for conversion and cycle detection. When distinct Go NaN keys collide under the fixed Starlark interpreter's equality rules, MakeDict returns an error instead of dropping data. Get/Delete equality semantics are unchanged.

Current branch maintenance: rebased onto the documentation changes on master cd5f885d (with the existing parent stack). All 25 comment-free Go ASTs/compiler directives, 17 test files and module files match the prior candidate. Fresh Go 1.27.3 / Go 1.19.13 build, race tests twice and vet pass; the normal commit hook passes. The old Go formatter has one pre-existing test-layout difference, retained without changing tests. Prior coverage/downstream/performance receipts retain their original heads. This maintenance does not resolve the performance HOLD; keep Draft and require fresh cloud gates.

Regression tests stay in the existing thematic files. They cover scalar/composite NaN keys, original paired values, script items/values, repeated-NaN conversion errors, self-reference and bounded-child/parent coverage. This PR stacks on the optimized #86; its runtime/module files and 231 regular test/example/fuzz function bodies match the verified combined candidate. Forty persistent benchmarks remain inherited from #86.

Retained historical runtime evidence (original source labels preserved): the combined candidate passes host Go 1.27.3 and offline Go 1.19.13 build/vet/full race tests twice. Relative to the verified #86 tree, total statement coverage rises from 1296/1398 (92.703863%) to 1312/1411 (92.983700%) on both compilers. All changed-production-line-intersecting blocks are hit: host 19 blocks/32 statements, floor 20 blocks/36 statements. Its 80 active downstream legs plus four archived diagnostic legs pass with identical paired package coverage. These are statement/block measurements, not branch-edge coverage.

Performance gate: HOLD together with #86. The L1 host40/floor14 set has no Holm-significant time regression, but integrated Starlet Call/Print1x4096/CustomHandler retains a positive timing signal: initial paired +5.6897%, Holm .0498; longer same-binary 12-pair × 1-second confirmation paired +3.704%, 95% paired-bootstrap interval [+0.278%, +9.203%], Holm .168, with unchanged target B/op/allocations. The longer result does not establish equivalence. Raw results and the adjacent-control outlier are retained; no unproven claim of zero performance loss is made.

Refs SLT-22. Keep Draft until the performance gate is resolved. Some required checks may be withheld for a stacked base branch; absent checks are not passes. This rebased head needs fresh exact-head cloud gates; old-head green checks are not reused. No floor, interpreter pin or module change. No tag or release.

Superseded by combined collection-safety PR #94, merged as a7a2ede after all required checks, scoped safety-cost acceptance and downstream verification. This historical PR is closed without merging because its complete change is delivered by #94. Original source heads, performance measurements and earlier validation failures remain preserved.

@codacy-production

codacy-production Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@vt128
vt128 force-pushed the codex/slt-22-paired-map-entries-20261107 branch from 50a1a46 to 5534c34 Compare November 7, 2026 04:47
@vt128
vt128 force-pushed the codex/fix-collection-pointers-20261107 branch from 2da39ac to 7076099 Compare November 7, 2026 08:45
@vt128
vt128 changed the base branch from codex/fix-collection-pointers-20261107 to master November 7, 2026 08:46
@vt128
vt128 changed the base branch from master to codex/fix-collection-pointers-20261107 November 7, 2026 09:37
@vt128
vt128 force-pushed the codex/slt-22-paired-map-entries-20261107 branch from 5534c34 to 7d93576 Compare November 7, 2026 09:39
@vt128
vt128 force-pushed the codex/fix-collection-pointers-20261107 branch from 7076099 to 0d309e9 Compare November 7, 2026 15:03
@vt128
vt128 force-pushed the codex/slt-22-paired-map-entries-20261107 branch from 7d93576 to da33986 Compare November 7, 2026 15:03
@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.48%. Comparing base (500a12c) to head (711421f).

Additional details and impacted files
@@                            Coverage Diff                             @@
##           codex/fix-collection-pointers-20261107      #87      +/-   ##
==========================================================================
+ Coverage                                   93.19%   93.48%   +0.29%     
==========================================================================
  Files                                           8        8              
  Lines                                        1734     1751      +17     
==========================================================================
+ Hits                                         1616     1637      +21     
+ Misses                                        117      113       -4     
  Partials                                        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vt128
vt128 force-pushed the codex/slt-22-paired-map-entries-20261107 branch from da33986 to 711421f Compare November 9, 2026 15:08
@vt128
vt128 force-pushed the codex/fix-collection-pointers-20261107 branch 2 times, most recently from 500a12c to b7c0f45 Compare November 10, 2026 03:27
@vt128 vt128 closed this Nov 12, 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