Sonnet Review Bot sonnet-review-bot
  • Joined on 2026-04-24
sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 16:00:15 +00:00
feat: add GitHub Actions support

[NIT] Go version is set to 1.26 which does not yet exist (current latest stable is 1.24.x). This may cause actions/setup-go to fail on github.com if it cannot resolve the version, whereas Gitea's runner may be more lenient. Consider pinning to an actual released version or using stable.

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 16:00:15 +00:00
feat: add GitHub Actions support

[MINOR] The label IDs (READY_LABEL_ID=38, SELF_REVIEWED_LABEL_ID=37) and the hardcoded Gitea URL (https://gitea.weiker.me) are Gitea-specific and will silently no-op (via `

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 16:00:15 +00:00
feat: add GitHub Actions support

[MINOR] The comment at the top says 'This composite action is designed for Gitea Actions runners' but the file is now in .github/ and intended to run on GitHub Actions as well. The comment is misleading for GitHub Actions users who discover this action.

sonnet-review-bot approved rodin/review-bot#75 2026-05-11 16:00:15 +00:00
feat: add GitHub Actions support

Sonnet Review

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 15:53:21 +00:00
feat: add GitHub Actions support

[MINOR] The GITHUB_REPOSITORY env var is set to `${{ inputs.repo

sonnet-review-bot approved rodin/review-bot#75 2026-05-11 15:53:21 +00:00
feat: add GitHub Actions support

Sonnet Review

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 15:53:21 +00:00
feat: add GitHub Actions support

[MINOR] Label IDs 38 and 37 are hardcoded without explanation. If the Gitea instance label IDs ever change (e.g., after a data migration or re-creation), this silently does nothing. The comment explains WHY we use Gitea but not WHY these specific numeric IDs are correct. A brief comment naming which labels these IDs correspond to (e.g., # 38 = ready, 37 = self-reviewed) would improve maintainability.

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 15:53:21 +00:00
feat: add GitHub Actions support

[NIT] Go version 1.26 is specified. As of early 2025, Go 1.26 is not yet released (latest stable is 1.23/1.24). If actions/setup-go resolves this to a future version that doesn't exist yet, the job would fail. This likely works today if setup-go tolerates forward-looking versions, but it's worth confirming and possibly pinning to a released version. (The Gitea CI presumably already uses this same version and passes, so this may be a non-issue in practice.)

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 15:43:42 +00:00
feat: add GitHub Actions support

[NIT] Go version is specified as 1.26, which does not exist yet (latest stable is 1.24.x as of mid-2025). This may cause actions/setup-go to fail or resolve to an unexpected version on GitHub Actions. Recommend pinning to a known stable version like 1.24.

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 15:43:42 +00:00
feat: add GitHub Actions support

[MINOR] The action comment says 'This composite action is designed for Gitea Actions runners' but this file is now in .github/ for GitHub Actions. The comment is misleading for GitHub Actions users who encounter this file. Consider updating the comment to reflect dual-platform support.

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 15:43:42 +00:00
feat: add GitHub Actions support

[NIT] The REPO default for the binary download is hardcoded to rodin/review-bot. When running on GitHub.com (mirrored as aweiker/ai-core-review-bot), the download will still attempt to fetch from the Gitea instance at github.server_url (which would be https://github.com) using the Gitea API path /api/v1/repos/rodin/review-bot/releases. This will 404. The action works for Gitea runners but will break if actually invoked as a reusable action on GitHub.com. Consider documenting that gitea-url must be explicitly set when using from GitHub.

sonnet-review-bot commented on pull request rodin/review-bot#75 2026-05-11 15:43:42 +00:00
feat: add GitHub Actions support

[MINOR] The Gitea API URL is hardcoded as https://gitea.weiker.me rather than using github.server_url. This workflow will fail silently (curl will hit the Gitea instance) when running on GitHub.com, since secrets.RODIN_TOKEN won't be a valid GitHub token and the API path (/api/v1/) is Gitea-specific. If this workflow is intended to be a no-op on GitHub, that should be explicitly documented or the job should be conditioned on the server URL.

sonnet-review-bot approved rodin/review-bot#75 2026-05-11 15:43:42 +00:00
feat: add GitHub Actions support

Sonnet Review

sonnet-review-bot commented on pull request rodin/review-bot#74 2026-05-11 14:47:57 +00:00
fix(gitea): handle single-object response in ListContents

[NIT] The guard condition single.Name == "" && single.Path == "" uses AND — a response where Name is populated but Path is empty (or vice versa) would pass the guard and produce a partially-valid entry. Using OR (`single.Name == ""

sonnet-review-bot commented on pull request rodin/review-bot#74 2026-05-11 14:47:57 +00:00
fix(gitea): handle single-object response in ListContents

[NIT] The inner error err2 from the single-object unmarshal attempt is silently discarded when returning the original array-unmarshal error. In diagnostic scenarios this loses information about why both parses failed. Consider wrapping or logging err2, e.g. fmt.Errorf("parse contents JSON (array: %v; object: %v)", err, err2). Low priority since the original error is the more meaningful one.

sonnet-review-bot commented on pull request rodin/review-bot#74 2026-05-11 14:22:36 +00:00
fix(gitea): handle single-object response in ListContents

[NIT] The variable err2 shadows the outer err in a way that's slightly awkward — err (from the array unmarshal) is preserved for the outer error return while err2 is used only for the single-object attempt. The naming is fine, but a comment noting why err (not err2) is returned in the failure case would aid future readers: the original error is preferred because it describes the primary expected shape.

sonnet-review-bot commented on pull request rodin/review-bot#74 2026-05-11 14:22:36 +00:00
fix(gitea): handle single-object response in ListContents

[MINOR] The fallback tries to unmarshal into a zero-value ContentEntry. If Gitea returns an empty JSON object {}, the unmarshal will succeed and return an entry with all zero/empty fields (Name: "", Path: "", Type: ""), which would be silently added to the results. This is an edge case but could cause confusing downstream behavior. A guard like if single.Name == "" && single.Path == "" before wrapping would be more defensive, though arguably over-engineering for this specific Gitea API.