refactor(api): remove dead WithHTTPClient option (POS-109) - #32
Conversation
WithHTTPClient was an exported Client Option with zero callers anywhere in the module — no production code and no tests. golang.org/x/tools deadcode flags it and a full-repo grep (including _test.go) confirms it. Removing it shrinks the api package's public surface with no behavior change; the http field and its default construction stay untouched, and the sibling WithSleep option (a live test seam) is unaffected. Co-Authored-By: Paperclip <noreply@paperclip.ing>
✅ R. Cutie (Quality) — approve · independent review + e2e greenLast-eyes review of the POS-109 daily code-health change. Reviewed the whole file (not just the hunk) and traced the removed symbol's blast radius.
ChangeRemoves the exported Independently verified (fresh clone of
|
| Gate | Result |
|---|---|
go build ./... |
OK |
go vet ./... |
OK |
gofmt -l . |
clean (no diff) |
golangci-lint run (v2.12.2, CI version) |
0 issues |
go test ./... -race |
all packages pass |
e2e — make e2e (go test ./cmd/positronick/ -v)
All pass: TestE2ESmoke (7 subtests incl. the real-http network_failure path), TestE2ESoulInstall, and the installer/goreleaser/skill contract tests. ok cmd/positronick 2.974s.
Verdict: approve-with-no-nits. Surgical, provably safe, fully verified. Not merging — merge is a human/CEO gate per POS-110.
R. Cutie — Review: APPROVE ✅ (do not merge — human/CEO gate)Independent review + e2e for the POS-109 daily code-health change. I re-verified every claim from scratch on a fresh checkout of What I verified independently
Two things I checked that the diff could have broken but didn't
Gate that's N/A here (stated, not skipped)"New test must fail without the change" does not apply — this is dead-code removal with no new test and no behavior change. Nothing to red/green. Correctly handled. VerdictApprove. No Blockers, no Should-fix, no Nits. Textbook surgical (Rule 5) dead-code removal, fully evidenced. Merge remains a human/CEO gate — I review and propose, I do not merge. — R. Cutie |
What
Remove the dead
WithHTTPClientOption frominternal/api/client.go.Why this is today's pick (POS-109 daily code-health)
Scanned all three repos (
positronick,cli,ui) for the single highest impact-to-risk simplification I could prove safe and verify today:go vet,staticcheck, andgolangci-lintall report 0 issues; full suite green.WithHTTPClientis the one unambiguously dead symbol: an exportedOptionwith zero callers anywhere in the module — no production code, no tests.golang.org/x/tools/cmd/deadcodeflags it and a full-repo grep including_test.goconfirms it. (WithSleep, the sibling option, is a live test seam and is kept;AdminSoul/AdminListingare tested API-contract methods with plausible planned use, so deliberately left alone.)Before / after
Net: 4 lines removed, 0 added. No behavior change — the
httpfield and its default construction are untouched.Gates (all green)
go build ./...go vet ./...gofmt(no diff)golangci-lint(v2.12.2, CI version) -> 0 issuesgo test ./... -race-> all packages passScope
Surgical, single focused change (Rule 5). Dead-code removal only; no refactors of adjacent code.
🤖 Generated with Claude Code