From bdb6041df9c8143e607fd6d9f59d328bb53dc828 Mon Sep 17 00:00:00 2001 From: Alvaro Saurin Date: Fri, 17 Jul 2026 12:49:13 +0200 Subject: [PATCH 1/2] chore: fix 3 pre-existing golangci-lint failures on main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- internal/acpproc/acp_process_memory.go | 7 ------- internal/web/handlers/dashboard.go | 6 ------ internal/web/loop_runner_test.go | 4 +++- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/internal/acpproc/acp_process_memory.go b/internal/acpproc/acp_process_memory.go index 26a62853..681199df 100644 --- a/internal/acpproc/acp_process_memory.go +++ b/internal/acpproc/acp_process_memory.go @@ -44,13 +44,6 @@ func processTreeRSSDetailed(pid int) (parent uint64, descendants uint64, descend return parent, descendants, descendantCount, nil } -// descendantsRSS recursively sums the RSS of all descendants of p. Per-process -// errors are skipped so a child exiting mid-walk does not fail the whole sum. -func descendantsRSS(p *process.Process) uint64 { - total, _ := descendantsRSSDetailed(p) - return total -} - // descendantsRSSDetailed recursively sums the RSS of all descendants of p and // counts them. Per-process errors are skipped so a child exiting mid-walk does // not fail the whole sum. diff --git a/internal/web/handlers/dashboard.go b/internal/web/handlers/dashboard.go index 63fdb642..d6ff8145 100644 --- a/internal/web/handlers/dashboard.go +++ b/internal/web/handlers/dashboard.go @@ -262,12 +262,6 @@ func itemStatus(item map[string]any) string { return s } -// itemType returns the "issue_type" field of an issue map as a string. -func itemType(item map[string]any) string { - s, _ := item["issue_type"].(string) - return s -} - // itemUpdatedAt returns the "updated_at" field of an issue map as a string. // bd emits RFC 3339 timestamps so lexicographic comparison matches chronology. func itemUpdatedAt(item map[string]any) string { diff --git a/internal/web/loop_runner_test.go b/internal/web/loop_runner_test.go index f9651b29..c63a4ede 100644 --- a/internal/web/loop_runner_test.go +++ b/internal/web/loop_runner_test.go @@ -4016,7 +4016,9 @@ func TestLoopRunner_WorkspaceKey(t *testing.T) { t.Error("keys should differ when WorkingDir differs") } // Same WorkingDir + ACPServer → same key. - if workspaceKey("/w", "a") != workspaceKey("/w", "a") { + k1 := workspaceKey("/w", "a") + k2 := workspaceKey("/w", "a") + if k1 != k2 { t.Error("keys should match for the same pair") } // NUL separator is present. From c92508d67ab817d33f0a89f180af3b35308de23d Mon Sep 17 00:00:00 2001 From: inercia Date: Fri, 17 Jul 2026 13:57:51 +0200 Subject: [PATCH 2/2] chore(lint): remove stale eslint-disable for nonexistent preact/hooks/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. --- web/static/hooks/useWebSocket.js | 1 - 1 file changed, 1 deletion(-) diff --git a/web/static/hooks/useWebSocket.js b/web/static/hooks/useWebSocket.js index 6d147d2b..8fbba135 100644 --- a/web/static/hooks/useWebSocket.js +++ b/web/static/hooks/useWebSocket.js @@ -4315,7 +4315,6 @@ export function useWebSocket({ } staggeredBackgroundTimersRef.current = {}; }; - // eslint-disable-next-line preact/hooks/exhaustive-deps }, []); // forceReconnectActiveSession lives in useWSConnection (C1) — mitto-90f.6.2.