Skip to content

fix(#9038): address configured GitHub host in run fallback and status - #9056

Merged
waynesun09 merged 18 commits into
mainfrom
agent/9038-ghes-agents-fallback-status
Nov 15, 2026
Merged

waynesun09 merged 18 commits into
mainfrom
agent/9038-ghes-agents-fallback-status

Conversation

@fullsend-ai-coder

@fullsend-ai-coder fullsend-ai-coder Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When GITHUB_SERVER_URL names a GitHub host other than github.com and GITHUB_API_URL is that instance's API, fullsend talks to that host for three things:

  • fullsend run resolves the fullsend-ai/agents fallback on that host;
  • the harness and its companion files are fetched from it, through the contents API;
  • the run's status comment is posted there.

Before this change, all three went to api.github.com and raw.githubusercontent.com and failed with 401 Bad credentials.

A GITHUB_API_URL that does not match GITHUB_SERVER_URL is ignored by these clients. So on github.com, or with only GITHUB_API_URL set, nothing changes and the token stays on api.github.com.

Related Issue

Closes #9038. Part of #9036.

Changes

Which host the clients use

  • internal/cli/github_client.go: newConfiguredHostGitHubClient builds every client this PR touches: the status client, the agents-repo fallback and its file and tree reads, and the dispatch --route client.
    • It leaves api.github.com only when githubAPIURLForServer accepts the pair: same scheme, and GITHUB_API_URL is <server>/api/v3 (GHES) or api.<host> (GHE.com).
    • On the configured host, redirects are followed only within the same scheme, host and port (WithSameOriginRedirects), so the token cannot be carried to another host, a subdomain or plain HTTP.
  • internal/config: GitHubServerBaseURL is exported. The agents-repo host prefix and the fetch-policy host come from it, so they always agree with the default allowed_remote_resources entry.

Reading files on the configured host

  • internal/forge/github: the new GetRawFileContentAtRef reads a file with the raw media type, so files over the 1 MiB JSON limit are served.
    • Servers that ignore that media type: a JSON response is accepted only when it is unambiguous. A contents envelope must have type: file plus encoding and content. A directory listing (an array of entries with type, path and sha), or a symlink or submodule entry, is an error. Anything else is returned as the file's bytes.
    • GetFileContentAtRef: unchanged from main for its other callers.
  • internal/cli/run.go: on the configured host, the fallback reads the harness, companion files and directory resources through that reader at the resolved SHA, and records them under the host's /raw/ URL.

Dispatch

Docs

  • docs/architecture.md: the fallback's behaviour on other hosts.

Testing

  • Tests in internal/cli/run_agents_repo_host_test.go and dispatch_host_test.go cover:
    • Host agreement: server/API agreement, including disagreeing host, port and scheme, and a mixed-case host.
    • Clients: the configured-host client for status, fallback and route.
    • Dispatch: a dispatch --route wiring test showing that GITHUB_API_URL alone receives no request and no Authorization header.
    • Redirects: a cross-origin redirect is refused.
    • Allowlist: the agents-repo prefix agrees with the default allowlist entry.
  • internal/forge/github:
    • GetRawFileContentAtRef tables for raw responses, envelopes, directory listings, symlink and submodule entries, and raw JSON files;
    • TestSameOriginRedirect and TestWithSameOriginRedirects.
  • go test ./internal/forge/github ./internal/config passes, as do the matching ./internal/cli tests. make lint passes.

Checklist

  • PR title follows Conventional Commits
  • Commits are signed off (DCO)
  • I can explain all changes in it

🤖 Generated with Claude Code

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:23 AM UTC · Completed 2:45 AM UTC

Commit: adea177 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.13

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://47b8c81a-site.fullsend-ai.workers.dev

Commit: aa9e0a871f5991ebea9098f40b1285c0b51a1486

@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.44118% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/forge/github/github.go 89.39% 5 Missing and 2 partials ⚠️
internal/cli/dispatch.go 91.66% 1 Missing and 1 partial ⚠️
internal/cli/github_client.go 92.85% 1 Missing and 1 partial ⚠️
internal/harness/compose.go 85.71% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 3, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Large diff across core runner and dispatch components with high historical churn is balanced by bot authorship, absent protected paths, extensive test additions, and close alignment with linked issue scope.

Previous run

Risk Assessment: moderate (2/5)

Details

Large diff across core runner and dispatch components with high historical churn is balanced by bot authorship, absent protected paths, extensive test additions, and close alignment with linked issue scope.

Previous run (2)

Risk Assessment: moderate (2/5)

Details

Touches 9 files and 1,278 lines with no protected or dependency paths, preserves host-gated behavior and extensive test coverage, maintaining a moderate risk score of 2 anchored to the prior review despite high churn in touched CLI components.

Previous run (3)

Risk Assessment: moderate (2/5)

Details

Although the PR touches 9 files with 1,209 lines across runner and dispatch components, it modifies no protected or dependency paths, includes extensive test coverage, and gates behavioral changes behind non-default GitHub host configuration, maintaining a moderate risk score of 2 despite high churn and author contention in touched files.

Previous run (4)

Risk Assessment: moderate (2/5)

Details

Although the PR touches 9 files with 1,139 lines across runner and dispatch components, it modifies no protected or dependency paths, includes extensive test coverage, and gates behavioral changes behind non-default GitHub host configuration, maintaining a moderate risk score of 2 despite high churn and author contention in touched files.

Previous run (5)

Risk Assessment: moderate (2/5)

Details

Although the PR expanded to 1,139 lines across 9 files with dispatch and forge client updates, it modifies no protected or dependency paths, includes extensive test coverage, and gates behavioral changes behind non-default GitHub host configuration, preserving a moderate risk score of 2 despite high churn and author contention in touched runner components.

Previous run (6)

Risk Assessment: moderate (2/5)

Details

While the PR expanded to 806 changed lines and added harness compose hooks, it preserves high test coverage without modifying protected paths or dependencies, maintaining a moderate risk score of 2 despite elevated churn and multi-author contention in touched runner and harness components.

Previous run (7)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Targeted bug fix with accompanying unit tests aligns closely with linked issue #9038 without modifying protected paths or dependencies, balanced by high recent churn and multi-author contention in touched CLI runner and harness code.

Previous run (8)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Targeted bug fix with accompanying unit tests aligns closely with linked issue #9038, balanced by high recent churn and multi-author contention in touched CLI runner code.

Previous run (9)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Targeted bug fix with accompanying unit tests aligns closely with linked issue #9038, balanced by high recent churn and multi-author contention in touched CLI runner code.

Previous run (10)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Targeted bug fix with accompanying unit tests aligns closely with linked issue #9038, balanced by high recent churn and multi-author contention in touched CLI runner code.

Previous run (11)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Targeted bug fix with accompanying unit tests aligns closely with linked issue #9038, balanced by high recent churn and multi-author contention in touched CLI code.

Previous run (12)

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Targeted bug fix with accompanying tests matching linked issue #9038, balanced by high recent churn and author contention in touched CLI files.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Looks good to me

Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJzc3JmIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfNjlkZDA3ZjRkOTdjYzE4YSIsImxpbmUiOjgwMTQsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5Ijoic2NvcGUtYnVuZGxpbmciLCJmaWxlIjoiaW50ZXJuYWwvY2xpL2Rpc3BhdGNoLmdvIiwiaWQiOiJmX2MxY2M3MGU0OWY1ODEyY2QiLCJsaW5lIjo4NiwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6ImludGVudC1jb2hlcmVuY2UifSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2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zMTgsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6InN0eWxlLWNvbnZlbnRpb25zIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoibWlzcGxhY2VkLWFic3RyYWN0aW9uIiwiZmlsZSI6ImludGVybmFsL2hhcm5lc3MvY29tcG9zZS5nbyIsImlkIjoiZl9mMGFiNDM1ZGY1M2E2MzYyIiwibGluZSI6NTYsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJpbnRlbnQtY29oZXJlbmNlIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5Ijoic2NvcGUtY3JlZXAiLCJmaWxlIjoiZG9jcy9hcmNoaXRlY3R1cmUubWQiLCJpZCI6ImZfN2U0ZjE4NzU2MTcwODJjOCIsImxpbmUiOjc4OCwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6ImludGVudC1jb2hlcmVuY2UifSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJiYWNrd2FyZC1pbmNvbXBhdGlibGUiLCJmaWxlIjoiaW50ZXJuYWwvZm9yZ2UvZ2l0aHViL2dpdGh1Yi5nbyIsImlkIjoiZl9hNDZjOGI1OTFiZjhkNTM2IiwibGluZSI6MjI2OSwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6ImNyb3NzLXJlcG8tY29udHJhY3RzIn1dfQ== -->

Review

Findings

Medium

  • [ssrf] internal/cli/run.go:8014 — The new contents-API transport bypasses FetchURL's redirect protection. readAgentsRepoFileAtRef and the directory hook (agentsRepoHostTreeFetcher) go through gh.New's http.Client, which sets no CheckRedirect (the fetch, GitLab, Jira and botidentity clients all guard redirects). If the configured instance or a reverse proxy redirects, harness and companion-file requests can follow the redirect to another host, an internal address or plain HTTP, even though the original URL passed allowed_remote_resources. Go keeps Authorization on redirects to the same host or its subdomains. The missing CheckRedirect predates this PR. What is new is that harness content, which used to go through the redirect-guarded FetchURL, now goes through this client.
    Remediation: Reject redirects for the configured-host clients used for status and agents-repo reads, or check every redirect against an explicit HTTPS origin boundary. Add tests for redirects to another host, an internal address, a subdomain and an HTTP URL.

  • [scope-bundling] internal/cli/dispatch.go:86 — The PR bundles the run: agents-repo fallback and the run's status comment address github.com on other GitHub hosts #9038 work (fullsend run fallback and status comment) with the dispatch matrix fetch policy and dispatch --route fallback loading (dispatch.go, dispatch_route.go, dispatch_host_test.go). The sibling issue cli: dispatch --route, lint and the offline cache resolve the agents repo on github.com #9042 lists dispatch --route as separate scope. The PR body does name the dispatch policy, so this is advisory.
    Remediation: Consider splitting the dispatch changes into a PR for cli: dispatch --route, lint and the offline cache resolve the agents repo on github.com #9042, or state in the PR body why run: agents-repo fallback and the run's status comment address github.com on other GitHub hosts #9038 needs them.

  • [design-smell] internal/forge/github/github.go:2271 — GetFileContentAtRef now requests Accept: application/vnd.github.raw. When the response Content-Type contains "json", it uses structural heuristics on the body to tell directory listings, symlink/submodule entries, base64 envelopes and raw JSON files apart. This is a core forge.Client method with many callers, and its safety depends on the server never labelling raw content with a JSON content type. The check is a loose strings.Contains("json").
    Remediation: Consider an explicit raw-content method, or rely on deterministic response headers instead of body sniffing.

Low

  • [api-contract] internal/cli/run.go:8145 — The tree fetcher treats a Contents API directory listing as complete, but GitHub caps a directory response at 1,000 entries. ListDirectoryContents does not detect truncation, and the file-count guards (maxDirFiles and gitfetch.MaxFiles, both 1000) accept exactly 1,000 entries. A directory with more than 1,000 immediate files could therefore be cached incomplete instead of being rejected, unlike the previous sparse-checkout path. Reach is narrow: only directories of the pinned first-party agents repo.
    Remediation: Fail conservatively when a single directory response reaches the Contents API limit, and add a test with a saturated response.

  • [error-handling-idiom] internal/forge/github/github.go:2318 — The "no base64 content" error formats path and ref with %s. docs/contributing/go-code.md says to use %q for values in error messages, and the other errors in the same function use %q.
    Remediation: Format path and ref with %q.

  • [misplaced-abstraction] internal/harness/compose.go:56 — ComposeOpts.FetchFile and ParseRawURL let internal/cli/run.go inject configured-host fetching and raw-URL parsing into the harness composer. TreeFetcher already follows this injection pattern, and the transport still goes through forge.Client. This is a design preference, not a defect.
    Remediation: Consider moving configured-host raw-URL parsing into internal/forge/ when forge: ParseRawContentURL rejects raw-content URLs on GitHub Enterprise hosts #9037 is addressed.

  • [scope-creep] docs/architecture.md:788 — The PR body's Changes section lists only internal/cli/run.go and docs/architecture.md, but the PR spans 11 files. The unlisted changes include compose.go hooks, the forge client's raw media retrieval and the GetFileContentAtRef behavior change.
    Remediation: Update the PR body to cover all changed areas.

  • [backward-incompatible] internal/forge/github/github.go:2269 — GetFileContentAtRef (about 20 callers) now sends the raw media type and returns raw bytes up to 100 MiB. It errors on directory, symlink and submodule paths and on an empty base64 envelope with a non-zero size. Previously these cases returned empty bytes. No signature change.
    Remediation: Document the new behavior on the forge.Client method comment.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (3)

Review

Reason: tool-failure

This PR was NOT reviewed. Do not count this as an approval.

Previous run (4)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJsb2dpYy1lcnJvciIsImZpbGUiOiJpbnRlcm5hbC9mb3JnZS9naXRodWIvZ2l0aHViLmdvIiwiaWQiOiJmX2MyNTk5ZmRjNDA4MGExZTEiLCJsaW5lIjoyMjMzLCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifSx7InNldmVyaXR5IjoiaW5mbyIsImNhdGVnb3J5Ijoic3NyZiIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOiJmX2NiMGRkODZkOWJjZDRlOGMiLCJsaW5l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wNjJhNzRlOTBmMCIsImxpbmUiOjI1NSwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifV0sImRpc3Bvc2l0aW9ucyI6W3siaWQiOiJmX2JiMjc4MWE1ZTg1MWI3Y2QiLCJzdGF0dXMiOiJvcGVuIn0seyJpZCI6ImZfYjZmMWM4OTg4NjBjNThjOSIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl9mNmIwOTZlOGY4OTc4ZjE0Iiwic3RhdHVzIjoiZGlzbWlzc2VkX2J5X2h1bWFuIn0seyJpZCI6ImZfZmY3ZTVhOThhMGY1NWFiYSIsInN0YXR1cyI6ImRpc21pc3NlZF9ieV9odW1hbiJ9LHsiaWQiOiJmXzg4ZTBkMzZlM2Y1NGYzMDkiLCJzdGF0dXMiOiJkaXNtaXNzZWRfYnlfaHVtYW4ifSx7ImlkIjoiZl9kMjY0YmRkMWFmMWY4MDdlIiwic3RhdHVzIjoiZGlzbWlzc2VkX2J5X2h1bWFuIn0seyJpZCI6ImZfZmMxNDM5YzE3ZTRkNzFjOCIsInN0YXR1cyI6ImRpc21pc3NlZF9ieV9odW1hbiJ9LHsiaWQiOiJmXzE4YWNhNTU5MDQ5NWQwZmQiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifSx7ImlkIjoiZl8zNzI5MjUyNDFlOWM2ODM2Iiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfOTZlNzkwNjJhNzRlOTBmMCIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9XX0= -->

Review

Findings

Low

  • [logic-error] internal/forge/github/github.go:2233 — GetFileContentAtRef treats any JSON body with a top-level encoding key as a Contents API envelope. A server that honors the raw media type but labels a raw JSON file application/json would make a file like {"encoding":"utf-8"} fail, and silently decode a file like {"encoding":"base64","content":"..."} instead of returning it byte-for-byte. The new NonBase64EncodingKeyFails test locks in the failure case. This only triggers when the server sends a JSON Content-Type for a raw-media-type response and the file has a top-level encoding key; real GitHub raw responses do not use a JSON Content-Type.
    Remediation: Prefer response media-type metadata over key-sniffing to tell a raw body from an envelope, and add a test that a raw JSON file containing encoding (and encoding: base64 plus content) is returned byte-for-byte when the response is identifiable as raw.

Info

  • [ssrf] internal/cli/run.go:7801 — The configured-host API transport bypasses FetchURL's network restrictions. Owner and repo are fixed, companion paths reject traversal, refs require full commit SHAs, and returned content is size-checked against policy.MaxSizeBytes. However, FetchPolicy does not constrain the API client's scheme, port, resolved IPs or redirects (github.go builds a plain http.Client with no CheckRedirect), so an administrator-configured GITHUB_API_URL can be HTTP, point at private addresses, or redirect outside the content allowlist. Issue run: agents-repo fallback and the run's status comment address github.com on other GitHub hosts #9038 asks for configured-host behavior, so this is a trust-boundary observation, not an exploit.
    Remediation: Keep GITHUB_API_URL administrator-controlled; consider validating its scheme and redirect destinations.
  • [ssrf] internal/cli/run.go:7661 — Carried forward from the prior review, unchanged in this push: the agents-repo ref lookup also goes through the configured-host client, outside FetchPolicy scheme/port/IP/redirect constraints (same trust boundary as above).

1 finding(s) below the low severity threshold were not posted.

Previous run (5)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL2ZvcmdlL2dpdGh1Yi9naXRodWIuZ28iLCJpZCI6ImZfZjZiMDk2ZThmODk3OGYxNCIsImxpbmUiOjIyMTIsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6ImluZm8iLCJjYXRlZ29yeSI6InNzcmYiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl9iYjI3ODFhNWU4NTFi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MGQzNmUzZjU0ZjMwOSIsInN0YXR1cyI6ImRpc21pc3NlZF9ieV9odW1hbiJ9LHsiaWQiOiJmX2QyNjRiZGQxYWYxZjgwN2UiLCJzdGF0dXMiOiJkaXNtaXNzZWRfYnlfaHVtYW4ifSx7ImlkIjoiZl9mYzE0MzljMTdlNGQ3MWM4Iiwic3RhdHVzIjoiZGlzbWlzc2VkX2J5X2h1bWFuIn0seyJpZCI6ImZfMThhY2E1NTkwNDk1ZDBmZCIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9LHsiaWQiOiJmXzM3MjkyNTI0MWU5YzY4MzYiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifV19 -->

Review

Findings

Medium

  • [logic-error] internal/forge/github/github.go:2212 — GetFileContentAtRef requests the raw media type but routes any response whose Content-Type contains "json" to the Contents API envelope-decoding branch. If a host returns a raw JSON file as application/json (or under a raw vendor type containing +json), the file is decoded as an envelope. A raw JSON object with no content/encoding/size fields (e.g. {"enabled":true}) decodes to empty content, passes the guard on line 2225, and base64-decoding "" returns empty bytes with no error. A JSON companion resource could then be silently cached as an empty file. A raw JSON array fails to decode and returns an error instead.
    Remediation: Do not decide on the substring "json" alone. Treat explicit raw media types as raw, and before decoding as an envelope check that envelope fields such as encoding, size or type are present. Add tests for a raw JSON object returned with application/json, alongside the existing base64-envelope fallback test.

Earlier findings

  • internal/cli/dispatch_route.go:255, logic-error, resolved — routeBuiltinAgent now calls useAgentsRepoHostFetch(&composeOpts, forgeClient) at line 262, before LoadWithBase, and a new route test covers it.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (6)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHk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N2U1YTk4YTBmNTVhYmEiLCJzdGF0dXMiOiJkaXNtaXNzZWRfYnlfaHVtYW4ifSx7ImlkIjoiZl84OGUwZDM2ZTNmNTRmMzA5Iiwic3RhdHVzIjoiZGlzbWlzc2VkX2J5X2h1bWFuIn0seyJpZCI6ImZfZDI2NGJkZDFhZjFmODA3ZSIsInN0YXR1cyI6ImRpc21pc3NlZF9ieV9odW1hbiJ9LHsiaWQiOiJmX2ZjMTQzOWMxN2U0ZDcxYzgiLCJzdGF0dXMiOiJkaXNtaXNzZWRfYnlfaHVtYW4ifSx7ImlkIjoiZl8xOGFjYTU1OTA0OTVkMGZkIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfMzcyOTI1MjQxZTljNjgzNiIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9XX0= -->

Review

Findings

Medium

  • [logic-error] internal/cli/dispatch_route.go:255 — The route path forwards the configured-host fallback's SourceURL (composeOpts.SourceURL = deps[0].URL) but, unlike runAgent, never calls useAgentsRepoHostFetch. harness.LoadWithBase then fetches relative companion files over unauthenticated raw HTTP and parses directory resources with the hub.lumenfield.work-only parser, so a fallback harness with companions, skills or plugins on the configured host cannot load. Routing marks the harness unavailable and requires write access, wrongly skipping actors who meet the harness's real, lower role threshold.
    Remediation: Call useAgentsRepoHostFetch(&composeOpts, forgeClient) right after assigning composeOpts.SourceURL in routeBuiltinAgent, and add a route fallback test that uses the configured-host API fixture with relative companion files and a skill directory.

Labels: The PR fixes a defect in how fullsend run addresses a configured GitHub host.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (7)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHki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ZCI6ImZfZDI2NGJkZDFhZjFmODA3ZSIsInN0YXR1cyI6ImRpc21pc3NlZF9ieV9odW1hbiJ9LHsiaWQiOiJmX2ZjMTQzOWMxN2U0ZDcxYzgiLCJzdGF0dXMiOiJkaXNtaXNzZWRfYnlfaHVtYW4ifSx7ImlkIjoiZl8xOGFjYTU1OTA0OTVkMGZkIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfMzcyOTI1MjQxZTljNjgzNiIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9XX0= -->

Review

Findings

Medium

  • [logic-error] internal/cli/dispatch_route.go:255 — The route now resolves the agents-repo fallback on the configured GitHub host, but forwards only SourceURL to LoadWithBase, without installing useAgentsRepoHostFetch as runAgent does (run.go:687-688). For an override-only agents entry with a trigger and a fallback harness containing a relative skill or plugin directory, a cold-cache load still falls back to forge.ParseRawContentURL, which rejects non-raw.githubusercontent.com URLs. The route then treats the harness as unavailable and requires write access, wrongly skipping actors who satisfy the harness's actual lower authorization threshold. Extending AllowedDomains alone does not fix directory URL parsing or authenticated companion fetching.
    Remediation: After setting composeOpts.SourceURL, call useAgentsRepoHostFetch(&composeOpts, forgeClient), matching runAgent. Add a route regression test with an override-only entry and a configured-host fallback harness with a relative skill directory, asserting that an actor authorized by the loaded harness role can run.

Low


Labels: The PR also changes dispatch routing and harness composition.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (8)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImFwaS1jb250cmFjdCIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOi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iJmXzE4YWNhNTU5MDQ5NWQwZmQiLCJsaW5lIjo3NTAwLCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfMzcyOTI1MjQxZTljNjgzNiIsImxpbmUiOjc2NDgsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn1dLCJkaXNwb3NpdGlvbnMiOlt7ImlkIjoiZl84OGUwZDM2ZTNmNTRmMzA5Iiwic3RhdHVzIjoib3BlbiJ9LHsiaWQiOiJmX2JiMjc4MWE1ZTg1MWI3Y2QiLCJzdGF0dXMiOiJvcGVuIn0seyJpZCI6ImZfYjZmMWM4OTg4NjBjNThjOSIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl8xOGFjYTU1OTA0OTVkMGZkIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfMzcyOTI1MjQxZTljNjgzNiIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9XX0= -->

Review

Findings

Medium

  • [api-contract] internal/cli/run.go:7767 — On a configured GitHub host, files larger than 1 MB are read as empty with no error. The Contents API returns an empty content with encoding: "none" for such files, and GetFileContentAtRef (internal/forge/github/github.go:2197-2217) decodes only content as base64 without checking encoding. readAgentsRepoFileAtRef checks only the upper size bound, so a harness, companion file or skill/plugin directory file between 1 and 10 MB (the default fetch limit) is silently replaced by an empty file and cached. The raw.githubusercontent.com path returns the real bytes. The test server always returns base64, so this boundary is untested.
    Remediation: Make the forge client return the real bytes for files over 1 MB (for example the application/vnd.github.raw media type or the Git Blobs API). Return an error when encoding is not base64, and fail on an empty response for a non-empty file. Add a regression test with an encoding: "none" response and a companion file larger than 1 MB.

Low

  • [error-handling-idiom] internal/cli/run.go:7903 — In agentsRepoHostTreeFetcher, error messages at lines 7903, 7913, 7918 and 7922 format dirPath with unquoted %s, while lines 7891 and 7895 in the same function use %q, as docs/contributing/go-code.md asks.
    Remediation: Format dirPath with %q in every error message in agentsRepoHostTreeFetcher.
  • [naming-convention] internal/harness/compose.go:137 — The new ComposeOpts.parseRawURL method names its receiver o; the other ComposeOpts methods (lockedFilePin, lockedDirPin) use opts.
    Remediation: Rename the receiver to opts.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (9)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImFwaS1jb250cmFjdCIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOiJmXzg4ZTBkMzZlM2Y1NGYzMDkiLCJsaW5lIjo3NjMyLCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJpbmZvIiwiY2F0ZWdvcnkiOiJzc3JmIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfYmIyNzgxYTVlODUxYjdjZCIsImxpbmUiOjc2MDMsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJzZWN1cml0eSJ9LHsic2V2ZXJpdHkiOiJpbmZvIiwiY2F0ZWdvcnkiOiJzc3JmIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfYjZmMWM4OTg4NjBjNThjOSIsImxpbmUiOjc1MTgsImFjdGlvbmFibGUiOmZhbHNlLCJkaW1lbnNpb24iOiJzZWN1cml0eSJ9LHsic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfMThhY2E1NTkwNDk1ZDBmZCIsImxpbmUiOjc1MDAsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl8zNzI5MjUyNDFlOWM2ODM2IiwibGluZSI6NzY0OCwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifV0sImRpc3Bvc2l0aW9ucyI6W3siaWQiOiJmXzM3MjkyNTI0MWU5YzY4MzYiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifSx7ImlkIjoiZl9iYjI3ODFhNWU4NTFiN2NkIiwic3RhdHVzIjoib3BlbiJ9LHsiaWQiOiJmX2I2ZjFjODk4ODYwYzU4YzkiLCJzdGF0dXMiOiJvcGVuIn0seyJpZCI6ImZfMThhY2E1NTkwNDk1ZDBmZCIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9XX0= -->

Review

Findings

Medium

  • [api-contract] internal/cli/run.go:7632 — The new configured-host transport reads every file, including directory companion assets, through GetFileContentAtRef. That method decodes only the Contents API's JSON content field as base64 and never checks encoding. GitHub serves that representation only for files up to 1 MB. A larger file (for example 2 MB, well under the 10 MB per-file and 50 MB tree limits) comes back with empty content, which decodes to zero bytes without an error. It then passes the size check and is cached as an empty file. The test server always returns base64 regardless of size, so this boundary is untested.
    Remediation: Add a forge-client operation that retrieves raw bytes at the pinned ref, or handle the large-file response with an authenticated raw-media request. At minimum, fail explicitly when the response is not base64 or is empty for a non-empty file. Add a regression test with a companion file larger than 1 MB that checks the bytes are preserved.

Earlier findings

  • internal/cli/run.go, logic-error — resolved. The latest commit installs the ParseRawURL and TreeFetcher hooks in useAgentsRepoHostFetch, and new tests load relative skill directories and adjacent script helpers through the configured host.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (10)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfMzcyOTI1MjQxZTljNjgzNiIsImxpbmUiOjc2NDgsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6ImluZm8iLCJjYXRlZ29yeSI6InNzcmYiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl9iYjI3ODFhNWU4NTFiN2NkIiwibGluZSI6NzYwMywiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6ImluZm8iLCJjYXRlZ29yeSI6InNzcmYiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl9iNmYxYzg5ODg2MGM1OGM5IiwibGluZSI6NzUxOCwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl8xOGFjYTU1OTA0OTVkMGZkIiwibGluZSI6NzUwMCwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifV0sImRpc3Bvc2l0aW9ucyI6W3siaWQiOiJmXzM3MjkyNTI0MWU5YzY4MzYiLCJzdGF0dXMiOiJvcGVuIn0seyJpZCI6ImZfYmIyNzgxYTVlODUxYjdjZCIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl9iNmYxYzg5ODg2MGM1OGM5Iiwic3RhdHVzIjoib3BlbiJ9LHsiaWQiOiJmXzE4YWNhNTU5MDQ5NWQwZmQiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifV19 -->

Review

Findings

Medium

  • [logic-error] internal/cli/run.go:7648 — The configured-host transport (useAgentsRepoHostFetch / agentsRepoHostFileFetcher) replaces only single-file fetching. Directory resources still take the hub.lumenfield.work-only path: a relative skill reaches fetchBaseSkillDir, whose ParseRawContentURL accepts only raw.githubusercontent.com, so a fallback harness that declares a skill fails to load on another host. A script with a directory part is fetched as its entry file alone, without the helpers next to it. This push documents both limits in docs/architecture.md and pins them with TestAgentsRepoHostFallback_DirectoryResourcesUnsupported, but run.go is unchanged, so the runtime gap remains. Severity is kept at medium because the code is unchanged since the prior review and the documentation and test do not show that assessment was incorrect.
    Remediation: Provide configured-host directory fetching for skills, plugins and script directories, keeping the harness commit pin, authentication, allowlist, cache and lock checks. Replace the "unsupported" test with ones that assert a skill loads and that script helpers are available.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (11)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfMzcyOTI1MjQxZTljNjgzNiIsImxpbmUiOjc2NDgsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6ImluZm8iLCJjYXRlZ29yeSI6InNzcmYiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl9iYjI3ODFhNWU4NTFiN2NkIiwibGluZSI6NzYwMywiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6ImluZm8iLCJjYXRlZ29yeSI6InNzcmYiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl9iNmYxYzg5ODg2MGM1OGM5IiwibGluZSI6NzUxOCwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl8xOGFjYTU1OTA0OTVkMGZkIiwibGluZSI6NzUwMCwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifV0sImRpc3Bvc2l0aW9ucyI6W3siaWQiOiJmX2JiMjc4MWE1ZTg1MWI3Y2QiLCJzdGF0dXMiOiJvcGVuIn0seyJpZCI6ImZfYjZmMWM4OTg4NjBjNThjOSIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl8xOGFjYTU1OTA0OTVkMGZkIiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== -->

Review

Findings

Medium

  • [logic-error] internal/cli/run.go:7648 — The configured-host transport (useAgentsRepoHostFetch / agentsRepoHostFileFetcher) covers only single-file reads via the ComposeOpts.FetchFile hook. Directory resources still go through forge.ParseRawContentURL, which accepts only raw.githubusercontent.com. A fallback harness that declares a relative skill (e.g. skills/review) therefore fails composition on a non-hub.lumenfield.work host. A script with a directory part falls back to fetching only the entry script, so adjacent helper files are missing. This is not a regression, since the fallback never worked on such hosts, but it leaves the issue goal of fetching the harness from the configured host unmet for harnesses that declare skills. The new tests cover only single-file resources.
    Remediation: Support directory resources (skills, script directories) on the configured host, keeping its token and the pinned commit. Alternatively, document the limitation explicitly in docs/architecture.md. Add composition tests for a relative skill directory and for a script that needs an adjacent helper.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (12)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoiaW5mbyIsImNhdGVnb3J5Ijoic3NyZiIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOiJmX2JiMjc4MWE1ZTg1MWI3Y2QiLCJsaW5lIjo3NjAzLCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoic2VjdXJpdHkifSx7InNldmVyaXR5IjoiaW5mbyIsImNhdGVnb3J5Ijoic3NyZiIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOiJmX2I2ZjFjODk4ODYwYzU4YzkiLCJsaW5lIjo3NTE4LCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoic2VjdXJpdHkifSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJsb2dpYy1lcnJvciIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOiJmXzE4YWNhNTU5MDQ5NWQwZmQiLCJsaW5lIjo3NTAwLCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9XSwiZGlzcG9zaXRpb25zIjpbeyJpZCI6ImZfMThhY2E1NTkwNDk1ZDBmZCIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9LHsiaWQiOiJmX2I2ZjFjODk4ODYwYzU4YzkiLCJzdGF0dXMiOiJvcGVuIn1dfQ== -->

Looks good to me

Earlier findings

  • internal/cli/run.go:7500, logic-error, resolved — the latest commit installs the host-specific companion-file fetcher (useAgentsRepoHostFetch in runAgent, backed by the new ComposeOpts.FetchFile hook), covered by TestAgentsRepoHostFallback_LoadsCompanionFiles.
  • internal/cli/run.go:7518, ssrf, reclassified — remains informational (operator-controlled GITHUB_API_URL trust boundary); now also covers companion files.

No findings at or above low severity; 1 lower-severity finding(s) were not posted.

Previous run (13)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfMThhY2E1NTkwNDk1ZDBmZCIsImxpbmUiOjc1MDAsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6ImluZm8iLCJjYXRlZ29yeSI6InNzcmYiLCJmaWxlIjoiaW50ZXJuYWwvY2xpL3J1bi5nbyIsImlkIjoiZl9iNmYxYzg5ODg2MGM1OGM5IiwibGluZSI6NzUxOCwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In1dLCJkaXNwb3NpdGlvbnMiOlt7ImlkIjoiZl8xOGFjYTU1OTA0OTVkMGZkIiwic3RhdHVzIjoib3BlbiJ9LHsiaWQiOiJmX2I2ZjFjODk4ODYwYzU4YzkiLCJzdGF0dXMiOiJyZWNsYXNzaWZpZWQifV19 -->

Review

Findings

Medium

  • [logic-error] internal/cli/run.go:7500 — Still present at PR head. On a host other than github.com, only the initial harness is fetched through the configured forge client. The host URL becomes composeOpts.SourceURL, but LoadWithBase resolves relative agent, policy, and script files through fetchBaseFile (internal/harness/compose.go). That calls fetch.FetchURL with runAgent's unchanged fetch.DefaultPolicy, which allows only github.com and raw.githubusercontent.com. A fresh, uncached run on another host therefore still fails while loading the harness, even when its URL is covered by allowed_remote_resources. Issue run: agents-repo fallback and the run's status comment address github.com on other GitHub hosts #9038 expects the harness fetch to go to the configured host. The new success test stops after downloading the YAML and never exercises composition. The docs/architecture.md sentence added since the last review documents the limitation but does not fix it.
    Remediation: Carry configured-host fetching through companion-resource resolution, keeping the commit pin and the resource allowlist. Add a regression test that downloads a harness with relative companion files and calls LoadWithBase successfully, using the same options as runAgent.

Earlier findings

  • internal/cli/run.go:7518, ssrf — reclassified from low to info. The contents-API read skips the FetchPolicy network controls, but it targets the operator-configured forge API base, which the same client already uses for the ref lookup and the status comment with the same token. The size bound added in the latest push covers the remaining resource-exhaustion path. This is now optional hardening below the posting threshold.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

1 finding(s) below the low severity threshold were not posted.

Previous run (14)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6ImludGVybmFsL2NsaS9ydW4uZ28iLCJpZCI6ImZfMThhY2E1NTkwNDk1ZDBmZCIsImxpbmUiOjc1MDAsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5Ijoic3NyZiIsImZpbGUiOiJpbnRlcm5hbC9jbGkvcnVuLmdvIiwiaWQiOiJmX2I2ZjFjODk4ODYwYzU4YzkiLCJsaW5lIjo3NTE4LCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoic2VjdXJpdHkifV19 -->

Review

Findings

Medium

  • [logic-error] internal/cli/run.go:7500 — The new host-specific URL becomes composeOpts.SourceURL, but companion-file resolution does not use the configured forge client. LoadWithBase resolves relative agent, policy, and script references through harness.fetchBaseFile, which calls fetch.FetchURL with composeOpts.FetchPolicy (fetch.DefaultPolicy, allowing only github.com and raw.githubusercontent.com). On a cold cache, any other host fails at the first relative resource even when allowed_remote_resources lists that host, and a private host would also need an authenticated request for the /raw/ URL. The added test stops after downloading the harness and never exercises this loading step. Separately, cache entries written under the host-specific URL cannot be recovered offline: cachedPinnedAgentsRepoFile only matches defaultAgentsRepoURLPrefix, so an online run followed by an offline run reports no cached harness (the PR defers this part to cli: dispatch --route, lint and the offline cache resolve the agents repo on github.com #9042).
    Remediation: Carry configured-host fetching through companion-resource resolution (authenticated forge client or an appropriately configured fetch mechanism). Pass the selected host prefix into the offline cache lookup, or explicitly defer that part to cli: dispatch --route, lint and the offline cache resolve the agents repo on github.com #9042. Add tests that resolve the fallback and then load a harness with a relative agent or script on the configured host.

Low

  • [ssrf] internal/cli/run.go:7518 — The custom-host branch reads the harness through forgeClient.GetFileContentAtRef instead of fetch.FetchURL, so FetchPolicy no longer applies: there is no redirect restriction and no MaxSizeBytes bound on the decoded response. The request target is not attacker-controlled (owner/repo are constants, relPath rejects traversal, the SHA is validated, the host comes from the operator-supplied GITHUB_API_URL), so this is defense-in-depth rather than an exploitable SSRF.
    Remediation: Optionally bound the decoded content by FetchPolicy.MaxSizeBytes and restrict redirects to the configured instance on this path.

Labels: PR changes fullsend run agents-repo fallback and status client behavior


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added the component/runner Agent runner behavior and lifecycle label Nov 3, 2026
@fullsend-ai-coder

fullsend-ai-coder Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 2:47 AM UTC · Completed 2:55 AM UTC

Commit: adea177 · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.52

fullsend-ai-coder Bot added a commit that referenced this pull request Nov 3, 2026
Address review feedback on PR #9056.

- Apply FetchPolicy.MaxSizeBytes to the contents-API read used on a
  host other than github.com, matching fetch.FetchURL, with a test.
- Document in docs/architecture.md that relative companion files and
  the offline cache lookup are not yet resolved on such a host.

Not done: authenticated companion-resource fetching and the offline
cache prefix are left to follow-up work; redirect restriction needs a
forge client change.

pre-commit could not fetch hook repositories in the sandbox (TLS); gofmt,
go vet and whitespace checks were run directly and pass. Package tests
pass except TestStartFetchService_* and TestPostScriptEnv_NoSchema*,
which fail the same way on main in the sandbox.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Bounded the other-host contents read by FetchPolicy.MaxSizeBytes with a test, and documented that companion files and the offline cache are not yet resolved on such hosts. Recorded a disagreement on implementing host-aware companion-resource fetching here, as it is a larger cross-package change tied to sibling issues. Package tests pass apart from the sandbox-only failures that also occur on main. pre-commit could not fetch hooks (TLS), so gofmt, go vet and whitespace checks were run directly.

Fixed (2):

  1. The limitation above was undocumented (internal/cli/run.go, medium) (docs/architecture.md): Added a sentence to the runtime-resolution note saying that relative companion files and the offline cache lookup are not yet resolved on a host other than github.com.
  2. Contents-API read on another host bypasses the FetchPolicy size bound (ssrf, low) (internal/cli/run.go): The harness read on a host other than github.com now fails when the decoded content exceeds FetchPolicy.MaxSizeBytes, matching fetch.FetchURL. Added TestTryAgentsRepoFallback_OtherGitHubHostSizeLimit. Redirect restriction was not added because it needs a forge client change and the reviewer marked it optional and non-exploitable.

Disagreed (1):

  1. Companion-resource resolution (relative agent, policy, script files) and offline cache lookup do not use the configured host (internal/cli/run.go, medium): The finding is accurate, but carrying authenticated, host-aware fetching through the harness composition layer (fetchBaseFile, tree fetchers, ParseRawContentURL, fetch policy domains) is a separate design change in internal/harness and internal/fetch that overlaps sibling issues in the Several code paths address github.com instead of the configured GitHub host #9036 series (forge: ParseRawContentURL rejects raw-content URLs on GitHub Enterprise hosts #9037, config: default allowed_remote_resources refuses fullsend-ai repositories on the configured GitHub host #9040, cli: dispatch --route, lint and the offline cache resolve the agents repo on github.com #9042). It is out of scope for this PR, which covers the ref lookup, harness fetch and status client. The offline cache prefix is already explicitly deferred to cli: dispatch --route, lint and the offline cache resolve the agents repo on github.com #9042 in the PR description. A maintainer should decide whether to land the companion fetch before this PR merges.

Tests: passed

CI inspections (6):

  1. CI / test (passing, success)
  2. CI / web (passing, success)
  3. CI / commit-lint (passing, success)
  4. codecov/patch (passing, success)
  5. E2E Tests / playback (pending, in_progress): Still running when inspected.
  6. E2E Tests / behaviour (pending, in_progress): Still running when inspected.

Conflict update: skipped; strategy none; forge MERGEABLE; target main

Decision points
  • Whether to implement host-aware companion fetching in this PR (alternatives: Extend the fetch policy and harness composition to the configured host now, Document the limitation and defer to follow-up work; rationale: Companion fetching needs authenticated access and changes to shared harness code, so it was deferred and documented instead of bundled into this fix.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:57 AM UTC · Completed 3:05 AM UTC

Commit: ae7a377 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.67

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 3:07 AM UTC · Completed 3:15 AM UTC

Commit: ae7a377 · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.54

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (bot-triggered)

Addressed the medium finding by routing companion-file fetches for agents-repo harnesses on a non-hub.lumenfield.work host through the configured host's API, with a LoadWithBase regression test. The offline cache lookup on such hosts remains deferred to #9042 and is documented. Tests in internal/harness and the new cli tests pass; a few unrelated tests in internal/cli and internal/fetch fail in this sandbox with or without the change (network and DNS restrictions). Pre-commit could not run because it could not reach its hook repositories, so gofmt and go vet were run directly and are clean.

Fixed (1):

  1. Companion-resource resolution on a non-hub.lumenfield.work host still uses the hub.lumenfield.work-only default fetch policy (internal/cli/run.go): Added an optional ComposeOpts.FetchFile transport used by fetchBaseFile; runAgent sets it for agents-repo harnesses on the configured host so relative agent, policy, and script files are read through that host's authenticated API at the harness's commit. Allowlist, cache, lock pins, and audit still apply; URL shape and size are validated. Added a regression test that runs LoadWithBase on a fallback-fetched harness with relative companion files, and updated the architecture note.

Disagreed (1):

  1. Optional hardening of the contents-API read (ssrf, reclassified to info): The reviewer marked it below the posting threshold and non-actionable; the size bound added earlier covers the remaining risk, and the target is the operator-configured forge API.

Tests: passed

CI inspections (10):

  1. test (pending, in_progress): Still running at inspection time.
  2. behaviour (pending, in_progress): E2E job still running.
  3. playback (pending, in_progress): E2E job still running.
  4. commit-lint (passing, success)
  5. test-sandbox-darwin (passing, success)
  6. web (passing, success)
  7. gateway-doc-configs (passing, success)
  8. pr-title-lint (passing, success)
  9. build (passing, success)
  10. DCO (passing, success)

Conflict update: skipped; strategy none; forge MERGEABLE; target main

Decision points
  • How to carry configured-host fetching through companion-resource resolution (alternatives: Add a fetch-transport hook on ComposeOpts, Widen the default fetch policy to the configured host; rationale: A hook keeps the allowlist and commit pin and uses the authenticated forge client, without loosening the SSRF policy.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

fullsend-ai-coder Bot added a commit that referenced this pull request Nov 3, 2026
Add ComposeOpts.FetchFile so relative agent, policy, and script files of
an agents-repo harness fetched from a host other than github.com are read
through that host's authenticated API at the harness's commit, instead of
the hub.lumenfield.work-only default fetch policy. The allowlist, cache, and audit
checks still apply. Add a test that loads a fallback harness with relative
companion files via LoadWithBase, and update the architecture note.

Addresses review feedback on PR #9056

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:17 AM UTC · Completed 3:25 AM UTC

Commit: 37d8716 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.47

fullsend-ai-coder Bot and others added 11 commits November 14, 2026 12:52
On a GitHub host other than github.com, `fullsend run` built the
agents-repo fallback client and the status-comment client with a bare
gh.New(token), which always targets api.github.com. The agents ref
lookup was refused with the host's token (401) and the run stopped,
and the run's status comment failed the same way. The harness URL was
also fixed to raw.githubusercontent.com, which such a host lacks.

- Build both clients with newGitHubLiveClient, which honours
  GITHUB_API_URL, like other internal/cli paths.
- In fetchPinnedAgentsRepoFile, when the client addresses a host other
  than github.com, read the file through the client's contents API at
  the resolved SHA and record it under the host's raw URL
  (https://<host>/fullsend-ai/agents/raw/<sha>/<path>; an /api/v3
  base maps back to the instance URL). A 404 from the API is reported
  like an HTTP 404 from the raw fetch.
- github.com behaviour is unchanged: the unauthenticated
  raw.githubusercontent.com fetch is still used, and callers that
  still pass a github.com client (dispatch --route, lint,
  eval-measure; #9041, #9042) keep the current URLs.

The host URL is still checked against allowed_remote_resources; the
default list does not yet name the configured host (#9040), so it has
to be added by hand until then. The offline cache scan is left to
#9042.

Note: pre-commit could not fetch hook repos (TLS failure in the
sandbox); the applicable hooks (whitespace/EOF, gofmt, go vet,
symlinks, docs links, lychee, secret scan) were run directly and
passed. Pre-existing internal/cli failures that also occur on main in
this sandbox (TestStartFetchService_*, TestPostScriptEnv_NoSchema*)
are environment-related.

Closes #9038

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Tanner <jtanner+github@redhat.com>
Address review feedback on PR #9056.

- Apply FetchPolicy.MaxSizeBytes to the contents-API read used on a
  host other than github.com, matching fetch.FetchURL, with a test.
- Document in docs/architecture.md that relative companion files and
  the offline cache lookup are not yet resolved on such a host.

Not done: authenticated companion-resource fetching and the offline
cache prefix are left to follow-up work; redirect restriction needs a
forge client change.

pre-commit could not fetch hook repositories in the sandbox (TLS); gofmt,
go vet and whitespace checks were run directly and pass. Package tests
pass except TestStartFetchService_* and TestPostScriptEnv_NoSchema*,
which fail the same way on main in the sandbox.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: James Tanner <jtanner+github@redhat.com>
Add ComposeOpts.FetchFile so relative agent, policy, and script files of
an agents-repo harness fetched from a host other than github.com are read
through that host's authenticated API at the harness's commit, instead of
the hub.lumenfield.work-only default fetch policy. The allowlist, cache, and audit
checks still apply. Add a test that loads a fallback harness with relative
companion files via LoadWithBase, and update the architecture note.

Addresses review feedback on PR #9056

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: James Tanner <jtanner+github@redhat.com>
The agents-repo fallback records the harness under https://<host>/..., but
fetch.DefaultPolicy admits only github.com and raw.githubusercontent.com, so
a base harness or companion file on another GitHub host was refused with
"domain not in allowlist". Add the host of the fallback client (derived from
GITHUB_API_URL, as agentsRepoHostURLPrefix already does) to the compose fetch
policy in runAgent, without mutating the shared default policy.

Note: pre-commit could not fetch its hook repositories (TLS failure in the
sandbox); gofmt, go vet and whitespace checks were run directly and passed.

Addresses #9056

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: James Tanner <jtanner+github@redhat.com>
…b host

The configured-host transport reads single files only. Directory
resources (relative skills, script helper files) still use git sparse
checkout from raw.githubusercontent.com URLs. Document the limitation in
docs/architecture.md and add tests pinning the behavior for a relative
skill directory and a script with an adjacent helper.

Addresses review feedback on PR #9056

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: James Tanner <jtanner+github@redhat.com>
A fallback harness fetched from a GitHub host other than github.com had
its single files read through that host, but skill, plugin and script
directories still went through git sparse checkout from
raw.githubusercontent.com. A relative skill therefore failed to load and
a script was fetched without its adjacent helpers.

Add ComposeOpts.ParseRawURL and install it, with a TreeFetcher that lists
and reads the directory through the host's API, when the harness comes
from the configured host. Reads stay pinned to the harness commit, use
the host's token, run after the allowlist check, and are bounded in file
count, per-file size and total size. Replace the "unsupported" test with
tests that a skill loads and that script helpers are available, and update
docs/architecture.md.

Addresses review feedback on PR #9056.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: James Tanner <jtanner+github@redhat.com>
…licy

The previous revision extends only runAgent's compose policy with the
configured GitHub host. `fullsend dispatch` builds its own fetch policy
in two places — the harness enumeration behind the dispatch matrix
(ListTriggeredHarnesses) and `dispatch --route` (routeBuiltinAgent) —
and both kept fetch.DefaultPolicy, which admits only github.com hosts.
On a forge whose configured host serves raw content from itself, every
config-registered harness whose base: chain or companion files sit on
that host fails to load with "domain not in allowlist": the
harness-dispatch job of reusable-dispatch.yml skips every agent and
exits non-zero before any agent job is reached, and the route job
cannot read the harness role it needs for its authorization threshold,
failing closed to write.

Derive the dispatch policy the same way runAgent does
(newDispatchFetchPolicy): the fallback client honours GITHUB_API_URL
(the token stays optional, as fullsend-ai/agents is public), and the
policy admits the host that client addresses, including an explicit
port. On github.com the default policy is returned unchanged. The
route's default fallback client also moves from a bare gh.New("") to
newGitHubLiveClient("", ""), so the agents-repo fallback in the route
resolves on the configured host too.

lint, eval-measure and poll still build their own policies and keep
their current behaviour (tracked with the other callers in #9041 and

Signed-off-by: jtanner <tanner.jc@gmail.com>
#9042).
GetFileContentAtRef decoded only the JSON representation's base64
content field and never checked the encoding, so on the configured
GitHub host a file over 1 MiB — which GitHub serves as content: "",
encoding: "none" — was silently returned as empty bytes and cached as
an empty file, while the fetch policy allows up to 10 MiB. The fallback
harness, companion files and directory reads on such a host all go
through this call.

Request the file with the raw contents media type, which GitHub serves
for files up to 100 MiB, and read it with a size bound. A server that
ignores the media type and answers with the JSON representation (the
GitHub API-compatible emulators do) is still decoded, now failing
explicitly when the representation carries no base64 content for a
non-empty file instead of returning empty bytes.

Signed-off-by: jtanner <tanner.jc@gmail.com>
Follow-ups from the review round: agentsRepoHostTreeFetcher's error
messages format dirPath with unquoted %s at four sites while the checks
earlier in the same function use %q; docs/contributing/go-code.md asks
for %q on values. And ComposeOpts.parseRawURL names its receiver o
where the neighbouring ComposeOpts methods use opts.

Signed-off-by: jtanner <tanner.jc@gmail.com>
Review follow-up: the route path forwarded the configured-host fallback
SourceURL but, unlike runAgent, never called useAgentsRepoHostFetch, so
harness.LoadWithBase fetched relative companion files over
unauthenticated raw HTTP and parsed directory resources with the
hub.lumenfield.work-only parser. A fallback harness with companions, skills or
plugins on the configured host therefore could not load: routing marked
the harness unavailable and required write access, wrongly skipping
actors who meet the harness's real, lower role threshold.

Call useAgentsRepoHostFetch right after assigning composeOpts.SourceURL
in routeBuiltinAgent, exactly as runAgent does, with a route fallback
test that loads a harness with a relative agent file and a skill
directory from the configured host's API.

Signed-off-by: jtanner <tanner.jc@gmail.com>
Review follow-up: GetFileContentAtRef decided between the raw and the
envelope branch on the Content-Type substring "json" alone. With the raw
media type requested, a raw JSON file served with its own type
(application/json) also matched, and decoding it as a contents envelope
yielded empty content with no error (the envelope guard only fired when
size > 0), so a JSON companion resource could be silently cached as an
empty file.

Read the body once, and treat a JSON body as the envelope only when it
carries the envelope's encoding key — every contents envelope has one
("base64", or "none" over 1 MiB), while a lone type, size or content key
is common in ordinary JSON files (JSON schemas say "type":"object") and
is not evidence of an envelope. A body that claims the encoding key but
does not carry base64 content fails explicitly. Tests: a raw JSON object
and a schema-shaped JSON with type/size keys are returned verbatim; an
encoding key without base64 content fails; the envelope fallback and the
encoding-"none" failure are unchanged.

Signed-off-by: jtanner <tanner.jc@gmail.com>
@waynesun09

Copy link
Copy Markdown
Member

/fs-fix-stop

@github-actions

Copy link
Copy Markdown

Fix agent disabled for this PR. Remove the fullsend-no-fix label or use /fs-fix to re-engage.

With the raw media type, api.github.com answers a directory path with
a JSON array of entries, and a symlink or submodule with an object of
that type and no content. The JSON fallback returned those bytes as the
file content, where the call used to fail, so any of the ~20 callers
could treat a directory listing as a file on github.com.

A JSON body that is an array, or an object whose type is dir, symlink
or submodule (with its sha and path), now errors. A body is decoded as
the contents envelope only when it carries an encoding of base64 or
none together with a content key; anything else, such as a raw JSON
file that happens to contain an encoding key, is returned verbatim.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
The status client carries a write-scoped installation token from the
mint. Following GITHUB_API_URL on its own meant that variable alone
could send the token to another host, even on github.com Actions. It
now leaves api.github.com only when GITHUB_SERVER_URL names a
non-hub.lumenfield.work instance and GITHUB_API_URL is that instance's API
(<server>/api/v3 for GHES, api.<host> for GHE.com); unset, github.com
or disagreeing values keep the default.

The agents-repo fallback derived its host by stripping /api/v3 from
GITHUB_API_URL, while the default allowed_remote_resources entries use
GITHUB_SERVER_URL with a lowercased host. On GHE.com or with a
mixed-case URL the two differed and the fallback was skipped as "not
in allowed_remote_resources". config.GitHubServerBaseURL is now
exported, and the fallback prefix and the fetch-policy host are built
from it, behind the same server/API agreement check.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
api.github.com never serves a raw file as application/json, so the
JSON branch only runs for servers that ignore the raw media type. The
previous round still misread some raw JSON files there: any valid
array was taken for a directory, so a file such as ["bug"] errored,
and any object with encoding and content keys was decoded as the
envelope.

An array is now a directory listing only when it is non-empty and
every element is an object with type, path and sha; any other array
is returned as the file. An object is decoded as the contents envelope
only when it also has type "file", besides an encoding of base64 or
none and a content key. The doc comment now says the JSON handling is
defensive, for servers that ignore the raw media type.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
The agents-repo fallback client in fullsend run and the unauthenticated
client dispatch --route builds still followed GITHUB_API_URL on its
own. On main both were pinned to api.github.com. With GITHUB_API_URL
set but no matching GITHUB_SERVER_URL, the compose/git token went to
that host, and its ref answer picked the commit the harness was then
fetched at from raw.githubusercontent.com.

newConfiguredHostGitHubClient now builds all of these, the status
client too. It leaves api.github.com only when GITHUB_SERVER_URL names
a non-hub.lumenfield.work instance and GITHUB_API_URL is that instance's API;
otherwise it is gh.New(token). The dispatch fetch policy uses it too,
so every caller names the host the same way.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
runDispatch passed its authenticated client to the route. That client
comes from newGitHubLiveClient, which follows GITHUB_API_URL on its
own, so the configured-host client in routeBuiltinAgent only ran when
no token resolved. In the normal Actions case, --route sent the token
in the fallback's ref lookup to a host named only by GITHUB_API_URL.

newDispatchRouteOpts now gives the route its own client from
newConfiguredHostGitHubClient, with the same token. It stays on
api.github.com unless GITHUB_SERVER_URL and GITHUB_API_URL name the
same instance. The authenticated client is kept for the event and
bot-role lookups, and newGitHubLiveClient is unchanged for the other
commands.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ❌ Failure (post-script /home/runner/work/fullsend/fullsend/.fullsend/.fullsend-cache/resources/sha256/acb112208e35fb3920bfd7fe513f69ccd8eca83404aef9bcc59cfc84245c7684/scripts/post-review.sh failed: exit status 1) · Started 8:35 PM UTC · Completed 9:00 PM UTC

Commit: 891400c · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.54

@waynesun09

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:06 PM UTC · Completed 9:18 PM UTC

Commit: 891400c · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.12

fullsend-ai-review[bot]

This comment was marked as outdated.

GetFileContentAtRef has about 20 callers. This PR switched it to the
raw media type and added JSON sniffing, which changed behaviour for
all of them to serve one path: the agents-repo fallback on a GitHub
host other than github.com.

GetFileContentAtRef is restored to main's behaviour. The raw media type
and the strict JSON handling move to a new GetRawFileContentAtRef on
the GitHub client, with the tests moved along. readAgentsRepoFileAtRef,
which the fallback, the companion file fetcher and the tree fetcher
share, uses it through an interface local to the cli code, so
forge.Client is unchanged. Any other client still reads with
GetFileContentAtRef.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
…ects

The clients newConfiguredHostGitHubClient builds for a GitHub host other
than github.com (the agents-repo fallback, its companion and directory
reads, the dispatch route and the status comments) used gh.New's
default http.Client, which follows any redirect. Go keeps the
Authorization header on same-host and subdomain hops, so a redirect
from the configured host could carry the token to another origin.

gh.LiveClient gains WithSameOriginRedirects. It keeps the client's
transport and timeout and follows a redirect only to the same scheme,
lowercased host and port, which is what GitHub's same-host 301s for
renamed repositories need. It refuses every other target with an
error: another host, a subdomain, an http downgrade, another port or
an IP literal. newConfiguredHostGitHubClient applies it only on the
configured instance. On api.github.com the client is still exactly
what gh.New builds.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:43 PM UTC · Completed 9:54 PM UTC

Commit: aa9e0a8 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.40

This branch was successfully deployed

1 active and 1 inactive deployments
site-preview — aa9e0a87 Deployed Nov 14, 2026 by github-actions[bot]
dev — aa9e0a87 Deployed Nov 14, 2026 by waynesun09 via playback #20309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/dispatch Workflow dispatch and triggers component/harness Agent harness, config, and skills loading component/runner Agent runner behavior and lifecycle fullsend-no-fix Skip bot-triggered fix agent runs needs-human Agent loop needs human intervention ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate type/bug Confirmed defect in existing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run: agents-repo fallback and the run's status comment address github.com on other GitHub hosts

3 participants