Repository navigation
fix(review): pass the owner/repo slug to ghkit — the bare-name 404 class - #15
Conversation
The ghkit adoption in #14 collapsed the (owner, repo) pair into ONE slug argument (ghkit owns /repos/<slug>/... path building, R3), but the tool dispatch in runAgentLoop kept passing the BARE repo name: t.gh.toolFiles(ctx, t.repo, t.pr) // /repos/spec/pulls/140 -> 404 Every read-only tool (get_pr_meta, get_pr_body, get_pr_files, get_pr_file, get_pr_commits, get_pr_thread, get_pr_comment) therefore 404'd against the GitHub API, and the model correctly returned a BLOCK: "No retrievable PR state". This is why spec#140, action-review#7 and the umbrella #231 stayed BLOCKED after the weld — the engine was fast (4.9s vs the old ~20m) but could not read anything. Measured on the welded engine (run 35531666727, charly v2026.263.1828): get_pr_meta -> /repos/opencharly/pulls/231 404 get_pr_body -> /repos/opencharly/issues/231 404 (spec#140 resolved the bare name 'spec': /repos/spec/pulls/140 404). Fix: add toolSet.slug() — the ONE place the engine's split (owner, repo) meets ghkit's single slug — and pass it at all seven dispatch sites. The two other ghkit call sites already passed cfg.Repo (a full slug) and are unchanged. The escape: every existing tool test is fixture-backed (t.fixture), which short-circuits BEFORE the ghkit call, and the live tests skip without a token — so no test ever exercised ghkit's path building. slug_test.go stands up a stub GitHub API and asserts every tool targets /repos/<owner>/<repo>/..., failing on the bare-name form; it reproduces the exact 404s without the fix. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
[step: review]Review — BLOCKHead SHA: Change class: indeterminate — no diff, body, commits, or comments are retrievable. Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: plugin Go code + test ( Placement: CORRECT — the Blocks
Comment intake
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Addresses the validator BLOCK on the first head:
1. Dead code: drop `var _ = json.Marshal` and the then-unused `encoding/json`
import from slug_test.go.
2. Evidence: re-ran the reverted-fix test and paste the COMPLETE untrimmed
output (both assertions per tool + the `--- FAIL:` line).
3. Coverage: TestToolCallsPassOwnerRepoSlug now drives ALL SEVEN tools, including
the two argument-taking ones (get_pr_file with {"path":...}, get_pr_comment
with {"id":...}) that the first revision only listed.
4. R5 sweep: the pattern below covers all seven dispatch sites.
5. Empty-owner fallback: slug() now returns ok=false for an empty owner (or repo)
instead of silently returning the bare name — the exact 404 form. call()
resolves the slug once and fails loudly for every GitHub-backed tool when the
context is absent, so the fallback can no longer re-create the class.
Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
[step: review]Review — BLOCKHead SHA: Change class: plugin Go code + test ( Placement: CORRECT — Blocks
Comment intake
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
[step: review]Review — PASSHead SHA: Security screen: PASS — T1–T4 clean: no secrets/egress, no new deps, no guardrail weakening (the change restores the validator's ability to read PR state), no embedded directives in body/commits, and the diff does exactly what the summary claims (2 files, Comment intake:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
[step: review]Review — PASSHead SHA: Security screen: PASS — T1–T4 clean: no secrets/egress, no new deps, no guardrail weakening (the change restores the validator's ability to read PR state and fails closed on a missing owner), no embedded directives in body/commits, and the diff does exactly what the summary claims (2 files: Checklist: All applicable rules PASS or NA. Change class = plugin Go code + test; placement CORRECT (candy-local helper, no core/sdk movement, no alias file, no new core import). Re-derived against the CURRENT diff: the reverted-run output's line numbers ( Comment intake:
Note (non-blocking): 3 commits ( Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…ame 404 (#624) * fix(release): weld plugin-review v2026.263.1956 — it fixes the bare-name 404 Bump the WELDED plugin-review pin from v2026.263.1642 -> v2026.263.1956 so the next charly release's plugin bundle carries the owner/repo slug fix merged into opencharly/plugin-review#15. The #14 weld (v2026.263.1642) made the engine FAST but exposed a regression: the ghkit adoption collapsed (owner, repo) into ONE slug argument, while the tool dispatch kept passing the BARE repo name. Every read-only tool 404'd (/repos/spec/pulls/140), so the model correctly returned a BLOCK -- "No retrievable PR state". Measured on umbrella #231 (charly v2026.263.1828, run 35531666727): get_pr_meta -> /repos/opencharly/pulls/231 404. That is why spec#140, action-review#7 and umbrella #231 stayed BLOCKED after the #14 weld. #15 adds toolSet.slug() -- the one place the engine's split (owner, repo) meets ghkit's single slug -- resolves it once in call(), passes it at all seven dispatch sites, and fails loudly on an empty owner instead of silently re-creating the bare-name path. A stub-GitHub regression test drives all seven tools and reproduces the 404s without the fix. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body with the real change-class bed evidence Paste the release workflow's own plugin-build step run verbatim on the pinned tag (plus the built binary's fix strings and the .providers manifest), correct the R5 sweep to a real command+output, and lower the attribution tier to `analysed on a live system` (the post-merge release build is the full R10). Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (analysed on a live system) --------- Co-authored-by: Andreas Trawoeger <[email protected]>
Summary
Fix the engine so every GitHub tool call targets
/repos/<owner>/<repo>/.... The ghkit adoption inplugin-review#14collapsed the(owner, repo)pair into one slug argument (ghkit owns the path building, R3), but the tool dispatch inrunAgentLoopkept passing the bare repo name:Every read-only tool (
get_pr_meta,get_pr_body,get_pr_files,get_pr_file,get_pr_commits,get_pr_thread,get_pr_comment) therefore 404'd, and the model correctly returned a BLOCK — "No retrievable PR state". This is whyspec#140,action-review#7and umbrella#231stayed BLOCKED after the engine weld: the engine became fast (~4.9 s vs the old ~20 min) but could read nothing.Measured on the welded engine (umbrella
#231, charlyv2026.263.1828, run35531666727):On
spec#140the bare namespecwas used:/repos/spec/pulls/140404.Fix. Add
toolSet.slug()— the ONE place the engine's split(owner, repo)meets ghkit's single slug — and resolve it once incall(), passing it to all seven dispatch sites. The two other ghkit call sites (runReviewEngine's preflight meta read,emitReviewEffects' comment post) already passedcfg.Repo(a full slug) and are unchanged.An empty owner is a reported error, not a silent bare-name path: the review engine's
Repois always a full slug (--repo owner/repoorGITHUB_REPOSITORY), and ghkit cannot build an owner-less/reposroute.call()fails loudly for every GitHub-backed tool when the context is absent, so the fallback cannot re-create the 404 class.Why it escaped review. Every existing tool test is fixture-backed (
t.fixture), which short-circuits BEFORE the ghkit call, and the live tests skip without a token — so no test ever exercised ghkit's path building. R3's single-GitHub-client refactor changed the argument contract, and no test pinned that contract.How tested
New regression test (
slug_test.go) stands up a stub GitHub API, drives all seven dispatch sites — including the two argument-taking tools (get_pr_file {"path":...},get_pr_comment {"id":...}) — and asserts every request targets/repos/<owner>/<repo>/....Complete, untrimmed output with the fix reverted (both assertions fire per tool, plus the
--- FAIL:line):On the final tree:
Rulebook compliance
R1 — the 404 class is root-caused to the argument-contract change in
#14(measured API paths from the live run), not guessed.R2 — all seven affected call sites are fixed in one change; no site left on the bare-name form.
R3 — one GitHub client (ghkit) and one slug-join point (
toolSet.slug()), not a per-call string concat.R4 — no workaround: the path is built by ghkit from the correct argument, as the contract requires; the empty-owner case fails loudly.
R5 — the bare-name form is removed everywhere in the engine. Sweep (covers all seven dispatch sites,
t.repoand the argument-taking tools included):Every site passes
slug; none passest.repo.R7 — the new test fails without the fix (full output above) and passes with it, on the committed tree.
R9 — the welded binary is rebuilt by the release workflow from this source; local build/test green.
Change classification
go test ./...,gofmt -l,go vet(pasted above); the live validator re-run after the weld is the runtime proof.fully tested and validated— the regression test reproduces the defect and the full package suite passes on the final tree.Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)