Skip to content

fix(id): repair records-budget WIP swept in by repo-keeper snapshot e756e67d58 - #6570

Merged
dezren39 merged 1 commit into
mainfrom
lane/id-clear-cap
Nov 6, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane/id-clear-cap

Conversation

@dezren39

@dezren39 dezren39 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

What broke

Repo-keeper snapshot commit e756e67d58 ("repo-keeper: snapshot code 2026-11-06 08:24 CST") swept a half-finished RecordsBudget WIP feature into main. On current main the id lib-test target did not compile, and once compiling, the WIP dropped data:

  1. Two E0277 type errors in pkgs/id/src/world_net.rs:
    • line 658: key > last — &str compared against &String
    • line 1621: next > cursor — &str compared against &String
  2. A real page-drop bug in record_pages: the snapshot had moved pages.push(...) below the match, so the next_after: None arm returned Ok(pages) before pushing the final page — silently dropping it. The WIP's own test caught it once the code compiled: paged_records_survive_the_iroh_frame_limit got 95 of 96 records.

Oracle reasoning

The code's own stated invariants are string-ordering checks ("keys must be strictly ascending"; "records cursor did not advance"). String ordering is str ordering, so comparing the borrowed values as &str is the faithful fix — no semantics change, no assertion weakened. For record_pages, the fix runs the cursor validations against the borrowed page, then pushes, then branches on next_after — every WIP validation is preserved; only the push ordering is repaired.

Verification

  • Targeted: paged_records_survive_the_iroh_frame_limit PASS; test_clear_spanning_more_authors_than_the_cap_clears_exactly_its_claims PASS.
  • Full suite on the final tree: cargo test -p id --lib → 2305 passed; 0 failed; 6 ignored.
  • cargo fmt applied; blast radius confined to pkgs/id/src/world_net.rs (46 insertions / 45 deletions).

Context: this unblocks the check phase that stopped the 2026-11-04 Mistral deploy switch (code#5218). The original red test from that switch was already repaired separately by #5736 (role-aware default view); this PR fixes the successor blocker that landed on main this morning.


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

…ot (e756e67)

The snapshot landed RecordsBudget half-finished: two str/String
comparison type errors (validate_record ordering check, record_pages
cursor-advance check) broke the crate build, and record_pages returned
before pushing its final page, silently dropping that page's records
(paged_records_survive_the_iroh_frame_limit: 95 of 96).

- Compare keys as &str on both sides (String ordering is str ordering;
  the stated invariants are unchanged).
- Run the cursor validations against the page, then push it, then
  branch on next_after -- the final page is retained.
- rustfmt the snapshot's additions.

Diagnosis and switch-block context: code#5218.
@dezren39
dezren39 requested a review from a team as a code owner November 6, 2026 16:51
@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 57 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: fc4a98a2-72c8-4846-880a-e794bfe7f15c
Commits

Reviewing files that changed from the base of the PR and between 26f51c3 and bcf6e5d.

Files selected for processing: 1

  • pkgs/id/src/world_net.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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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 ✅ Completed 2026-11-06T16:52:48.111663Z bcf6e5d 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.

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