GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: clear staticcheck nits surfaced by the v16 audit by gnanam1990 · Pull Request #208 · Twigpine/zero

Conversation

@gnanam1990

@gnanam1990 gnanam1990 commented Jun 15, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Summary

Clears the six minor staticcheck findings the v16 audit surfaced (§5.1 / §7 #4). All are cosmetic — no behavior change — and each is independently verified by staticcheck.

Code File Fix
S1011 ×2 agenteval/score.go, cli/agent_eval.go for … { append(x, e) } → append(x, src...)
S1016 tools/web_search.go searchResult{Title:…, URL:…, Snippet:…} → searchResult(item) (identical fields)
ST1005 tools/web_fetch.go lowercase the "unsafe redirect URL" error string (+ test assertion)
SA4006 tui/provider_wizard_test.go drop the dead final next = assignment (keep the type assertion)
S1009 provideronboarding/localruntime_test.go remove redundant == nil before len()

Verification

  • staticcheck ./...: 32 → 26 (the remaining 26 are the two separate audit buckets: 15 U1000 unused + 11 SA1019 deprecated Bubble Tea mouse API — each its own follow-up).
  • gofmt -l clean · go vet clean · go build ./... · go test ./... (full) pass.
  • deadcode unchanged (100) · govulncheck 0.

Scoped deliberately to the cosmetic nits; the dead-code prune, the deprecated mouse-API migration, the unwired Slack sink, and the scoped-network wiring are tracked separately.

Summary by CodeRabbit

  • Bug Fixes

    • Standardized error message formatting for consistency across the application.
  • Refactor

    • Streamlined internal code patterns and structures for improved maintainability.
  • Tests

    • Updated test assertions to reflect formatting improvements.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gnanam1990
chore: clear staticcheck nits surfaced by the v16 audit
b6897d9
Fixes the six minor staticcheck findings (no behavior change):
- S1011 ×2: loop+append → append(dst, src...) in agenteval/score.go and
  cli/agent_eval.go.
- S1016: convert rawResult to searchResult instead of a field-by-field struct
  literal in tools/web_search.go (identical fields).
- ST1005: lowercase the "unsafe redirect URL" error string in tools/web_fetch.go
  (+ update its test assertion).
- SA4006: drop the dead final assignment to next in a provider_wizard test
  (keep the type assertion).
- S1009: remove the redundant nil check before len() in a provideronboarding
  test.

staticcheck drops 32 → 26 (remaining: 15 U1000 unused + 11 SA1019 deprecated
mouse API — separate audit items). gofmt/vet/build/test (full) pass;
deadcode unchanged (100); govulncheck 0.
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Zero automated PR review

Verdict: No blockers found

Blockers

  • None found.

Validation

  • [pass] Diff hygiene: git diff --check
  • [pass] Tests: go test ./...
  • [pass] Build: go run ./cmd/zero-release build
  • [pass] Smoke build: go run ./cmd/zero-release smoke

Scope

Head: b6897d98d1f5
Changed files (7): internal/agenteval/score.go, internal/cli/agent_eval.go, internal/provideronboarding/localruntime_test.go, internal/tools/web_fetch.go, internal/tools/web_fetch_test.go, internal/tools/web_search.go, internal/tui/provider_wizard_test.go

This deterministic review checks validation status and basic diff hygiene. A human reviewer still owns product judgment and design quality.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ce45c55b-79a5-49a7-a7a7-b85729c2cd5c

📥 Commits

Reviewing files that changed from the base of the PR and between 9ddef0e and b6897d9.

📒 Files selected for processing (7)
  • internal/agenteval/score.go
  • internal/cli/agent_eval.go
  • internal/provideronboarding/localruntime_test.go
  • internal/tools/web_fetch.go
  • internal/tools/web_fetch_test.go
  • internal/tools/web_search.go
  • internal/tui/provider_wizard_test.go

Walkthrough

Seven single-line edits across five packages: variadic append replaces loops in score.go and agent_eval.go; parseSearchResults uses a direct struct type conversion; webFetchRedirectPolicy lowercases its error string with the test updated to match; and two test assertions are simplified by dropping an unused assignment and an explicit nil check.

Changes

Minor cleanups and micro-refactors

Layer / File(s) Summary
Variadic append refactors
internal/agenteval/score.go, internal/cli/agent_eval.go
Loop-based appends in Score and agentEvalReportFromBenchmark replaced with single variadic append(..., slice...) calls. No change to output ordering or contents.
Error string capitalization fix
internal/tools/web_fetch.go, internal/tools/web_fetch_test.go
webFetchRedirectPolicy error message changed from "Unsafe redirect URL" to "unsafe redirect URL"; test assertion updated to match the new lowercase form.
Struct conversion and test simplifications
internal/tools/web_search.go, internal/provideronboarding/localruntime_test.go, internal/tui/provider_wizard_test.go
parseSearchResults replaces field-by-field struct literal with direct type conversion; localruntime test drops explicit nil check; provider wizard test discards an unused updated.(model) result.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the pull request's primary change: addressing staticcheck findings from a v16 audit through cosmetic code fixes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/staticcheck-nits

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]
coderabbitai Bot approved these changes Jun 15, 2026
View reviewed changes
@gnanam1990
gnanam1990 marked this pull request as draft June 15, 2026 10:54
@gnanam1990 gnanam1990 mentioned this pull request Jun 15, 2026
web_search: add domains allowlist + score field #209
Merged
Vasanthdev2004
Vasanthdev2004 approved these changes Jun 16, 2026
View reviewed changes

@Vasanthdev2004 Vasanthdev2004 left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Verdict: APPROVED ✅

Reviewed locally in worktree review-pr208 at b6897d9. The PR title says "staticcheck nits" and the actual diff (1 commit on top of main) is just 95 lines of trivial staticcheck/SA1019-style fixes across 7 files (slice-spread syntax in score.go and agent_eval.go, lowercase error string in web_fetch, dead nil check in localruntime_test, struct-conversion in web_search.go). Confirmed gofmt -l . empty, go vet ./... clean, go build ./... clean, go test ./... only fails on the pre-existing TestRunExecUsesProjectConfigAndOpenAICompatibleProvider (reproduces on clean main, not introduced here).

(Note: gh pr diff shows 8235 lines because the branch's tip inherits 6 already-merged commits — feat(swarm), feat(sandbox), feat(daemon), etc. — but GitHub's PR diff is against main and the actual content added is 95 lines.)

Files touched (1 line each, mostly):

  • internal/agenteval/score.go — for ... { append } → append(slice, ...)
  • internal/cli/agent_eval.go — same spread pattern
  • internal/provideronboarding/localruntime_test.go — drop redundant == nil check
  • internal/tools/web_fetch.go — "Unsafe redirect URL" → "unsafe redirect URL" (linter complained about the capital)
  • internal/tools/web_fetch_test.go — match the new error string
  • internal/tools/web_search.go — searchResult{Title:..., URL:..., Snippet:...} → searchResult(item) (struct conversion)
  • internal/tui/provider_wizard_test.go — same kind of simplification

All sound. Merging.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Vasanthdev2004 Vasanthdev2004 closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] approved these changes
@Vasanthdev2004 Vasanthdev2004 Vasanthdev2004 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@gnanam1990 @Vasanthdev2004
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.