- Runtime: Go 1.24+,
CGO_ENABLED=0for builds - Language: Go
- Dependencies: standard library only on Unix;
github.com/Microsoft/go-winioon Windows - License: Apache-2.0
gofmtis the formatter;gofmt -l .must print nothing before commit- Tabs for indentation, LF endings, UTF-8
- Platform files use build tags —
//go:build unixand//go:build windows - Exported identifiers carry doc comments beginning with the identifier name
- Errors are wrapped with
%w; sentinels are inspectable viaerrors.Is/errors.As - Never swallow a security-relevant underlying error
Every source file starts with:
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2026 Four Bytes- LF line endings, UTF-8 encoding
*.local.mdis gitignored — use it for personal notes- No personal paths in committed files
A change that breaks one of these is a defect, not a trade-off. Each has a test that fails if it is violated; if you find one without a test, that is a bug worth its own issue.
- No TCP fallback, silent or otherwise.
- Every runtime-directory candidate is validated — exists, is a directory, owned by the
current UID, no group or world write bit. This applies to an explicitly passed
RuntimeDirtoo. If none passes, fail withErrNoRuntimeDir. $TMPDIRis a Darwin-only precedence step. On macOS it is per-user and mode0700; on Linux it conventionally means world-writable/tmp, which must never hold a socket.- Stale cleanup removes only an owned socket. Anything else at the socket path —
a regular file, a directory, another user's socket — is
ErrStaleCleanupUnsafe. - No Linux abstract namespace. Abstract sockets carry no filesystem permissions, so every process in the network namespace could connect. This is declined permanently, not deferred.
ReadFramevalidates the declared length before allocating. A reader that allocates first is a remote memory-exhaustion primitive.- The Windows DACL grants the intended SID only — never
Everyone, neverAnonymous, never the default DACL.
- Every change ends with
gofmt,go vet,go test -race ./... - Version bump and
HISTORY.mdentry before merge - No merge with a red gate; fix or revert, never skip