fix: register sisyphus-junior as builtin agent#2352
fix: register sisyphus-junior as builtin agent#2352rluisr wants to merge 2 commits intocode-yeongyu:devfrom
Conversation
… model fallback Sisyphus-Junior was missing from BuiltinAgentName type, agentSources map, barrel exports, and AGENT_MODEL_REQUIREMENTS. This caused type inconsistencies and prevented model-fallback hooks from working for sisyphus-junior sessions. Closes code-yeongyu#1697
|
All contributors have signed the CLA. Thank you! ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
No issues found across 6 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: This PR follows the established pattern for registering builtin agents, adds necessary types and schemas, and passes all relevant tests without altering existing agent logic.
acamq
left a comment
There was a problem hiding this comment.
The PR correctly adds sisyphus-junior as a builtin agent across the type system and model fallback, but the test suite wasn't updated to reflect this change.
Issue
Test: src/shared/model-requirements.test.ts
Line: 213
Error:
Expected length: 10
Received length: 11
The test "all 10 builtin agents have valid fallbackChain arrays" expects exactly 10 agents, but AGENT_MODEL_REQUIREMENTS now has 11 entries after adding sisyphus-junior.
Fix Required
Update src/shared/model-requirements.test.ts (lines 194-213):
test("all 11 builtin agents have valid fallbackChain arrays", () => {
// #given - list of 11 agent names
const expectedAgents = [
"sisyphus",
"hephaestus",
"oracle",
"librarian",
"explore",
"multimodal-looker",
"prometheus",
"metis",
"momus",
"atlas",
"sisyphus-junior", // ← Add this line
]
// when - checking AGENT_MODEL_REQUIREMENTS
const definedAgents = Object.keys(AGENT_MODEL_REQUIREMENTS)
// #then - all agents present with valid fallbackChain
expect(definedAgents).toHaveLength(11) // ← Change from 10 to 11
for (const agent of expectedAgents) {
// ... rest of test unchangedChanges Summary
- Add
"sisyphus-junior"toexpectedAgentsarray (line 207) - Change test description from "all 10" to "all 11" (line 194)
- Update assertion from
toHaveLength(10)totoHaveLength(11)(line 213)
Note: The author mentioned "All 251 tests pass" in the PR description, but CI shows this test failing. Likely a local test vs CI environment difference.
|
Once you fix the test, this PR is good to merge. |
|
@acamq fixed |
Summary
Changes
src/config/schema/agent-names.ts: Add"sisyphus-junior"toBuiltinAgentNameSchemasrc/agents/types.ts: Add"sisyphus-junior"toBuiltinAgentNametype unionsrc/agents/builtin-agents.ts: Import factory and add toagentSourcesmap (forbuiltinAgentNamesSet correctness)src/agents/builtin-agents/general-agents.ts: Skip incollectPendingBuiltinAgents(handled separately viaagent-config-handler.ts, same pattern as atlas)src/agents/index.ts: Add barrel export forcreateSisyphusJuniorAgentWithOverridesandSISYPHUS_JUNIOR_DEFAULTSsrc/shared/model-requirements.ts: AddAGENT_MODEL_REQUIREMENTS["sisyphus-junior"]with fallback chain (claude-sonnet-4-6 -> gpt-5.4 -> gemini-3-flash) for model-fallback hook and doctor checksTesting
bun test src/config/schema.test.ts src/agents/sisyphus-junior/index.test.ts src/tools/delegate-task/tools.test.ts src/tools/delegate-task/category-resolver.test.ts src/plugin-handlers/config-handler.test.tsAll 251 tests pass.
Related Issues
Closes #1697
Summary by cubic
Register
sisyphus-junioras a builtin agent so types, exports, and model fallback work consistently across the app. Restores correct fallback behavior and fixes type mismatches (fixes #1697).sisyphus-juniortoBuiltinAgentNameschema and type.agentSourcesand barrel exports.collectPendingBuiltinAgents(handled via config handler, likeatlas).claude-sonnet-4-6→gpt-5.4(medium) →gemini-3-flash.sisyphus-junior.Written for commit 123f73c. Summary will update on new commits.