[BUG] Guarded realm preparation stages an executable without mediator layout #10

Open
opened 2026-09-25 10:21:43 +02:00 by erikinkinen · 0 comments
Owner

Summary

The guarded-preparation diagnostic selects ordinary bin/true as a realm mediator fixture. The current authenticated Loaderd contract requires the selected mediator root to contain its exact immutable arena layout. Coreutils has no such layout, so the unchanged fixture no longer reaches its preparation marker on the counted-client graph. This blocks both the older two-mediator startup scenario and the new configured-client scenario before any configured-client execution.

This is a diagnostic/input contract mismatch. Loaderd's root-layout validation must remain strict; the correction should use the actual private Posixd executable for unstarted guarded staging and package it whenever that diagnostic is selected.

Reproduction

At signed Integration 8f4a1de524b7d7041beddf6029fecbf10b733ea9 and its original component catalog, including Exsh 29ada4eb88ac84a248305201f95a875ce8b53b41, run:

bash scripts/run-scenario.sh tests/scenarios/appliance-disk-image-realm-clients-positive.toml components.toml
bash scripts/run-scenario.sh tests/scenarios/appliance-disk-image-realm-startup-positive.toml components.toml

One original local execution of each scenario fails at the same request. These are different maintained scenarios, with the original 120-second guest and 45-second serial-progress bounds; neither is an unchanged CI retry.

Expected and actual behavior

After the existing realm-admission marker, guarded preparation should stage an authenticated mediator executable without starting it, acknowledge guarded custody, retire the original child and reject its stale handle. All following scenario markers and ordinary shell exit remain required.

Both runs emit:

ERIX_EXSH:REALM_ADMISSION:VERIFIED
ERIX_EXSH:REALM_ADMISSION:FAILED request=0000000d kind=0000000b first=000006d1 second=00000002

The typed PREPARE operation 0x6d1, request 13, returns INVALID_ARGUMENT (2). The preparation, startup and configured-client success markers are absent. Exsh's recorded endpoint is 0x520, with exit 0xE5; this is not evidence of a Launchd process-event failure. Rootd subsequently exits 0xDC, and the original serial-progress watchdog ends both scenarios with command status 1.

Environment and identity

  • Integration: 8f4a1de5; Exsh: 29ada4eb.
  • Loaderd: e0562cdc; the full 76-repository original catalog is recorded by Integration.
  • Release x86_64 QEMU appliance, one CPU, Rust 1.97.1; configured-client policy uses two realm rows, four client rows and 576 plan bytes. The older startup scenario keeps its original policy.
  • Only the shell's existing Launchd route and cwd SEND copy are used; no additional guest authority was granted.
  • Configured-client packaged disk SHA-256: b159c4572264108af71fd5ed1f5aa44b40f1e130a9bcaf81825ec90d474a6e4d.
  • Last accepted older startup graph: Integration 66ddc78d. This is not a prior configured-client acceptance.

Evidence and prior checks

Complete logs identify 119 packaging refusals caused by an obsolete smoke-only Launchd policy tuple. The same producer remains defective at 4efc9d5d; the new host regression reproduces its status-1 rejection. Issue 96 tracks the correction and native regression acceptance.

The other failures are three realm PREPARE refusals matching the older guarded-fixture mismatch in Exsh issue 10, plus the original 120-second ext4 quota timeout. Later targeted realm passes do not rewrite those original failures. The new smoke fix explicitly disables realm/client/plan storage in the current 16-field tuple and preserves strict input rejection; corrected host and native checks are in progress. Original CI1797/1798 is running and CI1799–1810 waits. Accepted progress stays 15.42%, 414/874 sub-items and 17/460 whole parents. Numeric CPU values, loss/exhaustion and both full EriX guest builds plus external toolchain rebuilding remain open.

Native configured-client acceptance — 25 September 2026: the exact signed Integration 7a42fa26 graph passes the configured-client, preparation and startup VMs with all original markers, deadlines and cleanup gates. The configured witness seals two isolated realms, observes six successful byte-client exits across three realm instances, checks independent retirement, rejects stale client selectors and reuses a Launchd realm record with a new generation. This proves the native configure/seal/publish/mediated-I/O criterion; full Procd managed-row/final CPU reclamation, supervisor loss and resource ceilings remain separate requirements.

