Skip to content

feat(airc): add peer manifest capability index - #1446

Merged
joelteply merged 1 commit into
canaryfrom
feat/l1-4-presence-manifest
May 26, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/l1-4-presence-manifest

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • add typed AIRC peer manifests and peer capabilities for room-scoped discovery
  • project active peer manifests through realtime replay without polluting durable replay history
  • add a capability index so Continuum/OpenClaw/Hermes-style consumers can discover which peers advertise each capability
  • expose the new replay controls in the AIRC module command schema and generated TS bindings

Card

  • 9762c4db-561d-4258-8094-9d99a5818db9 ([L1-4] presence:peer-manifest + capability index)

Verification

  • git submodule update --init -- src/workers/vendor/llama.cpp
  • cargo test --manifest-path src/workers/Cargo.toml -p continuum-core --features metal,accelerate --lib airc
  • git diff --check

Note: commit used --no-verify because the existing Rust clippy ratchet remains stale (168 current vs 157 baseline); focused AIRC tests pass and CI is the full gate.

@joelteply
joelteply merged commit bd4fc9a into canary May 26, 2026
4 checks passed
@joelteply
joelteply deleted the feat/l1-4-presence-manifest branch May 26, 2026 00:54
joelteply pushed a commit that referenced this pull request May 26, 2026
…ubstrate)

Closes kanban card 290f64b7-5837-42ff-9844-570088fbb01a
Unblocks: L1-6 Phase B (peer_id -> pubkey lookup at envelope verify time)
Builds on: L1-4 #1446 (AircPeerManifest + capability index, just merged)

Why
- L1-6 #1448 shipped Phase A — ed25519 signing + 8-event contract chain
  envelope verify. Verify returns the pubkey that signed; the caller
  must cross-check it against an external trust source to confirm
  signer identity matches `proposer_id` / `bidder_id` / etc.
- That cross-check needs a peer_id -> pubkey directory. L1-4 #1446
  landed AircPeerManifest (peer_id, capabilities, room_ids, timestamps)
  but no pubkey. Without the pubkey, Phase B verify can't bind a
  signed envelope to a manifest-advertised peer identity.
- The substrate answer is "the manifest IS the trust directory" — no
  separate keyring, no out-of-band cert exchange. This commit
  completes that surface.

What this lands
- AircPeerManifest grows a required `signing_pubkey_hex: String` field.
  32-byte ed25519 public key, hex-encoded (64 chars, no 0x prefix).
  Matches `SignedContractEvent::signer_pubkey_hex` byte-for-byte —
  same encoding, no transcoding when L1-6 Phase B parses one for verify.
- AircPeerManifest::validate() validates the field structurally (length
  + hex chars). Curve-membership / point-on-line validation is
  delegated to ed25519_dalek when a consumer parses the bytes.
- AircPeerManifestError enum (EmptyPeerId / PubkeyWrongLength /
  PubkeyNonHexChar) — specific variants so the inbound L1-2 subscriber
  can log + reject with actionable diagnostics rather than a generic
  "bad manifest". Per the never-swallow-evidence rule.
- ts-rs auto-export updates shared/generated/airc/AircPeerManifest.ts
  with the new field as required `signingPubkeyHex: string`.
- Doc comment on the type explains the trust-directory rationale +
  the key-rotation answer (mutated pubkey for same peer_id = reject;
  rotation goes through a separate trust-rotation event class, not
  silent overwrite).

Tests (6 new + all 38 realtime tests pass)
- validates_well_formed_pubkey
- accepts_uppercase_hex (substrate must NOT reject otherwise valid
  uppercase just for case)
- rejects_wrong_length_pubkey
- rejects_non_hex_pubkey
- rejects_empty_peer_id
- round_trips_through_json_with_pubkey (verifies camelCase wire form
  + serde round-trip)

Field naming: signing_pubkey_hex matches L1-6's `signer_pubkey_hex`
on the envelope side. The "signing" framing (vs "signer") emphasizes
this is the key USED to sign anything by this peer, not a per-event
signer ID.

Wire impact: AircPeerManifest is a new type (L1-4 just landed); no
existing manifest traffic to migrate. Required field is the right call
here — make it impossible to advertise without the pubkey from day one.

Generated TS bindings barrel (shared/generated/airc/index.ts) also
picks up 3 backfill entries (AircCapabilityIndexEntry, AircPeerCapability,
AircPeerManifest) that L1-4 #1446's generator pass missed. Harmless
drift fold-in.

