mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 08:02:24 +00:00
`usable` asks two things of an existing path — not a directory, and carrying the executable bit — and only the mode half had a fixture. A directory has that bit as a matter of course, 0755 being what `mkdir` gives you, so dropping `!stat.is_dir` left every directory reading as an installed server. The installer would skip the install and hand `ensure_daemon` a path nothing can exec: the remote never comes up, says nothing useful about why, and never tries again, because as far as it is concerned the binary is there. A directory at that path is not exotic — an interrupted install, an `scp -r` aimed a level too high, or a hand-made `~/.local/share/tty7` all leave one. The same predicate guards `published_binary_serves_us`, and there it is deliberately not asserted: dropping it falls through to a probe that execs the path, which fails on a directory and reaches the same answer a round trip later. Equivalent in production, so a test would pin the fake rather than the behaviour. Also considered and left alone: `binary = added == "-" && removed == "-"` in the numstat parse. Git emits the two dashes together or not at all, so one without the other is input that cannot arrive.