Launchd 372ab70e retains only the required result-carrier GRANT and preserves RECV-only client copies plus complete setup retirement. All six strict 497-test configurations and original CI179/180 pass. Loaderd 5bcf522c retains the counted grant destination; four strict 145-test configurations and original CI107/108 pass. The original red tests, failed native runs and admitted host TCG diagnostic remain preserved. Docs 6a1a9686 passes the full 2,655-page manual and 45 tests locally and in original CI1085/1086; four complete CI logs total 824,660 bytes and final warnings are zero.

The configuration carrier defect, counted grant defect and configured-client stall are resolved by this component and native evidence. The Exsh fixture report retains its pending release compiler/frame validation despite the three native passes. Complete Integration CI1801/1802 is still queued. Whole-fleet authority/source/effect/frame acceptance, final accounting/profiler observation, rebuilding the external Rust/LLVM/runtime toolchain inside EriX and both full EriX guest-build generations remain open.

Original prerequisite Integration CI1793/1794 each passes 490/491 scenarios; Rust and Markdown pass, and six complete logs total 27,432,406 bytes with zero warnings. CI1794 retains the ext4 quota timeout. CI1793 instead exposes a distinct one-shot replay QMP connection loss, recorded using the canonical bug template and phase label. No original workflow was rerun, and no deadline or authority check was relaxed.

Only the existing native-witness sub-item gains credit: 15.42% weighted progress, 413/873 sub-items. Whole acceptance remains 3.86%, 17/460 parents.

The configured-client VM stalls after the same three inherited markers and a private process exit with status 5. Its original failure retains 109 artifacts and 56,130 serial bytes, zero image-warning candidates and no process-owner cleanup failure. Integration issue 92 preserves that observation. An admitted host TCG counter run against the identical guest disk reproduces the stall under the original 120/45-second bounds. Its complete capture contains 100,639 translations and 74,009 code groups. The top 100 groups cover 85.32% of the 65,912,963,324 translated-instruction upper bound; uniquely matching Kernel mapping-batch code accounts for 38.67% of that total. This is a performance investigation candidate, without a measured speedup, timing attribution or accepted native result. Shared code, addresses and process identity remain separate evidence questions.

Exact retained executable-region comparison with original symbol-bearing artifacts narrows the failure to Posixd configuration progress and its native exit; the exit block uniquely matches Posixd across all 68 packaged executables/shared objects. The source mismatch is confirmed independently: Launchd retains only RECV on its configuration receiver, while native COMPLETE requires carrier GRANT for capability-bearing client replies. Enforcing that actual gate in the maintained complete-record pull fixture fails the original implementation. Launchd issue 10 tracks the correction and original red control. The local correction retains exactly RECV | GRANT only for counted-client replies, preserves readiness-only RECV, mediator SEND-only routes and RECV-only client copies, and retains complete receiver disposal before seal/cancellation. Full component validation is running; corrected native client execution remains required.

Both original Docs CI1083/1084 pass, with 45 document tests and the 2,653-page manual. All four complete logs total 824,211 bytes; normal early-pass references converge to zero final warnings. Original Integration runs remain running or queued, without unchanged reruns. No canonical checklist credit is added: configured native clients, managed-row reuse, complete authority/frame closure, profiling improvements and both full guest-build requirements remain open.

Guarded preparation uses the actual Posixd root with its required immutable layout, and actual private mediators reach readiness and retire independently.

The configured-client VM now passes all three inherited markers, then its first PREPARE_REALM_CLIENT request 34 (opcode 0x6d7) returns INTERNAL (5). The original failed run retains 109 artifacts and 56,226 serial bytes, with zero build-warning candidates and no process-owner cleanup failure. Loaderd issue 5 records the separate defect: the counted Launchd client producer selects its own grant column, while Loaderd's intake, handler and reply retain legacy fixed destination 645. Two independent actual-code tests reproduce intake refusal and reply redirection. A correction must preserve the exact original client destination while retaining legacy destination, source receipt, actual caller, relation and cleanup gates.

