Skip to content

ci: analyze every GOOS per pull request — vet, lint, and cross-compile sweeps - #388

Merged
David-Noble-at-work merged 1 commit into
developfrom
ci/goos-analysis-sweep
Aug 12, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
ci/goos-analysis-sweep

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Phase 1b of issue #373: per-GOOS vet / lint / build sweeps, on the one ubuntu runner.

Why

go vet, golangci-lint, and the compiler all honor build constraints — a single-GOOS pass never sees the other platforms' files. The real Darwin and Windows package managers were never analyzed per-PR; only their stubs were. New make vet-all / lint-all / build-all targets run each analysis under all three GOOS, wired into quality-gate.

The first run earned its keep twice

1. A Windows triage undercount, found from a Mac. GOOS=windows go vet failed to compile three test files (syscall.Umask ×2, syscall.Stat_t ×1) — the cause of [build failed] on pkg/op, pkg/op/provider/file, and pkg/op/provider/plan in the windows test leg, which the --- FAIL counting never included. The standing "34 failures" excludes whatever those three packages' suites reveal once they run. The umask tests now read through production's portable processUmask seam, so they run on Windows; the chown test is unix-scoped because its subject (uid/gid) exists only there.

2. First-ever windows lint pass: 5 findings (linux/darwin: zero), all fixed structurally, none suppressed: statIdentity gains named results matching its unix twin; runShellCommand + its knobs move to helpers_unix.go (every consumer is unix-gated); captureRefresh moves to update_unix_test.go.

Compliance sweep, per directive

All 11 touched Go files brought to the full go-style standard: 17 multi-line doc summaries split, ~105 blank-after-signature lines inserted, 7 over-column lines fixed, fixture members documented. Detectors report zero; the one >120 survivor is bracket's signature, §8-exempt. Section-by-section evidence is in the review thread.

Verified: gofmt clean; vet-all, lint-all, build-all green (the commit script re-asserts before committing); full make test green.

Expect the windows test leg to report more than 34 once the three packages compile — that is the undercount surfacing, not a regression.

…e sweeps

Phase 1b of issue #373. go vet, golangci-lint, and the compiler all honor
build constraints, so the single-GOOS quality-gate never saw the other
platforms' _darwin.go/_windows.go/_linux.go files: the real Darwin and Windows
package managers went unanalyzed while their stubs were checked, and a compile
error in a windows file would have surfaced at release, not at PR. New Makefile
targets vet-all, lint-all, and build-all run each analysis under linux, darwin,
and windows on the one runner; quality-gate wires them in place of the
single-GOOS vet and direct-lint steps, plus a cross-compile step.

The first local run earned its keep twice over.

GOOS=windows go vet failed to compile three test files (syscall.Umask in
pkg/op/default_funcs_test.go and pkg/op/provider/plan/deferred_default_test.go;
syscall.Stat_t in pkg/op/provider/file/provider_test.go). That is the cause of
a triage undercount on the windows test leg: those three packages reported
[build failed], which the FAIL-line counting never included — the standing "34
failures" excludes whatever their suites reveal once they run. The umask tests
now read through production's portable processUmask seam (a build-tagged
testProcessUmask pair for the external plan_test package), so they RUN on
Windows rather than being skipped; the chown test moves to
provider_unix_test.go, scoped because its subject — uid/gid ownership through
syscall.Stat_t — exists only on Unix.

The first-ever windows lint pass found 5 issues (linux and darwin: zero), all
fixed structurally rather than suppressed: statIdentity's windows variant gains
its unix twin's named results (inode, device); runShellCommand and its two
knobs move to pkg/platform/helpers_unix.go, because every consumer is
unix-gated and under a windows analysis they were dead code; captureRefresh
moves to update_unix_test.go for the same reason.

A full go-style compliance sweep of all 11 touched Go files rides along, per
directive: 17 multi-line doc summaries split to the single-line form, ~105
missing blank-after-signature lines inserted, 7 over-120-column lines rewrapped
or shortened, fixture struct members documented inline. The mechanical
detectors report zero findings; the one surviving >120 line is bracket's
signature, exempt under section 8. One error the sweep itself introduced — an
err := redeclaration from a hoisted tamper-guard call — was caught by vet and
fixed before commit.

Verified: gofmt clean over the change set; make vet-all, make lint-all, and
make build-all all green (the commit script re-asserts the first two before
committing); full make test green — zero FAIL or panic lines by count.
Plan: docs/plans/platform-test-matrix.md (phase 1b recorded).
Issue: #373
@David-Noble-at-work David-Noble-at-work self-assigned this Aug 12, 2026
@David-Noble-at-work
David-Noble-at-work merged commit 801d981 into develop Aug 12, 2026
7 of 8 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the ci/goos-analysis-sweep branch August 12, 2026 23:02
David-Noble-at-work added a commit that referenced this pull request Aug 13, 2026
Two plan documents, landing after the work they describe.

docs/plans/fsroot-canonical-rel.md is issue #377's plan: rel canonical slash
form at every construction and decode site, abs OS-native, every non-test
Rel() consumer audited (two of them — walkDir and merkleRoot — were handing
native-form rel to io/fs APIs whose contract requires slash paths, so the fix
repaired them rather than risking them). Both rulings are recorded: existing
serialized documents are greenfield, and Abs()-class test expectations are
platform-correct rather than slash literals.

Its Outcome section records what actually happened: the implementation landed
inside PR #389 (the Apache-2.0 relicense) rather than as its own PR — it was
in-flight in the same working tree when the licensing sweep staged whole
directories, and the ruling was to merge with the entanglement disclosed in
the PR body rather than split commits or rewrite a shared branch. Issue #377
closed by that merge. Measured on #389's own windows test leg: 85 -> 57
failures, every fsroot/triad path assertion and TestRegistry_FilePaths
cleared, zero build failures. The attribution correction is recorded too: the
earlier ~50-of-85 estimate was wrong (the separator-direct share was 28), and
the surviving receipt/graph-resume round-trips have a second cause beyond
separator form — the first thing to read in the remaining-57 triage.

docs/plans/platform-test-matrix.md gains the corrected phase-2 baseline: with
the three formerly-[build failed] packages compiling on Windows (PR #388), the
honest count was 85, not 34 — the FAIL-line counting had silently excluded
three entire suites.

Documentation only; no code changes.
Issues: #377 (closed), #373

Co-authored-by: David Noble <[email protected]>
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.

1 participant