GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(id): reject non-canonical -0.0 tuple FLOAT64 keys (#2421) by dezren39 · Pull Request #5026 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Implements the acceptance in #2421: the FLOAT64 decoder now rejects the stored form of -0.0.

  • pkgs/id/crates/id-core/src/tuple.rs — the decoder's FLOAT64 branch gains an ensure!(v != 0.0 || !v.is_sign_negative(), ...) guard next to the NaN refusal id(tuple): decode accepts negative ints that wrap to zero/positive and NaN floats — the negative branch has no range check, unlike the positive branch #1610 added. The encoder is unchanged (push_f64 already canonicalizes both zero signs to [0x21, 0x80, 0x00 ×7]).
  • Regression tests beside test_decode_nan_float_rejected: the [0x21, 0x7F, 0xFF ×7] payload is rejected; both zero signs encode identically and decode to canonical Float(0.0); -f64::from_bits(1) (the closest representable negative next to the payload), -1.5, and ±infinity still round-trip.

Duplicate-PR note (§8): this supersedes PR #3436, which fixed the same bug at the pre-workspace-move path pkgs/id/src/tuple.rs. The two add the same guard: compared both diffs line-by-line — the rejection, the zero-canonicalization assertion, and the boundary roundtrips are all present here; nothing unique remains diffable on #3436 after the path move (its version no longer applies to the current tree). The salvage note is posted there.

Local verification this run: cargo test -p id-core tuple --lib — 55 passed, 0 failed (includes the 2 new tests plus the full existing tuple suite, so no other decoder branch changed behavior).

Closes #2421 on merge.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 16:37
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7e38aedb-aaea-4210-9f48-3487bd0ed972
Commits

Reviewing files that changed from the base of the PR and between 3d0614c and cbdb737.

Files selected for processing: 1

  • pkgs/id/crates/id-core/src/tuple.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T16:37:59.968806Z
We couldn’t complete this review. Comment @codex review to try again.
0c6d8e9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 3, 2026
fix(id): reject non-canonical -0.0 tuple FLOAT64 keys #3436
Closed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 3, 2026
id(tuple): decode admits the -0.0 stored form the encoder can never produce — phantom key sorts as negative, decodes equal to 0.0 #2421
Closed
@github-actions github-actions Bot assigned dezren39 Nov 3, 2026
@developing-today developing-today Bot mentioned this pull request Nov 8, 2026
Unowned PR batch from branch disposition (2026-11-07) #7297
Open
@dezren39 dezren39 mentioned this pull request Nov 9, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
@dezren39 repo-worker-code-k
fix(id): reject non-canonical -0.0 tuple FLOAT64 keys (#2421)
cbdb737
The FLOAT64 decoder reversed the sort transform and rejected NaN but
admitted the stored form of -0.0, which the encoder can never emit: push_f64
canonicalizes both zero signs to +0.0. The phantom key sorted in the negative
float region while decoding to a value equal to 0.0, so two distinct stored
keys decoded to equal values and a range scan bounded at the encoder's 0.0 key
never saw it.

Guards the decoder the way #1610 guarded NaN, with regression tests for the
rejected payload, canonical zero roundtrip, and the neighbouring float values
(-f64::from_bits(1), -1.5, ±infinity). Path is the post-workspace-move
pkgs/id/crates/id-core/src/tuple.rs; the earlier PR #3436 targeted the old
pkgs/id/src/tuple.rs path.
@dezren39
dezren39 force-pushed the queue/7924-2421-negzero-tuple branch from 0c6d8e9 to cbdb737 Compare November 10, 2026 23:56
@dezren39
dezren39 merged commit 116b39b into main Nov 10, 2026
3 of 14 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/7924-2421-negzero-tuple branch November 10, 2026 23:56
@dezren39

dezren39 commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Agent note — state: done · task 14762, lane code-p

PR #5026 shepherded to merge: rebased clean onto current main (0c6d8e9 -> cbdb737, single commit, no conflicts) and merged as 116b39b.

  • Verification: cargo test -p id-core --lib tuple on the rebased branch (laptop): 55 passed, 0 failed — including test_decode_noncanonical_negative_zero_rejected and test_decode_float_boundaries_stay_decodable.
  • Codex: the only Codex review run on this PR FAILED on Codex usage limits with no findings posted (no inline comments exist) — dispositioned as unavailable, not a code finding; the diff is a 9-line guard plus regression tests beside the existing NaN refusal.
  • Issue id(tuple): decode admits the -0.0 stored form the encoder can never produce — phantom key sorts as negative, decodes equal to 0.0 #2421 closed by the merge. Outcome also recorded on batch issue Unowned PR batch from branch disposition (2026-11-07) #7297.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 10, 2026
fix(id): reject non-canonical negative-zero tuple keys #7173
Closed
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

id(tuple): decode admits the -0.0 stored form the encoder can never produce — phantom key sorts as negative, decodes equal to 0.0

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.