[BUG] Scenario overrides retain policy for a disabled program #146

Open
opened 2026-10-17 01:40:20 +02:00 by erikinkinen · 1 comment
Owner

Summary

A scenario that disables an inherited program can fail image-profile validation before it reaches the guest. The existing missing-Exsh negative scenario is affected.

Reproduction

From Integration, run:

./scripts/run-scenario.sh tests/scenarios/appliance-disk-image-initial-exsh-missing-program-negative.toml

The scenario overlays the dev profile with programs.exsh = false and supplies no Exsh state. The recursive merge retains the dev profile's program_state.exsh table. Resolving those same maintained inputs directly reproduces the refusal.

Expected and actual behavior

Disabling a program should remove its inherited policy when the override supplies no policy of its own. An explicit disabled program with its own state must remain invalid.

Actual direct resolution raises ValueError: runtime config programs.exsh=false cannot retain program_state.exsh. The scenario cannot test launch rejection and cleanup because profile preparation stops first.

Environment and identity

  • Integration: 443288573aff8cc378b581ab1bb186bb34b74144; the affected resolver, base config and scenario inputs remain unchanged in the later published revision.
  • Runtime selection: dev; the scenario's maintained missing-program override.
  • Reproduction: Python 3.14 profile resolution on the host. No compiler or VM is needed to reproduce the merge error.
  • Last known working revision: unknown.

Evidence and prior checks

The direct resolver reproduction uses the actual dev config, scenario override and payload manifest. The earlier VM matrix records a preflight ValueError for the uniquely unreconciled missing-program case, but omits the exception detail; the deterministic merge defect is consistent with that failure.

The existing capacity check validates the raw override rather than its merged effective config. The original resolver retains inherited tables when merging the override.

Tracking

  • Explicitly disabling an inherited Coreutils, Exsh or Extop removes only that program's inherited state.
  • Explicit disabled-program state remains invalid; other policy and provenance are preserved.
  • Regression checks resolve the actual scenario inputs and cover both cases.
  • The existing missing-program VM scenario reaches the guest and verifies rejection and cleanup.

Related: phase 6 completion.

## Summary A scenario that disables an inherited program can fail image-profile validation before it reaches the guest. The existing missing-Exsh negative scenario is affected. ## Reproduction From Integration, run: ```sh ./scripts/run-scenario.sh tests/scenarios/appliance-disk-image-initial-exsh-missing-program-negative.toml ``` The scenario overlays the dev profile with `programs.exsh = false` and supplies no Exsh state. The recursive merge retains the dev profile's `program_state.exsh` table. Resolving those same maintained inputs directly reproduces the refusal. ## Expected and actual behavior Disabling a program should remove its inherited policy when the override supplies no policy of its own. An explicit disabled program with its own state must remain invalid. Actual direct resolution raises `ValueError: runtime config programs.exsh=false cannot retain program_state.exsh`. The scenario cannot test launch rejection and cleanup because profile preparation stops first. ## Environment and identity - Integration: `443288573aff8cc378b581ab1bb186bb34b74144`; the affected resolver, base config and scenario inputs remain unchanged in the later published revision. - Runtime selection: dev; the scenario's maintained missing-program override. - Reproduction: Python 3.14 profile resolution on the host. No compiler or VM is needed to reproduce the merge error. - Last known working revision: unknown. ## Evidence and prior checks The direct resolver reproduction uses the actual dev config, scenario override and payload manifest. The earlier VM matrix records a preflight `ValueError` for the uniquely unreconciled missing-program case, but omits the exception detail; the deterministic merge defect is consistent with that failure. The existing capacity check validates the raw override rather than its merged effective config. The [original resolver](https://git.erikinkinen.fi/erix/integration/src/commit/443288573aff8cc378b581ab1bb186bb34b74144/scripts/image_profile_model.py) retains inherited tables when merging the override. ## Tracking - [x] Explicitly disabling an inherited Coreutils, Exsh or Extop removes only that program's inherited state. - [x] Explicit disabled-program state remains invalid; other policy and provenance are preserved. - [x] Regression checks resolve the actual scenario inputs and cover both cases. - [ ] The existing missing-program VM scenario reaches the guest and verifies rejection and cleanup. Related: [phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65).
Author
Owner

Fixed in 348db49d. Explicitly disabling a program removes its inherited state when the override supplies none; an override that supplies its own state is still rejected. Other policy and provenance are preserved.

All 13 model tests and the capacity check against the actual merged scenario inputs pass. Guest rejection and cleanup remain to be confirmed by the existing VM scenario.

Fixed in [348db49d](https://git.erikinkinen.fi/erix/integration/commit/348db49d538de2f59812bae281f8e48d23625427). Explicitly disabling a program removes its inherited state when the override supplies none; an override that supplies its own state is still rejected. Other policy and provenance are preserved. All 13 model tests and the capacity check against the actual merged scenario inputs pass. Guest rejection and cleanup remain to be confirmed by the existing VM scenario.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:18 +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/integration#146
No description provided.