Skip to content

Use native go-gh REST clients for release and ref lookups#47547

Merged
pelikhan merged 13 commits into
mainfrom
copilot/go-fan-review-cli-go-gh
Jul 24, 2026
Merged

Use native go-gh REST clients for release and ref lookups#47547
pelikhan merged 13 commits into
mainfrom
copilot/go-fan-review-cli-go-gh

Conversation

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

gh-aw still had two gaps in its go-gh usage: update checks were using context-less REST calls, and remote ref resolution still depended on gh api subprocess execution. This change moves both paths onto native go-gh REST clients, keeps the existing fallback chain intact, and aligns remaining GET calls on http.MethodGet.

  • Update checks

    • switch latest-release lookups from client.Get(...) to client.DoWithContext(...)
    • thread context through async update checks so cancellation reaches the GitHub API call
    • keep the existing github.com-only targeting for release metadata
  • Remote ref-to-SHA resolution

    • replace gh.Exec("api", ...) in remote SHA resolution with a native REST lookup against repos/{owner}/{repo}/commits/{ref}
    • preserve the existing fallback order:
      1. authenticated REST lookup
      2. git ls-remote
      3. unauthenticated public API on github.com
    • detect auth failures via *api.HTTPError status (401 / 403) instead of stderr string parsing
  • Client option reuse

    • add a small shared helper for go-gh ClientOptions seeded with the repository’s default HTTP timeout
    • reuse it where host-specific REST clients are created
  • HTTP verb consistency

    • normalize remaining REST GET call sites from string literals to http.MethodGet
  • Regression coverage

    • add focused tests for:
      • release lookup endpoint selection and context-aware client usage
      • native ref resolution request shape
      • auth-error fallback behavior for git and public API paths

Example of the ref lookup change:

var result struct {
	SHA string `json:"sha"`
}

err := client.DoWithContext(
	ctx,
	http.MethodGet,
	buildCommitLookupAPIPath(owner, repo, ref),
	nil,
	&result,
)

Generated by 👨‍🍳 PR Sous Chef · gpt54 19.7 AIC · ⌖ 8.4 AIC · ⊞ 7K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 14.8 AIC · ⌖ 8.94 AIC · ⊞ 7K ·
Comment /souschef to run again


$

Generated by 👨‍🍳 PR Sous Chef · gpt54 11.6 AIC · ⌖ 7.58 AIC · ⊞ 7K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 14.9 AIC · ⌖ 8.66 AIC · ⊞ 5.5K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 14.3 AIC · ⌖ 9.1 AIC · ⊞ 7K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/30035273314

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 18 AIC · ⌖ 10.1 AIC · ⊞ 7K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 10.4 AIC · ⌖ 6.78 AIC · ⊞ 7K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 9.66 AIC · ⌖ 8.72 AIC · ⊞ 7K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/30053287301

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 22.6 AIC · ⌖ 7.33 AIC · ⊞ 7K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/30057263862

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 32.9 AIC · ⌖ 8.04 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI linked an issue Jul 23, 2026 that may be closed by this pull request
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review Go module for cli/go-gh Use native go-gh REST clients for release and ref lookups Jul 23, 2026
Copilot AI requested a review from pelikhan July 23, 2026 11:10
@pelikhan
pelikhan marked this pull request as ready for review July 23, 2026 11:39
Copilot AI review requested due to automatic review settings July 23, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates release and ref lookups to context-aware native go-gh REST clients.

Changes:

  • Adds shared REST client options with default timeout.
  • Replaces gh api ref resolution while preserving fallbacks.
  • Standardizes GET methods and adds regression tests.
Show a summary per file
File Description
pkg/workflow/repository_features_validation.go Uses http.MethodGet.
pkg/parser/remote_resolve_sha.go Adds native REST ref resolution.
pkg/parser/remote_fetch_test.go Tests ref resolution and fallbacks.
pkg/parser/remote_client.go Reuses shared client options.
pkg/githubapi/options.go Adds shared options helper.
pkg/githubapi/options_test.go Tests shared options.
pkg/cli/update_extension_check.go Supplies release lookup context.
pkg/cli/update_cooldown.go Uses http.MethodGet.
pkg/cli/update_check.go Adds context-aware release requests.
pkg/cli/update_check_test.go Tests release endpoints and errors.
pkg/cli/org_issue_pr_helpers.go Adapts release lookup caller.
pkg/cli/copilot_billing_check.go Uses http.MethodGet.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 12/12 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread pkg/parser/remote_resolve_sha.go
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

