Skip to content

feat(net)!: lite-07 Path Keep counts decoded parts - #9357

Merged
kixelated merged 3 commits into
mainfrom
quest/m2/lite07-path-keep-parts
Nov 24, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/m2/lite07-path-keep-parts

Conversation

@kixelated

@kixelated kixelated commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m2/lite07-path-keep-parts.md (deleted here, with its links in lite07-finalize, the m2 README, and the lite07-routing README).

Summary

lite-07 Path Keep now counts decoded path parts, as draft-lcurley-moq-lite.md defines it, in both Rust and JS. The temporary raw_parts / raw_head_len / base.split("/") migration is gone, so a head never ends inside an escape and a\/b is one part.

  • rs/moq-net/src/lite/compress.rs: the decoder slices the head with Path::head_len, and the encoder's trie keys and head length use Path::parts() / head_len.
  • js/net/src/lite/announce.ts: AnnounceHistory resolves a keep over Path.parts(base).
  • Tests: Rust unit test and an exhaustive pair round trip over parts holding \/ and \\; a pinned golden stream with \/ and \\ bases that Rust encodes and JS decodes (golden_escaped_stream_is_pinned and AnnounceHistory resolves the Rust encoder's keeps across escapes); the JS unit test replaces the raw-parts one.

Impact

Public API: none. Wire: breaking on moq-lite-07-wip for paths containing \/ (a keep that spans an escaped slash is now one part, not two). An unpublished -wip version changes freely.

Migrate: nothing to change in application code. The previous release (release, moq-net 0.3.24) counts raw /, but its opt-in lite-07-wip still carries hop chains, which main's lite-07-wip replaced, so the two releases never share a lite-07 link and newest/previous relays keep interoperating on lite-06. Between two peers built from main, a keep over \/ now resolves per the draft.

Validation

  • cargo test -p moq-net --lib --features async lite::compress: 17 pass, including the escaped golden stream.
  • bun test src/lite/announce.test.ts in js/net: 34 pass, decoding the same golden hex Rust pins.
  • just check: everything passes except four moq-relay runtime_uring::* tests that time out at 60s here (io_uring, unrelated to this diff).
  • After merging main (2026-11-23): cargo test -p moq-net --lib --features async lite::compress 17 pass; bun test src/lite/announce.test.ts 34 pass. just check passes except three moq-srt ts::tests that time out while the host's test runner waits for machine-wide scheduler capacity; cargo nextest run -p moq-srt ts::tests -j 1 runs all nine in 0.6s, passing.
  • Mixed-version premise (see Waiting): git show origin/release:drafts/draft-lcurley-moq-lite.md has lite-07-wip's ANNOUNCE_START carrying Hop Base/Hop Keep and a hop chain (rs/moq-net/src/lite/announce.rs on release), while main's has neither (claims and Route IDs since moq-dev/moq#8987), and release's Version::Lite07 is opt-in only. So no release (moq-net 0.3.24) relay can run a lite-07 link with a relay built from main, with or without the shim.

Choices for review

  • Merged main (2026-11-23): its other audit items in quest/m2/README.md had all landed, so that paragraph now says so instead of listing this quest.

  • Reused Path::head_len and Path::parts() instead of adding new helpers; Path::depth (a separate raw-/ migration for MAX_PARTS) and its JS/fuzz counterparts are left as they were, since the quest names only Path Keep.

  • No MIGRATE.md entry: AGENTS.md says the release cut writes it from this Impact section.

  • Added the exhaustive pair round trip as a unit test (fast, depth <= 3 over four parts) rather than a fuzz target.

Decisions

  • Lift the 11-22 hold (maintainer, comment): ✅ land before lite07-finalize (rejected: hold until the migration that drops 0.3.24). The previous release's lite-07-wip still sends hop chains, which main replaced in moq-dev/moq#8987, so the raw_parts shim protects no link.

Follow-ups

None.

Models

Size: S
Implementer: Claude, claude-sonnet-5-5, unknown effort (arm B)
Implementer: Claude Code, claude-opus-5-5, high effort (iterate, S)

Review

Rewritten by quest review after each round.

  • Head: 8adf83b

  • Base: origin/main at e56d723

  • Risk: high, It changes how lite-07 `Path Keep` is computed in `rs/moq-net/src/lite/compress.rs` and `js/net/src/lite/announce.ts` from raw `/` splits to decoded path parts, so a peer on the same wire version that still counts raw `/` (including the previous release) would resolve escaped-slash paths to different paths, which breaks interop for deployed peers and the unpublished `moq-lite-07-wip` wire that the next cut publishes; a revert would restore the old behavior, but only after it has already shipped to any peer that merged it, and the RISK file names an unpublished `-wip` wire change as high.

  • Classified: high by Claude Code, claude-haiku-5-5, low effort, session 13480d8b-aea0-44c9-b3c7-2ba432d8ce4e

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a20b66-075c-7a03-a7a9-6c3432132cc4, round 1

  • Score: 9/10, Source review found no actionable defects, with consistent Rust and JS implementations and cross-language fixtures supporting landing, though builds and tests were not run as instructed.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 2 commits November 21, 2026 22:25
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Count lite-07 Path Keep by Path::parts feat(net)!: lite-07 Path Keep counts decoded parts Nov 22, 2026
@kixelated
kixelated marked this pull request as ready for review November 22, 2026 06:49
pullfrog[bot]
pullfrog Bot previously approved these changes Nov 22, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Approach: sound. It removes the raw / shim on both ends at once and reuses the existing Path::head_len / Path::parts() (Rust) and Path.parts (JS) helpers, so the encoder's trie, the decoder's head slice, and the JS resolver now all count Path Keep the way the draft defines it (in segments, at draft-lcurley-moq-lite.md:494,1344).

Reviewed changes: all 7 files in the 2 commits up to 740a8ac.

  • Rust decoder: resolve slices the base with Path::head_len(keep), so a head can no longer end inside an escape and a keep past the base's parts is still a ProtocolViolation.
  • Rust encoder: heads.insert / remove / longest key on suffix.parts(), and path_ref takes head_len from that same parts count, so the trie and the slice can't disagree.
  • JS resolver: AnnounceHistory.start uses Path.parts(base). That returns parts in their escaped spelling, so the existing kept.join("/") followed by Path.tryDecode still rebuilds the right path.
  • Tests: a Rust unit test for \/ and \\ keeps, an exhaustive pair round trip up to depth 3, and a golden hex stream that Rust pins and JS decodes. I checked the golden's distance/keep pairs (0/0, 1/1, 2/2, 2/2) against the four expected paths by hand.
  • Quest bookkeeping: deletes the finished quest file and removes its links from the m2 README, lite07-finalize, and the lite07-routing README.

On a link between relays on the new and previous releases, the two sides will disagree about a keep that spans an escaped /. This was a deliberate trade-off (the deleted quest records keeping the shim as the rejected option) and only affects paths containing \/. Path::depth and the other MAX_PARTS migrations still count raw /, which is a separate concern and out of scope here.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Rust compression and JavaScript announcement resolution now count Path Keep by decoded path parts instead of raw / characters. Tests cover escaped slashes and backslashes, keep limits, path round trips, and a Rust-pinned compressed stream. Quest records remove the temporary migration items.

Merge Risk: Minimal · up to 740a8

This change makes Path Keep count whole decoded path parts in both Rust and JS. Paths containing an escaped slash change on the wire between releases, which was intended and is documented. Paths without an escaped slash are unaffected, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: lite-07 Path Keep now counts decoded parts instead of raw slashes. It uses the conventional commit form and the scope (net). It is specific enough for a reviewer scann…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states that the change finishes the lite-07 Path Keep quest, counting decoded path parts in Rust and JS. It names the touched files (compress.rs, announce.ts, and the quest docs) and l…
Full details: Title check

Explanation

The title names the main change: lite-07 Path Keep now counts decoded parts instead of raw slashes. It uses the conventional commit form and the scope (net). It is specific enough for a reviewer scanning history. The title does not mention the wire-format break, but the PR description and objectives cover that.

Full details: Description check

Explanation

The description states that the change finishes the lite-07 Path Keep quest, counting decoded path parts in Rust and JS. It names the touched files (compress.rs, announce.ts, and the quest docs) and lists the tests added. It also covers the wire-compatibility impact and validation. It is directly related to the changeset.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3be68829-2c6e-4e47-8eb5-4e846d4ba177
Commits

Reviewing files that changed from the base of the PR and between 1cb22d4 and 740a8ac.

Files selected for processing: 7

  • js/net/src/lite/announce.test.ts
  • js/net/src/lite/announce.ts
  • quest/m1/lite07-routing/README.md
  • quest/m2/README.md
  • quest/m2/lite07-finalize.md
  • quest/m2/lite07-path-keep-parts.md
  • rs/moq-net/src/lite/compress.rs
Files with no reviewable changes: 1

  • quest/m2/lite07-path-keep-parts.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision: hold this until the next version migration. Removing the raw_parts shim makes a previous-release relay resolve a Path Keep over a \/-escaped path to a different path, or refuse it, and newest and previous relays must interoperate. Land it with the migration that drops the previous release, unless the previous release already counts decoded parts.

(Written by Claude Opus 5.5 with high)

…keep-parts

# Conflicts:
#	quest/m2/README.md
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged main into this branch (head 8adf83b). This head keeps the hold: it stays unmerged, and the question is under ## Waiting in the description.

I think the hold's premise doesn't apply, though. The previous release can't open a lite-07 link to a relay built from main, shim or not:

  • release (moq-net 0.3.24) has lite-07-wip's ANNOUNCE_START carrying Hop Base/Hop Keep and a hop chain (drafts/draft-lcurley-moq-lite.md and rs/moq-net/src/lite/announce.rs on release). Main replaced those with claims and Route IDs in feat(moq-net)!: lite-07 sessions run the new route rule #8987, so the two can't parse each other's lite-07-wip announces.
  • Both releases leave lite-07-wip out of their default version sets (Versions::all in rs/moq-net/src/version.rs), so newest/previous relays negotiate lite-06, where Path Keep doesn't exist.
  • After the lite-07 finalize rename, wip and final refuse each other by ALPN.

So the raw_parts shim protects no link that can form. Recommendation: lift the hold and land this before lite07-finalize, which requires it for the 0.22 cut. Keeping the hold means lite-07 either freezes with the shim or the cut waits on dropping 0.3.24.

(Written by Claude Opus 5.5 with high)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes: the one commit since the last review merges origin/main and resolves conflicts in the quest docs. The Rust and JS Path Keep code is the same as in 740a8ac.

  • Quest doc merge: quest/m2/README.md now says all of the audit's breaking fixes have landed. The decision paragraph and the Required list in quest/m2/lite07-finalize.md no longer mention the deleted lite07-path-keep-parts quest. Nothing in the tree still links to the deleted file.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (via /quest-run, 2026-11-23): ✅ lift the hold and land this before lite07-finalize (rejected: hold until the migration that drops 0.3.24). A previous-release relay can't form a lite-07 link with main: it still sends hop chains, both leave lite-07-wip out of their defaults so mixed relays speak lite-06, and lite-07 final refuses wip at setup. The shim protects a link that can't exist. Merge pick: /quest-merge.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Head 8adf83b already applies the decision above: it removes the raw_parts shim, and the PR body's ## Decisions records lifting the hold. No change needed.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 37ebe62 Nov 24, 2026
8 checks passed
@kixelated
kixelated deleted the quest/m2/lite07-path-keep-parts branch November 24, 2026 02:56
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