Skip to content

test(app): eliminate real ToolHive probe deadline wait - #1937

Merged
JAORMX merged 1 commit into
mainfrom
test/toolhive-probe-virtual-time
Sep 25, 2026
Merged

JAORMX merged 1 commit into
mainfrom
test/toolhive-probe-virtual-time

Conversation

@JAORMX

@JAORMX JAORMX commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Run TestToolhiveProbeDeadlinePublishesHealthySibling inside testing/synctest, following the neighboring stale-refresh test.

  • Keep the real probe flow and unchanged 1,500 ms production deadline.
  • Preserve deadline propagation, healthy-sibling publication, provider separation, and discovery cleanup assertions.
  • Tighten the elapsed-time assertion from a wall-clock tolerance to the exact virtual deadline.
  • No production code or new dependencies. Most of the diff is indentation.

Measured benefit

Same test, forced uncached with -count=1, measured using go test -json:

Measurement Before After
Target test 1.50 s <0.01 s
Selected package run 1.542 s 0.045 s

The post-change test duration rounds to zero at the JSON reporter's precision; this is not a whole-suite speedup claim.

Completed verification

  • Targeted before/after test runs passed.
  • Probe, refresh-deadline, and concurrent-refresh tests passed 50 repetitions under -race.
  • Mutation check: adding 1 ms to the effective bootstrap budget failed with probe elapsed = 1.501s, want 1.5s. The mutation was reverted and the test passed again.
  • Full non-race task test GOPROXY=off passed.
  • Independent focused review found no blockers or important findings.
  • git diff --check passed.

Outstanding verification

Opening ready for review at the operator's request, with incomplete aggregate checks disclosed:

  • The initial root lint scan reported zero issues but exceeded its timeout.
  • The retry passed root lint; engine/submodule lint completion has not yet been confirmed.
  • Full repository race verification and the offline demo have not yet completed.

These are not claimed as passed. CI checks remain pending on the submitted branch.

Classification

Routine: test-only use of existing standard-library virtual time. No behavior, API, configuration, or documentation changes.

Exercise the real probe deadline and healthy-sibling publication in synctest, replacing the wall-clock tolerance with an exact virtual-time assertion.

Co-Authored-By: mecatl <noreply@mecatl.dev>
@JAORMX
JAORMX merged commit d8f5b1f into main Sep 25, 2026
36 checks passed
@JAORMX
JAORMX deleted the test/toolhive-probe-virtual-time branch September 25, 2026 13:57
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 25, 2026
2 tasks
jbeda added a commit that referenced this pull request Sep 25, 2026
…mit-coauthor-guidance

* origin/main: (32 commits)
  docs: plan optional native Kubernetes execution provider (#1579)
  feat(mecatui): restore session status metrics (#1891)
  docs(plan): bound agent inventory viewport (#1946)
  docs: include user-docs in matlatl and use local documentation links (#1934)
  feat(mecatui): bound sessions inventory (#1944)
  feat(studio): show session delegation activity (#1907)
  docs(plan): define Studio session activity (#1885)
  Release TypeScript SDK v0.4.0 (#1940)
  Release v0.0.41 (#1941)
  docs(mecatui): plan bounded sessions inventory (#1906)
  feat(studio): add exact plan control and authorization review prerequisite (#1909)
  test(app): eliminate real ToolHive probe deadline wait (#1937)
  docs(plan): define Studio chat approvals and exact plan control (#1888)
  test(sdk): enforce SDK/TUI high-level parity (#1471) (#1917)
  docs(plan): propose SDK high-level parity coverage (#1471) (#1916)
  docs: improve gRPC schema table readability (#1842)
  test(app): eliminate real waits in durable learning tests (#1933)
  feat(studio): align chat transcript and composer (#1886)
  docs(plan): define Studio chat transcript and composer (#1880)
  feat: correlate provider requests with the root session (#1883)
  ...
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