Skip to content

test(engine): env-var driven E2E spill integration test (STN-14 #2348) - #4408

Merged
oferchen merged 1 commit into
masterfrom
feature/stn-14-integration-test
May 18, 2026
Merged

oferchen merged 1 commit into
masterfrom
feature/stn-14-integration-test

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Integration test spill_env_e2e_engages_spill_layer drives LocalCopyPlan::execute over 10 MiB of mixed pseudo-random content with OC_RSYNC_SPILL_THRESHOLD_BYTES=131072 and OC_RSYNC_SPILL_DIR=<tempdir> set; asserts at least one .tmp file lands in the spill directory.
  • Hermetic: source, destination, and spill scratch are all tempfile::TempDir handles; env vars are wrapped in an inline EnvGuard and serialised by a per-process Mutex so failing assertions still restore prior state on drop.
  • Marked #[ignore] (blocked on STN-8 env parse + STN-9/STN-10 engine wiring). The file compiles cleanly today and the test runs end-to-end the moment those land.
  • No new dependencies: deterministic xorshift64 PRNG generates the payload in place of rand; no #[allow(clippy::...)] waivers.
  • #![cfg(unix)] because env-var semantics differ on Windows.

Test plan

  • cargo fmt --all clean
  • Hermetic: no env or filesystem state leaks beyond the TempDir root
  • Un-ignore once STN-8/STN-9/STN-10 land and confirm the spill counter assertion fires

Closes #2348.

@github-actions github-actions Bot added the test label May 18, 2026
@oferchen
oferchen force-pushed the feature/stn-14-integration-test branch 2 times, most recently from 94dc086 to adc8aac Compare May 18, 2026 01:14
Adds `spill_env_e2e_engages_spill_layer` under
`crates/engine/tests/spill_env_e2e.rs`. The test seeds 10 MiB of mixed
pseudo-random content into a `TempDir`, runs `LocalCopyPlan::execute`
with `OC_RSYNC_SPILL_THRESHOLD_BYTES=131072` and `OC_RSYNC_SPILL_DIR`
pointed at a scratch tempdir, then asserts at least one `.tmp` file
landed in the spill directory.

Marked `#[ignore]` until env-var wiring (STN-8 parse, STN-9/STN-10
engine plumbing) lands. The file compiles, the inline `EnvGuard`
serialises env mutation via a per-process `Mutex`, and an inline
xorshift PRNG keeps the corpus deterministic without adding `rand`
as a dev-dependency. Gated on `cfg(unix)` because env-var semantics
differ on Windows.

Closes #2348.
@oferchen
oferchen force-pushed the feature/stn-14-integration-test branch from adc8aac to 10a569f Compare May 18, 2026 01:16
@oferchen
oferchen merged commit 2505740 into master May 18, 2026
3 of 8 checks passed
oferchen added a commit that referenced this pull request May 18, 2026
#4408)

Adds `spill_env_e2e_engages_spill_layer` under
`crates/engine/tests/spill_env_e2e.rs`. The test seeds 10 MiB of mixed
pseudo-random content into a `TempDir`, runs `LocalCopyPlan::execute`
with `OC_RSYNC_SPILL_THRESHOLD_BYTES=131072` and `OC_RSYNC_SPILL_DIR`
pointed at a scratch tempdir, then asserts at least one `.tmp` file
landed in the spill directory.

Marked `#[ignore]` until env-var wiring (STN-8 parse, STN-9/STN-10
engine plumbing) lands. The file compiles, the inline `EnvGuard`
serialises env mutation via a per-process `Mutex`, and an inline
xorshift PRNG keeps the corpus deterministic without adding `rand`
as a dev-dependency. Gated on `cfg(unix)` because env-var semantics
differ on Windows.

Closes #2348.
oferchen added a commit that referenced this pull request May 18, 2026
#4408)

Adds `spill_env_e2e_engages_spill_layer` under
`crates/engine/tests/spill_env_e2e.rs`. The test seeds 10 MiB of mixed
pseudo-random content into a `TempDir`, runs `LocalCopyPlan::execute`
with `OC_RSYNC_SPILL_THRESHOLD_BYTES=131072` and `OC_RSYNC_SPILL_DIR`
pointed at a scratch tempdir, then asserts at least one `.tmp` file
landed in the spill directory.

Marked `#[ignore]` until env-var wiring (STN-8 parse, STN-9/STN-10
engine plumbing) lands. The file compiles, the inline `EnvGuard`
serialises env mutation via a per-process `Mutex`, and an inline
xorshift PRNG keeps the corpus deterministic without adding `rand`
as a dev-dependency. Gated on `cfg(unix)` because env-var semantics
differ on Windows.

Closes #2348.
@oferchen
oferchen deleted the feature/stn-14-integration-test branch May 19, 2026 15:12
oferchen added a commit that referenced this pull request Aug 24, 2026
#4408)

Adds `spill_env_e2e_engages_spill_layer` under
`crates/engine/tests/spill_env_e2e.rs`. The test seeds 10 MiB of mixed
pseudo-random content into a `TempDir`, runs `LocalCopyPlan::execute`
with `OC_RSYNC_SPILL_THRESHOLD_BYTES=131072` and `OC_RSYNC_SPILL_DIR`
pointed at a scratch tempdir, then asserts at least one `.tmp` file
landed in the spill directory.

Marked `#[ignore]` until env-var wiring (STN-8 parse, STN-9/STN-10
engine plumbing) lands. The file compiles, the inline `EnvGuard`
serialises env mutation via a per-process `Mutex`, and an inline
xorshift PRNG keeps the corpus deterministic without adding `rand`
as a dev-dependency. Gated on `cfg(unix)` because env-var semantics
differ on Windows.

Closes #2348.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant