Repository navigation
Conversation
Quest-Claim: f24a30faad8b228d
…ard filters (Rust) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prefix, Prefixes, InvalidPrefix, and the segment helpers (parts, escape, unescape) move into @moq/net, at Path.* as before and at a new `@moq/net/prefix` entrypoint that loads no wire stack. @moq/auth depends on @moq/net and imports from that entrypoint. Discovery filters are prefixes now: announced/routes take an optional `prefix: Path.Valid` (relative to the handle's root) instead of a Path.Pattern, and announcements carry no `captures`. Callers that wanted a subset filter the announced paths themselves. A request or follow no longer refuses a path holding `*`, an ordinary byte now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…apper Each wrapper's announced() lists a prefix and everything beneath it; the pattern filter and Announce.captures are gone, and the InvalidPattern error is now InvalidPrefix. The CARLA sim derives a driver id from the direct child path beneath its prefix instead of a wildcard capture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…epth A prefix still refuses *, so a broadcast holding one could be published but never listed, scoped, or watched, and pre-0.22 subscribers read it as a wildcard. Refuse it again wherever an origin publishes, mounts, or looks up a path, in Rust and JS, and refuse a lookup whose rooted path exceeds the wire's depth before it registers an interest. The player's coverage watch skips routes beneath its path instead of holding and rescanning them on every event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ees it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The player's coverage watch listed its path with covering, which a prefix listing extends to every route beneath the path and every initial set owed there. An internal exact listing reports only routes at or above the path and waits only on initial sets there, as the literal pattern did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reader whose scope reaches only beneath the path can never request it, so its exact listing names nothing. The player also asks for covering and keeps its own ancestry check, so a Reader that ignores exact stays correct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 28, 2026 02:40
…attern # Conflicts: # quest/m2/README.md # quest/m2/delete-moq-pattern.md # quest/m2/remove-catalog-identity.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 28, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…starred route, keep escaped slashes - Connection.routes and the lite subscriber parse the prefix before registering a reader, so a starred or overlong prefix throws instead of leaving an empty listing or a stuck reader. - An origin skips a peer's announced path holding `*` rather than letting receive throw and end the session's discovery. - CARLA's driver and camera parsing split only at unescaped slashes. - Nightly no longer schedules the deleted pattern fuzz target; two examples drop a trailing slash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…before registering Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes quest/m2/delete-moq-pattern.md, which this PR deletes.
Summary
Deletes
moq-patternand@moq/pattern. Grants and listings already traveled as prefixes, so wildcards were only a local discovery filter. The prefix algebra moves intomoq-netand@moq/net, and every listing now takes a prefix set.moq_net::path::{Prefix, Prefixes, InvalidPrefix}(re-exported at the crate root) andmoq_net::path::{parts, Parts, escape, unescape}replace themoq-patterncrate. In JS,Path.PrefixandPath.Prefixesreplace@moq/pattern, with a lean@moq/net/prefixsubpath for@moq/auth.Consumer::filterandAnnounce.capturesare gone, andConsumer::scope(root, &Prefixes)is the only way to narrow a listing. Interest prefixes come straight from the listedPrefixes.*: no prefix can name one, and pre-0.22 subscribers would read it as a wildcard. An origin refuses one wherever it publishes, mounts, or looks up a path, withError::InvalidPath(now a unit variant) in Rust and an error in JS, which now refuses it onrouteandclaimtoo.Prefixrefuses*likewise, so a pattern written where a prefix belongs fails loudly.foo/**for older verifiers, throughwritten()inwire.rs.Impact
Breaking API, no wire change.
Wire: none. Announce interest is still a prefix set, and no path holding
*is published or watched, as before.Behavior: when a broader route of another identity takes over a path whose route was lost, listings now report a Restart instead of Offline followed by Start. Capture changes no longer exist, so their unannounce-then-announce is gone.
Migration:
moq_pattern::{Prefix, Prefixes, InvalidPrefix}becomesmoq_net::{Prefix, Prefixes, InvalidPrefix};moq_pattern::partsbecomesmoq_net::path::parts.Pattern,Patterns,Segment,Specificity,IntersectionError, andInvalidPatternare removed.InvalidPrefixhas new variants (Wildcard,EmptySegment,InvalidSegment,TooManySegments).consumer.filter(&pattern)becomesconsumer.scope(root, &prefixes). For a shape a prefix cannot express (such as*/camera), list the enclosing prefix and filter locally.Announce.capturesis gone. Derive the value fromannounce.prefix.Error::InvalidPathno longer carries anInvalidPattern: it is a unit variant for a path holding*.requestandfollowrefuse a path whose rooted form exceeds 32 segments withBoundsExceeded, instead of registering an interest no session can encode.moq_net::stats::Config::with_excludeandwith_exclude_rootedtake aPrefix, and theexcludeandexclude_rootedfields arePrefixes.moq_relay::session::Filter::path: Option<Pattern>becomesprefix: Option<Prefix>.announced(Path.Pattern.subtree(p))becomesannounced(p), androutes(...)likewise.capturesis gone.@moq/patternbecomes@moq/net(Path.Prefix,Path.Prefixes) or@moq/net/prefix.routeandclaimnow throw on a path holding*, asfollowandrequestalready did.Connection.announcedandroutesthrow synchronously on a prefix holding*or more than 32 segments, instead of returning a listing that never fills. A peer's announcement of a path holding*is skipped rather than ending the session's discovery./sessionsfilter takesprefix=.path=is refused with an error namingprefix.moqCLI--pathbecomes--prefix.--stats-prefixholding*is refused at config time./, or any*, is now an error, so"live/"becomes"live". A listing prefix outside the consumer's scope now fails with Unauthorized instead of listing nothing, since the prefix scopes the listing rather than filtering it.announced(prefix, filter=...)becomesannounced(prefix).Announce.capturesis gone, andmoq.Error.InvalidPrefixreplacesInvalidPattern.AnnounceOptions.Filter.ErrInvalidPatternbecomesErrInvalidPrefix. Derive whatCapturesheld fromPrefix.AnnounceConfig(prefix). Nocaptures, andMoqException.InvalidPrefixreplaces the old exception.announced(prefix:hidden:). Nocaptures, andMoqError.InvalidPrefixreplaces the old error.filteris removed, andInvalidPrefixMoqExceptionreplaces the old exception.moq_announce_configlosesfilterandfilter_len, andmoq_announce_eventlosescapturesandcaptures_len. The struct layout changed, so recompile.Decisions
The user was away, so I took my recommendation in each case.
*, as doesPrefix, until grant-alias-delete. A pattern such asroom/*typed where a prefix belongs fails loudly, and no broadcast exists that no listing can root at or that a pre-0.22 JS subscriber would read as a wildcard (review round 1). Rejected: making*an ordinary path byte now, which this PR first did; it left such a broadcast publishable but undiscoverable, and broke older subscribers' announce streams. That quest decides whether both refusals lift together.@moq/authdepend on moq-net and@moq/net. This follows the repo's preference for a module in an existing package over a one-off package. The cost is that auth now compiles moq-net. JS keeps the bundle small through the@moq/net/prefixsubpath. Rejected: a tinymoq-prefixcrate, which is the same package this quest deletes under a new name."live/"errors rather than normalizing, as the bindings already do for paths (each binding's MIGRATE.md: "a path with a leading, trailing, or doubled/raises instead of collapsing it"). Rejected: normalizing before parsing, which a reviewer suggested; it would make a listing prefix the one binding path that still collapses slashes.path=loudly viaError::Path. An ignored filter would silently widen/sessionsoutput. Rejected: aliasingpath=toprefix=, since its semantics (an exact pattern) differ.Prefix.moq-net(benches/prefixes.rs), and the JS algebra and pattern browser benches were dropped. The wildcardmaskandchainrows had nothing left to measure. The JS prefix rows are owned by peer-grant-bound..github/compile-time-audit.jsonis left as is. It is a historical measurement snapshot, not a build input.next decide). Codex kept a finding after two rounds: a prefix listing withcoveringalso lists routes beneath the path and waits on initial sets owed there, which the literal pattern never did, so a player's offline decision could wait on a session scoped beneath the rendition. Picked: fix as recommended, with an@internalexactoption onAnnounce.Optionsthat reports only routes at or above the path and waits only on initial sets there (Rust's lookup cursor already does this internally). Round 4 hitnext decideagain on two gaps in that option, and the same pick applied: an exact listing is empty when the scope cannot reach the path, and the player also passescoveringand keeps its ancestry check, so aReaderthat ignoresexactstays correct. Round 5 passed with no findings. Rejected: accepting the delay, which is a real regression in offline detection; and dropping the PR.expectwhen parsing its prefix, documented onConfig::prefix, and the relay refuses a*stats prefix at config time. Rejected: makingProducer::newfallible for a config no deployment uses.Overlap
moq-dev/moq#9719 also touches
rs/moq-net/src/model/origin.rs,doc/concept/moq-lite.md, and the binding alias files. Expect a mechanical rebase conflict for whichever lands second.Validation
just check origin/mainpassed: 13966 Rust tests, plus the JS, Python, Go, Kotlin, Dart, CARLA, bench, quest, markdown, shell, and tooling checks.just test interop --allpassed, including the C, C++, Python, Go, JS, and GStreamer clients.just check origin/mainpassed on each fixed head, and nextest over moq-net, moq-cli, moq-relay, moq-ffi, libmoq, moq-tokio, moq-auth, and moq-stats (6938 tests), plus the JS net and watch suites. Interop was not rerun: those fixes change no wire or FFI code.a_star_is_refused_everywhere_a_path_is_named,a_lookup_past_the_depth_limit_is_refused, anda_broader_route_taking_over_a_lost_one_restarts(origin), the JS twin of the*refusal,announced_lists_a_prefix_and_refuses_a_wildcard(FFI), the relay/sessionspath=refusal, and the stats prefix refusal.moq-netprefixesbench, one local run at a whole 64 KiBAUTH_OK: collect 179 µs, covers 1.6 ms, intersect 3.6 ms.mainat5a7973d818:just check origin/mainpassed except for host-only failures that also hitmain(Swift without Xcode, the cross-lint without LLD, andrpmcrashing in the tooling check). Workspace nextest passed 13126 of 13129; the three failures also fail onmainon this macOS host and go to a follow-up.just test interop --allpassed.just check origin/mainfailed only wheremaindoes on this host (the same three macOS Rust tests, Swift, the cross-lint, andrpmin tooling), plus two JS load flakes in files this PR leaves alone:fit widens only what does not fithit bun's 5 s timeout, and the lite tail testa group stream that arrives after the subscribe stream's FIN is deliveredfailed once. Run alone, fit.test.ts and tail.test.ts passed two of three and three of three times. The JS lite, origin, and reload suites passed (1246 tests), as did CARLA's pytest andpaths.test.ts.Models
Size: L
Implementer: Claude Code, claude-opus-5-5, unknown (arm A)
Implementer: Claude Code, claude-opus-5-5, high effort (iterate, L, arm A)
Follow-ups
identities::ietf22,same_tick_fetch_protects, andfetch_refresh_survives_evictionfail onmainon Apple Silicon while the Linux queue passes. No open decisions.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 5f453c6
Base: origin/main at 065a4c1
Risk: high,
it changes .github/workflows/release-gate.yml, which is always high: workflows run with the repository's secretsClassified: high by the always-high paths
Risk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, xhigh effort
Session:
01a21f8b-c2fc-7c60-8a96-2d56526fd4ae, round 5Score: 10/10,
The head fixes both remaining findings, and the incremental review found no new regressions.Rounds: 5; first round 3 (high 1, medium 2); findings 6 (high 1, medium 5): fixed 6, refuted 0, open 0
Findings: none
The last round's findings, at c0e329d:
js/net/src/origin.ts:2749:Keep exact listings anchored to the requested path;At js/net/src/origin.ts:2753, exact mode checks the scope against the original requested path and uses an empty listing when that path is outside the scope.js/watch/src/broadcast.ts:58:Preserve coverage for public Reader adapters;At js/watch/src/broadcast.ts:59, the player passes `covering: true` and filters descendant events at line 67, preserving coverage for Reader adapters that ignore `exact`.Reviewer: Claude Code, claude-opus-5-5, high effort, second
Session:
59b4502c-7c57-44d0-b863-d4623b1b79e6, round 5Score: 9/10,
Since the last round, an `exact` listing on a reader whose scope reaches only beneath the path lists and waits on nothing, using the existing `Scope.covers` that also decides whether a request is allowed. `watchCovered` also keeps `covering` plus a `hasPrefix` filter, so it stays correct with a `Reader` that ignores the internal `exact` option. A test covers the change, and nothing here introduces a bug.Rounds: 5; first round 2 (high 1, medium 1); findings 2 (high 1, medium 1): fixed 1, refuted 1, open 0
Findings: none