Skip to content

DRAFT: run a platform's tests on a host you own, when a host variable is set #724

Open

Description

@David-Noble-at-work

DRAFT — not chartered. Recorded so the idea and its analysis survive; no commitment to build it.

Distinct from: #652 (closed NOT_PLANNED) — that was distribution, shipping to machines you do not control. This
is local acceleration: running a platform's tests on your own box for that platform, before pushing.

The idea

Per-platform host variables. Set one, and that platform's tests run there. Leave it unset, and that platform is
skipped.

WINDOWS_ARM64_HOST=danoble-wd11-3.local

The point is feedback latency. Today the answer to "does this work on Windows?" costs a push plus roughly eight
minutes of CI. This makes it a local make away, which matters most for the work where platform behavior is the
subject — fsroot, signing, file, and the Windows permission campaign.

The fork that decides the size of this

Does the target host get a Go toolchain?

Cross-compiled test binaries Go installed on the target
Setup on target none one package install
-race impossible — cross-compiling with the race detector needs cgo and a target C toolchain on the build host works
testdata must ship the tree; a test binary resolves testdata/ against its working directory, so each must run from its own package dir free — it is just the repo
123 packages 123 binaries to build, ship, run, and collect irrelevant; make test handles it
Implementation a real project rsync + ssh 'cd repo && make test-race'

Recommended: Go on the target. The goal is catching what CI catches, and -race is where platform-specific
failures actually surface here — 2026-08-27's claimcheck timeout appeared only on race legs and was invisible to
make test. A remote mode that cannot run race would have missed exactly the defect that motivates having one.

Cross-compiling remains the right answer for #652's goal. It is the wrong one here: a large complexity tax to
avoid a single winget install golang.

Sketch

# Optional hosts for local cross-platform testing. Unset ⇒ that platform is skipped.
WINDOWS_ARM64_HOST ?=

test-windows-arm64:
	@[ -n "$(WINDOWS_ARM64_HOST)" ] || { echo "WINDOWS_ARM64_HOST unset — skipping"; exit 0; }
	rsync -a --delete --exclude build/ ./ $(WINDOWS_ARM64_HOST):devlore-cli/
	ssh $(WINDOWS_ARM64_HOST) 'cd devlore-cli && make test-race'

Open questions

  1. Skip semantics. exit 0 with a note means an aggregate target succeeds with nothing configured. Right for a
    convenience target — but it must print loudly enough that "passed" is never mistaken for "ran". A green summary
    listing skipped platforms is the minimum.
  2. What the target needs beyond Go. Eight test files shell out: git (×3) and pwsh (×1). True in either
    approach, and it means the target is not environment-free whatever is chosen.
  3. Windows transport. ssh works with OpenSSH Server enabled; rsync on Windows means WSL, Git Bash, or a
    substitute. Unverified.
  4. Which platforms get variables. The CI matrix has five legs. Some may never have a host, and the design should
    not imply otherwise.
  5. Whether scenarios travel. make test-scenario needs the built products. make build PLATFORM=... already
    cross-compiles them, so this may be nearly free — or may want the target to build its own.

Explicitly not in scope

CI. This adds nothing to any workflow and changes no gate. It is a local convenience, and if it stops working
nothing in the pipeline notices — which is also its risk: an unused path rots.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions