Repository navigation
test(node): widen the time budget in the unaffordable re-probe test - #594
Open
beardthelion wants to merge 1 commit into
Open
beardthelion wants to merge 1 commit into
beardthelion wants to merge 1 commit into
Conversation
absent_probe_skips_a_reprobe_it_cannot_afford ran a fake git that sleeps 0.9s against a 1s budget, leaving 0.1s for exec and scheduling. Under load the first probe itself crossed the deadline, the watchdog reaped it, and the call took about 2.05s, failing the overshoot assertion with one spawn. Use a 2s budget and a 1.2s sleep. The re-probe is still unaffordable (more than half the budget is gone) and the slack before the first probe times out is 0.8s. With 0.2s of simulated startup latency the old values failed 3 of 3 runs and the new ones passed 3 of 3. With the affordability check disabled the new test fails with a second spawn, so it still guards the check.
Contributor
|
Warning Review limit reachedThis review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Next included review available in 11 minutes. View limit details
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
absent_probe_skips_a_reprobe_it_cannot_affordnow uses a 2s budget and a 1.2s fake probe instead of 1s and 0.9s, so exec and scheduling latency under load no longer pushes the first probe past its deadline.Motivation & context
The fake
gitsleeps 0.9s against a 1s budget, leaving 0.1s for process start and scheduling. Under load the first probe itself crosses the deadline, the watchdog reaps it, and the call takes about 2.05s instead of about 1s. The overshoot assertion fails with one spawn. I saw this twice in local loaded runs (2.047s and 2.060s). It has not failed in the CI logs I checked.Kind of change
What changed
gitlawb-node: ingit/store.rs, the test's fake probe sleeps 1.2s and the budget is 2s, with a comment on the margin. The re-probe is still unaffordable (more than half the budget is gone), and the slack before the first probe times out goes from 0.1s to 0.8s.How a reviewer can verify
cargo test --locked -p gitlawb-node --lib git::store::tests::absent_probe_skips_a_reprobe_it_cannot_affordPasses on an idle machine either way. To see the difference, add
sleep 0.2at the top of the fake script (simulated startup latency). With the old values the test then fails 3 of 3 runs (elapsed about 2.03s); with the new values it passes 3 of 3. The test still guards the affordability check: with thefirst_probe_tookcheck inobject_type_boundeddisabled, the new version fails with a second spawn (left: 2).Before you request review
cargo test --workspacepasses locallycargo fmt --allandcargo clippy --workspace --all-targets -- -D warningsare cleanfeat(...),fix(...),docs(...)).env.exampleupdated if behavior or config changed (or N/A)Protocol & signing impact
did:key, Ed25519 / RFC 9421 signatures, UCAN, ref certs, or P2P wire formatsNone of these apply: the change is inside a test module and touches no protocol code.
Notes for reviewers
I did not run the full workspace tests on this branch. I ran
git::store::tests(all passing),cargo fmt --all -- --check, and clippy with-D warningsongitlawb-nodeonly, so the clippy box is unticked. The new-tests box is unticked because this changes a test and adds no behavior.The latency injection simulates load; it is not a captured CI failure. The test has never failed in the CI logs I checked.
Under a heavier local load (busy loops plus a high test thread count on the
git::tests), other process-timing tests invisibility_pack.rsandsmart_http.rsalso failed. I have not looked at those and they are not changed here.