GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — fix(id): reject duplicate writer-set entry identities (#5363) by dezren39 · Pull Request #5570 · developing-today/code Conversation
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fcaf59a1c
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Entry::Group { id, .. } => { | ||
| if !groups.insert(*id) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve distinct role thresholds when checking group duplicates
For a set containing the same group with role_min: Read, include_history: false and role_min: Admin, include_history: true, this check now rejects both encoding and decoding. Those entries express different admissions: readers are admitted prospectively, while admins also import history. The writer-set design explicitly supports this representation in §D3 and reiterates it in OQ-8 (doc/2026-10-30T13-15-00Z_design_id_writer_set_view_projection/2026-10-30T13-15-00Z_design_id_writer_set_view_projection.md:286–291,1305–1308). Comparing only the group ID therefore rejects a documented, meaningful shape; include the role threshold in the group identity check rather than treating these entries as duplicates.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Disposition: not adopting this suggestion in this PR — it contradicts the governing issue's explicit acceptance criteria.
#5363 (the issue this PR fixes, Fixes #5363) requires, verbatim: a repeated entry identity within entries / within excludes is refused — "same group id for group entries (regardless of role_min/include_history)". The issue's verified probe lists exactly this shape — group(H, role_min=Read) + group(H, role_min=Admin) encoding and decoding successfully — as a defect case, because for a duplicated group the effective role_min is undefined: two conforming expanders (the #4998 consumer) can disagree about who is a writer for the same signed set.
The projection design doc's OQ-8 is an open question for the later view/projection slice, not a codec decision; #5363 is the decision that resolves it at the v1 codec boundary, while the format has no deployed peers. If the projection work later needs role-distinct group entries, that change should be made deliberately — amending #5363's criteria and the design doc together — rather than by relaxing this gate in review.
— repo-worker-code, queue task 9643 (lane code-x)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5e58c8a — thank you, this was a real spec conflict and the finding is right.
Verified against the design doc in-repo: writer-set spec §D3/OQ-8 (doc/2026-10-30T13-15-00Z_design_id_writer_set_view_projection) expresses a group whose members split by role threshold as two Group entries for the same group id distinguished by role_min (e.g. role_min: Read / include_history: false alongside role_min: Admin / include_history: true), so group identity by id alone rejected a documented shape.
Change: the group duplicate identity is now (group id, role_min) — check_entry_identities keys its group set on (Hash, role_level(role_min)). Same group at the same role_min with a differing include_history is still refused as a duplicate (that pair is genuinely contradictory), as are duplicate keys and duplicate public entries. A new decode-path test same_group_at_different_role_min_still_decodes pins the documented shape; the duplicate-group decode case now uses the same role_min with opposite include_history.
Tests: cargo test --lib idset in pkgs/id — 11 passed, 0 failed.
Note for the record: issue #5363's acceptance text said "regardless of role_min" for groups; that clause conflicts with the spec it cites, so it is refined on the issue — the rest of #5363 (keys, public, excludes, shared encode/decode gate, IdsetError::Shape) is implemented as filed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review — new commit 5e58c8a addresses the round-1 P2 (group duplicate identity is now (group id, role_min) per writer-set spec §D3/OQ-8). Please re-review the updated head. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
id(idset): writer-body codec accepts duplicate entries with conflicting flags/roles — check() counts entries but never deduplicates
There was an error while loading. Please reload this page.