René's URL Explorer Experiment


Title: id(range-sync): a zero-length upper bound encodes as +infinity — Some(vec![]) is the one bound length the sentinel swallows, and check_bounds approves it as finite · Issue #2607 · developing-today/code · GitHub

Open Graph Title: id(range-sync): a zero-length upper bound encodes as +infinity — Some(vec![]) is the one bound length the sentinel swallows, and check_bounds approves it as finite · Issue #2607 · developing-today/code

X Title: id(range-sync): a zero-length upper bound encodes as +infinity — Some(vec![]) is the one bound length the sentinel swallows, and check_bounds approves it as finite · Issue #2607 · developing-today/code

Description: Problem The range-sync wire format uses a bound's length byte as a sentinel: 0 means +infinity, anything else is the length of the key prefix that follows (module doc, pkgs/id/src/event_store/range.rs lines 19–24). That makes a zero-leng...

Open Graph Description: Problem The range-sync wire format uses a bound's length byte as a sentinel: 0 means +infinity, anything else is the length of the key prefix that follows (module doc, pkgs/id/src/event_store/range...

X Description: Problem The range-sync wire format uses a bound's length byte as a sentinel: 0 means +infinity, anything else is the length of the key prefix that follows (module doc, pkgs/id/src/event_store/r...

Opengraph URL: https://github.com/developing-today/code/issues/2607

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(range-sync): a zero-length upper bound encodes as +infinity — Some(vec![]) is the one bound length the sentinel swallows, and check_bounds approves it as finite","articleBody":"## Problem\n\nThe range-sync wire format uses a bound's length byte as a sentinel: `0` means +infinity, anything else is the length of the key prefix that follows (module doc, `pkgs/id/src/event_store/range.rs` lines 19–24). That makes a zero-length bound unrepresentable — but nothing refuses one. An entry built with `upper: Some(vec![])` encodes byte-for-byte identically to `upper: None` (+infinity), so the encoder silently changes what the entry says, and `check_bounds` — the documented pre-flight check a caller runs before `Party::respond` — approves the entry as a finite bound that does not end the flight.\n\nEvidence (pkgs/id/src/event_store/range.rs, main f9268e24; file sha256 identical on the laptop clone at 819889bb):\n\n- `encode_entry` (~line 411): `Some(b) => { out.push(b.len() as u8); out.extend_from_slice(b); }` — with `b` empty it pushes the `0` sentinel and no bytes, exactly the `None` arm's output.\n- `Reader::entry` (~line 510): `let len = self.byte()? as usize; … let upper = if len == 0 { None } else { Some(…) }` — the decoder can never produce `Some(vec![])`, so the value exists only on the constructing side, where it is silently rewritten.\n- `check_bounds` (~line 571): treats `Some(bound)` as a finite bound — it does not set its `ended` (+infinity) flag, and an empty bound sorts below every other bound, so `[Some([]), Some([1]), None]` passes.\n- Internal producers are safe today only by construction: `Party::separator` always returns at least one byte, and inbound entries come through `decode_frame`. `Entry`, `frames`, `check_bounds` and `Party::respond` are the public library surface of `/id-range-sync/1`, and `respond` clones the caller's upper bounds into its answer.\n\n## Verified this run (laptop probe, real crate)\n\nProbe: ~/git/fleet/probe-2026-10-30-laneA-zerobound/ (`id` path dependency, default-features off; range.rs sha256 2e8a2255… matches sandbox main f9268e24):\n\n- Case 1: `frames([Entry { upper: Some(vec![]), mode: Skip }])` succeeds (4 wire bytes); `decode_frame` returns the entry with `upper = None`; round-trip equality is **false**. `check_bounds` on the original entry: Ok.\n- Case 2: the flight `[Some([]), Some([1]), None]` passes the sender-side `check_bounds`; after encode/decode its uppers are `[None, Some([1]), None]`, which the receiver-side `check_bounds` **rejects** (\"an entry follows +infinity\") — a flight the sender's own pre-flight check approved kills the session at the peer.\n- Case 3: `frames([Some(vec![])])` is byte-identical to `frames([None])`.\n\nRelated but distinct: #2595 covers bounds **over** KEY_LEN (decoder rejection at 73–255, u8 wrap at ≥256). A fix that only refuses `len > KEY_LEN` does not catch the empty bound — the empty bound is the one length that collides with the format's own sentinel rather than exceeding its limit. This issue tracks that remaining case; the two fixes belong in the same functions (`encode_entry`/`frames` and `check_bounds`).\n\n## Why it matters\n\nA bound that silently widens to +infinity changes the meaning of a flight: as the last entry it reconciles the whole remaining key space instead of an empty range; anywhere else it makes the peer reject the flight. Either way the failure surfaces at the wrong layer (a bounds error on the receiver, or a mysteriously widened range), never at the constructor that wrote an unrepresentable value. The module's own pattern is fail-closed at encode time (frame budgets, bound length in the decoder); the empty bound is the one input that slips through because its length is *too small*, not too large.\n\n## Acceptance criteria\n\n- `frames()` (or `encode_entry`) refuses an entry whose upper bound is `Some` with length 0, with an error naming the problem (a bound is a key prefix of 1..=KEY_LEN bytes, or `None` for +infinity).\n- `check_bounds` also refuses a zero-length bound, so the documented pre-flight check catches what `respond()` would otherwise clone into its answer and re-encode as +infinity.\n- Tests cover: `Some(vec![])` refused at encode and by `check_bounds`; a 1-byte bound still round-trips; `None` still encodes as the sentinel.\n- Existing range.rs tests stay green.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-30T06:47:48Z","url":"https://github.com/developing-today/code/issues/2607"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ade6702d-a3e9-1df2-0a0b-e1cf2a7de4c6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8FE4:32B444:55D80:72A54:6B07585D
html-safe-noncec36985e96eaf47bfeeb0c6dd2751747af4bf0be9be75e62a6bd1801d03d63916
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkU0OjMyQjQ0NDo1NUQ4MDo3MkE1NDo2QjA3NTg1RCIsInZpc2l0b3JfaWQiOiI3MzQ5MjEzMzg3NzQ0MDQxMDUzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac80d4bd290d895e11eacd7e859a6e46f837f1d86cd64efd05900f293879b03ec4
hovercard-subject-tagissue:6114594696
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/2607/issue_layout
twitter:imagehttps://opengraph.githubassets.com/aff823d0cf42acb07bd539fbf4827ead59a54478fa7f96807628d48c8e0c0610/developing-today/code/issues/2607
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/aff823d0cf42acb07bd539fbf4827ead59a54478fa7f96807628d48c8e0c0610/developing-today/code/issues/2607
og:image:altProblem The range-sync wire format uses a bound's length byte as a sentinel: 0 means +infinity, anything else is the length of the key prefix that follows (module doc, pkgs/id/src/event_store/range...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
Nonee8a742cfa7d479a227a6a6e03ec8d1b3f77f746d4752d7d11136b478718b9658
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7bda31a5f68d83542e3adebba328d48747c5f604
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/2607#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F2607
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F2607
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/2607
Reloadhttps://github.com/developing-today/code/issues/2607
Reloadhttps://github.com/developing-today/code/issues/2607
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1k (1k)https://github.com/developing-today/code/issues
Pull requests206 (206)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/2607
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/2607
#4222https://github.com/developing-today/code/pull/4222
id(range-sync): a zero-length upper bound encodes as +infinity — Some(vec![]) is the one bound length the sentinel swallows, and check_bounds approves it as finitehttps://github.com/developing-today/code/issues/2607#top
#4222https://github.com/developing-today/code/pull/4222
https://github.com/dezren39
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
effort/xshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fxs%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/lowhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Flow%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 30, 2026https://github.com/developing-today/code/issues/2607#issue-6114594696
f9268e2https://github.com/developing-today/code/commit/f9268e24d0cd4b209fdf6191081d4ef455101a6b
819889bhttps://github.com/developing-today/code/commit/819889bb5d48444ff95fefe0ce60fcd99e405422
f9268e2https://github.com/developing-today/code/commit/f9268e24d0cd4b209fdf6191081d4ef455101a6b
#2595https://github.com/developing-today/code/issues/2595
Nexthttps://github.com/developing-today/code/issues/2607?timeline_page=1
dezren39https://github.com/dezren39
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/lowhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Flow%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
effort/xshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fxs%22
on Oct 30, 2026https://github.com/developing-today/code/issues/2607#event-34665210600
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 30, 2026https://github.com/developing-today/code/issues/2607#issuecomment-6516775503
f9268e2https://github.com/developing-today/code/commit/f9268e24d0cd4b209fdf6191081d4ef455101a6b
id(range-sync): frames() never validates an entry's upper-bound length — bounds over KEY_LEN encode into frames decode_frame itself rejects, ≥256 wraps the u8 length prefix and garbles the entry, and check_bounds approves them all #2595https://github.com/developing-today/code/issues/2595
id(range-sync): a zero-length upper bound encodes as +infinity — Some(vec![]) is the one bound length the sentinel swallows, and check_bounds approves it as finite #2607https://github.com/developing-today/code/issues/2607
id(range-sync): frames() never validates an entry's upper-bound length — bounds over KEY_LEN encode into frames decode_frame itself rejects, ≥256 wraps the u8 length prefix and garbles the entry, and check_bounds approves them all #2595https://github.com/developing-today/code/issues/2595
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 30, 2026https://github.com/developing-today/code/issues/2607#event-34685085130
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
on Nov 1, 2026https://github.com/developing-today/code/issues/2607#event-34824400096
dezren39https://github.com/dezren39
status/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fparked%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
on Nov 2, 2026https://github.com/developing-today/code/issues/2607#event-34883444728
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 2, 2026https://github.com/developing-today/code/issues/2607#issuecomment-6571245850
#4222https://github.com/developing-today/code/pull/4222
#4222https://github.com/developing-today/code/pull/4222
153c5a4https://github.com/developing-today/code/commit/153c5a4a60bc3bb763ebbf97093744b121dd7f3d
#4222https://github.com/developing-today/code/pull/4222
#2607https://github.com/developing-today/code/issues/2607
dezren39https://github.com/dezren39
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fparked%22
queue/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fparked%22
on Nov 2, 2026https://github.com/developing-today/code/issues/2607#event-34885150656
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 2, 2026https://github.com/developing-today/code/issues/2607#issuecomment-6571661308
#4222https://github.com/developing-today/code/pull/4222
#4222https://github.com/developing-today/code/pull/4222
153c5a4https://github.com/developing-today/code/commit/153c5a4a60bc3bb763ebbf97093744b121dd7f3d
dezren39https://github.com/dezren39
on Nov 2, 2026https://github.com/developing-today/code/issues/2607#event-34885258684
id(range-sync): reject empty bounds (#2607) (#4222)https://github.com/developing-today/code/commit/ddd0d424c4c9cf5ea1042839979af2a49e96e302
#2607https://github.com/developing-today/code/issues/2607
#4222https://github.com/developing-today/code/pull/4222
ddd0d42https://github.com/developing-today/code/commit/ddd0d424c4c9cf5ea1042839979af2a49e96e302
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#4222https://github.com/developing-today/code/pull/4222
on Nov 2, 2026https://github.com/developing-today/code/issues/2607#event-34885259698
dezren39https://github.com/dezren39
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
on Nov 2, 2026https://github.com/developing-today/code/issues/2607#event-34885297536
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 2, 2026https://github.com/developing-today/code/issues/2607#issuecomment-6571697028
#4222https://github.com/developing-today/code/pull/4222
ddd0d42https://github.com/developing-today/code/commit/ddd0d424c4c9cf5ea1042839979af2a49e96e302
#2607https://github.com/developing-today/code/issues/2607
153c5a4https://github.com/developing-today/code/commit/153c5a4a60bc3bb763ebbf97093744b121dd7f3d
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/2607
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/2607
dezren39https://github.com/dezren39
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
effort/xshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fxs%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/lowhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Flow%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.