Skip to content

fix(delegate): update tests broken by v0.13.0 heartbeat and credentia…#21821

Closed
MorAlekss wants to merge 1 commit into
NousResearch:mainfrom
MorAlekss:fix/delegate-test-regressions
Closed

fix(delegate): update tests broken by v0.13.0 heartbeat and credentia…#21821
MorAlekss wants to merge 1 commit into
NousResearch:mainfrom
MorAlekss:fix/delegate-test-regressions

Conversation

@MorAlekss

Copy link
Copy Markdown
Contributor

Summary

Fixes 4 tests in TestDelegateHeartbeat and TestDelegationCredentialResolution broken by v0.13.0 changes.


Root cause

Two upstream changes in v0.13.0 broke existing tests without updating them:

  1. _HEARTBEAT_STALE_CYCLES_IDLE increased from 5 to 15 - test_heartbeat_still_trips_idle_stale_when_no_tool had a hardcoded bound of 9 cycles which no longer holds.
  2. resolve_runtime_provider() gained a new target_model parameter - three tests in TestDelegationCredentialResolution asserted the old signature without target_model.

What changed

  • tests/tools/test_delegate.py: replaced hardcoded 9 with _HEARTBEAT_STALE_CYCLES_IDLE + 2 so the bound tracks the runtime constant
  • tests/tools/test_delegate.py: updated three assert_called_once_with assertions to include target_model=ANY
  • tests/tools/test_delegate.py: added ANY to unittest.mock imports

Tests

17 tests across TestDelegateHeartbeat and TestDelegationCredentialResolution pass. No regressions.

@alt-glitch alt-glitch added type/test Test coverage or test infrastructure tool/delegate Subagent delegation P2 Medium — degraded but workaround exists labels May 8, 2026
@MorAlekss

Copy link
Copy Markdown
Contributor Author

Closing in favor of #21012 which covers the same fixes along with other shared CI failures.

@MorAlekss MorAlekss closed this May 8, 2026
@MorAlekss MorAlekss mentioned this pull request May 8, 2026
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium — degraded but workaround exists tool/delegate Subagent delegation type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants