A symlink is read as its link text, and a range reads only the files it touches (forge martha#111) #112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "titan/111-symlink-and-range-reads"
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?
Purpose (bug): the private gate runs on every repository, including one that tracks a symlink to a directory, so a
README-only pull request can land gated (forge martha#111).
A symlink is read as its link text, never followed.
treeSourcesread every tracked path withreadFileSync,which follows a symlink: macula-os tracks three to
../.., so the gate stopped withEISDIRon a README-onlychange. Each path is now
lstat'd and a symlink is read withreadlinkSync, the text git publishes for it — whichalso means a link's own text is read, where before the target's content was.
A
--rangerun reads only the files the range touches. It read the whole tree beside the commits it was given,so a range over a data repository read every file in it: 42 minutes at full CPU on mcl-fovea-records with nothing
landed. The tree read is now narrowed to
git diff --name-only <base>..<head>. A branch's first push, whose base isall zeros, has no base to compare against and still reads the whole tree.
Both came red first, and each carries a mutant that a named test kills:
bytesAtwithout the lstat/readlink branch → the symlink test fails with the issue's ownEISDIR;sourcesOfreading the whole tree → "a range run reads only the files the range touches" fails;sourcesOfnarrowing to nothing → "a range still reads the files it touches, and a first push…" fails;pathsTouchedBywithout the all-zero base line → the same guard test fails.On this repository (1253 tracked paths): whole tree 3688 ms, a four-path range 275 ms.
Gate on msi00 (node 24.22.3, nice -n 10, four cores):
typecheck0,lint0,check:privateclean whole-tree andover the range,
npm test5339 of 5386 pass. The five failures arerun_an_owner_signed_command's sandbox tests(
/bin/sh: exec: node: not found/npm: not found, msi00's node lives only under mise); the same five fail on main1f36933ein the same tree.Refs #111