⚠️ PR Code Quality Reviewer failed during code quality review.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Quality Sentinel: 77/100 - FAILED. Hard violation: pkg/githubapi/options_test.go missing required (go/redacted):build tag on line 1. Fix: add (go/redacted):build !integration as line 1. Implementation ratio 14% (threshold 30%) - otherwise good behavioral coverage in remote_fetch_test.go fallback tests.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design, /diagnosing-bugs, and /tdd — requesting changes on three issues.

📋 Key Themes & Highlights

Issues

  • Leading-slash URL bug (already flagged at line 118 + confirmed by test at line 106): buildCommitLookupAPIPath returns /repos/... but go-gh prepends its own prefix — the test masks the bug by asserting the wrong value.
  • Lost context propagation: org_issue_pr_helpers.go re-introduces context.Background() just after getLatestRelease was updated to accept a context. The upgradeExtensionIfOutdated caller has the same gap (no context param at all).
  • Asymmetric fallback coverage: client-creation auth errors (lines 82–96 of remote_resolve_sha.go) follow a different code path than DoWithContext auth errors — only the latter is tested.

Positive Highlights

  • ✅ Excellent use of a narrow releaseRESTClient / restCommitResolver interface for injection — makes the new tests clean and dependency-free.
  • ✅ Context threading through the async update path is a meaningful correctness improvement.
  • githubapi.ClientOptions helper removes repetition nicely.
  • ✅ Good fallback-chain test coverage for the three documented scenarios.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 46.3 AIC · ⌖ 4.88 AIC · ⊞ 6.7K
Comment /matt to run again

Comment thread pkg/cli/org_issue_pr_helpers.go Outdated

getLatestOrgReleaseFunc = getLatestRelease
getLatestOrgReleaseFunc = func(includePrereleases bool) (string, error) {
return getLatestRelease(context.Background(), includePrereleases)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design] This wrapper hardcodes context.Background(), so callers that supply a cancellable context cannot cancel the getLatestRelease call.

💡 Suggested fix

Since getLatestRelease now accepts ctx, thread it through instead of introducing a wrapper:

getLatestOrgReleaseFunc = func(ctx context.Context, includePrereleases bool) (string, error) {
    return getLatestRelease(ctx, includePrereleases)
}

Update the variable type and all call sites accordingly.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wrapper already threads the caller's context through — getLatestOrgReleaseFunc = func(ctx context.Context, includePrereleases bool) (string, error) { return getLatestRelease(ctx, includePrereleases) } — which is exactly the suggested fix. This thread is outdated.

args = []string{"api", apiPath, "--jq", ".sha"}
client, err := createRESTClientForHost(host)
if err != nil {
if gitutil.IsAuthError(err.Error()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/diagnosing-bugs] Auth errors during createRESTClientForHost (lines 82–96) go through a separate fallback path from auth errors during DoWithContext (lines 118–130). This asymmetry means the fallback logic is tested only for the latter path — a regression in client-creation auth errors wouldn't be caught by the new tests.

💡 Suggested fix

Consider consolidating: always attempt createRESTClientForHost and only then enter resolveRefToSHAWithFallbacks. If client creation fails for non-auth reasons, return immediately. If it fails for auth reasons, pass a nil/stub client and let resolveRefToSHAWithFallbacks handle both fallback branches consistently. Alternatively, add a test for the client-creation failure path.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took the "add tests" alternative. TestResolveRefToSHA_ClientCreationAuthError_UsesGitFallback and TestResolveRefToSHA_ClientCreationAuthError_GithubDotCom_UsesPublicAPIWhenGitFails both exercise the client-creation error path — the first verifies git fallback is invoked, the second verifies the public API fallback is attempted on github.com when git also fails.

Comment thread pkg/parser/remote_fetch_test.go Outdated
if method != http.MethodGet {
t.Fatalf("DoWithContext() method = %q, want %q", method, http.MethodGet)
}
if path != "/repos/owner/repo/commits/feature%2Fbranch" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/tdd] The test asserts path == "/repos/owner/repo/commits/feature%2Fbranch" (leading slash), but go-gh's REST client prepends its own path prefix. The existing review comment at production line 118 flagged this — this test will pass even though the production code passes a double-slash path to the HTTP layer.

