Phase 0: Guardrails & baseline (Taskfile, golangci-lint v2, coverage plumbing) - #52
Closed
grubmeshi wants to merge 1 commit into
Closed
Phase 0: Guardrails & baseline (Taskfile, golangci-lint v2, coverage plumbing)#52grubmeshi wants to merge 1 commit into
grubmeshi wants to merge 1 commit into
Conversation
…overage plumbing Phase 0 of the single-Go-binary refactor (PLAN_DETAIL_00_guardrails.md). Behavior-neutral: no production code path changes, no frozen contract touched (D9/D10). Change categories: Tooling (D14): - Replace Makefile with root Taskfile.yml (all targets preserved 1:1 except `vet`, which now runs inside `task lint` via govet). Colon-namespaced subtasks; `task --list` replaces `make help`. Adds `task coverage`. - Root .golangci.yml (golangci-lint v2, provider-parity linter set incl. govet, gci localmodule ordering, per-module strict depguard rules) serving all three modules. - flake.nix gains pkgs.go-task (nix develop provides go, golangci-lint, go-task). - README.md + run-controller/README.md: make -> task. Mechanical lint cleanup (category 1, §5.3 — provably inert only): - gci import ordering, godot comment periods, misspell (comments), unconvert, staticcheck QF-series (tagged-switch, embedded-selector). No executed production logic changed. Pinned-not-fixed (category 2, §5.3): errcheck/forcetypeassert/nilerr/makezero/ineffassign/ unparam findings in production files are silenced via commented exclusions.rules blocks in .golangci.yml (tfrun -> phase 2/2b; run-controller + go-meshapi-client -> phase 3). Fixing them would alter behavior (deferred to 2b per D13). The swallowed workspace-select error (tfcmd.go:232-234) stays intact for phase-1 pinning. Coverage plumbing (D6, not yet gating): - tools/coverage/check.sh (POSIX sh + go tool cover), thresholds.txt + exclusions.txt both ship empty. Gate is vacuous today; phase 1 flips it on by adding one threshold line. CI (ci.yml, additive per §5.5): go-runners-ci writes coverage.out, runs check.sh (report-only), uploads coverage-<app> artifacts; adds the go-meshapi-client matrix leg (sanctioned §5.5/§11 exception to "CI untouched until phase 7"). No -race, no lint job. Research artifacts: COVERAGE_BASELINE.md, D9_UNTESTED_BEHAVIOR_INVENTORY.md, PHASE0_LOCAL_DEV_STACK_VERIFICATION.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Phase 0 of the single-Go-binary refactor (
PLAN_DETAIL_00_guardrails.md). Behavior-neutral: no production code path changes, no frozen contract touched (D9/D10). Squash-merges to one commit.What lands
Taskfile.ymlreplaces theMakefile1:1 exceptvet(now insidetask lintvia govet). Addstask coverage.flake.nixgainspkgs.go-task. READMEs updated (make→task)..golangci.yml(provider-parity linter set incl. govet, gci localmodule ordering, per-module strict depguard) serving all three modules.tools/coverage/check.sh+thresholds.txt+exclusions.txt(both ship empty). Phase 1 flips the gate on by adding one threshold line — no further CI change.go-runners-ciwritescoverage.out, runscheck.sh(report-only), uploadscoverage-<app>artifacts.Lint-adoption rule (§5.3)
exclusions.rulesblocks (tfrun→ phase 2/2b;run-controller+go-meshapi-client→ phase 3). Verified load-bearing (errcheck reports the sites without the config; full config → 0 issues). The swallowed workspace-select error (tfcmd.go:232-234) stays intact for phase-1 pinning (D13).Sanctioned deltas (flagged)
go-meshapi-clientCI matrix leg added — the one sanctioned exception to D14 "CI functionally untouched until phase 7" (§5.5/§11): a shared module the refactor leans on should not go unguarded. Coverage upload uses SHA-pinnedactions/upload-artifact.start:run-controller, etc.) — acceptable per §5.1 (nothing outside README referenced the old names; cross-repo grep clean).Gates (all green)
task lint→ 0 issues in all three modules.task test→ all pass.task coveragereproduces the §3 baseline: go-meshapi-client 53.3%, run-controller 22.6%, tf-block-runner 56.6% (tfrun 59.4%). Gate mechanism proven (temp threshold above baseline →check.shfails, then reverted).Baseline (§3)
local-dev-stack safety net (§6 step 9)
Verified against this branch (
PHASE0_LOCAL_DEV_STACK_VERIFICATION.md): compose stack (mariadb/ravendb/keycloak/mux) + meshfed services + manual (gradle) & tf (go run .) runners up; readiness markers and claim/poll observed. One honest gap: a fully HTTP-triggered live run to a terminal status was not produced (needs a keycloak dev credential absent from reachable docs); the claim/poll contract + acceptance-testing skill were used as substitute evidence.Notes for reviewer
go.mod/go.sum/go.work.sum) were reverted tomain: a sibling'stask tidy/work-synchad bumped indirect deps (e.g. run-controllergolang.org/x/net0.39→0.56). Out of scope for a behavior-neutral phase (§2); reverting keeps the phase minimal and matchesmain. Build/lint/tests all green afterward..mddocs are committed to the code branch (rather than only the plan branch / PR description as §2/§8 preferred) to preserve completed work and serve plan-01's A4/A7 verification steps; documentation-only, no contract impact.🤖 Generated with Claude Code