Split PR #522 [4/9]: Admin scripts package#560
Conversation
Split 4/9 of PR #522 (integration-router-v2). Contains the Admin Script Runner service: - Script execution infrastructure (runner, registry, base class) - Hybrid scheduling (EventBridge + local adapters) - Dry-run mode with repository wrapper and HTTP interceptor - Admin router, SQS worker handler, builder Depends on: core (PR 3) for repository factories and queue utilities.
|
| this._validateScriptExists(scriptName); | ||
|
|
||
| // Delete from database | ||
| const deleteResult = await this.commands.deleteSchedule(scriptName); |
There was a problem hiding this comment.
We should probably try/catch that.
| * This use case encapsulates the business logic that was previously | ||
| * embedded in the router, reducing cognitive complexity and improving testability. | ||
| */ | ||
| class ScheduleManagementUseCase { |
There was a problem hiding this comment.
That's not a good use case name, a use case is usually an intention.
| results: [] | ||
| }; | ||
|
|
||
| this.context.log('info', 'Starting integration health check', { |
Code reviewFound 2 issues (both runtime crashes):
frigg/packages/admin-scripts/src/infrastructure/admin-script-router.js Lines 229 to 234 in a3764cb
frigg/packages/admin-scripts/src/builtins/integration-health-check.js Lines 145 to 147 in a3764cb frigg/packages/admin-scripts/src/builtins/oauth-token-refresh.js Lines 133 to 135 in a3764cb Additional notes (scored just below the reporting threshold but worth flagging given this is part of the same #522 split that had extensive issues in PR #559):
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |


Summary
Stack
This is PR 4 of 9 splitting #522 into reviewable chunks:
claude/split-522-01-docsclaude/split-522-02-schemasclaude/split-522-03-coreclaude/split-522-05-ai-agentsclaude/split-522-06-ui-libclaude/split-522-07-cliclaude/split-522-08-management-uiclaude/split-522-09-e2e-and-lockfileTest plan
https://claude.ai/code/session_01D3qzNKrmQXgSJoV6BJkcbQ