The test should assert the path without a leading slash ("repos/owner/repo/commits/feature%2Fbranch") to match what go-gh expects, and then the same fix should be applied to buildCommitLookupAPIPath.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a prior commit — buildCommitLookupAPIPath no longer emits a leading slash, and all path assertions in the tests were updated accordingly (e.g. "repos/owner/repo/commits/feature%2Fbranch"). This thread is outdated.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REQUEST_CHANGES — one correctness bug plus a behavioral regression must be fixed before merging.

### Blocking issues

1. Leading slash in buildCommitLookupAPIPath (correctness bug)
buildCommitLookupAPIPath returns /repos/... but go-gh's REST client already prepends / to the path, producing //repos/.... Every REST call via the new native client will 404. The companion test in remote_fetch_test.go (line 370) asserts the broken path and must be updated together with the fix.

2. Empty-host regression in createRESTClientForHost (behavioral regression)
The old code guarded opts.Host = host behind if host != "", so go-gh used its built-in host detection when no host was specified. The new ClientOptions(host, "") always sets Host: host even when host == "", potentially overriding go-gh's default resolution for non-github.com deployments.

### Non-blocking observation

getLatestOrgReleaseFunc now wraps getLatestRelease with context.Background(), discarding any upstream cancellation. Not a regression (the old code also lacked context), but since the signature was already being changed this is the natural moment to thread the context through properly.

🔎 Code quality review by PR Code Quality Reviewer · sonnet46 90 AIC · ⌖ 5.16 AIC · ⊞ 5.7K
Comment /review to run again

Comments that could not be inline-anchored

pkg/parser/remote_resolve_sha.go:118

Leading slash in REST path causes double-slash URL: buildCommitLookupAPIPath returns /repos/... but go-gh prepends its own REST prefix before the path, producing //repos/... — this will 404 or silently resolve against the wrong URL.

<details>
<summary>💡 Suggested fix</summary>

Drop the leading / in buildCommitLookupAPIPath:

