Skip to content

Define versioned capability-oriented port contracts #10160

Closed

Description

@dezren39

Problem and goal

Phase 1 root owner: land the common interface and private module-root skeletons before consumer adapters add leaf modules. Do not declare or export absent leaf modules. After this PR merges, this slice relinquishes shared-root writes; consumers do not edit roots.

Version and design basis

Version: V2. Settled design: https://github.com/developing-today/code/blob/main/doc/2026-11-13T03-40-00Z_design_id-atlas-summit/crosscut/versioned-design.md#port-contract (section: Port contract).
Tier: crucial.
Statement IDs: S0.2, S0.7, S0.10, S0.13, S0.14, S0.15, S0.16
Enables: Introduce separate store, blob, event-log, world, object-bucket, stream, and request-transport contract types with capability declarations, semantic guarantees, limits, and typed unsupported errors. Include a Kafka-like ordered-stream test double to verify additive supportability without selecting or implementing Kafka. This is the sole owner of common crate root exports/Cargo manifests and the shared test-vector schema; consumers add distinct module files and do not edit those roots. Owns stable crate-root exports/Cargo manifests and shared test-vector schema. The federation/mod.rs, graph/mod.rs, and triples/mod.rs files define roots only; they do NOT unconditionally export absent future feature modules. V2/V3 feature exports are wired by 9110-09 after exact module outputs exist, with a release gate. Consumers own distinct child modules and do not edit roots. The Kafka-like ordered-stream double is in-memory contract coverage only, not a Kafka adapter or deployment choice. The B registry inventory is exactly b01_key_lifecycle, b02_key_revocation, b03_replay_guard, b04_signature_suites, b05_signer_binding, b06_rejection_events, b07_conflict_report, b08_sync_scope, b09_anti_entropy, b15_peer_priority, b16_fanout_budget, b17_query_grants, b18_query_privacy, b19_signed_receipt, b20_request_identity, b21_result_dedup, b22_loop_inform, b23_routing_state, b24_topology_probe, b25_local_reputation, b27_claim_log, b28_takeover_response, b29_receipt_contradiction, b30_search_integrity, b31_peer_classes, and b32_ingest_gate under federation/slices/. The registry file records these exact paths but leaves not-yet-built modules unexported.

Scope and ownership

Parent: #9110 (native component/meta parent).

  • pkgs/id/crates/id-core/src/lib.rs (existing; owner: 9110-02)
  • pkgs/id/crates/id-core/Cargo.toml (existing; owner: 9110-02)
  • pkgs/id/crates/id-sync/src/lib.rs (existing; owner: 9110-02)
  • pkgs/id/crates/id-sync/Cargo.toml (existing; owner: 9110-02)
  • pkgs/id/crates/id-events/src/lib.rs (existing; owner: 9110-02)
  • pkgs/id/crates/id-events/Cargo.toml (existing; owner: 9110-02)
  • pkgs/id/crates/id-store/src/lib.rs (existing; owner: 9110-02)
  • pkgs/id/crates/id-store/Cargo.toml (existing; owner: 9110-02)
  • pkgs/id/crates/id-worlds/src/lib.rs (existing; owner: 9110-02)
  • pkgs/id/crates/id-worlds/Cargo.toml (existing; owner: 9110-02)
  • pkgs/id/crates/id-core/src/port.rs (new; owner: 9110-02)
  • pkgs/id/crates/id-core/src/graph/mod.rs (new; owner: 9110-02)
  • pkgs/id/crates/id-core/src/triples/mod.rs (new; owner: 9110-02)
  • pkgs/id/crates/id-sync/src/federation/mod.rs (new; owner: 9110-02)
  • pkgs/id/crates/id-sync/src/federation/slices/mod.rs (new; owner: 9110-02)
  • pkgs/id/test-vectors/schema.json (new; owner: 9110-02)
  • pkgs/id/tests/port_contract.rs (new; owner: 9110-02)
  • pkgs/id/tests/kafka_like_stream_contract.rs (new; owner: 9110-02)
  • pkgs/id/tests/support/kafka_like_ordered_stream.rs (new; owner: 9110-02)
    Hard dependencies (native blockers): 9110-01 — Required output from slice 9110-01.
    Soft sequencing (not blockers): none

Test / evidence first

