[FEATURE] Preserve realm directory preparation failure context #22

Open
opened 2026-10-17 09:48:23 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

The realm filesystem VM diagnostic can report a directory-preparation refusal
as INTERNAL without its stored first failure class. That is insufficient to
distinguish provider rejection, native progress, invalid evidence or cleanup.
Launchd has no logging route; adding one would broaden its authority.

Proposed behavior and scope

Add an explicit directory-preparation diagnostic operation on the caller's
existing Launchd endpoint. Enable it only in the existing realm-bindings
integration configuration. Preserve the ordinary 56-byte protocol exactly;
use a separate fixed 80-byte response for the diagnostic operation.

Carry the original result, typed first failure and a validated provider class
where one exists. Distinguish values already stored as u32 from retained native
i64 status; do not reconstruct information lost by older adapters.

Authority, security and reliability

Apply the ordinary caller, realm, source and generation checks before effects
and before publishing context. Report only this caller's original request;
return no paths, object IDs, slots or memory contents. Add no grant, endpoint,
logging route or command selector, and no follow-up IPC after a refusal.

Preserve the first error and independent cleanup obligations. Uncertain custody
cannot produce diagnostics or resume ordinary work. The reply is descriptive
failure data, not authority or proof that cleanup completed.

Acceptance criteria

  • Retain the first preparation and safely correlated provider failure.
  • Keep ordinary request/reply codecs and capability inventories unchanged.
  • Add strict diagnostic codecs and same-policy producer/consumer handling.
  • Cover full-width values, framing, correlation, caller loss and cleanup.
  • Observe the existing VM diagnostic with its original limits and gates.

Alternatives and tradeoffs

A new logging capability is unnecessary. Appending fields to the ordinary
reply breaks its exact framing; an additional query cannot safely recover an
uncertain request. The explicit operation keeps its lifetime and reply together.

Tracking and rollout

Supports phase completion
and remaining integration gates.
Publish coherent LibIPC, Launchd, Exsh and Integration revisions. Keep ordinary
builds and grants unchanged. This diagnostic does not establish or repair the
underlying VM refusal by itself.

## Problem and motivation The realm filesystem VM diagnostic can report a directory-preparation refusal as `INTERNAL` without its stored first failure class. That is insufficient to distinguish provider rejection, native progress, invalid evidence or cleanup. Launchd has no logging route; adding one would broaden its authority. ## Proposed behavior and scope Add an explicit directory-preparation diagnostic operation on the caller's existing Launchd endpoint. Enable it only in the existing realm-bindings integration configuration. Preserve the ordinary 56-byte protocol exactly; use a separate fixed 80-byte response for the diagnostic operation. Carry the original result, typed first failure and a validated provider class where one exists. Distinguish values already stored as u32 from retained native i64 status; do not reconstruct information lost by older adapters. ## Authority, security and reliability Apply the ordinary caller, realm, source and generation checks before effects and before publishing context. Report only this caller's original request; return no paths, object IDs, slots or memory contents. Add no grant, endpoint, logging route or command selector, and no follow-up IPC after a refusal. Preserve the first error and independent cleanup obligations. Uncertain custody cannot produce diagnostics or resume ordinary work. The reply is descriptive failure data, not authority or proof that cleanup completed. ## Acceptance criteria - [x] Retain the first preparation and safely correlated provider failure. - [x] Keep ordinary request/reply codecs and capability inventories unchanged. - [x] Add strict diagnostic codecs and same-policy producer/consumer handling. - [x] Cover full-width values, framing, correlation, caller loss and cleanup. - [ ] Observe the existing VM diagnostic with its original limits and gates. ## Alternatives and tradeoffs A new logging capability is unnecessary. Appending fields to the ordinary reply breaks its exact framing; an additional query cannot safely recover an uncertain request. The explicit operation keeps its lifetime and reply together. ## Tracking and rollout Supports [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65) and [remaining integration gates](https://git.erikinkinen.fi/erix/integration/issues/6). Publish coherent LibIPC, Launchd, Exsh and Integration revisions. Keep ordinary builds and grants unchanged. This diagnostic does not establish or repair the underlying VM refusal by itself.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:33 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/launchd#22
No description provided.