Repository navigation
test: honor process and home custody in lifecycle fixtures - #5067
Conversation
|
Cormac on #5067 at dbb3e48: source-approved, pending CI at this exact head. Read the diff 8eaed76..dbb3e48, which touches test_kill_execution only. Verified: it observes with |
|
Cormac on #5067 at 1940e8d: source-approved, pending CI at this exact head. The dbb3e48..1940e8d delta touches only node_local_catalog_cannot_follow_a_remote_main_database (data.rs). It takes the existing async |
…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]>
Two lifecycle fixtures made stronger assumptions than their production owners guarantee, intermittently blocking combined canary validation.
test_kill_executionnow observes actual absence of retained descendant identities and its independently witnessed grandchild within the same existing ten-second reap deadline. Direct-shell reap does not imply every signalled descendant has exited at the immutable snapshot. The fixture never sends another signal, clears custody, or changes production behavior.node_local_catalog_cannot_follow_a_remote_main_databasenow holds the existing async HomeGuard across real adapter initialization/reuse and asserts the resolved node path belongs to that home. CONTINUUM_HOME takes precedence over the process test-home fallback; without this shared guard, another fixture could remove the selected temporary directory during SQLite open. Remote-backend isolation and adapter reuse assertions remain.Validation: diff check passes; fresh hosted CI pending for1940e8d81. Prior dbb run38787547501 passed shell and broker fixtures but failed only the node-catalog fixture (8904passes/1failure). Prior combined8ea run failed only shell-kill. These failures are recorded, not waived; no local build. Deployment requires all exact-head and combined-revision checks.