Skip to content

ci: run the unit suite on every platform - #375

Merged
David-Noble-at-work merged 1 commit into
developfrom
ci/platform-test-matrix
Aug 12, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
ci/platform-test-matrix

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Phase 1 of issue #373.

What changes

A new test job runs make test-race on a three-platform matrix. The Test step leaves quality-gate — the matrix's ubuntu leg covers it. Lint, go mod tidy, frontmatter validation, shell lint, and code metrics stay on the one ubuntu runner; they are platform-invariant and should not triple.

CGO_ENABLED: "1" is explicit: -race needs cgo and a C toolchain, the default varies by platform and by whether a compiler is discoverable, and the windows runner ships mingw-w64.

A correction to the plan, in the same commit

The plan specified continue-on-error: true for this phase. That is both unnecessary and harmful, and the plan is updated here.

Ruleset 12426847 on develop requires exactly one status check — quality-gate. A job absent from that list cannot block a merge whatever it reports. So continue-on-error would add nothing except suppressing the red — and the red is the phase-2 triage data. The job lands without it: failing legs report as failures, visibly, and still block nothing.

Phase 4 therefore reduces to a ruleset change with no further edit to ci.yaml.

Recorded from the same query: the existing scenario (macos-latest) and scenario (windows-latest) legs are not required checks either. A red Windows scenario does not block a merge today.

Why this is cheaper than it looks

test-scenario → build → generate, so the existing scenario job already runs the whole codegen chain on all three platforms, green — including make and bash working on the windows runner. test-race: generate inherits a proven chain. And TestWritDeployScenario is symlink-based deployment passing on windows-latest, so symlink creation works there.

Expect red

The first runs will likely fail on macOS and Windows. Those are pre-existing defects being revealed, not regressions introduced here. Measured signals across the test tree: 66 hardcoded /tmp|/usr|/etc|/bin references, 66 permission-bit assertions, 14 expected values containing /, 9 files calling os.Symlink, 6 shelling out — and zero runtime.GOOS == "windows" branches in production code.

Phase 2 classifies every failure as a genuine platform defect, a Unix-assuming test, or a test whose subject exists on one platform only. The third moves into a build-tagged _linux_test.go, which is scoping. A t.Skip added to turn a leg green is not an outcome this plan permits.

Verified: actionlint clean on ci.yaml.

Phase 1 of issue #373. The unit suite ran in quality-gate on ubuntu alone — 121
packages there — while macOS and Windows ran only `go test -run
TestWritDeployScenario ./cmd/writ`, a single test in a single package. A green
scenario leg attested to one writ deploy, not to the suite.

A new `test` job carries a three-platform matrix running `make test-race`, and
the Test step leaves quality-gate; the matrix's ubuntu leg covers it. Lint, go
mod tidy, frontmatter validation, shell lint, and code metrics stay on the one
ubuntu runner — they are platform-invariant and should not run three times.

CGO_ENABLED is set explicitly: -race requires cgo and a C toolchain, the
default varies by platform and by whether a compiler is discoverable, and the
windows runner ships mingw-w64.

The plan specified continue-on-error for this phase. That was corrected during
implementation and the plan is updated in the same commit. The develop ruleset
(12426847) requires exactly one status check, quality-gate, so a job absent
from that list cannot block a merge whatever it reports — continue-on-error
would add nothing except suppressing the red, and the red IS the phase 2 triage
data. The job therefore lands without it. Phase 4 reduces to a ruleset change
with no further edit to this file.

Recorded from the same query: the existing scenario macos and windows legs are
not required checks either, so a red Windows scenario does not block a merge
today.

Two facts make this cheaper than it looks. test-scenario depends on build,
which depends on generate, so the existing scenario job already runs the whole
codegen chain on all three platforms and is green — test-race inherits a
prerequisite chain that is already proven, including make and bash working on
the windows runner. And TestWritDeployScenario is symlink-based deployment
passing on windows-latest, so symlink creation works there.

Expect the first runs to be red on macOS and Windows. Those are pre-existing
defects being revealed, not regressions introduced here; phase 2 classifies
every one of them and phase 3 fixes them. A t.Skip added to turn a leg green is
not an outcome this plan permits.

Verified: actionlint clean on ci.yaml.
Plan: docs/plans/platform-test-matrix.md (phase 1).
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 0c85c8e into develop Aug 12, 2026
7 of 8 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the ci/platform-test-matrix branch August 12, 2026 03:16
David-Noble-at-work added a commit that referenced this pull request Aug 12, 2026
)

Phase 3 of issue #373, taking the largest cluster first. The first
three-platform run (PR #375, commit f8b28c8) passed on macOS and ubuntu and
failed on Windows with 63 --- FAIL lines. Roughly 37 of them were one bug.

`go build -o` appends .exe on Windows, so the binary landed at
devlore-test.exe while TestMain kept exec'ing devlore-test. Every invocation
failed to start, reporting `exit code = -1` with empty output — which is why
all 30 TestCLI_* cases failed at 0.00s, along with the 5 "no JSON summary" and
2 "missing Hello World!" assertions that depend on the same process running.

The plan's phase 2 triage is recorded in the same commit. Two genuine product
defects were found and filed rather than patched inline, both invisible to the
previous ubuntu-only gate:

  #376 — Starlark extension loading breaks on any Windows path. C:\Users\...
         interpolated into Starlark source fails on \U, an invalid escape.
  #377 — fsroot.Path.Rel() returns OS-native separators, and Path is a
         serialized type, so documents and their checksums differ between
         platforms. The six failing assertions are correct; the product is
         wrong, and it contradicts this repository's own platform-stable digest
         rule.

Remaining Windows failures are permission-bit assertions, a hardcoded
/dev/null, and two needing a closer read. Those counts are a lower bound: ~37
masked failures may have been concealing others, and the next Windows run
reveals what was behind them.

No test is skipped and no build tag is added to dodge a platform. The fix is
one conditional suffix in the test's own setup.

Verified on Darwin: make vet, full make test green — zero FAIL or panic lines
by count; gofmt clean. The changed path is Windows-only, so CI's windows leg is
the real verification.
Plan: docs/plans/platform-test-matrix.md (phase 2 recorded, phase 3 begun).
Issue: #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