Skip to content

chore: fix 3 pre-existing golangci-lint failures on main#71

Merged
inercia merged 2 commits into
mainfrom
chore/main-lint-cleanup
Jul 17, 2026
Merged

chore: fix 3 pre-existing golangci-lint failures on main#71
inercia merged 2 commits into
mainfrom
chore/main-lint-cleanup

Conversation

@inercia

@inercia inercia commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

main currently fails golangci-lint with 3 issues, which also cascade into every open PR (verified: run 29413245700 on main, run 29568780468 on PR #70 — identical errors). Prior cleanup bead mitto-7r0 was closed but the failures came back.

Fixes

1. internal/acpproc/acp_process_memory.go:49unused: descendantsRSS
Deleted. It was a thin wrapper that discarded the count return of descendantsRSSDetailed; a git grep confirms zero callers anywhere in the tree.

2. internal/web/handlers/dashboard.go:266unused: itemType
Deleted. Sibling helpers (itemStatus, itemUpdatedAt, itemPriority) are used, but nothing reads issue_type through this helper. No callers.

3. internal/web/loop_runner_test.go:4019staticcheck SA4000
The test literally did:

if workspaceKey("/w", "a") != workspaceKey("/w", "a") { ... }

which is a tautology (SA4000 correctly flags it). Fixed by assigning both invocations to variables so the comparison is between two independent calls — preserving the actual intent (verify workspaceKey is deterministic for identical inputs).

Local gate

Ran on top of origin/main:

  • make fmt-check — clean
  • go build ./... — clean
  • go vet ./... — clean
  • golangci-lint run --timeout=5m0 issues
  • go test ./internal/acpproc/... ./internal/web/... ./internal/web/handlers/... — all pass

Related

  • Prior (closed) cleanup: mitto-7r0
  • Not related to PR Unsorted improvements #70 (feat/unsorted-improvs) — this is an independent cleanup so main and every PR CI go green again.

Prior cleanup (mitto-7r0) was closed but the failures returned:

1. internal/acpproc/acp_process_memory.go:49 (unused)
   Delete descendantsRSS — dead wrapper around descendantsRSSDetailed with
   no callers anywhere in the tree.

2. internal/web/handlers/dashboard.go:266 (unused)
   Delete itemType — no callers; the sibling item* helpers (itemStatus,
   itemUpdatedAt, itemPriority) are used, but nothing reads issue_type
   via this helper.

3. internal/web/loop_runner_test.go:4019 (staticcheck SA4000)
   The test literally called
     workspaceKey("/w", "a") != workspaceKey("/w", "a")
   which is a tautology. Assign both to variables first so we're
   comparing two independent invocations of the helper (the actual
   intent: verify workspaceKey is deterministic for identical inputs).

All three appear in run 29413245700 (main) and 29568780468 (PR #70)
with identical output.
Copilot AI review requested due to automatic review settings July 17, 2026 10:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR restores golangci-lint cleanliness on main by removing two unused helper functions and fixing a staticcheck tautology in a test, preventing CI failures from cascading into unrelated PRs.

Changes:

  • Remove unused descendantsRSS wrapper in ACP process memory accounting (internal/acpproc).
  • Remove unused itemType helper from dashboard handler utilities (internal/web/handlers).
  • Fix staticcheck SA4000 in TestLoopRunner_WorkspaceKey by comparing two independent calls.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/acpproc/acp_process_memory.go Deletes an unused wrapper (descendantsRSS) with no callers to satisfy unused lint.
internal/web/handlers/dashboard.go Removes an unused dashboard helper (itemType) with no callers to satisfy unused lint.
internal/web/loop_runner_test.go Updates a deterministic-key test to avoid SA4000 tautology while preserving intent.

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

…/exhaustive-deps rule

The preact/hooks/exhaustive-deps plugin is not installed in this repo's
ESLint config, so the disable-comment produces a hard error:

    Definition for rule 'preact/hooks/exhaustive-deps' was not found

This surfaced in CI once the Go lint issues fixed by this PR stopped
short-circuiting the Lint job. The useEffect at that call site
intentionally uses an empty deps array; no rule suppression is needed.
@inercia
inercia merged commit d7419ea into main Jul 17, 2026
4 checks passed
@inercia
inercia deleted the chore/main-lint-cleanup branch July 17, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants