Repository navigation
test(daemon-client): tighten the case that proves the crossing - #4900
Conversation
The review asked for the crossing to be cheaper and sharper. Shorten the gate on the first start from 700 ms to 250 ms: the outlived call's second start then lands about 400 ms into the next case, whose own window stays 1 s, so detection goes from a 350 ms margin to 2.5x. Drop the third launch step: a failed local startup makes two starts, and a spare step would swallow a production change that started a third daemon instead of the plan refusing it. Both cases now assert the in-flight set they are about: the leaking case says its call was still running when it ended, and the next case says it inherited none. The launch-seam count stays as the second net. Keep the join bound's own limit in its docblock: a call cannot be cancelled, so one that outlasts the join still hands its remaining launches to the next case.
Size Report
Startup median (7 runs, lower is better):
|
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
Reviewed 9c7e658. The change reads correctly and the tightened case does prove the crossing. The two Body rules runs show as cancelled. They look like superseded runs, because that workflow cancels in-progress runs on edit and push events, and the diff touches only a test file. The other 23 checks pass. Not verified here: the test file and the join-removed mutation were not run, so the PR body's quoted output was relied on, and no later Body rules run was checked. Before merge, confirm the latest Body rules run is green. |
Summary
Follow-up to #4896, from its review. The crossing this file proves was asserted on a thin margin and with one step too many.
Shorten the gate on the outlived call's first start from 700 ms to 250 ms. Its second start then lands about 400 ms into the next case, whose own window stays 1 s, so detection goes from a 350 ms margin to 2.5x, and the two cases cost 1.7 s of wall clock instead of 2.35 s. Drop the third launch step: a failed local startup makes two starts, so a spare step would swallow a production change that started a third daemon instead of the plan refusing it.
Both cases now assert the in-flight set they are about: the leaking case says its call was still running when its case ended, the next says it inherited none. The launch-seam count stays as the second net. The join's own limit is stated where the bound is: a call cannot be cancelled, so one outlasting the join still hands its launches to the next case.
No production change. Relates #4848.
Validation
At head
9c7e658d36: the file green on 12 runs and on 56 more with eight copies in parallel on a 12-core host; the two cases at 725 ms and 1,012 ms against the 2,500 ms budget; the package, 353 passed;tsc -b,oxlintandoxfmtclean. Detection proven at head with only the join removed:CI owns the rest. Not device-facing.
🤖 Generated with Claude Code