Skip to content

mcpx: fix the 119 golangci findings the new lint leg surfaced, then make the leg blocking #2836

Open

Description

@dezren39

Summary

The new mcpx CI lint leg (PR #2718, for #1996) now runs end-to-end and its first full golangci-lint run against pkgs/mcpx (config: pkgs/mcpx/.golangci.yml, v2, standard set + staticcheck checks: [all]) reports 119 pre-existing findings across the module — far beyond the small baseline #1996 assumed (shellcheck 3, gofmt clean). Per #1996's acceptance fallback, these are filed here as a linked follow-up instead of being fixed inside the #1996 slice, and the golangci step of the lint leg is non-blocking (explicit continue-on-error, noted on #1996) until this issue lands.

Evidence

Shape of the findings (from the run log)

  • errcheck (50): mostly unchecked Close() / os.WriteFile / os.Remove returns, concentrated in internal/logging, internal/config tests, internal/runner, internal/openapi, internal/registry, internal/scripting, internal/sdnotify.
  • staticcheck (50): includes real-signal items — SA1012 nil Context (internal/mcpclient/http.go x2, internal/preflight/preflight_test.go), SA4000 identical != operands (internal/refdoc/md_test.go), SA4006 dead value (internal/nearmiss), SA9003 empty branch (internal/nearmiss) — plus many style-class ST1000/ST1016/ST102x/QF100x findings that checks: [all] deliberately enables.
  • unused (17): dead funcs/fields/consts in internal/cli (runInline), internal/conformance tests, internal/launcher (readName), internal/logging (min field), internal/mcpclient (errOnce), internal/mcpserver (mayBlockOnClient, isReply), internal/mcpspec (Schema.check), internal/openapi (rest field), internal/pool (Pool.start), internal/preflight (skipSpaceIn), internal/tui (app field).
  • ineffassign (2).

Acceptance

  • All 119 findings fixed, or individually dispositioned in pkgs/mcpx/.golangci.yml (exclude rules with a stated reason per rule — no blanket linter disables).
  • The golangci step in .github/workflows/mcpx.yml is blocking again (remove continue-on-error) and the leg is green.
  • go test ./... for pkgs/mcpx stays green in CI.

Refs: #1996, PR #2718.

Acceptance criteria

Activity

  1. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    on Oct 30, 2026
  2. added
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    source/queue-workerFiled or worked by the queue/worker pilot
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 31, 2026
  3. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: PR #2718 / #1996 (lint leg; golangci step currently non-blocking until this lands). Risks: 119 findings invite blanket exclusions — resist; fix or per-site-exclude with reasons. Suggested approach: group findings by checker, fix mechanical classes in batches, keep the config's standard set intact.

    — Fleet monitor intake enrichment (protocol §5): verified still live this run (no merged PR resolves it), labels normalized, acceptance criteria appended. Marked meta/enriched.

  4. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  5. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked up
    Task 8002, lane 7b47536b-c162-444c-be8a-3a9538cc4cb5: verifying at current main whether the lint findings remain live and scoping the fix or blocker. Fresh check: issue open; linked lint-leg PR #2718 merged; no open PR found for #2836. Queue state labels are already in-progress/claimed/assigned.

  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (still live)
    task: 8002
    Current-main evidence: at 7d3dbd0, golangci-lint run in pkgs/mcpx reports 123 findings (errcheck 50, staticcheck 50, unused 21, ineffassign 2). The workflow still calls the step non-blocking until #2836 and sets continue-on-error: true.
    Ownership: #2836 remains open; PR #2718 merged on 2026-10-30; no open PR for #2836.
    Scope/order: fix the findings or individually justify reviewed exclusions in pkgs/mcpx/.golangci.yml; prioritize behavior defects among staticcheck findings, then handle mechanical errcheck/ineffassign/unused findings in checker/file batches; run golangci-lint and go test ./...; remove continue-on-error only once lint acceptance is met. No external blocker identified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/testTest coverage, test infrastructure, or test-only fixesmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilottask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions