Repository navigation
fix: admit remote commands only through verified addressed contracts - #5603
Conversation
…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
…o 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
…acts (#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
|
The a60f004 integration run failed one engine test: 1404 passed, 1 failed. Source diagnosis identified two fixtures sharing a bounded process-global sample cache: one intentionally cycles more than its eight-directory capacity while the stuck-reader fixture expects its live sample to remain. None was the observed result, consistent with eviction. Repair 195e767 gives samples and their single disk-read flight one StateSampler owner. Production uses one shared instance; each lifecycle fixture uses an independent instance of exactly that implementation. Original assertions remain, with an added cross-owner eviction assertion while the first read is blocked. Independent source review APPROVE; exact-head CI remains required. No local Rust build beside serving. No retry, larger timeout, assertion relaxation or cache reset. |
An untrusted peer could publish command-shaped room messages that a node executed and residents perceived as speech. Commands now enter only through the identity's verified addressed inbox. Room subscriptions carry conversation, with no command execution path.
The kernel owns the addressed frame/inbox/port/handler contract. Ingress checks authenticated kind, addressee, command header, trust or verified capability before decoding the payload, then rejects path disagreement. Generation identity and validity are required. Invalid presented grants are refused without tier fallback. Commands and results use merged AIRC d26713bf; the assumed API and old body hints are removed.
The integrated consumer changes from #5605 use one sealed progress/completion exchange, required bodies and typed inbox failures. Execution and stream draining share lifetime and deadline; lost progress cancels work, success requires a final marker, and requester cancellation is mandatory. Obsolete room/store reply recovery and event-control parsers are deleted. Shutdown releases inbox ownership and interrupts handlers.
Validation: #5605 exact5158a7d3e946e75e4bf78ab2c9db886f6d28a10c passed the full selected Rust workflow,1224 core tests (zero failures;10ignored,2filtered), client/CLI regressions, hygiene and macOS ARM/Intel plus Windows artifact builds. Local cumulative source review approved the production fixes. Its squash integration a60f004 has the identical source tree; this PR's canary integration checks remain required.
Remaining scope: event-control adapters accept verified addressed frames but production dispatcher registrations/private event fan-out are not wired here. Existing event fan-out remains public room traffic. Deployment, reciprocal actual-session delivery, maintenance continuity and retained learning require separate live evidence.
The mandatory development doctrine is recorded once in docs/architecture/DEVELOPMENT-DOCTRINE.md, linked by AGENTS.md and CLAUDE.md: zero backward compatibility, explicit typed failures, one mechanism owner, crate boundaries and continuous refinement/deletion.