Repository navigation
feat(id-caps): ProviderManifest class field + shipped/reserved class table (#12982) - #13002
Merged
Merged
Conversation
…table (#12982) Implements #5999 §10 follow-up 1 (the gate #12921 names): ProviderManifest gains a `class` field carried as registry data, and a new id-caps `cap_class` module ships the class table — §2.2's nine classes with their member assignments for the names the record covers, §2.3's reserved classes (fs.sandbox, fs.read.arbitrary, net.out; http.fetch takes the net.out slot), and the fail-closed `unknown` class. Names registered after the record (kv.*, blob.*, speech.*, form.*, notify, device.info, client.file.read, client.notify) carry CLASS_UNKNOWN until a design pass assigns them a class; a test pins that list as a tripwire. CAP_CLASS_TABLE_VERSION = 1 for the comparisons #12921 records. Tests: cargo test -p id-caps 206 passed / 0 failed (6 new cap_class tests: exact table shape, §2.2 assignments name by name, reserved fs classes memberless, unassigned-names tripwire, every registered id in the table, fail-closed resolution); --features test-provider also 206/0; cargo test -p id-worlds --lib provider_broker 16 passed / 0 failed. rustfmt clean on all touched files.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed.
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. |
This was referenced Nov 23, 2026
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 #12982. Refs #5999 (§2.2–§2.4, §10 follow-up 1), #12921 (whose gate this clears), #5959 §10.
What
ProviderManifest.class(pkgs/id/crates/id-caps/src/world_caps.rs): a class id carried as registry data, never derived from the name (id: design: capability-change diff semantics — user-meaningful capability classes and re-approval triggers #5999 §2.4 rejects prefix guessing). The registry macro gains aclass:arm; all 34 production entries carry their assignment; the client manifests, the test-provider manifest, and the two test fixtures are updated.id-caps::cap_classmodule: the shipped class table — §2.2's nine classes with the record's client-side sentences (cap.nonemessageless), §2.3's reserved classes (fs.sandbox,fs.read.arbitrary,net.out), and the fail-closedunknownclass.http.fetchtakes the reservednet.outslot — it is the arbitrary-network-out provider the slot exists for.CAP_CLASS_TABLE_VERSION = 1;resolve_cap_class/ProviderManifest::cap_class/ProviderRegistry::class_for_nameall fail closed tounknownfor an unregistered name or an unshipped class id.CLASS_UNKNOWN— they always disclose until a design pass assigns real classes (id: design: capability-change notices on reconnect — expansion and sideways changes #5959 §1). A test pins that exact list as a tripwire so the gap can't grow silently; the assignment pass files as its own follow-up.Out of scope (by the record's own §10): the comparison/subsumption machinery and the baseline store — #12921, now unblocked on this gate; the registration-time class-exists check (§9.3) rides the first fs./net. registration.
Verification (laptop worktree off origin/main,
nix developin pkgs/id)cargo test -p id-caps— 206 passed / 0 failed, including 6 newcap_classtests: exact table shape + reserved set, §2.2 assignments name by name (all 19 + http.fetch), reserved fs classes memberless, the unassigned-names tripwire, every registered class id present in the shipped table, fail-closed resolution both directions.cargo test -p id-caps --features test-provider— 206 passed / 0 failed (the feature-gated manifest compiles with its class).cargo test -p id-worlds --lib provider_broker— 16 passed / 0 failed (the one external manifest fixture).rustfmt --edition 2024 --checkclean on all four touched files; no new warnings (id-caps' 4 lib warnings are pre-existing in world_manifest/library_resolution/world_caps).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.