[BUG] Repeated parsing delays standalone shell scenario intake #86

Open
opened 2026-09-24 18:26:30 +02:00 by erikinkinen · 0 comments
Owner

Summary

Standalone shell scenario intake reparses the same TOML file for each initial-shell field. Under the current parallel validation workload, all three realm intake cases exceed their unchanged 10-second subprocess deadline. The normal runner's explicit parent load masks this redundant work, while the standalone loader does not initialize that parent cache.

Reproduction

Source scripts/lib/scenario.sh, scripts/lib/initial-exsh-scenario.sh and scripts/lib/service-build.sh in a fresh Bash process, then call load_initial_exsh_scenario with a valid realm admission, preparation or startup scenario. Run python3 tests/launchd_route_capacity_test.py to exercise this same intake path with its original 10-second subprocess bounds. The retained 22-test run fails three intake cases with subprocess.TimeoutExpired; the remaining controls pass. No VM was started by this test.

Expected and actual behavior

Each successful intake should parse the selected scenario once in the parent shell, preserve strict parser failure, normalize its fields and export only the selected diagnostic. Instead each command substitution inherits an empty cache; scenario_load populates only a short-lived subshell, so subsequent fields parse again. The unchanged per-case timeout expires after 10 seconds. The intended correction populates the existing cache in the owning shell before field access; neither the timeout nor guest acceptance criteria changes.

Environment and identity

  • Component: Integration feature branch, based on signed a787946077c918e9426a8eac741afe2d4e51372a, with the locally implemented private startup scenario.
  • Image/build: hosted helper tests; no image or guest execution claim.
  • Toolchain: Linux x86-64, Bash and Python 3.14, concurrent bounded Rust/manual validation.
  • Input and authority: explicit repository scenario path and existing parser selection; no added guest route or capability.
  • Last known working state: the focused intake cases previously completed; this observation exposes load-sensitive redundant parsing, without attributing an unrelated VM failure to it.

Evidence and prior checks

The retained original helper run reports 22 tests in 30.363 seconds, three timeout errors and status 1. Source review identifies cache state lost across command substitution. A parser-invocation count and unchanged-output comparison will accompany the correction, alongside malformed-input controls and the original deadline. All original failure receipts remain retained; passing unchanged checks need not be repeated.

Tracking

Measured correction published in Integration: the parent shell loads the selected scenario before field extraction. The same traced intake invokes the parser 49 times before and once after, with identical output bytes. All 28 focused controls pass, including malformed/missing input preserving the previous selection and a different path forcing a fresh parse. Observed traced times were 19.466462 and 0.745568 seconds under changing host load; only the invocation reduction is an isolated conclusion. All 172 helper commands are accounted for, retaining original timeout evidence. Original publication CI remains pending.

Related: realm startup, implementation PR, and Phase 6 completion. Keep this issue open until the corrected loader and targeted regression checks pass, and track subsequent original CI separately.

## Summary Standalone shell scenario intake reparses the same TOML file for each initial-shell field. Under the current parallel validation workload, all three realm intake cases exceed their unchanged 10-second subprocess deadline. The normal runner's explicit parent load masks this redundant work, while the standalone loader does not initialize that parent cache. ## Reproduction Source `scripts/lib/scenario.sh`, `scripts/lib/initial-exsh-scenario.sh` and `scripts/lib/service-build.sh` in a fresh Bash process, then call `load_initial_exsh_scenario` with a valid realm admission, preparation or startup scenario. Run `python3 tests/launchd_route_capacity_test.py` to exercise this same intake path with its original 10-second subprocess bounds. The retained 22-test run fails three intake cases with `subprocess.TimeoutExpired`; the remaining controls pass. No VM was started by this test. ## Expected and actual behavior Each successful intake should parse the selected scenario once in the parent shell, preserve strict parser failure, normalize its fields and export only the selected diagnostic. Instead each command substitution inherits an empty cache; `scenario_load` populates only a short-lived subshell, so subsequent fields parse again. The unchanged per-case timeout expires after 10 seconds. The intended correction populates the existing cache in the owning shell before field access; neither the timeout nor guest acceptance criteria changes. ## Environment and identity - Component: Integration feature branch, based on signed `a787946077c918e9426a8eac741afe2d4e51372a`, with the locally implemented private startup scenario. - Image/build: hosted helper tests; no image or guest execution claim. - Toolchain: Linux x86-64, Bash and Python 3.14, concurrent bounded Rust/manual validation. - Input and authority: explicit repository scenario path and existing parser selection; no added guest route or capability. - Last known working state: the focused intake cases previously completed; this observation exposes load-sensitive redundant parsing, without attributing an unrelated VM failure to it. ## Evidence and prior checks The retained original helper run reports 22 tests in 30.363 seconds, three timeout errors and status 1. Source review identifies cache state lost across command substitution. A parser-invocation count and unchanged-output comparison will accompany the correction, alongside malformed-input controls and the original deadline. All original failure receipts remain retained; passing unchanged checks need not be repeated. ## Tracking Measured correction published in [Integration](https://git.erikinkinen.fi/erix/integration/commit/9c5f766369d3ee9e3fdc8e59f16571dd4837f997): the parent shell loads the selected scenario before field extraction. The same traced intake invokes the parser 49 times before and once after, with identical output bytes. All 28 focused controls pass, including malformed/missing input preserving the previous selection and a different path forcing a fresh parse. Observed traced times were 19.466462 and 0.745568 seconds under changing host load; only the invocation reduction is an isolated conclusion. All 172 helper commands are accounted for, retaining original timeout evidence. Original publication CI remains pending. Related: [realm startup](https://git.erikinkinen.fi/erix/integration/issues/1), [implementation PR](https://git.erikinkinen.fi/erix/integration/pulls/12), and [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65). Keep this issue open until the corrected loader and targeted regression checks pass, and track subsequent original CI separately.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:39:19 +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#86
No description provided.