Skip to content

[fix] reject non-reflexive map mutation success (SLT-23) - #88

Closed
vt128 wants to merge 1 commit into
codex/slt-22-paired-map-entries-20261107from
codex/slt-23-nan-mutation-errors-20261107
Closed

vt128 wants to merge 1 commit into
codex/slt-22-paired-map-entries-20261107from
codex/slt-23-nan-mutation-errors-20261107

Conversation

@vt128

@vt128 vt128 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

GoMap.Clear and popitem could report success while leaving non-reflexive NaN-like keys unchanged. Clear now checks every key before mutating the host map, and popitem validates the lookup before deletion. Unsupported mutation returns an error while preserving the host map; ordinary keys retain their existing behavior.

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.

The fix remains a separate SLT-23 commit stacked on #87, rebased over the current #85/#86/#87 implementation and persistent benchmark set. Existing key tests cover float/interface/composite keys, atomic failure, successful ordinary-key mutation and the script-visible errors. The original host/floor regression evidence keeps its original source labels. The current rebased source passes the original formatting/vet/test hook and full host/floor build and race tests twice. The final accepted compatibility matrix deliberately excludes this PR.

Performance gate: HOLD. The ordinary-key preflight adds measurable Clear cost. Multiple bounded prototypes have not met the retained Go 1.19 performance requirement; the prototypes and adverse samples are retained rather than replacing this reviewed implementation with an unproven variant. In addition, the parent #86/#87 integrated Starlet timing gate remains unresolved. Keep this PR Draft; successful functional or cloud checks alone do not authorize a merge.

Refs SLT-23. No Go floor or interpreter pin change. No merge, 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

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 300 complexity · 15 duplication

Metric Results
Complexity 300
Duplication 15

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.13% coverage variation

Metric Results
Coverage variation ✅ +0.13% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (711421f) 2263 2078 91.83%
Head commit (2e67b5a) 2275 (+12) 2092 (+14) 91.96% (+0.13%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#88) 14 14 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

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/slt-23-nan-mutation-errors-20261107 branch from 49b5d04 to cefae1b Compare November 7, 2026 04:47
@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/slt-23-nan-mutation-errors-20261107 branch from cefae1b to 2cb3628 Compare November 7, 2026 09:39
@vt128
vt128 force-pushed the codex/slt-22-paired-map-entries-20261107 branch from 7d93576 to da33986 Compare November 7, 2026 15:03
@vt128
vt128 force-pushed the codex/slt-23-nan-mutation-errors-20261107 branch from 2cb3628 to 975a254 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.57%. Comparing base (711421f) to head (2e67b5a).

Additional details and impacted files
@@                             Coverage Diff                              @@
##           codex/slt-22-paired-map-entries-20261107      #88      +/-   ##
============================================================================
+ Coverage                                     93.48%   93.57%   +0.08%     
============================================================================
  Files                                             8        8              
  Lines                                          1751     1758       +7     
============================================================================
+ Hits                                           1637     1645       +8     
+ Misses                                          113      112       -1     
  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/slt-23-nan-mutation-errors-20261107 branch from 975a254 to 2e67b5a Compare November 9, 2026 15:08
@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