Repository navigation
test(server): pin what the tasks and agents route tests let through - #1698
Merged
Merged
Conversation
Code review of the background tasks and agent catalog slices found three mutations their route tests did not catch. The OmO case now writes a dag_*.json workflow record and checks runs and server_time on the OmO answer, so answering runs: [] or dropping server_time fails. The agent list now includes kinds whose label order differs from their kind order (cmd, copilot), so sorting by kind fails, and a plain error from herdr pins 500 internal_error beside the 502.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Owner
Author
|
Merging without a CodeRabbit review: CodeRabbit hit its review limit on this PR ("Review limit reached"), so no review ran. This is a test-only change (two test files, no production code), so I did not ask for another one (AGENTS.md). The merge pass reviewed it instead, at head 3f69917:
|
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.
A test-only follow-up to the background tasks slice (#1688) and the agent catalog slice (#1690). In their code reviews, the reviewer broke the moved routes on purpose, one change at a time, to see whether the route tests would notice. Three of those breakages left every test passing. This PR adds what those three cases need. No production file changes.
server/tasks-routes.test.ts(#1688 review, point 3)The test that calls the route directly with an OmO session now also:
dag_1.jsonworkflow record for that session under the project's.omo/senpi-task/dag/runs, and assertsrunsis[["dag_1", "Bug-fix round", "running"]](id, name, status). Before, the fixture had no workflow, sorunswas[]either way, and returningruns: []from the OmO branch went unnoticed;server_timeon the OmO answer parses as a date. Before, it was checked only on the non-OmO answer, so dropping it from the OmO branch went unnoticed.server/agents-routes.test.ts(#1690 review, L1 and the surviving sort mutation)cmd(label "Command Code") andcopilot(label "GitHub Copilot"). Sorted by label, they land aftercodexand aftergjc; sorted by kind,cmdcomes beforecodexandcopilotbeforegjc. Sorting by kind instead of label now fails the test.500 internal_errorwithout the error's own text, next to the existingHerdrError→ 502 case.Checks
HERDR_TEST_MODE=unit bun test server/tasks-routes.test.ts server/agents-routes.test.ts: 6 pass, 0 fail.The three breakages from the reviews each fail a test now. I made each change, ran the two test files, then restored the code:
runs: []server_time/api/agentssorted by kind onlybun run typecheck: passes.bun run check fast: passes (unit 6161 pass, 0 fail, 12 skip in 440 files, 8 at a time, 57.5s).Test-only: no change in
server/outside the two test files, nor insrc/orshared/. No changelog fragment: users see no change.