Skip to content

test(cli): bound the version probe by the wedge, not a clock - #3092

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
fix/load-sensitive-test-bounds-v2
Oct 5, 2026
Merged

ScriptedAlchemy merged 1 commit into
masterfrom
fix/load-sensitive-test-bounds-v2

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Ports what is still needed from fix/load-sensitive-test-bounds (written 2026-09-21, about 1,350 commits behind master). One of its four commits still applies, in narrowed form. Master already fixed the other three.

Kept: 6f21ffe, narrowed (test(cli): bound the version probe by the wedge, not a clock)

Target: a_descendant_holding_stdout_cannot_hold_the_probe_past_its_deadline in crates/tracedecay-cli/src/upgrade.rs.

Cause: the test asserts elapsed() < 5s while its descendant holds the inherited stdout pipe for 20 s. The 5 s stands in for "the probe returned on its own deadline and did not wait for the pipe". The descendant's hold is now a named constant (DESCENDANT_PIPE_HOLD, 30 s), and the assertion uses it. A probe that returns at or after the hold waited for the pipe. The overfill test's bare < 2s becomes < VERSION_PROBE_DEADLINE, the deadline that a wait-before-read probe would run into.

Failing before: NOT REPRODUCED. Harness: the upgrade::tests::version_probe module (7 tests) at --test-threads=16, pinned with taskset -c 0-1, with N busy-loop spinners pinned to the same two cores.

  • N=32: 30 of 30 iterations passed (module time 0.8 s to 1.0 s).
  • N=128: 30 of 30 iterations passed (module time 2.8 s to 4.7 s).

The change is kept because it replaces a raw wall-clock bound that stands in for a liveness fact.

Passing after: the same N=128 harness passed 30 of 30. cargo test -p tracedecay-cli --bin tracedecay: 354 passed, 0 failed.

Not ported from this commit: the rewrite of a_wedged_binary_is_killed_and_reaped_at_the_deadline (pid file, then a /proc scan). Master already replaced the pid-file race. Its child now blocks on a FIFO, and processes_running scans /proc for the script path. The original commit's WEDGED_PROBE_DEADLINE (300 ms raised to 1 s) existed for that race, so it is not ported either.

Dropped

Gates

  • cargo fmt --all -- --check: pass.

  • cargo test -p tracedecay-cli --bin tracedecay: 354 passed. The host-CLI fixture example must be built first.

  • cargo clippy --workspace --all-targets --locked -- -D warnings: fails on master, not on this diff.

    • items_after_test_module in crates/tracedecay-code-index/src/production/generation_statistics.rs:72, from f4b8918.
    • match_bool in crates/tracedecay-mcp/src/handlers/analysis/hotspots.rs:73.

    Open PR fix(ci): repair lanes broken by retrieval disclosure commit #3090 fixes both. With those two fixes applied locally and not committed here, workspace clippy exits 0 on this branch.


Devin Review

`a_descendant_holding_stdout_cannot_hold_the_probe_past_its_deadline`
asserted `elapsed() < 5s` while its descendant held the inherited pipe
for 20 s. The 5 s stood in for "the probe did not wait for the pipe"
without saying so. The hold is now a named constant, and the bound is
that hold: a probe returning at or after it waited for the descendant.

The overfill test's bare 2 s becomes `VERSION_PROBE_DEADLINE`, the
deadline a wait-before-read probe would run into.

Not reproduced on master: 30 runs of the version_probe module at 16
test threads pinned to cores 0-1 with 128 competing spinners passed.
The same harness passes 30 of 30 with this change.
@changeset-bot

changeset-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3db5cec

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy merged commit b7465c8 into master Oct 5, 2026
13 of 23 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 2 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@ScriptedAlchemy
ScriptedAlchemy deleted the fix/load-sensitive-test-bounds-v2 branch October 5, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant