Repository navigation
Bound the cooldown tests' wall clock by a budget, not by 100ms - #107
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Ready for maintainer review Review snapshot
Completeness: Complete FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. How this fits togetherflowchart LR
n0["...search_answers_from_cached_server_details<br/>changed"]:::changed
n1["...search_skips_the_network_for_the_cooldown<br/>changed"]:::changed
n2["cursors"]:::impacted
n3["auth_at"]:::impacted
n4["store"]:::impacted
n5["switchable_registry"]:::impacted
n6["set"]:::impacted
n0 -->|calls| n2
n0 -->|tests| n2
n0 -->|calls| n3
n0 -->|tests| n3
n0 -->|calls| n5
n0 -->|tests| n5
n0 -->|calls| n6
n0 -->|tests| n6
n1 -->|calls| n2
n1 -->|tests| n2
n1 -->|calls| n3
n1 -->|tests| n3
n1 -->|calls| n4
n1 -->|tests| n4
n1 -->|calls| n5
n1 -->|tests| n5
n1 -->|calls| n6
n1 -->|tests| n6
n6 -->|calls| n4
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0002 · 94,047 in / 2,490 out · 18,304 cached (19%) · ladder/vectors-oai3, deepseek-v4.1-flash · 174 embedded
critique: $0.0000 · 34,149 in / 465 out · 4,352 cached (13%) · deepseek-v4.1-flash
security: $0.0000 · 15,589 in / 83 out · 1,920 cached (12%) · deepseek-v4.1-flash
tests: $0.0000 · 14,288 in / 165 out · 3,072 cached (22%) · deepseek-v4.1-flash
description: $0.0001 · 27,354 in / 796 out · 8,960 cached (33%) · deepseek-v4.1-flash
a_stalled_search_skips_the_network_for_the_cooldown asserted the cooled-down search finished in under 100ms, which is also the search budget it would otherwise wait. On a shared macOS runner it took 119.5ms (job 116436420086) while its real proof, that no request was sent, passed. The same bound sat in a_cooling_down_search_answers_from_cached_server_details. Give both tests a 1s search budget and bound the cooled-down call at half of it: still failing if the adapter waits out the budget, far from scheduler noise. The request count stays the proof that nothing was sent.
76472ce to
8686029
Compare
Ships tinyhumansai#105 (the pure tool-UI rules move into tinymcp-bus, contract 1.25) and tinyhumansai#107. Workspace version and the two lockfile entries only, as in the 0.18.5 release. Part of tinyhumansai/openhuman#7868
Summary
registry::sources::officialhas two cooldown tests:a_stalled_search_skips_the_network_for_the_cooldownanda_cooling_down_search_answers_from_cached_server_details. Both asserted that a search made during the cooldown finished in under 100ms, which is the same as the search budget that search would otherwise wait out. On a shared macOS runner the first test took 119.5ms (tinymcp#105, job 116436420086), while its real proof,state.requests() == after_first("nothing was sent"), passed. The 100ms bound can't tell a waited budget apart from scheduler noise.Both tests now use a 1s search budget (
COOLDOWN_SEARCH_BUDGET) and bound the cooled-down call at half of it, with a comment explaining why. A call that waited out the budget still fails the assertion, and no idle call comes near 500ms. The request count remains the proof that nothing was sent. The first test's expectedRegistryTimeout.timeoutfollows the new budget.Related issue
None. The failure is a flaky test on
main, surfaced on #105.API or behavior changes
None. Only tests change. Each of the two tests takes about 0.9s longer, because its first, stalled search now waits 1s instead of 100ms.
Validation
Not run locally: fmt
--checkas a separate step, clippy, build and test. By our fleet's policy, CI is the gate, and this PR relies onmodule-cifor those. Commands actually run:cargo fmt --all. Ran it and committed the result.cargo clippy --all-targets --all-features -- -D warnings(CI)cargo build --all-targets --all-features(CI)cargo test --all-features(CI)Tests
The two tests above are updated. Nothing is untested: neither test is relaxed in what it proves, since the request-count assertion is unchanged and the wall-clock bound still catches a call that waits out the budget.
Documentation
The reason is recorded in a doc comment on
COOLDOWN_SEARCH_BUDGET.Checklist
#[allow(...)],#[ignore], or relaxed lints.envcontents in the diff or the description