v0.4.9: fix the two defects the 3-day trial found - #7
Merged
Conversation
Both came from watching real output over days, not from review. 1. Upgrading to 0.4.8 set off a false alarm on every listener. 0.4.8 began storing `*:5000` where older snapshots held `5000`; the diff compared them as opaque strings, so the first post-upgrade run reported 11 "changed listener" findings on the trial Mac and 3 on the Linux box — all ORANGE, all notifying, all false: the ports were identical. The listening diff now compares port sets when either side predates the change. Not a blanket exemption: a genuinely new port arriving with the migration is still reported, and once both sides carry addresses, 127.0.0.1:5000 -> *:5000 remains a real exposure finding. Both guarantees are tested, and both tests were mutation-checked. 2. The Linux installer promised a daily job it could not keep. `systemctl --user enable --now` succeeding proves only that a user manager exists at that moment, and it exists because you are logged in. With lingering off systemd tears it down at your last logout and the timer goes with it — so the installer printed a confident success for a job that goes dormant on exactly the machine that needs it most: a server nobody logs into. It now checks Linger after a successful enable and prints the one-line fix. Verified on a real Ubuntu box in both directions. Suite 689 -> 692. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two defects found by a three-day trial run on a real Mac and a real Ubuntu box — neither was findable by review or CI.
1. Upgrading to v0.4.8 set off a false alarm on every listener.
v0.4.8 started storing
*:5000where older snapshots held5000. The diff compared those as opaque strings, so the first run after upgrading reported 11 "changed listener" findings on the Mac and 3 on the Linux box — all ORANGE, all above the--notifythreshold, and every one false: the ports were identical. The v0.4.8 changelog predicted this churn and waved it through as harmless. It was not.The listening diff now compares what both sides actually express: when either side predates the change it compares port sets, so a pure representation change yields nothing. Deliberately not a blanket exemption —
127.0.0.1:5000→*:5000is a real exposure change and stays a finding.Both guarantees have tests, and both tests were mutation-checked (removing the fix, and over-applying it, each fail).
2. The Linux installer promised a daily job it could not keep.
systemctl --user enable --nowsucceeding proves only that a user manager exists at that moment — and it exists because you are logged in. With lingering off, systemd tears that manager down at your last logout and the timer goes with it, so the installer printed a confident "enabled systemd user timer" for a job that then goes dormant on exactly the machine that needs it most: a server nobody logs into. (Persistent=truedefers the run to the next login rather than losing it.)The installer now checks
loginctl show-user … -p Lingerafter a successful enable and prints the one-line fix. Verified on a real Ubuntu 24.04 box in both directions: the note appears withLinger=no, and is absent afterenable-linger.Suite 689 → 692.
🤖 Generated with Claude Code