[BUG] Rejected metadata command overwrites retained status evidence #99

Closed
opened 2026-09-28 21:13:06 +02:00 by erikinkinen · 0 comments
Owner

Summary

The metadata process owner overwrites an existing status receipt when a later command collides with its output files. This corrupts the retained result of a successful validation even though the new child is never started. A pre-existing status file without output files is also overwritten after a new command runs.

Reproduction

At Integration b8bc5d0941bda3d3b2c23539a4b057379b1d8179, call cargo_source_metadata.run_owned with a fresh private output basename and a successful command. Save its .stdout, .stderr and .status.json bytes. Call the same owner with that basename again, or with the basename plus .native (the owner replaces the final suffix).

The second call raises FileExistsError on the original stdout file, but its finally block replaces the original status JSON with a failed pre-execution record. A focused local regression reproduces both variants deterministically. Another control pre-creates only the status file, or a symlink to retained fixture evidence: the original owner executes the child and replaces those bytes.

Expected and actual behavior

Existing evidence must remain unchanged. Reserve the status receipt exclusively before starting the child or borrowing signal handlers, retain that owned handle through cleanup, and refuse any existing receipt without replacing it. Partial output/open failures must preserve the original child error and signal-cleanup rules.

Actual: the stdout/stderr files use exclusive creation, but status uses an unconditional path-based write during cleanup. The old complete status is lost. The observed collision changes its recorded exit status from zero to null; this does not mean the original successful validation failed.

Environment and identity

  • Integration b8bc5d0941bda3d3b2c23539a4b057379b1d8179, branch feature/posix-compat.
  • Host Python 3.14, Linux x86-64; no guest image or VM is required.
  • Caller-selected private temporary output directory and explicit command/environment; no additional runtime capabilities or network route.
  • Original helper: cargo_source_metadata.py.
  • First affected revision and last-known-good revision are unestablished.

Evidence and prior checks

Local prerequisite acceptance — 29 September 2026: the receipt-preservation correction is complete in signed Integration d68a95870076c3435b1a5ab36440d0941b5ab45e, with matching producer adoption in Lib-cstd a76f6faa1eabe30d9a596d9e9650236ca6463d8c and Integration e4ffe2efcf4f06386ffc72d227c4d9c9646e86d1.

The caller-loss manual contract is signed and pushed as Docs e94d7c56dde026b407f85b75c9a2664b5f7756bf. All 45 documentation controls and the complete 2,657-page manual pass with zero final warnings. All 492,046 rendered word bounds pass; the changed contract and neighboring pages were visually checked. The helper's native behavior and whole lifecycle requirement remain pending. Remaining local Rust checks will run with compiler work serialized after a retained progress-deadline failure. No CI monitoring is being performed.

Original CI review — 29 September 2026: run 1826 passes the complete workflow, all 492 VM scenarios, canonical dev/release image checks and subsequent physical interactive gates. The paired run 1825 passes 491/492 scenarios and fails only subsystem-named-idle-time-resolution-positive at its original 60-second QEMU deadline. This is another occurrence of the existing Named timeout report, whose cause remains unresolved. Different outcomes on the same revision do not establish a fix.

Runs 1827 and 1828, on the intermediate receipt-owner revision, fail in native_memory_fixture.py before VM execution: the selected memory producer rejects the changed process-owner identity. This is the known coordinated-adoption dependency; signed Integration e4ffe2efcf4f06386ffc72d227c4d9c9646e86d1 adopts the matching Lib-cstd producer. Its original CI 1829/1830 remains running; the later roadmap-only CI 1831/1832 remains waiting. The intermediate refusal is retained rather than bypassed or retried.

All twelve newly terminal logs are complete and hash-checked, totaling 27,929,343 bytes with zero warning candidates. Rust and Markdown jobs pass in all four runs. The separate Docs failed logs remain unavailable with HTTP 500. No unchanged failure was rerun and no additional lifecycle acceptance is claimed.

Native numerical accounting acceptance — 28 September 2026: signed Integration e4ffe2ef, Kernel 928aee12 and Lib-cstd a76f6faa pass the coordinated native regressions.

