Repository navigation
Description
--install's mode-stamp targets prove -w before stamping, and -w proves this euid can write a file's contents, not that it can change the file's mode. chmod requires owning the file (or CAP_FOWNER/root); a group- or ACL-writable regular file owned by another account passes every planning check, the cp succeeds, and the later chmod fails — after other artifacts are already placed on the one path in openRepoTools that promises all or none.
Two call sites, both predating PR #44's round 1 (raised again against them in round 2, so filing rather than fixing in that round per the durable word — take what a round introduces, file what predates it):
place_skill_and_hook's skill loop,chmod 644 "$target" || die "could not set the mode on $target."— round 2 comment (also flagged at the command-file loop's identicalchmod 644, same shape).- The
present-arm SessionStart hook path,chmod 600 "$settings" || die "could not set mode 600 on $settings, ...".
Related, and not currently guarded at all: the eleven-command bin loop's own mode stamp, chmod 755 "$target" in install_commands, has no || die beside it — unlike the two sites above, a failure there exits under set -e with the shell's own status (1), which this toolset reserves for "findings were printed," not the refusal (2) a mode-stamp failure should read as. Whoever picks this up should fold that in: at minimum, every chmod this command performs should fail through die, whatever is decided about preflighting.
Why PR #44 round 1 declined a preflight rather than fixing it there
The check that would catch this ahead of time is [ -O ] — this euid against the file's owner. Two problems with adding it:
- Untestable in this suite. Every fixture in
tests/runs as one account undertmp_path; there is no way to construct a second real owner to prove a[ -O ]guard actually refuses what it claims to, or that it lets through what it should. - It would misfire for root. A root-run
--install— provisioning a shared account, say — has itschmodsucceed regardless of the target's owner.[ -O ]would refuse that install even though the mode stamp it is worried about would, in fact, succeed.
This is the same shape already ruled on as R-A9-15 (#24 review): a guard no test can reach is a guard nobody can rely on. See the reasoning written into openRepoTools beside unplaceable_kind (search for "WHAT -w DOES NOT PROVE").
What's open
- Decide whether a narrower, testable guard exists (for example: refuse only when the target's mode is already wrong and its owner is not this euid and this euid is not
0— narrower than blanket[ -O ], and it would not refuse the root case since root is excluded from the check). - At minimum, guard the bin loop's
chmod 755with|| dieso every mode-stamp failure in this command reads as a refusal (exit 2) rather than the shell's own exit 1.
Filed per PR #44's durable word (lane-collision-protocol convention: take what a round introduces, file what predates it as an issue and resolve the review thread naming the issue).
Activity
`unusable_dir_kind`'s walk now stops at a dangling symlink instead of…
brettheap commentedon Sep 14, 2026
CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-14T20:47:28Z, for #48
Logged in
lanes/log/openRepoTools-3.mdat20f0a4c33bacbc277e1017e580f1c483706e0649.The three reads (lane-collision-protocol Rule 1):
`wip init`'s owed-byte comparison now asks the INDEX as well as the w…
`wip init`'s owed-candidate branch also catches a symlink (dangling o…
`--install` stamps the documented mode on every artifact and refuses …
brettheap commentedon Sep 16, 2026
RELEASED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T00:35:34Z, for #48
brettheap commentedon Sep 16, 2026
CLAIMED — lane openRepoTools-1, session df82f553-7803-49c4-8ddf-3f9acdcb8ee0@Eagle, 2026-09-16T01:05:56Z, for #48
Logged in
lanes/log/openRepoTools-1.mdatdacf8f1aaedef802a1775ea650e04e19e0951526.The three reads (lane-collision-protocol Rule 1):
The receipt is born at mktemp's 0600 and no chmod touches it, so #48'…
`--help` and the README both say the receipt is born at mode 0600, a …