Skip to content

tests: dashboard tests wait for HITS and PROF before reading them - #1821

Merged
JustVugg merged 1 commit into
devfrom
fix/dashboard-tests-wait-hits
Oct 1, 2026
Merged

JustVugg merged 1 commit into
devfrom
fix/dashboard-tests-wait-hits

Conversation

@JustVugg

@JustVugg JustVugg commented Oct 1, 2026

Copy link
Copy Markdown
Owner

dev went red on the merge of #1819 in the "DeepSeek V4.1 tiny oracle" job, and green again on the next merge:

FAIL: test_brain_lights_up_and_shows_residents (tests.test_dsv41_dashboard...)
    self.assertEqual(len(experts["hits"]), ((bits + 7) // 8) * 2)
AssertionError: 0 != 12

#1819 only touched mimo.c and the family registry; the cause is a race in the test. The engine writes HITS and PROF after DONE. The gateway answers the HTTP request as soon as its dispatcher reads DONE, and the dispatcher reads the two lines after that, so a test that queries /experts right after the reply can see the grid before this turn's hits arrive. The qwen36 and glm53 dashboard tests read the endpoints the same way.

The endpoints already return a seq that counts the lines received. The three tests now wait until seq >= 1 on /experts and /profile (up to 30 s; past that they return what is there and the existing assertions name what is missing).

Checked

  • With a local-only time.sleep(0.5) before the gateway records HITS, the test on dev fails exactly as on CI (0 != 12), and with this change it passes.
  • Without the delay, both versions pass 5 out of 5 runs under full CPU load; the race needs the dispatcher to fall behind, which is why it shows up only now and then on CI.
  • Tests only; the gateway and engines are unchanged.

The engine writes HITS and PROF after DONE. The gateway answers the request
as soon as it reads DONE, and its dispatcher reads the two lines a moment
later, so a test that queries /experts right after the reply can see the
empty grid. That is what turned dev red on the merge of #1819
(test_dsv41_dashboard: 0 != 12). The qwen36 and glm53 dashboard tests read
the endpoints the same way.

The tests now wait until each endpoint's seq says its line arrived, up to
30 s, then assert as before.
@JustVugg
JustVugg merged commit 4521832 into dev Oct 1, 2026
31 checks passed
Yi-111-a added a commit to Yi-111-a/colibri that referenced this pull request Oct 1, 2026
Catch up past JustVugg#1821 so the branch includes the serve-variant and MiMo-Pro
docs that landed after the first merge.
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