Create or validate pkgs/id/tests/kafka_like_stream_contract.rs first. Proposed command: cargo test --manifest-path pkgs/id/Cargo.toml --test port_contract --test kafka_like_stream_contract
Oracle: model — expected Capability negotiation chooses the ordered-stream profile only when declared; in-memory duplicate/retry traces conform without a Kafka client or runtime dependency.; verifier: A small independent ordered-stream reference state machine checks sequence, redelivery, ack, and unsupported-capability outcomes..

Done and rollback

Done when the declared oracle passes and test/evidence output plus changed-file summary is attached. Research evidence: doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-b/implementation-slices.json; doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-a-graph/implementation-slices.json; doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-a-addressing/implementation-slices.json; doc/2026-11-13T03-40-00Z_design_id-atlas-summit/inventory-live/live-issues.json.
Rollback: Keep existing adapters and data formats; remove or revise only unused additive exports after all consumers are migrated. Never remove a module/root still imported by a consumer.

Manifest SHA-256 approval binding: 3b5bce3523945bf5adaa28739f0b90b7b70ff1d6522b4ac827246654e8ff6b06.

Activity

  1. developing-today commented on Nov 14, 2026

    @developing-today
    Contributor
  2. 65 remaining items

  3. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged
    task: 17010
    lane: code-b
    summary: Preflight for slice 9110-02 (task 17010, lane code-b, 2026-11-14). Native-blocker check: GET repos//issues/10160/dependencies/blocked_by returns exactly one blocker, #9418, and #9418 is CLOSED (fresh gh verify this shift) — the native gate is CLEAR. Caveat: the issue body also names "9110-01 — Required output from slice 9110-01" as a hard dependency in prose; it is not a native blocked_by entry, and no queue task for 9110-01 was visible in the queued/claimed/parked/blocked/done list windows at preflight time. The implementation lane must verify 9110-01's output exists on main before building on it and dep-block naming it if absent. Contingent research trigger: none. Issue #10160 is OPEN with no hard-stop labels (no held / user/owned / do-not-merge / do-not-auto-edit). No implementation was performed in this preflight packet (preflight-only by its terms; no production rollout is authorized). Implementation was split to follow-on task 17131, dedupe-checked against the queue (no existing fix task for #10160). Manifest binding on the issue: SHA-256 3b5bce3523945bf5adaa28739f0b90b7b70ff1d6522b4ac827246654e8ff6b06.
    next: task 17131 implements 9110-02 within the issue's approved scope and stated oracle (test first: kafka_like_stream_contract), after verifying the 9110-01 output caveat above.

  4. added and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 14, 2026
  5. added a commit that references this issue on Nov 14, 2026
  6. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Agent note — task 17131 DONE: slice 9110-02 implemented and merged (lane code-a, 2026-11-14)

    PR #10327 MERGED (merge commit c8fcfa68235937ed6a21e8752238a03795a821f3); this issue auto-closed via the PR's Closes line.

    What landed, per the settled port-contract design:

    • pkgs/id/crates/id-core/src/port.rs — separate port types with their own traits (record store, blob store, event log, world store, object bucket, message stream, request/response transport); PortDescriptor (contract version, resource identity/scope, required/optional capabilities, semantic guarantees, hard limits); OperationEnvelope; typed PortError; negotiate() granting exactly the declared-and-required capabilities, refusing before side effects.
    • Module roots: id-core graph/ and triples/ (roots only, no absent modules exported), id-sync federation/ + federation/slices/ recording the exact 26-name B-slice registry unexported; id-events/id-store/id-worlds roots re-export the contract for their port kinds (manifests already carried the id-core dependency from 9110-01 — no manifest changes needed).
    • pkgs/id/test-vectors/schema.json — shared conformance test-vector schema.
    • In-memory Kafka-like ordered-stream double (contract coverage only) + conformance tests against an independent reference state machine.

    Evidence: cargo test --manifest-path pkgs/id/Cargo.toml --test port_contract --test kafka_like_stream_contract → port_contract 7/7 passed, kafka_like_stream_contract 3/3 passed. Codex review on the PR failed on usage limits with zero findings produced (same disposition as the day's other merges); merged on the test evidence above.

    With #10160 closed, the native-blocker gate clears for the downstream ID/Atlas slices whose preflights self-blocked on it today (they re-serve as their remaining blockers clear).

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions