feat(tools): gh tools default to the configured repo when repo is omitted#12
Conversation
…mitted Every read/write tool required an explicit `owner/name` repo, so an agent with one repo had to repeat it (and Ava would ask "which repo?"). `repo` is now optional on all tools and falls back to the configured default — `github.default_repo`, else the first of `github.repos` (the same resolution as /issue and the board), then the GITHUB_DEFAULT_REPO / GH_REPO env. An explicit `repo` still wins; with no repo and no default, the error now points at Settings ▸ GitHub instead of claiming there's no default. Tools rebuild on a config reload, so the default tracks edits. `repo` moved after any required param (e.g. `github_get_pr(number, repo="")`) so it can carry a default — arg order is cosmetic for @tool (the LLM calls by name).
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #12 | feat(tools): gh tools default to the configured repo when repo is omitted
VERDICT: WARN (non-terminal CI — test still running; will finalize on re-dispatch)
CI Status
- test: in_progress
Diff Review
- All read tools now accept an optional
repofalling back to the configured default viaresolve_repo()— the same resolution chain/issueand the board already use, so all plugin surfaces agree. repoarg moved after required params (number,ref,run_id,path) in each@toolsignature; cosmetic for LangChain (the model calls by name) and the PR description explains this clearly.__init__.pycomputesdefault_repoonce at register time usingeffective_default_repo()and threads it into bothget_read_tools()andget_write_tools(). Config reload rebuilds tools, so it tracks edits without a restart.bad_repo()error message updated to point users at Settings ▸ GitHub instead of claiming there's no default — good UX improvement.
Observations
- LOW: clawpatch structural review unavailable (502 — checkout cache failed on
mainref). Diff-based review did not surface blocking issues. - NOTE: diff truncated at 485 lines —
write_tools.pychanges are presumed consistent withread_tools.pypattern but not directly reviewed. The__init__.pychange passesdefault_repoto both, and author reports 87 passing tests covering both paths. - The resolution chain (explicit →
default_repo→ first ofrepos→ env → error) is identical to the existing/issuepath — no new resolution logic introduced, just reuse of a tested code path.
No blocking findings from the diff. Awaiting terminal CI for formal verdict.
— Quinn, QA Engineer
|
Submitted COMMENT review on #12 — non-blocking while CI completes. The CI-completion event will re-dispatch me for the formal PASS/FAIL. |
There was a problem hiding this comment.
QA Audit — PR #12 | feat(tools): gh tools default to the configured repo when repo is omitted
VERDICT: WARN (CI in progress — non-blocking comment)
CI Status
- test: in_progress
Diff Review
- All read + write tools now accept optional
repowith fallback viaresolve_repo— clean consistent pattern acrossread_tools.pyandwrite_tools.py default_repocomputed once at register time fromeffective_default_repo(cfg)and threaded intoget_read_tools/get_write_tools— correct lifecycle (tools rebuilt on config reload)bad_repoerror message improved to point at Settings ▸ GitHub instead of claiming no default exists- Arg order:
repomoved after required params (e.g.numberbeforerepo) — cosmetic for@tool, model calls by name - Import of
effective_default_repolifted to module level in__init__.py, deduplicating the/issuecommand block
Observations
- LOW: clawpatch structural review unavailable (checkout cache SHA resolution error on
main) — diff is straightforward, resolution path isresolve_repowhich is already production-tested via/issueand board - No unresolved CodeRabbit threads
— Quinn, QA Engineer
|
Submitted COMMENT review on #12. |
Why
Every read/write tool required an explicit
owner/namerepo — so an agent with a single configured repo had to repeat it on every call, and (as the operator saw) Ava would stop to ask "which repo do you want me to check?" even thoughgithub.default_repowas set.Change
repois now optional on all read + write tools and falls back to the configured default:explicit repo→github.default_repo→ first ofgithub.repos→GITHUB_DEFAULT_REPO/GH_REPOenv → error.(Same resolution
resolve_repoalready powered for/issueand the board, so the tools, the command, and the board all agree.) An explicitrepostill wins. With no repo and no default, the error now points at Settings ▸ GitHub instead of claiming there's no default.The default is read from config at register time; tools are rebuilt on a config reload, so it tracks edits without a restart.
repomoved after any required param (e.g.github_get_pr(number, repo="")) so it can carry a default — arg order is cosmetic for a LangChain@tool(the model calls by name).Tests
ruffclean; full suite 87 passed.