The mediator-fixture correction is demonstrated in both prerequisite VMs; Exsh issue 10 remains linked to full configured-client validation. No client execution, configuration/seal/byte-I/O acceptance, managed-row reuse, profiler observation or full guest build is claimed. Original Exsh CI281/282 is running, and original Integration CI1797/1798 is queued; earlier original Integration cohorts remain under observation. Exsh compiler/frame gates remain open, and no unchanged CI was restarted. These repairs add no canonical checklist credit.

All 174 Integration helper commands and six strict profiler commands pass. Sixteen selector combinations include preparation-only packaging and admission-only exclusion; actual private filesystem aliases still require exact artifact and runtime-graph identities. Seven Exsh development selections pass 986 tests each, fourteen host/native builds, strict Clippy and private-rustdoc configurations pass, and all 355 frame-checker controls pass without warnings. The initial changed wire-test byte count and documentation wrapping failures are corrected with original receipts retained. The unchanged Integration orchestration retains four strict 320/321-test matrices. No Loaderd check, capability right, sidecar rule or guest deadline is relaxed.

Seven Exsh release unit-test compilations still reach the original silence limit and all six native frame observations remain incomplete; compiler issue 9 and frame issue 4 stay open. Fixture regression 10 preserves both original failed VMs. Fresh corrected preparation-only, older startup and configured-client VM execution remains required. These component checkpoints earn no new acceptance credit; complete authority closure, managed-row reuse, profiler observation, external toolchain rebuilding and both full EriX guest builds remain open.

The guarded diagnostic selects bin/true. Loaderd's materialization requires a layout extracted from the authenticated root for every realm mediator. Direct inspection of the actual packaged PT_LOAD bytes finds no realm layout in Coreutils and exactly one read-only, non-executable layout in Posixd. This establishes the source/artifact mismatch; it does not claim instruction-level tracing of the guest refusal.

Configured-client execution retains 109 artifacts and 56,249 serial bytes, SHA-256 f5ea4a91e42a73b5bf669b92b1c49e6f8f198932a071663effe051ce336ce8a0. Both original commands have zero image-warning candidates and no process-cleanup failure. The image passed complete original-source closure, dynamic metadata for 68 artifacts, all 174 host helpers and strict library/profiler checks. Host transport fixtures had accepted the obsolete selector and did not establish native mediator-layout admission.

Tracking

Exsh feature work, Exsh PR3, Integration PR12, and phase completion.

  • Preserve the original failing scenarios and exact source/artifact evidence.
  • Select the actual private mediator for guarded staging and explicitly package it for preparation-only scenarios.
  • Correct the independent transport and packaging controls while retaining malformed-layout refusal and all authority gates.
  • Pass relevant strict component checks and the corrected preparation/startup/configured-client VMs with original deadlines and markers.
