Skip to main content

Module moq_resolve

Module moq_resolve 

Source
Expand description

Typed MoQ/event object identity + declared track-policy resolver (v16 §10, WS-I / #1510).

The MoQ/event plane previously passed its track/prefix string into the RPC/VFS resolver’s service-domain coordinate (pep.rs → super::dispatch_pep::RpcObjectLabelResolver), so a track name was reinterpreted as a VFS path. v16 §10 removes that shared string coordinate: every plane owns a typed object reference and a plane-specific resolver, and “strings are parsed exactly once at the plane boundary and cannot be reinterpreted by another resolver”.

This module is that end state for MoQ/event:

  • MoqEventObjectRef is the exact decoded typed identity. A boundary string parses into it exactly once (MoqEventObjectRef::parse) or the check denies — there is no string path fallback and no rewriting of unknown input after the fact.
  • The service coordinate inside the identity is validated by the one canonical service-domain rule (validate_service_domain, 1..=MAX_SERVICE_DOMAIN_BYTES bytes) — not a second, plane-local identity rule.
  • MoqEventLabelResolver is the plane’s own resolver trait (a MoqEventObjectRef in, a SecurityLabel out). It is deliberately not the RPC resolver: dispatch, VFS/9P, CAS, and MoQ/event coordinates cannot cross resolver types.
  • MoqEventPolicyTable is the declared track-policy metadata — the authoritative label source for this plane. Lookup is an exact typed match against declared rows; unknown, unlisted, or newer-vocabulary inputs deny. There is no floor allowlist and no bootstrap exception: a table that declares nothing labels nothing.

§Dependency on the generated dispatch inventory (WS-D)

The end-state source of declared rows is the generated method-policy inventory (WS-D / #1505), which emits one reviewed row per annotated leaf across the service schemas. Until that inventory lands, the table is the interface seam: it is built from explicitly declared MoqEventPolicyRows and rejects (not ignores) malformed input at construction. WS-D’s generated code converts its inventory into rows here through one reviewed conversion — this module must not duplicate the annotation table.

This module compiles for wasm32 (pure types + the shared canonicalization rule); the PEP that consumes it remains native-only, matching super::pep.

Structs§

DeclaredTrackPolicyResolver
The production resolver: exact-match lookup against a validated declared track-policy table.
DenyAllMoqEventResolver
Fail-closed resolver: every object is unlabeled. The structural default when no declared track-policy table exists; combined with an installed PEP it denies everything regardless of clearance.
MoqEventObjectRef
The exact decoded track/prefix identity for one MoQ/event object.
MoqEventPolicyRow
One declared track-policy row: the declaring service’s label for its objects on one plane. The generated dispatch inventory (WS-D) is the end-state producer; rows are otherwise declared explicitly.
MoqEventPolicyTable
Declared track-policy metadata: the closed, validated set of rows the resolver trusts. This is the reviewed seam onto the generated inventory.

Enums§

MoqEventPlane
The MoQ data plane a coordinate belongs to. Closed and exhaustive: adding a plane is a resolver-contract change, not a string reinterpretation.
TrackPolicyError
Why a declared track-policy table could not be built. Construction failure is fail-closed: the caller keeps no partial table.

Constants§

MAX_TRACK_SEGMENTS
Maximum number of segments in a track/prefix identity. A bound on parse work per admission check; not the service-domain rule (which is byte-length based and applies only to the service segment).
MAX_TRACK_SEGMENT_BYTES
Maximum length in bytes of one non-service identity segment. Distinct from MAX_SERVICE_DOMAIN_BYTES, which bounds only the canonical service domain through the shared rule.
SUPPORTED_TRACK_POLICY_REVISION
The track-policy vocabulary revision this resolver understands. A policy table stamped with a newer revision (emitted by a newer generator whose vocabulary this build does not know) is rejected rather than partially interpreted — the “newer identities deny” rule.

Traits§

MoqEventLabelResolver
The MoQ/event plane’s own object-label resolver (v16 §10).