[BUG] Client accounting confuses supervisor and controller identities #9

Closed
opened 2026-09-25 08:08:56 +02:00 by erikinkinen · 0 comments
Owner

Summary

The client final-accounting consumer compares the returned Launchd supervisor against the Procd controller from ContextProbe. These are distinct processes. Correctly produced CPU snapshots are therefore refused, leaving client retirement incomplete. The first execution fixture incorrectly used the controller as the accounting supervisor and masked this regression.

Reproduction

Use Launchd commit cacef291ca8d423854ae0b2ef419763a11aae6ad. In src/runtime/realm_client_execution_tests_io.rs, change the final-accounting producer's (supervisor, generation) from (2u32, 1u32) to (17u32, 4u32). Those are the distinct controller and supervisor already supplied by src/runtime/realm_start_tests_io.rs. Run:

cargo test --locked sealed_clients_start_once_and_keep_full_terminal_outcomes_through_retirement

This producer-consistent regression control fails deterministically: expected (Retired, 4045620583), actual (Unconfirmed, 0). Only the independent fixture identity changed for this red control; production code was unchanged.

Expected and actual behavior

Expected: retain the original Launchd supervisor from the acknowledged context, separately from its authenticated Procd controller. Accept the original supervisor in final Read; reject a controller substituted into that field, wrong supervisor generation or other changed accounting data. Preserve exact original CPU recording, ACK and cleanup gates.

Actual: validate_final_snapshot compares the supervisor against provision.controller. The legitimate final snapshot is rejected before recording or ACK, and retirement remains quarantined. This is a fail-closed reliability defect; no authority bypass or guest reproduction is claimed.

Environment and identity

  • Component: Launchd cacef291ca8d423854ae0b2ef419763a11aae6ad, feature/posix-compat.
  • Producer reference: Procd 3b84f4b0155525876f1c79ca55171cddcb501adc, runtime_realm_producer.rs and runtime_realm_accounting.rs.
  • Image/runtime: host runtime regression and producer/consumer source comparison; no new coherent VM result.
  • Target/toolchain: x86_64 Linux host, Rust/Cargo 1.97.1; existing explicit private Launchd–Procd route.
  • Last working execution revision: none; the preceding seal checkpoint did not expose client Start.

Evidence and prior checks

The initial component passed 487 tests in six configurations, strict host/native Clippy, rustdoc and warning-free builds, but its accounting fixture reproduced the same incorrect identity assumption. The new red control uses the producer's actual role distinction and fails on the published source. Original CI173/174 is retained as validation of its original tests, not evidence that this defect is absent. The correction is signed at d226af9c. Its producer-consistent positive and negative controls, all 487 tests in each of six configurations, strict host/native Clippy, rustdoc, formatting, warning-denied builds and ELF checks pass. Original CI175 and CI176 pass for the correction. All four complete logs are independently verified (176,394 bytes, 487 tests per Rust job and zero warnings); no unchanged workflow was rerun. This accepts the corrected client-execution component and resolves issue 9 using changed production source and producer-consistent red/green controls. Completion is 15.41%, 411/872 sub-items and 17/460 whole items, with all original section weights preserved. The client identity defect is resolved; mediator accounting and coherent native failure/reuse remain separate open requirements.

Tracking

Related: Launchd work, Launchd PR2, mediator final accounting and phase completion. This client identity correction does not complete mediator accounting or the native failure/reuse witness.

## Summary The client final-accounting consumer compares the returned Launchd supervisor against the Procd controller from ContextProbe. These are distinct processes. Correctly produced CPU snapshots are therefore refused, leaving client retirement incomplete. The first execution fixture incorrectly used the controller as the accounting supervisor and masked this regression. ## Reproduction Use Launchd commit `cacef291ca8d423854ae0b2ef419763a11aae6ad`. In `src/runtime/realm_client_execution_tests_io.rs`, change the final-accounting producer's `(supervisor, generation)` from `(2u32, 1u32)` to `(17u32, 4u32)`. Those are the distinct controller and supervisor already supplied by `src/runtime/realm_start_tests_io.rs`. Run: ```sh cargo test --locked sealed_clients_start_once_and_keep_full_terminal_outcomes_through_retirement ``` This producer-consistent regression control fails deterministically: expected `(Retired, 4045620583)`, actual `(Unconfirmed, 0)`. Only the independent fixture identity changed for this red control; production code was unchanged. ## Expected and actual behavior Expected: retain the original Launchd supervisor from the acknowledged context, separately from its authenticated Procd controller. Accept the original supervisor in final Read; reject a controller substituted into that field, wrong supervisor generation or other changed accounting data. Preserve exact original CPU recording, ACK and cleanup gates. Actual: `validate_final_snapshot` compares the supervisor against `provision.controller`. The legitimate final snapshot is rejected before recording or ACK, and retirement remains quarantined. This is a fail-closed reliability defect; no authority bypass or guest reproduction is claimed. ## Environment and identity - Component: Launchd `cacef291ca8d423854ae0b2ef419763a11aae6ad`, `feature/posix-compat`. - Producer reference: Procd `3b84f4b0155525876f1c79ca55171cddcb501adc`, `runtime_realm_producer.rs` and `runtime_realm_accounting.rs`. - Image/runtime: host runtime regression and producer/consumer source comparison; no new coherent VM result. - Target/toolchain: x86_64 Linux host, Rust/Cargo 1.97.1; existing explicit private Launchd–Procd route. - Last working execution revision: none; the preceding seal checkpoint did not expose client Start. ## Evidence and prior checks The initial component passed 487 tests in six configurations, strict host/native Clippy, rustdoc and warning-free builds, but its accounting fixture reproduced the same incorrect identity assumption. The new red control uses the producer's actual role distinction and fails on the published source. Original CI173/174 is retained as validation of its original tests, not evidence that this defect is absent. The correction is signed at [d226af9c](https://git.erikinkinen.fi/erix/launchd/commit/d226af9cb8f47cec751702dcd040bda340274ea1). Its producer-consistent positive and negative controls, all 487 tests in each of six configurations, strict host/native Clippy, rustdoc, formatting, warning-denied builds and ELF checks pass. Original [CI175](https://git.erikinkinen.fi/erix/launchd/actions/runs/175) and [CI176](https://git.erikinkinen.fi/erix/launchd/actions/runs/176) pass for the correction. All four complete logs are independently verified (176,394 bytes, 487 tests per Rust job and zero warnings); no unchanged workflow was rerun. This accepts the corrected client-execution component and resolves issue 9 using changed production source and producer-consistent red/green controls. Completion is 15.41%, 411/872 sub-items and 17/460 whole items, with all original section weights preserved. The client identity defect is resolved; mediator accounting and coherent native failure/reuse remain separate open requirements. ## Tracking Related: [Launchd work](https://git.erikinkinen.fi/erix/launchd/issues/1), [Launchd PR2](https://git.erikinkinen.fi/erix/launchd/pulls/2), [mediator final accounting](https://git.erikinkinen.fi/erix/procd/issues/5) and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). This client identity correction does not complete mediator accounting or the native failure/reuse witness.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:32 +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#9
No description provided.