Skip to content

test(agent): periodic-scheduler worker-start-failure test exercises the failure branch again (follow-up #106308) - #106328

Merged
kshitijk4poor merged 1 commit into
NousResearch:mainfrom
kshitijk4poor:fix/periodic-scheduler-test-teeth
Sep 9, 2026
Merged

kshitijk4poor merged 1 commit into
NousResearch:mainfrom
kshitijk4poor:fix/periodic-scheduler-test-teeth

Conversation

@kshitijk4poor

Copy link
Copy Markdown
Contributor

Follow-up to #106308 (salvage of #105716). The post-merge review pass found the salvage's own test rewrite had gone vacuous.

Validation: 6 passed ×3; mutation (retire the handle on worker-start failure) → worker-start failure silently retired the timer. No production change.

…rker again

`kwargs.get("target") is sched._run_callback` is always False (a bound method is a fresh object
per access), so the fake never returned Boom and the _dispatch failure branch went untested;
the test passed on the normal worker. Compare with == and assert the interception happened
(mutation: retiring the handle on start failure now fails the test).

The thread-count assertions sampled while per-fire workers were still live; quiesce every
handle with cancel(wait=) before sampling so the count is deterministic (AGENTS.md: timing tests
must not assume a quiet runner).

Follow-up to NousResearch#106308.
@kshitijk4poor
kshitijk4poor enabled auto-merge (rebase) September 9, 2026 07:06
@kshitijk4poor
kshitijk4poor merged commit 7f3e0bb into NousResearch:main Sep 9, 2026
36 checks passed
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants