Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

#405

Build the tree for windows/amd64 and name the platform seams

merged · by keenan 2d ago · merged into main at 215f8aeb by keenan 2d ago

keenan opened this 2d ago

First milestone of #404: the tree builds and type-checks for windows/amd64, every unix-only site has a named seam, and the two controls that cannot yet be honoured on Windows refuse instead of silently weakening.

What moved:

  • internal/storage: Stat_t block accounting, hard-link identity, and Statfs capacity are split into stat_unix.go and stat_windows.go. Windows uses GetCompressedFileSize for allocated bytes (so sparse and compressed files do not claim their apparent size), a handle plus GetFileInformationByHandle for hard-link identity, and GetDiskFreeSpaceEx for capacity. stat_other.go keeps the package building where none of that exists, reporting the disk error through Stats.DiskErr rather than inventing numbers.
  • internal/secure and internal/audit: the mode/uid checks move whole into tighten_unix.go and verify_unix.go, with unchanged messages and order. The non-unix halves refuse: Chmod(0600) on Windows only sets the read-only attribute and os.Stat reports every writable file as 0666, so applying or verifying a unix mode there would invert the guarantee the package exists for. ACL-backed hardening is the next milestone; until it lands, a Windows build cannot create or accept a secret, and the instance refuses to start.
  • ci/agent: free space, the cache lock, the liveness probe, and the command’s process group are behind platform files. LockFileEx/UnlockFileEx give the runner the same die-with-the-process release flock gives. Windows kills the direct child only: reaching grandchildren needs a Job Object, which is not implemented and is called out in the file rather than hidden.
  • cmd/vole: the forced-command handoff calls replaceProcess, which is syscall.Exec on unix and an explanation elsewhere. Windows has no exec, and syscall.Exec there returns EWINDOWS with nothing sshd can act on.
  • server/integration_test.go: the runner cleanup uses ownProcessGroup/killRunnerTree so the tests compile for Windows while keeping the group kill on unix.
  • golang.org/x/sys becomes a direct requirement (it was already v0.49.0 in the graph; BSD-3-Clause is already listed in licenses.toml).

CI gains a windows build step beside macOS binaries that cross-compiles windows/amd64 and runs GOOS=windows go vet ./.... The vet is the part that matters: it type-checks test files, which go build does not compile.

Verification: vole workflow check, then vole workflow run verify (all steps, including windows build and the race suite, in the verify image). Also GOOS=windows GOARCH=amd64 go build ./... and go vet ./..., GOOS=darwin GOARCH=arm64 go vet ./..., and the unit tests of every touched package on linux.

Out of scope, per #404: running vole serve on Windows (ACL hardening, SID ownership, Job Objects, a Windows sshd drop-in), packaging and service management, and any Windows CI beyond type-checking.

Discussion (0)

No discussion yet.