Repository navigation
feat(net)!: lite-07 Path Keep counts decoded parts - #9357
Conversation
Quest-Claim: a32c7fd7ba853ccc
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ 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:
resolveslices the base withPath::head_len(keep), so a head can no longer end inside an escape and a keep past the base's parts is still aProtocolViolation. - Rust encoder:
heads.insert/remove/longestkey onsuffix.parts(), andpath_reftakeshead_lenfrom that same parts count, so the trie and the slice can't disagree. - JS resolver:
AnnounceHistory.startusesPath.parts(base). That returns parts in their escaped spelling, so the existingkept.join("/")followed byPath.tryDecodestill 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.
claude-opus-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughRust compression and JavaScript announcement resolution now count Merge Risk:
|
|
Maintainer decision: hold this until the next version migration. Removing the (Written by Claude Opus 5.5 with high) |
…keep-parts # Conflicts: # quest/m2/README.md
|
Merged main into this branch (head 8adf83b). This head keeps the hold: it stays unmerged, and the question is under 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:
So the (Written by Claude Opus 5.5 with high) |
There was a problem hiding this comment.
✅ 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.mdnow says all of the audit's breaking fixes have landed. The decision paragraph and the Required list inquest/m2/lite07-finalize.mdno longer mention the deletedlite07-path-keep-partsquest. Nothing in the tree still links to the deleted file.
claude-opus-5-5 | 𝕏
|
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) |
|
Head 8adf83b already applies the decision above: it removes the (Written by Claude Opus 5.5) |

Finishes
quest/m2/lite07-path-keep-parts.md(deleted here, with its links inlite07-finalize, the m2 README, and the lite07-routing README).Summary
lite-07
Path Keepnow counts decoded path parts, asdraft-lcurley-moq-lite.mddefines it, in both Rust and JS. The temporaryraw_parts/raw_head_len/base.split("/")migration is gone, so a head never ends inside an escape anda\/bis one part.rs/moq-net/src/lite/compress.rs: the decoder slices the head withPath::head_len, and the encoder's trie keys and head length usePath::parts()/head_len.js/net/src/lite/announce.ts:AnnounceHistoryresolves a keep overPath.parts(base).\/and\\; a pinned golden stream with\/and\\bases that Rust encodes and JS decodes (golden_escaped_stream_is_pinnedandAnnounceHistory 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-wipfor paths containing\/(a keep that spans an escaped slash is now one part, not two). An unpublished-wipversion 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.tsinjs/net: 34 pass, decoding the same golden hex Rust pins.just check: everything passes except fourmoq-relayruntime_uring::*tests that time out at 60s here (io_uring, unrelated to this diff).cargo test -p moq-net --lib --features async lite::compress17 pass;bun test src/lite/announce.test.ts34 pass.just checkpasses except threemoq-srtts::teststhat time out while the host's test runner waits for machine-wide scheduler capacity;cargo nextest run -p moq-srt ts::tests -j 1runs all nine in 0.6s, passing.git show origin/release:drafts/draft-lcurley-moq-lite.mdhas lite-07-wip's ANNOUNCE_START carryingHop Base/Hop Keepand a hop chain (rs/moq-net/src/lite/announce.rsonrelease), while main's has neither (claims and Route IDs since moq-dev/moq#8987), andrelease'sVersion::Lite07is opt-in only. So norelease(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.mdhad all landed, so that paragraph now says so instead of listing this quest.Reused
Path::head_lenandPath::parts()instead of adding new helpers;Path::depth(a separate raw-/migration forMAX_PARTS) and its JS/fuzz counterparts are left as they were, since the quest names onlyPath Keep.No
MIGRATE.mdentry: 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
raw_partsshim 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 reviewafter 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-2ba432d8ce4eReviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a20b66-075c-7a03-a7a9-6c3432132cc4, round 1Score: 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