fix: CLI agent mode review — logging init, flag scoping, dead code#290
Open
santoshkumarradha wants to merge 1 commit intomainfrom
Open
fix: CLI agent mode review — logging init, flag scoping, dead code#290santoshkumarradha wants to merge 1 commit intomainfrom
santoshkumarradha wants to merge 1 commit intomainfrom
Conversation
…, docstring - Remove empty PersistentPreRun on agent command that silently overrode root PersistentPreRunE, preventing logger initialization for all af agent subcommands - Move --output and --timeout flags from root PersistentFlags to agent command scope (avoid polluting af dev, af server, etc.) - Remove redundant server URL fallback in agentHTTP() (GetServerURL already handles the default) - Fix Python SDK split docstring: merge orphaned string literal back into __init__ docstring, place resolution code after docstring - Add doc comment to packages/server_url.go for parity with services/server_url.go
Contributor
Performance
✓ No regressions detected |
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.
Summary
Post-merge review fixes for PR #284 (CLI Agent Mode). These issues were found during code review but the PR was merged before the fix commit landed.
Issues Found & Fixed
Bug (High)
PersistentPreRunon agent command silently overrode rootPersistentPreRunE—logger.InitLogger()was never called for anyaf agent *subcommand. Removed the empty override so cobra traverses to parent's hook.Quality (Medium)
--outputand--timeoutas root PersistentFlags pollutedaf dev,af server,af runhelp text with irrelevant flags. Moved to agent command's localPersistentFlags.agentHTTP()— dead code sinceGetServerURL()already returns the default. Removed.Low
packages/server_url.gofor parity withservices/server_url.go.Changed Files (4 files, +17/-23)
control-plane/internal/cli/agent_commands.gocontrol-plane/internal/cli/root.gocontrol-plane/internal/packages/server_url.gosdk/python/agentfield/agent.pyVerification
go build ./...✅go vet ./...✅go test— 190 tests pass ✅Relates to #281, #282