fix: address review feedback — alias default, acronym convention, observability
PR Ready Gate / clear-labels (pull_request) Successful in 2s
CI / test (pull_request) Successful in 19s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Failing after 6s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Failing after 10s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Failing after 10s

- #19639: Use empty default for --gitea-url alias to remove ordering dependency
- #19640: Upgrade slog.Warn to slog.Error for missing ReviewSuperseder (signals bug)
- #19641: Remove orphaned comment fragment from buildSupersededBody relocation
- #19642: Rename ProviderGithub → ProviderGitHub per Go acronym convention
- #19643: Log resolution failures at debug level in SupersedeReviews
This commit is contained in:
claw
2026-05-13 09:20:33 -07:00
parent ac6d34f5bd
commit 5252143a33
3 changed files with 9 additions and 9 deletions
+4 -6
View File
@@ -85,8 +85,8 @@ func main() {
aicoreResourceGroup := flag.String("aicore-resource-group", envOrDefault("AICORE_RESOURCE_GROUP", "default"), "SAP AI Core resource group (for provider=aicore)")
// Backward-compatible alias: --gitea-url shares vcsURL's pointer (last flag wins).
// Must stay after vcsURL declaration and before flag.Parse().
flag.StringVar(vcsURL, "gitea-url", *vcsURL, "Deprecated: use --vcs-url instead")
// Shares vcsURL pointer; empty default avoids ordering dependency with vcsURL declaration.
flag.StringVar(vcsURL, "gitea-url", "", "Deprecated: use --vcs-url instead")
flag.Parse()
@@ -162,7 +162,7 @@ func main() {
case vcs.ProviderGitea:
giteaClient := gitea.NewClient(*vcsURL, *reviewerToken)
client = gitea.NewAdapter(giteaClient)
case vcs.ProviderGithub:
case vcs.ProviderGitHub:
client = github.NewClient(*reviewerToken, *baseURL)
default:
panic("unreachable: provider validation should have caught " + vcsProvider.String())
@@ -501,7 +501,7 @@ func main() {
os.Exit(1)
}
} else {
slog.Warn("provider does not support review superseding", "provider", vcsProvider)
slog.Error("provider does not support review superseding", "provider", vcsProvider)
}
}
}
@@ -721,8 +721,6 @@ func validateWorkspacePath(path, pathName string) (string, error) {
return resolvedPath, nil
}
// with collapsed original content and the commit it was evaluated against.
// hasSharedToken detects if another review-bot role posted under the same
// VCS user. This indicates misconfiguration where two roles share a token
// instead of having separate accounts. Returns true if shared token
+3 -1
View File
@@ -282,7 +282,9 @@ func (a *Adapter) SupersedeReviews(ctx context.Context, owner, repo string, prNu
if c.ID == 0 {
continue
}
_ = underlying.ResolveComment(ctx, owner, repo, c.ID)
if err := underlying.ResolveComment(ctx, owner, repo, c.ID); err != nil {
slog.Debug("could not resolve inline comment", "comment_id", c.ID, "error", err)
}
}
}
return nil
+2 -2
View File
@@ -7,13 +7,13 @@ type VCSProvider string
const (
ProviderGitea VCSProvider = "gitea"
ProviderGithub VCSProvider = "github"
ProviderGitHub VCSProvider = "github"
)
// Valid reports whether p is a known VCS provider.
func (p VCSProvider) Valid() bool {
switch p {
case ProviderGitea, ProviderGithub:
case ProviderGitea, ProviderGitHub:
return true
default:
return false