Repository navigation
feat: add agent runbook management tool - #2112
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR adds a new ChangesRunbook Management Tool & Infrastructure
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/agent/runbook_manage_test.go`:
- Around line 83-84: The local variable named copy shadows Go's built-in copy
function; rename it (for example to docCopy or cp) where it's declared as copy
:= *doc and update any subsequent uses (e.g., return ©, nil) to use the new
identifier so golangci-lint revive/govet warnings are eliminated while
preserving the same behavior.
- Around line 289-295: The test calls NewRunbookManageTool(...).Run with a
zero-value ToolContext{} which leaves the embedded Context nil and doesn't
exercise the real ListFlat path; update the non-error call to invoke Run with a
valid context (ToolContext{Context: context.Background()}) so the ListFlat code
path receives a non-nil context, while retaining the zero-value ToolContext{}
variant only for the nil-store/unavailability early-exit case; target the Run
invocation associated with NewRunbookManageTool and the assertions that follow
so the change affects the successful-list assertion but not the error-path test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b47d3231-d6b8-42bb-a6ab-4fc2c6a90f1e
📒 Files selected for processing (9)
internal/agent/api.gointernal/agent/runbook_manage.gointernal/agent/runbook_manage_test.gointernal/agent/session.gointernal/agent/system_prompt.txtinternal/agent/tool_registry.gointernal/agent/tool_registry_test.gointernal/agent/types.gointernal/service/frontend/server.go
Summary
runbook_managetool for listing, searching, reading, creating, updating, patching, and ensuring metadata on Markdown runbooksValidation
go test ./internal/agent -run 'TestRunbookManage|TestRegisteredTools' -count=1go test ./internal/service/frontend/...go test ./internal/agent -coverprofile=/tmp/dagu-agent-runbook.coverrunbook_manage.gostatement coverage: 97.3% (220/226)Notes
go test ./...was run locally before this push and reached the end, but existing Docker-backedinternal/intgtests failed while waiting on test containers unrelated to this change.Summary by CodeRabbit
Release Notes