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 — id(world): parse_records refuses duplicate JSON keys (#6473) by dezren39 · Pull Request #6561 · developing-today/code

Conversation

@dezren39

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

Uh oh!

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

Copy link
Copy Markdown
Member

Fixes #6473 — Phase 1 of #6520.

What

  • Promote parse_json_without_duplicate_keys from pkgs/id/src/world_session/mod.rs into one shared home in id-core (pkgs/id/crates/id-core/src/json_unique.rs), per design Design: a duplicate key is a parse error — one duplicate-key refusal contract for pkgs/id's checked JSON gates #6520 point 3. world_session now re-exports it (pub(crate) use), so its landed id(world_session): first-frame and joined-frame parsers collapse duplicate JSON keys before their checks — a hidden first type/world/capability value is never seen, and the sibling session paths reject the same bytes #6501 behaviour is unchanged.
  • world::parse_records now parses through the shared helper and converts the resulting object, so the MAX_RECORDS count, MAX_RECORD_VALUE_BYTES size cap, and key checks all run on the document as written — a duplicate key is a parse error naming the repeated key, at every depth.

Tests (oracle: the written document)

  • New world::tests::records_refuse_duplicate_keys: top-level, nested, and in-array duplicates refused with the key named; oversized value hidden behind a small duplicate refused; 4097 raw entries collapsing to 4096 distinct keys refused; distinct-key input parses identically.
  • New id_core::json_unique unit tests for the promoted helper (distinct keys parse as before; duplicates refused at every depth).
  • Existing record_keys_and_sizes_are_bounded and the world_session duplicate-key tests exercise the same seams.

Queue: task 11202 (repo-health-code-pilot).


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.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
developing-today[bot]
id(world): parse_records refuses duplicate JSON keys (#6473)
18ccc46
Promote parse_json_without_duplicate_keys from world_session into a
shared id-core module (json_unique) per design #6520, and route
world::parse_records through it so MAX_RECORDS and
MAX_RECORD_VALUE_BYTES are checked against the document as written,
not a last-wins collapse. Regression tests pin the top-level, nested,
in-array, oversized-hidden-value, and count-collapse shapes.

Task 11202 (repo-health-code-pilot).
@dezren39
dezren39 requested a review from a team as a code owner November 6, 2026 16:30
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

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 11 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: 35a0566b-b00b-460b-9526-016cd5583a4f
Commits

Reviewing files that changed from the base of the PR and between d54934a and 18ccc46.

Files selected for processing: 5

  • pkgs/id/crates/id-core/src/json_unique.rs
  • pkgs/id/crates/id-core/src/lib.rs
  • pkgs/id/src/world/mod.rs
  • pkgs/id/src/world/tests.rs
  • pkgs/id/src/world_session/mod.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 6, 2026 •
edited
Loading

Uh oh!

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

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 ✅ Completed 2026-11-06T16:32:33.937639Z 18ccc46 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 commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · verification status (task 11202, lane code-a)

  • cargo test -p id-core json_unique on the laptop: pass (2/2, including duplicate-refusal at every depth).
  • cargo test -p id --lib records on the laptop: cannot build — pre-existing failure on clean main, proven by stashing this branch's changes and re-running: cargo check -p id --tests and cargo check -p id at base 9c06d0c8a4 fail with the same two E0277 errors in src/world_net.rs:658 and src/world_net.rs:1621 (str vs String comparisons in RecordsBudget::validate_record and the records-cursor check). Neither error is in this PR's files; this PR's code type-checks (no other errors emitted). The world records tests in this PR therefore await CI / a fix for the pre-existing world_net build break, which is out of this task's scope.
All reactions

Sorry, something went wrong.

Uh oh!

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

This was referenced Nov 6, 2026
id(world): parse_records silently collapses duplicate JSON keys — an oversized value hidden behind a duplicate passes MAX_RECORD_VALUE_BYTES, and the record-count cap is checked after collapse #6473
Closed
id(world_net): str vs String comparisons (E0277) break cargo check -p id on main #6567
Closed
@dezren39

dezren39 commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

Update: the pre-existing world_net.rs E0277 build break described above is now tracked as issue #6567 (filed this shift, with clean-main reproduction evidence).

All reactions

Sorry, something went wrong.

Uh oh!

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

@developing-today
developing-today Bot merged commit 16ffcf5 into main Nov 6, 2026
6 of 7 checks passed

Uh oh!

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

@developing-today
developing-today Bot deleted the queue/11202-6473-parse-records-dup-keys branch November 6, 2026 17:04
This was referenced Nov 9, 2026
Phase 4 of #6520 — closing JSON-parse inventory: disposition every serde_json parse site in pkgs/id against the duplicate-key refusal contract #6521
Closed
Design: a duplicate key is a parse error — one duplicate-key refusal contract for pkgs/id's checked JSON gates #6520
Closed
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
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

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

id(world): parse_records silently collapses duplicate JSON keys — an oversized value hidden behind a duplicate passes MAX_RECORD_VALUE_BYTES, and the record-count cap is checked after collapse

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.