Skip to content

test: honor process and home custody in lifecycle fixtures - #5067

Merged
joelteply merged 2 commits into
canaryfrom
fix/d86-shell-end-observation
Oct 15, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fix/d86-shell-end-observation

Conversation

@joelteply

@joelteply joelteply commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Two lifecycle fixtures made stronger assumptions than their production owners guarantee, intermittently blocking combined canary validation.

test_kill_execution now 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_database now 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.

@joelteply

Copy link
Copy Markdown
Contributor Author

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 still_present and never re-signals (no recheck), so a kill that missed the grandchild still fails. The grandchild keeps sleeping 600 s past the 10 s deadline, and its independently captured identity is in the observed set. Custody is not cleared; it waits until the recorded unconfirmed_descendants are observed gone. Same existing 10 s bound, no production change. That's the right contract for card ea06701d (the kill itself ends the tree), as opposed to #5063's release-hands recheck contract. I had a duplicate card (27068049) for the same fix; I closed it and dropped my local change.

@joelteply joelteply changed the title test(shell): observe descendant exit after direct child reap test: honor process and home custody in lifecycle fixtures Oct 15, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

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 test_env::HomeGuard::set(node.path()) and holds it through both get_adapter awaits, so no concurrent home-mutating fixture can move or remove the home between path resolution and the SQLite open. That was the hosted failure (open @node at a vanished /tmp home). The added assertion that resolve_handle("@node") is node/.continuum/database/node.db proves the guard is the home in effect, so the test cannot pass by racing luck. The remote-DATABASE_URL refusal and adapter-reuse checks are unchanged. The test_kill_execution part (dbb3e48) I approved earlier and it passed hosted CI.

@joelteply
joelteply marked this pull request as ready for review October 15, 2026 19:59
@joelteply
joelteply merged commit 2ccf55e into canary Oct 15, 2026
7 checks passed
@joelteply
joelteply deleted the fix/d86-shell-end-observation branch October 15, 2026 19:59
joelteply added a commit that referenced this pull request Oct 20, 2026
…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
joelteply added a commit that referenced this pull request Oct 20, 2026
…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
joelteply added a commit that referenced this pull request Oct 20, 2026
…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
joelteply added a commit that referenced this pull request Oct 21, 2026
…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
joelteply added a commit that referenced this pull request Oct 21, 2026
…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]>
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