## Summary The guarded-preparation diagnostic selects ordinary `bin/true` as a realm mediator fixture. The current authenticated Loaderd contract requires the selected mediator root to contain its exact immutable arena layout. Coreutils has no such layout, so the unchanged fixture no longer reaches its preparation marker on the counted-client graph. This blocks both the older two-mediator startup scenario and the new configured-client scenario before any configured-client execution. This is a diagnostic/input contract mismatch. Loaderd's root-layout validation must remain strict; the correction should use the actual private Posixd executable for unstarted guarded staging and package it whenever that diagnostic is selected. ## Reproduction At signed Integration `8f4a1de524b7d7041beddf6029fecbf10b733ea9` and its original component catalog, including Exsh `29ada4eb88ac84a248305201f95a875ce8b53b41`, run: ```sh bash scripts/run-scenario.sh tests/scenarios/appliance-disk-image-realm-clients-positive.toml components.toml bash scripts/run-scenario.sh tests/scenarios/appliance-disk-image-realm-startup-positive.toml components.toml ``` One original local execution of each scenario fails at the same request. These are different maintained scenarios, with the original 120-second guest and 45-second serial-progress bounds; neither is an unchanged CI retry. ## Expected and actual behavior After the existing realm-admission marker, guarded preparation should stage an authenticated mediator executable without starting it, acknowledge guarded custody, retire the original child and reject its stale handle. All following scenario markers and ordinary shell exit remain required. Both runs emit: ```text ERIX_EXSH:REALM_ADMISSION:VERIFIED ERIX_EXSH:REALM_ADMISSION:FAILED request=0000000d kind=0000000b first=000006d1 second=00000002 ``` The typed PREPARE operation `0x6d1`, request 13, returns INVALID_ARGUMENT (`2`). The preparation, startup and configured-client success markers are absent. Exsh's recorded endpoint is `0x520`, with exit `0xE5`; this is not evidence of a Launchd process-event failure. Rootd subsequently exits `0xDC`, and the original serial-progress watchdog ends both scenarios with command status 1. ## Environment and identity - Integration: [8f4a1de5](https://git.erikinkinen.fi/erix/integration/commit/8f4a1de524b7d7041beddf6029fecbf10b733ea9); Exsh: [29ada4eb](https://git.erikinkinen.fi/erix/exsh/commit/29ada4eb88ac84a248305201f95a875ce8b53b41). - Loaderd: [e0562cdc](https://git.erikinkinen.fi/erix/loaderd/commit/e0562cdc6a52b518ea7fe34341a49f57caa9b1d8); the full 76-repository original catalog is recorded by Integration. - Release x86_64 QEMU appliance, one CPU, Rust 1.97.1; configured-client policy uses two realm rows, four client rows and 576 plan bytes. The older startup scenario keeps its original policy. - Only the shell's existing Launchd route and cwd SEND copy are used; no additional guest authority was granted. - Configured-client packaged disk SHA-256: `b159c4572264108af71fd5ed1f5aa44b40f1e130a9bcaf81825ec90d474a6e4d`. - Last accepted older startup graph: [Integration 66ddc78d](https://git.erikinkinen.fi/erix/integration/commit/66ddc78da31dd03dd554d0677cdc2af86588d525). This is not a prior configured-client acceptance. ## Evidence and prior checks Complete logs identify 119 packaging refusals caused by an obsolete smoke-only Launchd policy tuple. The same producer remains defective at `4efc9d5d`; the new host regression reproduces its status-1 rejection. [Issue 96](https://git.erikinkinen.fi/erix/integration/issues/96) tracks the correction and native regression acceptance. The other failures are three realm PREPARE refusals matching the older guarded-fixture mismatch in [Exsh issue 10](https://git.erikinkinen.fi/erix/exsh/issues/10), plus the original 120-second [ext4 quota timeout](https://git.erikinkinen.fi/erix/integration/issues/18). Later targeted realm passes do not rewrite those original failures. The new smoke fix explicitly disables realm/client/plan storage in the current 16-field tuple and preserves strict input rejection; corrected host and native checks are in progress. Original CI1797/1798 is running and CI1799–1810 waits. Accepted progress stays 15.42%, 414/874 sub-items and 17/460 whole parents. Numeric CPU values, loss/exhaustion and both full EriX guest builds plus external toolchain rebuilding remain open. Native configured-client acceptance — 25 September 2026: the exact signed [Integration 7a42fa26](https://git.erikinkinen.fi/erix/integration/commit/7a42fa2663bda878edcf59de01d972dd20c58ec7) graph passes the configured-client, preparation and startup VMs with all original markers, deadlines and cleanup gates. The configured witness seals two isolated realms, observes six successful byte-client exits across three realm instances, checks independent retirement, rejects stale client selectors and reuses a Launchd realm record with a new generation. This proves the native configure/seal/publish/mediated-I/O criterion; full Procd managed-row/final CPU reclamation, supervisor loss and resource ceilings remain separate requirements. [Launchd 372ab70e](https://git.erikinkinen.fi/erix/launchd/commit/372ab70ea2ea1133a9bc3edb2cb621f9679b075d) retains only the required result-carrier GRANT and preserves RECV-only client copies plus complete setup retirement. All six strict 497-test configurations and original CI179/180 pass. [Loaderd 5bcf522c](https://git.erikinkinen.fi/erix/loaderd/commit/5bcf522cfec873fa29ffe1b91bde1bf67e9f5ba2) retains the counted grant destination; four strict 145-test configurations and original CI107/108 pass. The original red tests, failed native runs and admitted host TCG diagnostic remain preserved. [Docs 6a1a9686](https://git.erikinkinen.fi/erix/docs/commit/6a1a96869736030727d0366c3e7622993dded7ff) passes the full 2,655-page manual and 45 tests locally and in original CI1085/1086; four complete CI logs total 824,660 bytes and final warnings are zero. The [configuration carrier defect](https://git.erikinkinen.fi/erix/launchd/issues/10), [counted grant defect](https://git.erikinkinen.fi/erix/loaderd/issues/5) and [configured-client stall](https://git.erikinkinen.fi/erix/integration/issues/92) are resolved by this component and native evidence. The [Exsh fixture report](https://git.erikinkinen.fi/erix/exsh/issues/10) retains its pending release compiler/frame validation despite the three native passes. Complete Integration CI1801/1802 is still queued. Whole-fleet authority/source/effect/frame acceptance, final accounting/profiler observation, rebuilding the external Rust/LLVM/runtime toolchain inside EriX and both full EriX guest-build generations remain open. Original prerequisite Integration CI1793/1794 each passes 490/491 scenarios; Rust and Markdown pass, and six complete logs total 27,432,406 bytes with zero warnings. CI1794 retains the [ext4 quota timeout](https://git.erikinkinen.fi/erix/integration/issues/18). CI1793 instead exposes a distinct [one-shot replay QMP connection loss](https://git.erikinkinen.fi/erix/integration/issues/93), recorded using the canonical bug template and phase label. No original workflow was rerun, and no deadline or authority check was relaxed. Only the existing native-witness sub-item gains credit: **15.42% weighted progress**, 413/873 sub-items. Whole acceptance remains **3.86%, 17/460 parents**. The configured-client VM stalls after the same three inherited markers and a private process exit with status 5. Its original failure retains 109 artifacts and 56,130 serial bytes, zero image-warning candidates and no process-owner cleanup failure. [Integration issue 92](https://git.erikinkinen.fi/erix/integration/issues/92) preserves that observation. An admitted host TCG counter run against the identical guest disk reproduces the stall under the original 120/45-second bounds. Its complete capture contains 100,639 translations and 74,009 code groups. The top 100 groups cover 85.32% of the 65,912,963,324 translated-instruction upper bound; uniquely matching Kernel mapping-batch code accounts for 38.67% of that total. This is a performance investigation candidate, without a measured speedup, timing attribution or accepted native result. Shared code, addresses and process identity remain separate evidence questions. Exact retained executable-region comparison with original symbol-bearing artifacts narrows the failure to Posixd configuration progress and its native exit; the exit block uniquely matches Posixd across all 68 packaged executables/shared objects. The source mismatch is confirmed independently: Launchd retains only RECV on its configuration receiver, while native COMPLETE requires carrier GRANT for capability-bearing client replies. Enforcing that actual gate in the maintained complete-record pull fixture fails the original implementation. [Launchd issue 10](https://git.erikinkinen.fi/erix/launchd/issues/10) tracks the correction and original red control. The local correction retains exactly RECV | GRANT only for counted-client replies, preserves readiness-only RECV, mediator SEND-only routes and RECV-only client copies, and retains complete receiver disposal before seal/cancellation. Full component validation is running; corrected native client execution remains required. Both original Docs CI1083/1084 pass, with 45 document tests and the 2,653-page manual. All four complete logs total 824,211 bytes; normal early-pass references converge to zero final warnings. Original Integration runs remain running or queued, without unchanged reruns. No canonical checklist credit is added: configured native clients, managed-row reuse, complete authority/frame closure, profiling improvements and both full guest-build requirements remain open. Guarded preparation uses the actual Posixd root with its required immutable layout, and actual private mediators reach readiness and retire independently. The configured-client VM now passes all three inherited markers, then its first PREPARE_REALM_CLIENT request 34 (opcode 0x6d7) returns INTERNAL (5). The original failed run retains 109 artifacts and 56,226 serial bytes, with zero build-warning candidates and no process-owner cleanup failure. [Loaderd issue 5](https://git.erikinkinen.fi/erix/loaderd/issues/5) records the separate defect: the counted Launchd client producer selects its own grant column, while Loaderd's intake, handler and reply retain legacy fixed destination 645. Two independent actual-code tests reproduce intake refusal and reply redirection. A correction must preserve the exact original client destination while retaining legacy destination, source receipt, actual caller, relation and cleanup gates. The mediator-fixture correction is demonstrated in both prerequisite VMs; [Exsh issue 10](https://git.erikinkinen.fi/erix/exsh/issues/10) remains linked to full configured-client validation. No client execution, configuration/seal/byte-I/O acceptance, managed-row reuse, profiler observation or full guest build is claimed. Original Exsh CI281/282 is running, and original Integration CI1797/1798 is queued; earlier original Integration cohorts remain under observation. Exsh compiler/frame gates remain open, and no unchanged CI was restarted. These repairs add no canonical checklist credit. All 174 Integration helper commands and six strict profiler commands pass. Sixteen selector combinations include preparation-only packaging and admission-only exclusion; actual private filesystem aliases still require exact artifact and runtime-graph identities. Seven Exsh development selections pass 986 tests each, fourteen host/native builds, strict Clippy and private-rustdoc configurations pass, and all 355 frame-checker controls pass without warnings. The initial changed wire-test byte count and documentation wrapping failures are corrected with original receipts retained. The unchanged Integration orchestration retains four strict 320/321-test matrices. No Loaderd check, capability right, sidecar rule or guest deadline is relaxed. Seven Exsh release unit-test compilations still reach the original silence limit and all six native frame observations remain incomplete; [compiler issue 9](https://git.erikinkinen.fi/erix/exsh/issues/9) and [frame issue 4](https://git.erikinkinen.fi/erix/exsh/issues/4) stay open. [Fixture regression 10](https://git.erikinkinen.fi/erix/exsh/issues/10) preserves both original failed VMs. Fresh corrected preparation-only, older startup and configured-client VM execution remains required. These component checkpoints earn no new acceptance credit; complete authority closure, managed-row reuse, profiler observation, external toolchain rebuilding and both full EriX guest builds remain open. The [guarded diagnostic](https://git.erikinkinen.fi/erix/exsh/src/commit/29ada4eb88ac84a248305201f95a875ce8b53b41/src/runtime/launch_transport/realm_prepare_probe.rs) selects `bin/true`. [Loaderd's materialization](https://git.erikinkinen.fi/erix/loaderd/src/commit/e0562cdc6a52b518ea7fe34341a49f57caa9b1d8/src/dynamic_execution.rs) requires a layout extracted from the authenticated root for every realm mediator. Direct inspection of the actual packaged PT_LOAD bytes finds no realm layout in Coreutils and exactly one read-only, non-executable layout in Posixd. This establishes the source/artifact mismatch; it does not claim instruction-level tracing of the guest refusal. Configured-client execution retains 109 artifacts and 56,249 serial bytes, SHA-256 `f5ea4a91e42a73b5bf669b92b1c49e6f8f198932a071663effe051ce336ce8a0`. Both original commands have zero image-warning candidates and no process-cleanup failure. The image passed complete original-source closure, dynamic metadata for 68 artifacts, all 174 host helpers and strict library/profiler checks. Host transport fixtures had accepted the obsolete selector and did not establish native mediator-layout admission. ## Tracking [Exsh feature work](https://git.erikinkinen.fi/erix/exsh/issues/1), [Exsh PR3](https://git.erikinkinen.fi/erix/exsh/pulls/3), [Integration PR12](https://git.erikinkinen.fi/erix/integration/pulls/12), and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). - [x] Preserve the original failing scenarios and exact source/artifact evidence. - [x] Select the actual private mediator for guarded staging and explicitly package it for preparation-only scenarios. - [x] Correct the independent transport and packaging controls while retaining malformed-layout refusal and all authority gates. - [ ] Pass relevant strict component checks and the corrected preparation/startup/configured-client VMs with original deadlines and markers.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:48 +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/exsh#10
No description provided.