func buildCommitLookupAPIPath(owner, repo, ref string) string {
	return fmt.Sprintf(&quot;repos/%s/%s/commits/%s&quot;, owner, repo, url.PathEscape(ref))
}
```…

</details>

<details><summary>pkg/parser/remote_resolve_sha.go:160</summary>

**`buildCommitLookupAPIPath` test assertion confirms the broken path**: the test explicitly expects the leading-slash form `&quot;/repos/owner/repo/commits/feature%2Fbranch&quot;`, so both the implementation and the test need to be fixed together — fixing one without the other will still ship broken behavior.

&lt;details&gt;
&lt;summary&gt;💡 Details&lt;/summary&gt;

In `remote_fetch_test.go` line 370 the test asserts:
```go
if path != &quot;/repos/owner/repo/commits/feature%2Fbranch&quot; {

This test was authored to validate…

pkg/parser/remote_client.go:27

Empty host passed to ClientOptions changes behavior from the old code: the old implementation only set opts.Host when host != &quot;&quot;, relying on go-gh to use its default host resolution when the field is absent. Now ClientOptions(host, &quot;&quot;) always sets Host: host, including the empty-string case, which may override go-gh's host detection with an empty value.

<details>
<summary>💡 Suggested fix</summary>

Preserve the original guard:

func createRESTClientForHost(host string) (*a</details>

<details><summary>pkg/cli/org_issue_pr_helpers.go:33</summary>

**`getLatestOrgReleaseFunc` bakes in `context.Background()` at call time, discarding any upstream context**: if callers are cancelled (e.g., command timeout), this async release check will continue running against GitHub until it completes or the process exits.

&lt;details&gt;
&lt;summary&gt;💡 Note&lt;/summary&gt;

The original function signature was `getLatestRelease(includePrereleases bool) (string, error)`, which also had no context. The new signature added a `ctx` parameter, but the wrapper ignores it:

``…

</details>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Design Decision Gate - ADR Required

This PR makes significant changes to core business logic (318 new lines in pkg/) but does not have a linked Architecture Decision Record (ADR).

Draft ADR committed: docs/adr/47547-use-native-go-gh-rest-clients-for-api-calls.md - review and complete it before merging.

This PR cannot merge until an ADR is linked in the PR body.

What to do next:

  1. Review the draft ADR committed to your branch at docs/adr/47547-use-native-go-gh-rest-clients-for-api-calls.md - it was generated from the PR diff
  2. Complete the missing sections - add context the AI could not infer, refine the decision rationale, and list real alternatives you considered
  3. Commit the finalized ADR to docs/adr/ on your branch
  4. Reference the ADR in this PR body by adding a line such as: ADR: ADR-47547: Use Native go-gh REST Clients for GitHub API Calls (docs/adr/47547-use-native-go-gh-rest-clients-for-api-calls.md)

Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision.

Why ADRs Matter: ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · sonnet46 53.1 AIC · ⌖ 12.3 AIC · ⊞ 8.5K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Overall this is a clean migration. One blocking issue exists.

Blocking: leading / in buildCommitLookupAPIPath

The existing bot comment on remote_resolve_sha.go:118 correctly identifies that go-gh prepends its own REST base URL (with trailing /), so passing "/repos/..." produces a double-slash URL that will 404. Fix by removing the leading slash from buildCommitLookupAPIPath and updating all test assertions that expect the leading slash.

Non-blocking observations
  • getLatestOrgReleaseFunc wraps getLatestRelease(context.Background(), ...) — fine for production but makes the var untestable with a custom context.
  • createRESTClientForHost passing empty-string host is correct — go-gh resolves to GH_HOST default.
  • New githubapi.ClientOptions helper cleanly centralises timeout + host — good addition.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 58.8 AIC · ⌖ 5.67 AIC · ⊞ 5K

Comment thread pkg/parser/remote_fetch_test.go Outdated
if method != http.MethodGet {
t.Fatalf("DoWithContext() method = %q, want %q", method, http.MethodGet)
}
if path != "/repos/owner/repo/commits/feature%2Fbranch" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test asserts the /repos/... path (with a leading slash), which matches the current (buggy) implementation. Once buildCommitLookupAPIPath is fixed to omit the leading slash, this assertion will need to be updated to "repos/owner/repo/commits/feature%2Fbranch" as well — otherwise the test will fail after the fix.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a prior commit — the leading slash was removed from buildCommitLookupAPIPath and the corresponding test assertions were updated to "repos/owner/repo/commits/...". This thread is outdated.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once the branch is up to date.

Unresolved review threads (newest first):

Generated by 👨‍🍳 PR Sous Chef · gpt54 19.7 AIC · ⌖ 8.4 AIC · ⊞ 7K ·
Comment /souschef to run again

…T client compatibility

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI requested a review from gh-aw-bot July 23, 2026 12:12
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, verify the remaining github-actions requested reviews are stale and can be dismissed, and confirm the failing CI checks are rerun on the current head.

U...

The two failing CI checks (test and impacted-go-tests) were caused by a regression introduced when main was merged: commit c834b37 bumped DefaultFirewallVersion to v0.27.39 and DefaultMCPGatewayVersion to v0.4.4, but did not add the corresponding container pin entries to the embedded pin data. Tests like TestApplyContainerPins_DefaultFirewallVersion and TestGetContainerPin_DefaultMCPImagesArePinned expect the new version's SHA256 digests to be embedded.

Fixed in the latest commit by:

  • Fetching the SHA256 digests for 5 images (gh-aw-firewall/{agent,api-proxy,cli-proxy,squid}:0.27.39 and gh-aw-mcpg:v0.4.4) from GHCR
  • Adding the sorted pin entries to .github/aw/actions-lock.json, then syncing to pkg/actionpins/data and pkg/workflow/data via make sync-action-pins
  • Running make recompile to update all 261 workflow lock file manifests with the full image@digest references

All three github-actions CHANGES_REQUESTED reviews reference commit aca01a8 and every issue they flagged is fixed in current HEAD — they are stale and need a maintainer to dismiss them before merge.

Local validation: make agent-report-progress (fmt + lint + test-unit) ✅ · all pkg/workflow and pkg/actionpins tests ✅

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, ensure this branch is up to date, and summarize merge readiness with any remaining blocking review state.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 9.66 AIC · ⌖ 8.72 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, ensure this branch is up to date, and summarize merge readiness with any remaining blocking review state.

...

Branch is up to date with main. Here is the full merge-readiness summary:

✅ Reviews — All three github-actions CHANGES_REQUESTED reviews (4763740876, 4763751625, 4763756956) target commit aca01a8 and are stale. Every issue they raised has been fixed in subsequent commits:

  • Build tag //go:build !integration — present at line 1 of pkg/githubapi/options_test.go
  • Leading slash in buildCommitLookupAPIPath — removed in commit 8edcff9; test assertions updated
  • context.Background() in getLatestOrgReleaseFunc — replaced with caller ctx
  • Empty-host guard in createRESTClientForHost — preserved
  • Client-creation auth-error fallback coverage — added two tests (TestResolveRefToSHA_ClientCreationAuthError_UsesGitFallback, TestResolveRefToSHA_ClientCreationAuthError_GithubDotCom_UsesPublicAPIWhenGitFails)
  • Missing container pins for AWF v0.27.39 / mcpg v0.4.4 — added in commit f313e68

These reviews must be dismissed by a maintainer before the PR can merge.

✅ Checks (local) — All targeted packages pass: pkg/parser, pkg/githubapi, pkg/cli, pkg/workflow, pkg/actionpins ✅. make agent-report-progress (fmt + lint + test-unit + workflow recompile) passed in the previous session.

❓ Checks (CI) — A new CI run is currently in progress (job/89356355746) on the current HEAD f313e68. Prior failing runs (job/89326599170, job/89326599197) were caused by the missing container pin data and are fixed in f313e68. CI result unverifiable until the in-progress run completes.

✅ Mergeable — PR is open, not draft. mergeable_state: blocked solely due to the unresolved CHANGES_REQUESTED reviews — no conflicts.

Hand-off: A maintainer needs to dismiss the three stale github-actions CHANGES_REQUESTED reviews and wait for the current CI run to complete. No further code changes are needed.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, make sure all replied review threads are fully resolved, and verify each blocking review item is either fixed or explicitly addressed before rerunning checks.

Unresolved review threads with author/@copilot follow-up (newest first):

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 22.6 AIC · ⌖ 7.33 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, make sure all replied review threads are fully resolved, and verify each blocking review item is either fixed or explicitly addressed before rerunning chec...

All five listed threads have been addressed. Here is the per-thread breakdown verified against the current HEAD (f313e68):

Thread Status Evidence
r3637800165 — leading slash in buildCommitLookupAPIPath ✅ Resolved is_resolved: true on GitHub
r3637851595context.Background() in org_issue_pr_helpers.go ✅ Fixed, outdated getLatestOrgReleaseFunc already passes caller ctx (line 22–24 of pkg/cli/org_issue_pr_helpers.go); thread is is_outdated: true
r3637851602 — asymmetric fallback coverage ✅ Fixed TestResolveRefToSHA_ClientCreationAuthError_UsesGitFallback and TestResolveRefToSHA_ClientCreationAuthError_GithubDotCom_UsesPublicAPIWhenGitFails cover the client-creation error path in pkg/parser/remote_fetch_test.go:226–280
r3637851609 — test asserts /repos/... path ✅ Fixed, outdated Path assertions updated to repos/owner/repo/commits/... (no leading slash); thread is is_outdated: true
r3637866033 — same path assertion ✅ Fixed, outdated Same fix as above; thread is is_outdated: true

Local validation on current HEAD: make fmt ✅ · make lint ✅ · pkg/parser, pkg/githubapi, pkg/cli, pkg/workflow, pkg/actionpins tests all pass ✅ (including TestApplyContainerPins_DefaultFirewallVersion, which was the root cause of the prior CI failures in run 30027960712).

Blocking state: The three CHANGES_REQUESTED reviews (4763740876, 4763751625, 4763756956) all target commit aca01a8 and are stale — every issue they flagged is fixed on the current HEAD. They must be dismissed by a maintainer before the PR can merge. No further code changes are needed.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage — §30057272009

Field Value
Category chore
Risk 🟡 Medium
Priority Score 46 / 100
Action 📦 batch_review
CI ✅ Passing
Review ⚠️ Bot CHANGES_REQUESTED (dismissed)
Batch lint-cli (with #47601)

Score breakdown: Impact 20 + Urgency 14 + Quality 12

Rationale: Migrates update checks and ref lookups from raw REST to native go-gh clients. 30 files changed. CI passing. Architectural hygiene — safe but warrants batch review.

Next action: Review together with #47601 in a single batch session.

Generated by 🔧 PR Triage Agent · sonnet46 · 35.7 AIC · ⌖ 5.3 AIC · ⊞ 5.7K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, make sure all replied review threads are fully resolved, and verify each blocking review comment is addressed before summarizing merge readiness.

Unresolved review threads (newest first):

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 32.9 AIC · ⌖ 8.04 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, make sure all replied review threads are fully resolved, and verify each blocking review comment is addressed before summarizing merge readiness.

Unresolv...

The state is unchanged from the previous review pass. All five threads are addressed on current HEAD (f313e68):

Thread is_resolved is_outdated Status
r3637800165 — leading slash in buildCommitLookupAPIPath true false ✅ Resolved on GitHub
r3637851595context.Background() in wrapper false true ✅ Code fixed + replied (context is threaded at org_issue_pr_helpers.go:22–24); outdated, needs maintainer to dismiss
r3637851602 — asymmetric fallback coverage false false ✅ Code fixed + replied (two new tests at remote_fetch_test.go:226–280)
r3637851609 — test asserts /repos/... path false true ✅ Code fixed + replied (path assertions updated to repos/...); outdated, needs maintainer to dismiss
r3637866033 — same path assertion false true ✅ Code fixed + replied; outdated, needs maintainer to dismiss

Local validation: pkg/parser, pkg/githubapi, pkg/cli tests all pass ✅. No uncommitted changes.

Blocker: The three CHANGES_REQUESTED reviews (4763740876, 4763751625, 4763756956) all target commit aca01a8 and cannot be dismissed programmatically — GraphQL mutations are blocked in this environment. A maintainer must dismiss them manually before the PR can merge. This is not addressable from the agent.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address these unresolved review threads, and update the PR once each is resolved:

Run: https://github.com/github/gh-aw/actions/runs/30058912537

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 15.8 AIC · ⌖ 7.42 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address these unresolved review threads, and update the PR once each is resolved:

The four IDs listed (r3639215898, r3639216790, r3639217609, r3639218195) are the copilot-swe-agent reply comments already posted to those threads in a prior session. The underlying code changes are in place on current HEAD (f313e68) and all four threads have replies. The thread status on the API is:

Thread (original comment) is_outdated Code fix Reply posted
r3637851595 — context.Background() in wrapper true org_issue_pr_helpers.go:22–24 threads caller ctx r3639215898
r3637851602 — asymmetric fallback coverage false TestResolveRefToSHA_ClientCreationAuthError_* tests at remote_fetch_test.go:226–280 r3639216790
r3637851609 — test asserts /repos/... path true ✅ path assertions updated to repos/... r3639217609
r3637866033 — same path assertion true ✅ same fix r3639218195

These threads remain is_resolved: false because marking a review thread as resolved requires a GraphQL mutation that is blocked in this environment. A maintainer must resolve them (or dismiss the three stale CHANGES_REQUESTED reviews 4763740876, 4763751625, 4763756956) before the PR can merge. No further code changes are needed.

@pelikhan
pelikhan merged commit 200fd7f into main Jul 24, 2026
28 checks passed
@pelikhan
pelikhan deleted the copilot/go-fan-review-cli-go-gh branch July 24, 2026 02:51
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[go-fan] Go Module Review: cli/go-gh

4 participants