[BUG] Reused VM worker caches collide with the previous metadata ledger #163

Open
opened 2026-10-17 21:29:55 +02:00 by erikinkinen · 1 comment
Owner

Summary

A second VM-worker run with the same cache directory fails metadata admission
because its default output path already belongs to the first run. Successful
scenarios are then reported as a failed invocation.

Reproduction

Run bash tests/run-ci-vm-scenarios-cache-reuse.sh. The existing test invokes
the maintained worker runner repeatedly with the same worker-cache root. Its
first invocation passes; the second reproduces the failure.

Expected and actual behavior

Separate invocations must reuse build caches while retaining independent
metadata ledgers. A later run must preserve the earlier run’s metadata.

The second invocation reports File exists: 'failed-vm-metadata' and metadata
run admission refusal. Its stubbed worker still passes its one scenario, but
the runner returns failure for metadata retention.

Environment and identity

  • Integration revision: 05a511ec958ce0cfa7f0486b9eb11f14c40dac73.
  • Existing shell regression on Linux; one worker, one Cargo job, stubbed build
    and VM effects. No guest failure is inferred.
  • Default metadata path under a reused worker root; no explicit metadata-root
    override.
  • Last known working revision: not established.

Evidence and prior checks

The original execution passes the thirteen runner controls, eight media-verifier
controls and three preceding shell checks. The cache-reuse shell test then fails
on its second worker invocation. The runner selects the same default metadata
path for each invocation, while ledger initialization correctly refuses an
existing directory. Earlier output and the original failure remain retained.

Tracking

Related: Integration PR #12.

  • Allocate a distinct default metadata namespace per invocation while preserving explicit-path admission rules.
  • Cover repeated successful and failing workers, cache reuse and preservation of the earlier ledger.
  • Pass the existing cache-reuse regression and applicable CI checks.
## Summary A second VM-worker run with the same cache directory fails metadata admission because its default output path already belongs to the first run. Successful scenarios are then reported as a failed invocation. ## Reproduction Run `bash tests/run-ci-vm-scenarios-cache-reuse.sh`. The existing test invokes the maintained worker runner repeatedly with the same worker-cache root. Its first invocation passes; the second reproduces the failure. ## Expected and actual behavior Separate invocations must reuse build caches while retaining independent metadata ledgers. A later run must preserve the earlier run’s metadata. The second invocation reports `File exists: 'failed-vm-metadata'` and metadata run admission refusal. Its stubbed worker still passes its one scenario, but the runner returns failure for metadata retention. ## Environment and identity - Integration revision: `05a511ec958ce0cfa7f0486b9eb11f14c40dac73`. - Existing shell regression on Linux; one worker, one Cargo job, stubbed build and VM effects. No guest failure is inferred. - Default metadata path under a reused worker root; no explicit metadata-root override. - Last known working revision: not established. ## Evidence and prior checks The original execution passes the thirteen runner controls, eight media-verifier controls and three preceding shell checks. The cache-reuse shell test then fails on its second worker invocation. The runner selects the same default metadata path for each invocation, while ledger initialization correctly refuses an existing directory. Earlier output and the original failure remain retained. ## Tracking Related: [Integration PR #12](https://git.erikinkinen.fi/erix/integration/pulls/12). - [x] Allocate a distinct default metadata namespace per invocation while preserving explicit-path admission rules. - [x] Cover repeated successful and failing workers, cache reuse and preservation of the earlier ledger. - [ ] Pass the existing cache-reuse regression and applicable CI checks.
Author
Owner

The fix is published in 9b87ed6d. Each default invocation owns a fresh ledger; workers in one invocation share it. Explicitly selecting an existing ledger still fails without changing its contents.

The expanded cache-reuse test passes repeated runs, child failure, shared workers and explicit-root refusal. The implementation and host regression criteria are checked. Current workflow acceptance remains open.

The fix is published in [9b87ed6d](https://git.erikinkinen.fi/erix/integration/commit/9b87ed6de7e5fc3b1ec874ccde46afb528b7024d). Each default invocation owns a fresh ledger; workers in one invocation share it. Explicitly selecting an existing ledger still fails without changing its contents. The expanded cache-reuse test passes repeated runs, child failure, shared workers and explicit-root refusal. The implementation and host regression criteria are checked. Current workflow acceptance remains open.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:20 +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#163
No description provided.