fix(test): isolate soak harness daemon runtime - #2196
Conversation
scripts/soak-test.sh claimed to isolate daemon coordination from interactive sessions through a private CBM_CACHE_DIR, but only CBM_RUNTIME_DIR moves the daemon rendezvous, so the soak shared the operator's account daemon and asserted that its own shutdown stopped it. Source scripts/test-runtime.sh for a harness-owned runtime and cache, and let the helper stop the private daemon before the root is removed. Add tests/test_soak_runtime_isolation_contract.sh, which fails before this change, and wire it into scripts/test.sh. Part of DeusData#1696. Signed-off-by: Anton Standrik <astandrik@yandex-team.ru>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
There was a problem hiding this comment.
🟡 Changes recommended
Address the native-Windows cleanup and setup-failure root-leak issues.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR isolates the soak-test daemon runtime and cache from interactive sessions and adds regression coverage.
Changes:
- Uses private runtime and cache directories.
- Adds a runtime-isolation contract test.
- Wires the contract into
scripts/test.sh.
File summaries
| File | Summary |
|---|---|
tests/test_soak_runtime_isolation_contract.sh |
Verifies caller runtime and cache paths are not exposed. |
scripts/test.sh |
Runs the new isolation contract. |
scripts/soak-test.sh |
Initializes and cleans up the private runtime; two moderate cleanup issues remain on native Windows. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # shellcheck source=test-runtime.sh | ||
| source "$(dirname "${BASH_SOURCE[0]}")/test-runtime.sh" | ||
| cbm_test_runtime_init | ||
| trap 'cbm_test_runtime_cleanup "$BINARY"' EXIT |
| # native-Windows cache sits under SOAK_WIN_ROOT, which goes only after the | ||
| # daemon check because the binary it probes with is the copy inside it. | ||
| cbm_test_runtime_cleanup "$BINARY" | ||
| [ -z "${SOAK_WIN_ROOT:-}" ] || rm -rf -- "$SOAK_WIN_ROOT" |
What does this PR do?
Part of #1696 (audit ledger), follow-up to #1691/#1695.
scripts/soak-test.shclaimed to "isolate daemon coordination from interactive CBMsessions" through a private
CBM_CACHE_DIR, but onlyCBM_RUNTIME_DIRmoves thedaemon rendezvous. The soak must be the only client of the daemon it measures (it
asserts that a session crash and the final shutdown each stop the daemon), so on a
shared rendezvous it either stopped the operator's daemon or was refused with a
cache-root conflict.
scripts/soak-test.shsourcesscripts/test-runtime.shand callscbm_test_runtime_init; off native Windows the helper's owner-only cache is thesoak cache, so the daemon log path is unchanged in shape.
soak_cleanupnow runscbm_test_runtime_cleanup "$BINARY"instead ofrm -rfon the cache: the privatedaemon is stopped first and the root is kept when it will not stop. The
native-Windows stamped root and its
icaclshandling are untouched(
tests/test_soak_daemon_recovery_contract.shpins them). Two FAIL messages nolonger say "shared daemon".
tests/test_soak_runtime_isolation_contract.sh: environment-probe fixture,same assertions as the smoke contract,
RESULTS_DIRkept out of the checkout.Fails on
mainwithFAIL: soak-test exposed the caller CBM_RUNTIME_DIR to a product process; passes with this change. Wired as Step 0d2 inscripts/test.sh.scripts/soak-legs.shstarts no product process and needs no change.Checklist
git commit -s)make -f Makefile.cbm test) — shell-only change; the newcontract plus
test_soak_daemon_recovery_contract,test_venue_parity_contractand
test_runtime_isolation_contractwere run; the full C suite was not runon this host
make -f Makefile.cbm lint-ci) — no C changes