Repository navigation
test(runtime): cover runEnd, rosterStatus and isModeSetting (#262) - #281
Merged
juancguerrerodev merged 7 commits intoDec 6, 2026
Merged
Conversation
juancguerrerodev
force-pushed
the
test/bots-rules-262
branch
from
December 6, 2026 09:10
f05c7d9 to
4f18d82
Compare
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 and why
Closes #262.
Creates
packages/runtime/test/bots-rules.test.tscoveringrunEnd,rosterStatusandisModeSettingfrompackages/runtime/src/bots.tsby name, withAloneTurnResultvalues built by hand: a final turn is done with no reason;changedtracks a successful step or a blocked step waiting as a suggestion; error turns fail with their code (orerrorwith none);needs_user,budgetandstoppedfail with their own kind; every returned reason is inROUTINE_RUN_REASONS; roster status precedence followsROSTER_STATUSES; and onlybots.modeand its per-bot keys are mode settings. Tests only;bots.tsis unchanged.Vision fit
Principle 7, small, typed and tested: the rules that decide what a person sees about their bots, when a routine ran and why it failed, and which settings only the permission modes may write, now have direct tests.
Non-negotiables
Checklist
acceptedproposal.changedfails 1 of the new tests, swapping the waiting/results precedence inrosterStatusfails 1, and dropping the dot from theisModeSettingprefix fails 1.pnpm check:privacy,pnpm typecheck,pnpm lint,pnpm testandnode scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. Run locally with the runtime dependency closure installed:pnpm --filter @hermit/runtime exec vitest run test/bots-rules.test.ts(7/7), the full@hermit/runtimesuite (56 files, 871 tests), and@hermit/runtimetypecheck (clean). CI runs the full root gates.packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. n/a: tests only, no UI string changed.executedandblockedare made up.Model path
packages/model,agent,skillsoreval, the prompt, the router, tool descriptions, normalizers, examples or the model file.Screenshots
New dependencies and network calls
None. Tests only;
packages/runtime/src/bots.tsis unchanged.AI agents