You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
plan: TestRenderTerrainStaysUnderTheCap builds a 541-byte path component, so it can never pass on Linux #382
internal/planTestRenderTerrainStaysUnderTheCap fails on every Linux machine, on a
clean origin/dev, with:
terrain_test.go:109: mkdir .../観測観測…観測d: file name too long
It is listed in .github/known-red.txt as environment-shaped ("PASS on a clean macOS
tree"). It is not. The fixture asks the operating system for a name Linux cannot create,
so no TMPDIR and no machine could ever turn it green here.
Mechanism
The fixture builds each of fourteen directory names from strings.Repeat("観測", 90):
180 three-byte runes, 541 bytes per name. ext4 and tmpfs cap one path component at 255 bytes; APFS caps it at 255 characters, and 181 characters fits. The test was
written on a Mac, passed there, and was recorded as environment-shaped when it first met
Linux.
The code under test (RenderTerrain, terrainClip) is correct. A known-red entry hid a
real fixture bug.
The law
A fixture builds only what every filesystem the project runs on can hold. A component
stays under 255 bytes, which is the tightest limit among ext4, tmpfs, APFS and NTFS.
Fix shape
One line: repeat 40 instead of 90. Each name is then 241 bytes, and fourteen of them are
3374 bytes, still well past the 2048-byte cap, so the assertions the test exists for —
clipped output, … at the end, cut on a rune boundary — all still bite. The entry
leaves .github/known-red.txt and the matching list in CLAUDE.md in the same change.
Replication
go test ./internal/plan/ -run '^TestRenderTerrainStaysUnderTheCap$' -count=1 -v
Acceptance
The replication passes on Linux and macOS, and 50 of 50 with -count=50.
TestRenderTerrainStaysUnderTheCap is gone from .github/known-red.txt and from the
list in CLAUDE.md.
Drafted with CodeAF · reviewed and owned by the author
Activity
plan: the terrain fixture stays under the 255-byte name limit
plan: the terrain fixture stays under the 255-byte name limit
plan: the terrain fixture stays under the 255-byte name limit, so it …