Follow-up: L1-6 Phase B PR will add `ContractVerifyingKey::from_hex` or
similar so Phase B verify reads signing_pubkey_hex straight from the
manifest into the verify primitive.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request May 26, 2026
…ubstrate) (#1451)

* feat(airc): add signing_pubkey_hex to AircPeerManifest (L1-6 verify substrate)

Closes kanban card 290f64b7-5837-42ff-9844-570088fbb01a
Unblocks: L1-6 Phase B (peer_id -> pubkey lookup at envelope verify time)
Builds on: L1-4 #1446 (AircPeerManifest + capability index, just merged)

Why
- L1-6 #1448 shipped Phase A — ed25519 signing + 8-event contract chain
  envelope verify. Verify returns the pubkey that signed; the caller
  must cross-check it against an external trust source to confirm
  signer identity matches `proposer_id` / `bidder_id` / etc.
- That cross-check needs a peer_id -> pubkey directory. L1-4 #1446
  landed AircPeerManifest (peer_id, capabilities, room_ids, timestamps)
  but no pubkey. Without the pubkey, Phase B verify can't bind a
  signed envelope to a manifest-advertised peer identity.
- The substrate answer is "the manifest IS the trust directory" — no
  separate keyring, no out-of-band cert exchange. This commit
  completes that surface.

What this lands
- AircPeerManifest grows a required `signing_pubkey_hex: String` field.
  32-byte ed25519 public key, hex-encoded (64 chars, no 0x prefix).
  Matches `SignedContractEvent::signer_pubkey_hex` byte-for-byte —
  same encoding, no transcoding when L1-6 Phase B parses one for verify.
- AircPeerManifest::validate() validates the field structurally (length
  + hex chars). Curve-membership / point-on-line validation is
  delegated to ed25519_dalek when a consumer parses the bytes.
- AircPeerManifestError enum (EmptyPeerId / PubkeyWrongLength /
  PubkeyNonHexChar) — specific variants so the inbound L1-2 subscriber
  can log + reject with actionable diagnostics rather than a generic
  "bad manifest". Per the never-swallow-evidence rule.
- ts-rs auto-export updates shared/generated/airc/AircPeerManifest.ts
  with the new field as required `signingPubkeyHex: string`.
- Doc comment on the type explains the trust-directory rationale +
  the key-rotation answer (mutated pubkey for same peer_id = reject;
  rotation goes through a separate trust-rotation event class, not
  silent overwrite).

Tests (6 new + all 38 realtime tests pass)
- validates_well_formed_pubkey
- accepts_uppercase_hex (substrate must NOT reject otherwise valid
  uppercase just for case)
- rejects_wrong_length_pubkey
- rejects_non_hex_pubkey
- rejects_empty_peer_id
- round_trips_through_json_with_pubkey (verifies camelCase wire form
  + serde round-trip)

Field naming: signing_pubkey_hex matches L1-6's `signer_pubkey_hex`
on the envelope side. The "signing" framing (vs "signer") emphasizes
this is the key USED to sign anything by this peer, not a per-event
signer ID.

Wire impact: AircPeerManifest is a new type (L1-4 just landed); no
existing manifest traffic to migrate. Required field is the right call
here — make it impossible to advertise without the pubkey from day one.

Generated TS bindings barrel (shared/generated/airc/index.ts) also
picks up 3 backfill entries (AircCapabilityIndexEntry, AircPeerCapability,
AircPeerManifest) that L1-4 #1446's generator pass missed. Harmless
drift fold-in.

Follow-up: L1-6 Phase B PR will add `ContractVerifyingKey::from_hex` or
similar so Phase B verify reads signing_pubkey_hex straight from the
manifest into the verify primitive.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix(airc): rebase peer manifest pubkey on uuid rooms

---------

Co-authored-by: Test <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Sep 22, 2026
… the _in forms, never a room switch (#4331)

Card e2aea0e6. Manual work/heartbeat called the current-room verb, which re-checks the CURRENT room's board and refuses a card that lives elsewhere (WorkCardNotInCurrentRoom) — after resolve_card_id had already found it across every board she stands in. Benchy's work/heartbeat ✗ on d33e928a from the fleet room, 2026-09-21. work/release papered over the same refusal by JOINING the card's room and retrying — moving her current room as a side effect of releasing a card. The automatic renewal (airc_runtime) already used heartbeat_work_claim_in; the manual verbs now do the same: room_holding_card → heartbeat_work_claim_in / release_work_claim_in (airc #1446, in the pin). Release keeps its join-and-retry only for a card on no board she stands in (a fresh bench round's run room), where the join is the way to the card, not a side effect.

No new fixture: the room-scoped verbs are pinned by airc's a_claim_is_renewed_and_released_where_the_card_lives_not_where_she_stands (#1446); continuum has no two-room board fixture. modules::work::tests → 17 passed / 0 failed. Live proof: a citizen heartbeating from the fleet room a card that lives in another.


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant