Repository navigation
test(storage): isolate broker custody fixtures from ambient disk samples - #5066
Conversation
|
Cormac on #5066 at 49ce9ba: source-approved, pending CI at this exact head. Read disk_eviction.rs; nothing run. Verified: |
…b3221a5) Three flaky lib tests in a row turned canary red and refused every node's deploy on 2026-10-15: the broker volume snapshot (#5066), a one-shot process table read (#5067) and CONTINUUM_HOME swapped by a concurrent fixture (#5067). The home class is the one test_env already owns: HomeGuard serializes every test that WRITES the home, but tests that only READ it (continuum_home, HOME, home_dir) took no lock, so a guarded fixture could swap the home between two of their reads. An audit of continuum-core's default-suite tests that read the home without a guard found six; four more are #[ignore]d hardware tests, and data.rs's is fixed in #5067: - paths::a_test_binary_never_resolves_the_operators_home - persona_roster::the_roster_lists_staged_checkouts_and_never_an_in_flight_clone. Its "CONTINUUM_HOME is set, skip" check could pass vacuously under a concurrent fixture, or pass the check and then write under that fixture's home. - code_commands::a_citizen_is_confined_to_her_workspace_and_the_operator_is_not - docker::macos_with_home_resolves_to_docker_raw (macOS) - forge::native_dry_run_resolves_spec_with_scale_from_alpha_over_rank (reads HOME, then the code under test expands ~ from HOME again) - serving_daemon::an_engine_bound_to_live_work_is_never_replaced_under_it Each takes HomeGuard::preserve (async) or the new preserve_blocking (sync, the twin of set_blocking), which holds the restored process home unchanged for the test's life. No production change; every edit is one guard line. Next on the card: the CONTINUUM_PROBE_DIR/CLASSES pair, mutated unlocked by tracing_init::from_env_reads_documented_env_vars and probe_file_sink's env test and read by persona/live_state. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…b3221a5) Three flaky lib tests in a row turned canary red and refused every node's deploy on 2026-10-15: the broker volume snapshot (#5066), a one-shot process table read (#5067) and CONTINUUM_HOME swapped by a concurrent fixture (#5067). The home class is the one test_env already owns: HomeGuard serializes every test that WRITES the home, but tests that only READ it (continuum_home, HOME, home_dir) took no lock, so a guarded fixture could swap the home between two of their reads. An audit of continuum-core's default-suite tests that read the home without a guard found six; four more are #[ignore]d hardware tests, and data.rs's is fixed in #5067: - paths::a_test_binary_never_resolves_the_operators_home - persona_roster::the_roster_lists_staged_checkouts_and_never_an_in_flight_clone. Its "CONTINUUM_HOME is set, skip" check could pass vacuously under a concurrent fixture, or pass the check and then write under that fixture's home. - code_commands::a_citizen_is_confined_to_her_workspace_and_the_operator_is_not - docker::macos_with_home_resolves_to_docker_raw (macOS) - forge::native_dry_run_resolves_spec_with_scale_from_alpha_over_rank (reads HOME, then the code under test expands ~ from HOME again) - serving_daemon::an_engine_bound_to_live_work_is_never_replaced_under_it Each takes HomeGuard::preserve (async) or the new preserve_blocking (sync, the twin of set_blocking), which holds the restored process home unchanged for the test's life. No production change; every edit is one guard line. Next on the card: the CONTINUUM_PROBE_DIR/CLASSES pair, mutated unlocked by tracing_init::from_env_reads_documented_env_vars and probe_file_sink's env test and read by persona/live_state. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…b3221a5) Three flaky lib tests in a row turned canary red and refused every node's deploy on 2026-10-15: the broker volume snapshot (#5066), a one-shot process table read (#5067) and CONTINUUM_HOME swapped by a concurrent fixture (#5067). The home class is the one test_env already owns: HomeGuard serializes every test that WRITES the home, but tests that only READ it (continuum_home, HOME, home_dir) took no lock, so a guarded fixture could swap the home between two of their reads. An audit of continuum-core's default-suite tests that read the home without a guard found six; four more are #[ignore]d hardware tests, and data.rs's is fixed in #5067: - paths::a_test_binary_never_resolves_the_operators_home - persona_roster::the_roster_lists_staged_checkouts_and_never_an_in_flight_clone. Its "CONTINUUM_HOME is set, skip" check could pass vacuously under a concurrent fixture, or pass the check and then write under that fixture's home. - code_commands::a_citizen_is_confined_to_her_workspace_and_the_operator_is_not - docker::macos_with_home_resolves_to_docker_raw (macOS) - forge::native_dry_run_resolves_spec_with_scale_from_alpha_over_rank (reads HOME, then the code under test expands ~ from HOME again) - serving_daemon::an_engine_bound_to_live_work_is_never_replaced_under_it Each takes HomeGuard::preserve (async) or the new preserve_blocking (sync, the twin of set_blocking), which holds the restored process home unchanged for the test's life. No production change; every edit is one guard line. Next on the card: the CONTINUUM_PROBE_DIR/CLASSES pair, mutated unlocked by tracing_init::from_env_reads_documented_env_vars and probe_file_sink's env test and read by persona/live_state. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ard cb3221a5) Re-ported onto canary 445ae4b after the #5245 file splits. Three flaky lib tests in a row turned canary red and refused every node's deploy on 2026-10-15 (#5066, #5067): tests that only READ the process home (continuum_home, HOME, home_dir) took no lock, so a guarded fixture could swap the home between two reads. Five readers take HomeGuard::preserve_blocking() (one async test takes preserve().await). The probe-env pair (tracing_init, probe_file_sink) both set/remove CONTINUUM_PROBE_DIR/CLASSES unlocked and restore each other's values mid-assertion; they take the same lock. test_env's doc says the ONE lock covers every test that mutates process env, so there is one env lock, not one per variable. The earlier forge test move is dropped: canary already split modules/forge. No production change. source-hygiene 43/43 on IntelMac, no baseline change. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ard cb3221a5) (#5069) Re-ported onto canary 445ae4b after the #5245 file splits. Three flaky lib tests in a row turned canary red and refused every node's deploy on 2026-10-15 (#5066, #5067): tests that only READ the process home (continuum_home, HOME, home_dir) took no lock, so a guarded fixture could swap the home between two reads. Five readers take HomeGuard::preserve_blocking() (one async test takes preserve().await). The probe-env pair (tracing_init, probe_file_sink) both set/remove CONTINUUM_PROBE_DIR/CLASSES unlocked and restore each other's values mid-assertion; they take the same lock. test_env's doc says the ONE lock covers every test that mutates process env, so there is one env lock, not one per variable. The earlier forge test move is dropped: canary already split modules/forge. No production change. source-hygiene 43/43 on IntelMac, no baseline change. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
The release-incremental broker fixture assumed its constructor budget forced pressure. That budget is only a fallback: the production pool now reads its owning volume from the shared monitor, so another test publishing a volume sample can remove broker admission between the locked and unlocked calls.
Keep the production monitor reader unchanged behind a private sample function and supply a measured critical volume in both real-broker fixtures. The release fixture asserts measured-volume admission and the actual release-lock decline before checking that 4096 bytes are reclaimed, while binaries, dependencies, build outputs and lock inode survive.
Validation: source diff check passed; hosted CI pending. No local compilation or live reclamation. The failing canary push 38771058840 had 8904 passing tests and only broker_reclaims_release_incremental_only_after_profile_custody failing (expected4096, got0); the binding check mirrored that failure. This PR does not waive the red push.
Existing owner: d86e79e8. Actual deployment and Kimi outcomes remain separate acceptance work.