Skip to content

fix: enforce sealed command deadlines, cancellation and ingress contracts - #5605

Merged
joelteply merged 11 commits into
fable/ingress-contractfrom
codex/addressed-event-client
Oct 30, 2026
Merged

joelteply merged 11 commits into
fable/ingress-contractfrom
codex/addressed-event-client

Conversation

@joelteply

@joelteply joelteply commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Remote commands previously depended on an assumed AIRC API, room-based progress and transcript reply recovery. This binds Continuum consumers to the merged sealed command bus at d26713bf, using one prearmed exchange for progress and completion, and removes the obsolete room recovery and event-control parsers.

Command ingress owns execution and stream draining together, retains the verified deadline, rejects expired requests, and cancels work when progress delivery fails. Inbox failures remain typed; closed owners release their leases and shutdown interrupts handlers. Streaming success requires a final marker. Generation ID and validity are mandatory; malformed metadata is refused rather than replaced. Presented grants must verify; rejected grants cannot fall through to tier authorization. Cancellation is mandatory regardless of beacon capabilities.

Stacked on Fable's #5603. Exact head5158a7d3e946e75e4bf78ab2c9db886f6d28a10c: Rust workflow41077967371 PASS, including1224 core tests with zero failures (10ignored,2filtered), client lifecycle tests and Windows lib/tests compilation. Hygiene41077967423 PASS. Independent local cumulative source review approved caf5d36; the only subsequent change explicitly marks the extracted test file cfg(test). Platform artifact workflow41077967266 remains pending on Windows; macOS builds passed.

Proof includes zero execution for invalid generation metadata or rejected presented grants, expiry/lag handling without losing the inbox, progress failure cancellation, mandatory cancellation without a capability beacon and teardown. No local Rust compilation beside serving. No deployment, actual-session maintenance continuity or learning recovery claim.

Event-control adapters now accept verified addressed frames, but production dispatcher registrations and private event fan-out remain separate unfinished work; existing event fan-out is public room traffic.

@joelteply
joelteply marked this pull request as ready for review October 30, 2026 15:48
@joelteply joelteply changed the title fix: bind private command consumers to sealed progress and deadlines fix: enforce sealed command deadlines, cancellation and ingress contracts Oct 30, 2026
@joelteply
joelteply merged commit a60f004 into fable/ingress-contract Oct 30, 2026
47 checks passed
@joelteply
joelteply deleted the codex/addressed-event-client branch October 30, 2026 16:18
joelteply added a commit that referenced this pull request Oct 30, 2026
…5603)

* A peer command never reaches a mind, and runs only direct, addressed here, from a tier that meets the command (ingress contract)

Incident 2026-10-30 00:28-00:38Z: peer e9093c03 (untrusted in the trust store)
published persona/placement/reserve and ai/generate requests into #general; the
M5 executed them (airc.command.accepted caller=e9093c03) and fed the same frames
to two residents as room speech (mind.feed.event residents=2).

- continuum-airc-protocol::inbound: the ONE inbound decode point. An airc event
  becomes a ProtocolEnvelope or a ConversationEvent from HEADER facts only
  (continuum.body_hint, airc.correlation_id, the addressee, sender, room); the
  payload stays opaque. A guard test fails if the classifier reads a payload.
- perception_feed::feed takes only a ConversationEvent; inbound_attach routes a
  protocol frame away from perception, the chat projection and the bus.
- command_ingress::ingress_contract: a command request executes only if direct
  (never a room broadcast), addressed to this node, names its command in the
  continuum.command.path header (the decoded body must agree), and the caller's
  airc trust tier meets the command ACL's declared tier (Provisional -> friend,
  above -> own_account; untrusted meets nothing) or a verified grant confers it.
  Typed IngressRefusal per rule, probe airc.command.ingress_refused (caller,
  path, channel, tier), refusal replies name the rule and never echo params.
- The command pump keys on the classifier instead of its own header string.
- TwoAircLoopback enrols its peers at own_account (two nodes of one account).
- Pure moves to keep files under 1,000 lines: inbound_attach tests to
  inbound_attach/tests.rs, StreamPublisher to command_ingress/stream_publisher.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Commands arrive only through the addressed inbox; the room path has no command handling (rebuild on the airc addressed seam)

Rebuilds the ingress contract on the agreed airc API seam (airc#1620 foundation
c7083d04 + the addressed module still to publish). BLOCKED on that module: this
does not compile until airc exports AddressedInbox / VerifiedAddressed /
AddressedKind and the reply bound to a request.

- continuum-kernel routing::addressed_inbox: the core's seam (AddressedFrame,
  AddressedInbox, AddressedPort, AddressedHandler) with the airc impls, plus
  test-fixtures FakeFrame / FakeInbox / FakePort so the contract runs without a
  daemon.
- command_ingress: CommandRequestHandler is an AddressedHandler only. The
  contract reads the verified fields: kind() == Command, to() == this node, the
  path from the typed header, from()'s airc trust tier >= the command ACL's tier
  (or a verified grant); the body is decoded only after, and must name the same
  command. Typed IngressRefusal per rule; replies bound to the request.
  ParsedEnvelope / parse_envelope / ConsumerAdapter / HANDLER_NAME deleted.
- The command pump reads only the addressed inbox (no room subscription).
- COMMAND_REQUEST_BODY_HINT / COMMAND_RESPONSE_BODY_HINT deleted with every
  stamp and check (kernel AircTransport, engine AircLiveTransport, client
  AircIpcTransport, its serve loop now on the inbox too). No compatibility branch.
- Room events: inbound::classify routes airc's Command / CommandResult kinds
  (and event-protocol hints / bus correlation) away from perception by transport
  kind and headers; the payload-guard test stays.
- await_reply consumers read VerifiedAddressed getters.
- Tests rewritten around the fake inbox: untrusted sender refused, frame
  addressed elsewhere ignored, own_account command executes, lying header
  refused, and a source guard that nothing on the room path reaches the command
  receiver. Integration tests drive the real receiver from the inbox.
- airc rev bumped to c7083d04 (lock rewritten by rev; cargo will settle it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix: enforce sealed command deadlines, cancellation and ingress contracts (#5605)

* fix: migrate command consumers to sealed progress and retained deadlines

* fix: finish client addressed API migration and fixture dependency scope

* Migrate event control handlers to verified addressed requests

* Keep client command serving alive across rejected inbox items

* Route placement reservation commands by authenticated peer

* Execute client transport regressions in the existing CLI CI job

* Remove obsolete command compatibility paths and require cancellation

* Define continuous refinement and hard architectural contracts

* Align learning doctrine with existing conscious and dream modes

* fix(ingress): refuse invalid generation metadata and presented grants

* test(ingress): mark extracted metadata tests as test-only

* fix(engine): own sample cache and read flight in one sampler

---------

Co-authored-by: Claude Opus 5.5 <[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