[142] fix simulation CI: coverage, live queue position, FIFO requeue#143
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Andriamanampisoa
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
Splits the CI debt from #142 (merged without a green coverage run) out of PR #136 so #136 can stay chatbot-only.
What this fixes
simulation/module +ai.service.tsshipped with thin/no tests. Added real unit tests acrosssimulation-capacity,-context,-promotion,-ws-token,simulation.config,simulation.cron,simulation-internal.controller, the internal-api-key guard, and the uncoveredai.servicemethods. Now: branches 85.64% / functions 94.4% / lines 94.13% / statements 94.32%, 650 server tests pass.useInterviewSessionfrozequeuePositionat enqueue time; the poll loop fetched a fresh position each tick but discarded it. Threaded anonProgresscallback so the queue banner now counts down.promoteNextFromQueueLPOP'd the head waiter and, on no free slot,enqueue()'d (RPUSH → tail), demoting the earliest waiter. AddedrequeueFront(LPUSH to head) and use it on the no-slot path to preserve FIFO.Why separate from #136
#136's net diff over
stagingfor these files was pure Prettier reformatting — zero logic. All the real simulation/ai logic came via the #142 merge. This PR carries the fixes; once merged tostaging, #136 rebases and goes green as a chatbot-only PR.Linked GitHub Ticket
No prior ticket
Workspace
Screenshots
N/A — no visual changes (live queue banner already existed; this PR only feeds it the live count).