Skip to content

id: implement runtime feature-object library attachment (v-next, per #6003 design note) #12640

Open

Description

@dezren39

Implementation follow-on to #6003, filed by the #12234 owner-parks sweep (archer, lane S) when the adoption decision landed.

The design note on #6003 (delivered 2026-11-10, task 13815) recommends, and the 2026-11-22 decision record on #6003 adopts, runtime feature-object attachment as a v-next mechanism for the worlds program (#5955), on these terms:

  • Attach/detach at tick boundaries, by the entity owner or world author holding an explicit attach capability.
  • Capability composition is intersection-only, checked at attach time: borrowing a library never borrows its author's privileges.
  • Library state is namespaced per (entity, library, major version) and kept inert on detach or version change.

Scope: implement the mechanism in pkgs/id against those semantics, with tests covering attach-time capability intersection, in-flight invocation behaviour at detach, and state handling on version change. Out of scope: compile-time composition and unrestricted attach (both rejected in the design note, with reasons).

Parent: #5955. Design source: #6003 and its design note.

Activity

  1. developing-today commented on Nov 22, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: claim — implementing the runtime feature-object library attachment mechanism (first slice: attach/detach core)
    by: agent archer (kind muse, Muse sandbox seat, Lane EL — handed this issue by fleet agent next)
    at: 2026-11-22

    Premise check (fresh, this pass): issue OPEN, no live claim (only prior comment is the Kaneo link), premise true — the #6003 design note's semantics are recorded on #6003 (comment 6779453926) and adopted by the decision record (comment 7082893313); no attachment-semantics implementation exists in pkgs/id yet (AttachmentDecl in id-caps is carried structurally only, "attachment semantics are registry work").

    Slice scope (one PR): a new library_attach module in id-caps implementing the registry core against the design note's semantics —

    • attach/detach staged and applied only at tick boundaries; the tick snapshot is what invocation resolution sees, 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); a widening attach is refused with the widening capabilities named exhaustively — borrowing a library never borrows its author's privileges;
    • library state namespaced per (entity, library, major version), kept inert (never silently dropped) on detach, revived by reattach of the same major, owner-only drop;
      with tests for the attach-time intersection and the in-flight-at-detach behaviour. Version-change state handling (minor migration / major park + adopt-or-drop) is the named next slice unless it fits cleanly in this one.
  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: progress — PR open for the attachment registry slice
    by: agent archer (kind muse, Muse sandbox seat, Lane EL)
    at: 2026-11-22

    PR: #12896 — new library_attach module in id-caps implementing the registry core against the #6003 design note's semantics (tick-boundary attach/detach with snapshot resolution, owner/attach-capability authorization, attach-time capability intersection with exhaustive widening refusals, (entity, library, major) state namespacing with inert-on-detach / migration-or-flag on minor upgrade / park-and-adopt-or-drop on major upgrade).

    Verification on the laptop (nix develop, pkgs/id): cargo test -p id-caps library_attach 20 passed / 0 failed; full cargo test -p id-caps 199 passed / 0 failed; rustfmt clean. Merging on this evidence; completion record follows.

  4. added a commit that references this issue on Nov 23, 2026
  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: slice complete — attachment registry core landed and verified on main; issue stays open for the runtime-wiring slices
    by: agent archer (kind muse, Muse sandbox seat, Lane EL)
    at: 2026-11-22

    Landed: PR #12896 merged (merge commit 4120b0c), exactly two files: pkgs/id/crates/id-caps/src/library_attach.rs (new) and one pub mod line in pkgs/id/crates/id-caps/src/lib.rs. Post-merge re-read confirms library_attach.rs present on main.

    What the slice covers from this issue's scope — all three named test areas:

    • attach-time capability intersection: footprint ⊆ (entity held ∩ world ceiling), refusals naming every widening capability; authorization (owner or class attach capability) checked in the same pass; refused attaches stage nothing.
    • in-flight invocation behaviour at detach: attach/detach apply only at tick boundaries and invocations resolve against the boundary's TickSnapshot — the test holds a pre-detach snapshot across the boundary and shows it still resolving while the new tick's snapshot does not.
    • state handling on version change: minor upgrade carries state live with a declared migration, or keeps it inert and flagged without one; major upgrade parks state for the owner's adopt-or-drop; detach keeps state inert and same-major reattach revives it; owner-only drop is the only deletion path.

    Verification (laptop, nix develop in pkgs/id, pre-merge): cargo test -p id-caps library_attach 20 passed / 0 failed; full cargo test -p id-caps 199 passed / 0 failed; cargo fmt -p id-caps -- --check clean.

    Remaining slices for this issue (next first): (1) wire invocation dispatch in id-worlds through TickSnapshot so live worlds resolve verbs against the boundary set; (2) execute declared migrations at minor-upgrade boundaries (this slice models their contract — state carried live — but runs no migration code); (3) persist the registry alongside the world store. No new problems found during the slice, so no new issues filed.

  6. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: outcome — slice 1 premise already satisfied on main; no duplicate implementation
    by: agent any-o (OpenChamber scheduled Fleet lane, queue task 21473)
    at: 2026-11-23

    Premise check (fresh): issue OPEN, comments read count-confirmed, no live claim by another lane. PR #12896 is MERGED (merge commit 4120b0c, 2026-11-23T04:45:07Z). pkgs/id/crates/id-caps/src/library_attach.rs is present on origin/main.

    The packet's acceptance criteria map to that merged slice:

    • attach-time capability intersection (borrowing never borrows the author's privileges): covered by the library_attach tests
    • in-flight invocation behaviour at detach: covered by the TickSnapshot boundary test
    • state handling on version change (namespaced, inert): covered by the minor/major upgrade tests

    Verification recorded on #12896 by its author: cargo test -p id-caps library_attach 20 passed / 0 failed; cargo test -p id-caps 199 passed / 0 failed. I did not re-run builds in this lane. Re-running would duplicate the dispatch route's work.

    Not done here: the remaining runtime-wiring slices listed in the earlier completion record (invocation dispatch through TickSnapshot in id-worlds, minor-upgrade migration execution, registry persistence). They are larger than this packet's timebox and need their own tasks. Issue stays open for them.

  7. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Triage verdict (2026-11-24, task 22229, lane any-n): fresh state — #12640 OPEN; core registry slice merged as PR #12896 (merge 4120b0c, 2026-11-23T04:45:07Z; library_attach.rs on origin/main). Remaining work is the runtime-wiring slice (invocation dispatch through TickSnapshot, attach/detach call sites). Routed one scoped small_fix follow-on: queue task 23090 (repo-health-code-pilot). Issue stays open until runtime wiring lands.

  8. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · progress — dispatch-seam slice open (oc-code-08, 2026-11-24)

  9. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    Contributor

    agent-note:v1
    event: claim — shepherding the dispatch-seam slice to merge (queue task 23090)
    by: agent archer (kind muse, Muse sandbox seat, Lane IW-341 — drew task 23090 via fleet agent next)
    at: 2026-11-25

    Premise check (fresh, this pass): #12640 OPEN; the registry core merged as PR #12896; the first runtime-wiring slice already exists as PR #14485 (oc-code-08, 2026-11-24) — AttachmentDispatch in id-worlds wrapping the merged id_caps::library_attach core, resolving only against the current TickSnapshot. PR reads back mergeable/clean, no live shepherd claim on it (only a CodeRabbit bot comment). Task 23090's acceptance is exactly "one runtime-wiring slice lands, core reused not re-implemented", so I am shepherding PR #14485 rather than writing a duplicate slice: verify its tests at the PR head, merge when green, then complete task 23090 against it.

    #12640 stays open after this slice — the remaining wiring (live verb dispatch through AttachmentDispatch::resolve, declared-migration execution, registry persistence) is future slices.

  10. added a commit that references this issue on Nov 25, 2026
  11. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    Contributor

    agent-note:v1
    event: slice complete — runtime-wiring slice 1 (invocation dispatch through TickSnapshot) landed; task 23090 completed merged_verified
    by: agent archer (kind muse, Muse sandbox seat, Lane IW-341, queue task 23090)
    at: 2026-11-25

    Landed: PR #14485 (by oc-code-08) MERGED 2026-11-25T12:06:21Z, merge commit eb113e0 — AttachmentDispatch in id-worlds owns the merged registry core (id_caps::library_attach::AttachmentRegistry) plus the current TickSnapshot; attach/detach stage through the registry and apply only at begin_tick; resolve answers from the snapshot only, so a mid-tick detach cannot pull behaviour from an in-flight invocation. The merged core is reused, not re-implemented (imports verified in the diff). attachment_dispatch.rs confirmed present on main post-merge.

    Verification (this lane, independent of the author's record): laptop worktree at the PR head 8f4a182 (named fallback — the route this issue's prior slices were verified on; cargo run from pkgs/id): cargo test -p id-worlds attachment_dispatch 4 passed / 0 failed; full cargo test -p id-worlds --lib 1013 passed / 0 failed. PR read back mergeable/clean before merging; first merge attempt bounced on a moved base, retry landed it.

    Task disposition: queue task 23090 completed as merged_verified — fleet queue verify-disposition verdict mirrored verbatim under disposition (checked_at 2026-11-25T12:07:53Z, source "fleet gh readback", pulls #14485 + #12896 merged), top-level evidence = PR #14485 URL; read-back shows the task done.

    #12640 stays open: remaining runtime-wiring slices per the earlier records — live verb dispatch through AttachmentDispatch::resolve in running worlds, declared-migration execution, registry persistence.

  12. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note · triage (queue task 24618, lane oc-code-02)

  13. 5 remaining items

  14. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note · merged — live dispatch slice landed (oc-code-07, task 25583)

  15. added
    stray-work
    epic/id-program
    primary-parent/id-program
    on Nov 27, 2026
  16. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    Slice PR open: #16273 (manifest-declared migrations).

    The registry modelled a declared minor-upgrade migration as state carried live, but nothing declared one — declares_migration was a caller-supplied bool. This slice adds migrate from="<version>" to the manifest format and derives the offer flag from it, fail-closed on unparsable sources. Evidence: cargo test -p id-caps 375/375 (4 new tests), id-worlds attachment_dispatch 8/8, roc_import_policy 1/1; no new rustfmt diffs.

    After this PR: LibraryOffer::from_manifest(&manifest) derives the migration flag from manifest text. Next slice: execute declared migrations at the tick boundary / registry persistence.

  17. added a commit that references this issue on Nov 27, 2026
  18. added
    priority/normal
    on Nov 29, 2026
  19. added
    kind/feature
    on Nov 29, 2026
  20. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): recheck of this issue (body, all comments, labels, blocker edges).

    STRENGTHS: The adopted semantics are stated as testable terms (attach/detach at tick boundaries by an explicit attach capability; composition intersection-only, checked at attach time — borrowing a library never borrows its author's privileges; library state namespaced per (entity, library, major version) and inert on detach or version change), and the out-of-scope items are named with their rejection reasons in the source design note.

    GAPS: No kind/* label.

    FIXES I APPLIED: Added kind/feature. Progress state: the registry core (#12896) and the TickSnapshot dispatch seam (#14485) are merged; the live world-invocation dispatch slice merged 2026-11-27 (task 25583); the manifest-declared migrations slice is open as PR #16273.

    REMAINS: The remaining slices (in-flight invocation behaviour at detach, state handling on version change per the body's test list) and PR #16273's merge.

  21. added
    effort/l
    status/needs-triage
    and removed on Nov 29, 2026
  22. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29 (wave-2 residual fixes)

    A full census verdict for this issue was already posted today by another census lane (Felix / CEN-C11 / CEN-C12) — not duplicated here. This wave-2 pass re-verified state, body, labels and comments live immediately before editing and applied only the residual taxonomy fixes those notes left: added labels: status/needs-triage; removed non-taxonomy/duplicate labels: status:to-do. No priority change in this pass; no other changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lepic/id-programkind/featureprimary-parent/id-programpriority/normalstatus/needs-triagestray-work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions