GeezerVison is showing github.com — id-caps: runtime feature-object library attachment registry (#12640) by dezren39 · Pull Request #12896 · developing-today/code
Conversation
dezren39
commented
Nov 23, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Implements the first slice of #12640: the runtime feature-object library attachment mechanism from the #6003 design note (adopted 2026-11-22), as a pure registry state machine in a new id-caps module, library_attach.
What lands
AttachmentRegistry — per-world registry of entities, live attachments, staged changes, and namespaced library state.
- Tick-boundary attach/detach (design note §1): changes stage when requested and apply only at
begin_tick(); the TickSnapshot handed out at the boundary is what invocations resolve against, so a detach never pulls behaviour from an in-flight invocation. Attach/detach are authorized for the entity owner or a world author holding an explicit attach capability on the entity's class. Refused attaches stage nothing (atomic).
- Attach-time capability intersection (§2): a library's requirement footprint must fit inside (entity held caps ∩ world ceiling); a widening attach is refused with the widening capabilities named exhaustively. Borrowing a library never borrows its author's privileges — the offer's footprint is the only thing judged.
- Namespaced state (§3): keyed by (entity, library, major version). Detach keeps state inert and a same-major reattach revives it; a minor upgrade carries state live when a migration is declared, otherwise keeps it inert and flagged; a major upgrade parks state until the entity owner adopts it into the new major or drops it. Owner-only adopt/drop; no silent migration, no silent drop.
LibraryOffer::from_manifest builds an offer from a parsed LibraryManifest (identity = content hash, footprint = declared requirements, version parsed fail-closed).
Verification (laptop, nix develop in pkgs/id): cargo test -p id-caps library_attach — 20 passed / 0 failed, each test naming its oracle (the design-note rule it checks); full cargo test -p id-caps — 199 passed / 0 failed; cargo fmt -p id-caps -- --check clean after fmt.
Not in this slice (named on #12640): runtime wiring — invocation dispatch through the snapshot in id-worlds, execution of declared migrations (modelled here by their contract), and persistence of the registry.
Refs #12640.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
Implements the #6003 design note's adopted semantics as a pure
registry state machine in a new library_attach module:
- attach/detach staged and applied only at tick boundaries; the
TickSnapshot a boundary hands out is what invocations resolve
against, so a mid-tick detach never pulls behaviour from an
in-flight invocation;
- attach authorization: entity owner, or a world author holding an
explicit attach capability on the entity's class;
- attach-time capability intersection: a library's requirement
footprint must fit inside (entity held caps ∩ world ceiling);
widening attaches are refused with the widening capabilities
named exhaustively — borrowing a library never borrows its
author's privileges;
- library state namespaced per (entity, library, major version):
inert (kept, flagged where the design note requires) on detach
and on minor upgrade without a declared migration, carried live
across a minor upgrade with one, parked on major upgrade until
the entity owner adopts or drops it.
20 new tests name their oracles (the design note's §1/§2/§3
rules); the full id-caps suite passes 199/199 and rustfmt is clean.
Runtime wiring (invocation dispatch through the snapshot, declared
migration execution, persistence) consumes this seam later.
Refs #12640.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 46 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
cfc60e69-0f7c-48e6-82f2-3160befa1ed3
Commits
-
Reviewing files that changed from the base of the PR and between bc47aa7 and f46bd99.
Files selected for processing: 2
-
pkgs/id/crates/id-caps/src/lib.rs
pkgs/id/crates/id-caps/src/library_attach.rs
- 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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-23T04:46:07.167528Z |
f46bd99 |
PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|