The complete numerical capture now passes all fourteen actual snapshot additions: six Measured mediators, six Measured clients and two positively NeverExecuted clients with exactly zero CPU. Independent review reconciles the final lifetime sums from 137 original backing pages after retirement, checks inactive user access denial, retires all hardware breakpoints, verifies complete code identity and confirms bounded child cleanup. The original 120-second gate passes; no guest bytes, grants or registers changed and no observer overhead was subtracted. Two positive and twenty adversarial observer controls pass. The older failed observations remain retained.

This closes numerical nonexecution evidence only. Remaining supervisor-loss, exhaustion and partial-cleanup validation must complete the active lifecycle requirement before unrelated work. The receipt defect also has coordinated native evidence, but remains open pending original Integration CI review. Lib-cstd CI13/14 and Kernel CI706/707 pass; other original CI remains monitored without unchanged reruns. The changed startup profiler capture passes, but its first comparison exposed producer metadata and Rootd verification differences; a fresh old-Kernel baseline under the same current producer graph is being built before any performance conclusion. Both full EriX builds and the external Rust/LLVM toolchain rebuild inside EriX remain required and unproved. No new checkbox or acceptance percentage is added for this dependency checkpoint.

No runtime assembly, guest authority or acceptance deadline changes.

Lib-cstd's complete local checker passes 211 commands: 132 Rust case executions, 90 independent array cases, 23 producer controls, 12 guarded mixed C/Rust executions and 40 expected link rejections. Strict host/freestanding builds, Clippy, formatting, private rustdoc and documentation checks pass without warnings. Original push CI13 and PR CI14 both pass; four complete logs total 64,962 bytes with zero warning candidates. Each records all 211 outer checker steps, six nested producer steps and initial lockfile creation. The Lib-cstd PR remains unfinished for its broader libc scope.

Coordinated Integration host validation passes 187 commands without warnings: 174 helper and six profiler commands, strict orchestration Clippy, both Rust unit selections, formatting, Markdown, dependency policy and diff checks. The first run retained six refusals because its private fixture still selected the previous producer. Those six pass after correcting only the fixture selection; the 181 unaffected successes remain tied to unchanged source. All 76 original signatures, three catalog policies and complete transitive closure pass. The structural audit covers 3,196 authored code files below 1,000 lines, 264 immutable Git selectors, 98 conventional/manifest crate roots and 111 automatically discovered target candidates enforcing missing_docs. This does not establish complete semantic authority cleanup.

Signed Kernel 928aee12 and Docs a42c89f1 remain the selected borrowed-mapping dependency. Kernel CI706/707 passes with complete warning-free logs. The 2,657-page manual and 45 local document controls pass with zero final warnings. Coordinated native mapping/lifecycle/client regressions, matched successful profiler captures, complete numerical NeverExecuted accounting and original Integration CI review remain required. The Integration PR, receipt defect and active lifecycle requirement stay open. Complete remaining abort/retire/partial cleanup, supervisor loss and resource ceilings before unrelated checklist work. Both full EriX builds and rebuilding the external Rust/LLVM toolchain inside EriX remain required and unproved. No checklist credit is added.

New focused preservation controls fail against the unchanged owner. The actual catalog-preparation incident retained stdout/stderr but lost one ordinary-policy status receipt when a native-policy evidence name collided. The native-policy child did not start. The original files and collision record remain retained; the affected read-only policy was verified again with a distinct evidence basename. No CI rerun or guest-gate relaxation is involved.

Tracking

Integration PR, validation workflow, and phase completion. Preserve all three prior files on repeated and suffix-aliasing basenames; cover pre-existing status files/links, partial admission, receipt-write errors and original process/signal cleanup before closing this defect.

