bug(release): rt does not build on Windows — the cut lock calls syscall.Flock, and register-check ignores the allow-list there #1502
Labels
No labels
bump
major
bump
minor
bump
patch
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
loop/paused
mirror-drift
priority
critical
priority
high
priority
low
priority
medium
size
L
size
M
size
S
size
XL
status
blocked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
frankenbit/release-toolkit#1502
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
rtdoes not compile on Windows.internal/release/lock.gotakes the cut-serialization lock withsyscall.Flock, and packagesyscalldefines that only on Unix. As a result, no verb is available to anyone working on Windows. That includes the read-only ones a reviewer runs by hand:rt review-eligibilityandrt review-submit-check(AGENTS.md section 6.1/6.2),rt register-check,rt fragment-checkandrt repin --dry-run.Measured 2026-10-02 at
29b541b, Go 1.27.1 windows/amd64, Git 2.55.0.windows.3, LF clone:With a Windows lock backend dropped in, the binary builds. Running it then shows one Windows runtime bug:
Every one of these files is covered by a
.register-allowlistentry (docs/adr/,docs/retro/and the three named files). On Linux the same command reports 0 hits.Cause.
scanOneFileininternal/register/filescan.goreceives the OS-native path thatfilepath.WalkDirproduces (docs\retro\...). It matches that path against the forward-slash allow-list entries and self-exclusion keys, which never match, and it also prints the path as the hit's file.Hooks. On Windows,
rt prepwith anypost_bump_hooksconfigured stops withprep: post_bump_hook not executable: <hook>. Nochmod +xcan fix that:os.Statreports no exec bit on Windows, andCreateProcessdoes not dispatch on#!. This repository no longer configures hooks, and the release workflow runs on Linux, so only a local Windowsrt prepmeets this.Tests. With the lock backend in place,
go test -count=1 ./...fails 11 tests natively, in 5 of the 29 packages:TestScanTree,TestRegisterFileScanDriftandTestRegisterFileScanExemptAndAllowlist;TestRunPostBumpHooks_theHookDoesNotReceiveTheGitCredentialis the hook refusal;rt:rtwithout.exe;chmod 000;filepath.Join.TestPushManifestAuthedRejectsSecondPushalso fails intermittently on Windows. Its 2 s context deadline can kill git mid-rebase on a busy host. It passed in this run.Why it matters
register-checkon Windows gives a false red on exactly the paths the allow-list exists to exempt. Its hit lines also carry backslash paths, a form that neither the allow-list format nor the docs use.Out of scope
.goreleaser.yamlbuilds linux/amd64 only, by the open cross-platform-runners fork in ADR-0009 section 9, which is an operator ratification point.post_bump_hookson Windows. They are POSIX scripts shared with the Linux workflow, so the right move is to refuse them by name.version_filesguard does not reject a..\prefix;resolveUnderRoottreats only a leading/as absolute;Acceptance criteria
go build ./cmd/rtsucceeds natively on Windows. Every non-Windows build keeps the identicalflockcall. — DONE @ #1505 (b47a824, reviewed as8e2cf58).go build ./cmd/rtandgo vet ./...succeed natively on96d2646.lock_unix.gois//go:build !windowsand carries the same twosyscall.Flockcalls as the oldlock.go(LOCK_EX|LOCK_NB,LOCK_UN).ErrConcurrentCuton contention), owned by the open file, and dropped by the OS when the holder dies. A second-process test and a killed-holder test cover it, and both go red under a contention-treated-as-success mutant on Windows and Linux. — DONE @ #1505 (b47a824, reviewed as8e2cf58), with one correction to the mutant wording. Measured natively on Windows and ingolang:1.25: a contention-treated-as-success mutant turnsTestAcquireLock_anotherProcessHoldsItandTestNewCutter_concurrentCutred, but not the killed-holder test, which never sees contention. A marker-file mutant (anO_EXCLfile instead of the OS lock) turnsTestAcquireLock_killedHolderDoesNotStrandTheLockred: stranded after 5 s. Each test bites on the property it pins, as #1505's own mutation table also says.rt register-checkon Windows honours.register-allowlistand prints forward-slash paths. On this repository it reports 0 hits, as on Linux. — DONE @ #1505 (90ef268, reviewed as6aef15b). Nativert register-checkon96d2646:OK: 0 register-drift hits, exit 0, with stdout and stderr byte-identical to the Linux run on the same tree. Forward-slash hits are pinned byTestScanTreeandTestScanTreeExplicitOSPath, both PASS natively.rt preprefuses configuredpost_bump_hooksby name, stating the actual cause, before running any of them. Linux behaviour is unchanged. — DONE @ #1505 (25d0c0b, reviewed as0ac9790). The refusal sits at the top of the per-hook loop, ahead of any exec.TestRunPostBumpHooks_refusalNamesTheCauseOnThisOSPASSES natively withpost_bump_hooks are not supported on Windows (no exec bit, no #! dispatch), and ingolang:1.25with the unchangednot executablerefusal.go vet ./... && go test -count=1 ./...passes natively on Windows (from Git Bash) and ingolang:1.25. On Linux, the output of the touched verbs is byte-identical before and after. — DONE @ #1505 (96d2646, reviewed asca66a11). Fresh clone of96d2646:go vet ./...clean andgo test -count=1 ./...29/29, natively from Git Bash and ingolang:1.25as a non-root user. Re-measured on Linux withrtbuilt at340608cand at96d2646, both run on the same tree:--help,register-checkandfragment-checkare byte-identical in stdout, stderr and exit code.prep --dry-runwas not re-run here; its byte-identity rests on #1505's review pass (non-executable, failing and succeeding hooks), and its only production change is aruntime.GOOS == "windows"branch.changelog.dfragment for the change. — DONE @ #1505 (b47a824, reviewed as8e2cf58).changelog.d/1502-windows-build.fixed.md;rt fragment-checkin content mode PASSES.Anchor
Found while testing a release-notes plan for frankenbit/storey on a Windows workstation. The Flock build failure was already listed as out of scope in #1485.
go test ./...still fails on an LF checkout —cmd/rtdoes not build, and POSIX-only tests run unguarded #1501Landed as #1505:
b47a824..96d2646, reviewed as8e2cf58..ca66a11.git range-diffshows all four commits as=. All six criteria are ticked above against livemain.96d2646is success, 16 of 16.The competing #1503 was shut unmerged, and its tracker #1501 is ticked against the same landing.
Shutting this tracker by hand.
..\paths, recover-pending-cut joins an absolute changelog, an atomic write fails over a read-only file #1526rt prep --dry-runrefuses when another program holds an ignored file open — the scratch copy reads every ignored file #1543