## Summary The metadata process owner overwrites an existing status receipt when a later command collides with its output files. This corrupts the retained result of a successful validation even though the new child is never started. A pre-existing status file without output files is also overwritten after a new command runs. ## Reproduction At Integration `b8bc5d0941bda3d3b2c23539a4b057379b1d8179`, call `cargo_source_metadata.run_owned` with a fresh private output basename and a successful command. Save its `.stdout`, `.stderr` and `.status.json` bytes. Call the same owner with that basename again, or with the basename plus `.native` (the owner replaces the final suffix). The second call raises `FileExistsError` on the original stdout file, but its `finally` block replaces the original status JSON with a failed pre-execution record. A focused local regression reproduces both variants deterministically. Another control pre-creates only the status file, or a symlink to retained fixture evidence: the original owner executes the child and replaces those bytes. ## Expected and actual behavior Existing evidence must remain unchanged. Reserve the status receipt exclusively before starting the child or borrowing signal handlers, retain that owned handle through cleanup, and refuse any existing receipt without replacing it. Partial output/open failures must preserve the original child error and signal-cleanup rules. Actual: the stdout/stderr files use exclusive creation, but status uses an unconditional path-based write during cleanup. The old complete status is lost. The observed collision changes its recorded exit status from zero to null; this does not mean the original successful validation failed. ## Environment and identity - Integration `b8bc5d0941bda3d3b2c23539a4b057379b1d8179`, branch `feature/posix-compat`. - Host Python 3.14, Linux x86-64; no guest image or VM is required. - Caller-selected private temporary output directory and explicit command/environment; no additional runtime capabilities or network route. - Original helper: [cargo_source_metadata.py](https://git.erikinkinen.fi/erix/integration/src/commit/b8bc5d0941bda3d3b2c23539a4b057379b1d8179/scripts/cargo_source_metadata.py). - First affected revision and last-known-good revision are unestablished. ## Evidence and prior checks Local prerequisite acceptance — 29 September 2026: the receipt-preservation correction is complete in signed Integration `d68a95870076c3435b1a5ab36440d0941b5ab45e`, with matching producer adoption in Lib-cstd `a76f6faa1eabe30d9a596d9e9650236ca6463d8c` and Integration `e4ffe2efcf4f06386ffc72d227c4d9c9646e86d1`. The caller-loss manual contract is signed and pushed as Docs `e94d7c56dde026b407f85b75c9a2664b5f7756bf`. All 45 documentation controls and the complete 2,657-page manual pass with zero final warnings. All 492,046 rendered word bounds pass; the changed contract and neighboring pages were visually checked. The helper's native behavior and whole lifecycle requirement remain pending. Remaining local Rust checks will run with compiler work serialized after a retained progress-deadline failure. No CI monitoring is being performed. Original CI review — 29 September 2026: [run 1826](https://git.erikinkinen.fi/erix/integration/actions/runs/1826) passes the complete workflow, all 492 VM scenarios, canonical dev/release image checks and subsequent physical interactive gates. The paired [run 1825](https://git.erikinkinen.fi/erix/integration/actions/runs/1825) passes 491/492 scenarios and fails only `subsystem-named-idle-time-resolution-positive` at its original 60-second QEMU deadline. This is another occurrence of [the existing Named timeout report](https://git.erikinkinen.fi/erix/integration/issues/75), whose cause remains unresolved. Different outcomes on the same revision do not establish a fix. [Runs 1827](https://git.erikinkinen.fi/erix/integration/actions/runs/1827) and [1828](https://git.erikinkinen.fi/erix/integration/actions/runs/1828), on the intermediate receipt-owner revision, fail in `native_memory_fixture.py` before VM execution: the selected memory producer rejects the changed process-owner identity. This is the known coordinated-adoption dependency; signed Integration `e4ffe2efcf4f06386ffc72d227c4d9c9646e86d1` adopts the matching Lib-cstd producer. Its original CI 1829/1830 remains running; the later roadmap-only CI 1831/1832 remains waiting. The intermediate refusal is retained rather than bypassed or retried. All twelve newly terminal logs are complete and hash-checked, totaling 27,929,343 bytes with zero warning candidates. Rust and Markdown jobs pass in all four runs. The separate Docs failed logs remain unavailable with HTTP 500. No unchanged failure was rerun and no additional lifecycle acceptance is claimed. Native numerical accounting acceptance — 28 September 2026: signed [Integration e4ffe2ef](https://git.erikinkinen.fi/erix/integration/commit/e4ffe2efcf4f06386ffc72d227c4d9c9646e86d1), [Kernel 928aee12](https://git.erikinkinen.fi/erix/kernel/commit/928aee127394ee77b130bc608d53141216e092dc) and [Lib-cstd a76f6faa](https://git.erikinkinen.fi/erix/lib-cstd/commit/a76f6faa1eabe30d9a596d9e9650236ca6463d8c) pass the coordinated native regressions. The complete numerical capture now passes all fourteen actual snapshot additions: six Measured mediators, six Measured clients and two positively NeverExecuted clients with exactly zero CPU. Independent review reconciles the final lifetime sums from 137 original backing pages after retirement, checks inactive user access denial, retires all hardware breakpoints, verifies complete code identity and confirms bounded child cleanup. The original 120-second gate passes; no guest bytes, grants or registers changed and no observer overhead was subtracted. Two positive and twenty adversarial observer controls pass. The older failed observations remain retained. This closes numerical nonexecution evidence only. Remaining supervisor-loss, exhaustion and partial-cleanup validation must complete the active lifecycle requirement before unrelated work. The [receipt defect](https://git.erikinkinen.fi/erix/integration/issues/99) also has coordinated native evidence, but remains open pending original Integration CI review. Lib-cstd CI13/14 and Kernel CI706/707 pass; other original CI remains monitored without unchanged reruns. The changed startup profiler capture passes, but its first comparison exposed producer metadata and Rootd verification differences; a fresh old-Kernel baseline under the same current producer graph is being built before any performance conclusion. Both full EriX builds and the external Rust/LLVM toolchain rebuild inside EriX remain required and unproved. No new checkbox or acceptance percentage is added for this dependency checkpoint. No runtime assembly, guest authority or acceptance deadline changes. Lib-cstd's complete local checker passes 211 commands: 132 Rust case executions, 90 independent array cases, 23 producer controls, 12 guarded mixed C/Rust executions and 40 expected link rejections. Strict host/freestanding builds, Clippy, formatting, private rustdoc and documentation checks pass without warnings. Original [push CI13](https://git.erikinkinen.fi/erix/lib-cstd/actions/runs/13) and [PR CI14](https://git.erikinkinen.fi/erix/lib-cstd/actions/runs/14) both pass; four complete logs total 64,962 bytes with zero warning candidates. Each records all 211 outer checker steps, six nested producer steps and initial lockfile creation. The [Lib-cstd PR](https://git.erikinkinen.fi/erix/lib-cstd/pulls/3) remains unfinished for its broader libc scope. Coordinated Integration host validation passes 187 commands without warnings: 174 helper and six profiler commands, strict orchestration Clippy, both Rust unit selections, formatting, Markdown, dependency policy and diff checks. The first run retained six refusals because its private fixture still selected the previous producer. Those six pass after correcting only the fixture selection; the 181 unaffected successes remain tied to unchanged source. All 76 original signatures, three catalog policies and complete transitive closure pass. The structural audit covers 3,196 authored code files below 1,000 lines, 264 immutable Git selectors, 98 conventional/manifest crate roots and 111 automatically discovered target candidates enforcing missing_docs. This does not establish complete semantic authority cleanup. Signed Kernel 928aee12 and Docs a42c89f1 remain the selected borrowed-mapping dependency. Kernel CI706/707 passes with complete warning-free logs. The 2,657-page manual and 45 local document controls pass with zero final warnings. Coordinated native mapping/lifecycle/client regressions, matched successful profiler captures, complete numerical NeverExecuted accounting and original Integration CI review remain required. The [Integration PR](https://git.erikinkinen.fi/erix/integration/pulls/12), receipt defect and active lifecycle requirement stay open. Complete remaining abort/retire/partial cleanup, supervisor loss and resource ceilings before unrelated checklist work. Both full EriX builds and rebuilding the external Rust/LLVM toolchain inside EriX remain required and unproved. No checklist credit is added. New focused preservation controls fail against the unchanged owner. The actual catalog-preparation incident retained stdout/stderr but lost one ordinary-policy status receipt when a native-policy evidence name collided. The native-policy child did not start. The original files and collision record remain retained; the affected read-only policy was verified again with a distinct evidence basename. No CI rerun or guest-gate relaxation is involved. ## Tracking [Integration PR](https://git.erikinkinen.fi/erix/integration/pulls/12), [validation workflow](https://git.erikinkinen.fi/erix/integration/issues/3), and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). Preserve all three prior files on repeated and suffix-aliasing basenames; cover pre-existing status files/links, partial admission, receipt-write errors and original process/signal cleanup before closing this defect.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:39: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#99
No description provided.