README: guard the daily cron scan against an unmounted disk (closes #175) #186

Merged
clawbot merged 1 commits from issue-175-readme-unmounted-disk into next 2026-11-11 09:37:10 +01:00
Collaborator

Closes #175. README only, as approved; no code changes.

What changed, in "Daily scan from cron":

  • One new sentence says why the line is guarded: an unmounted disk leaves its mount point empty, scan deletes every record under it, and the next scan reads every file on the disk again.
  • One sentence says to test the mount point of each disk at or below /srv, joined with &&, and /srv only when it is a mount point.
  • The cron line now runs scan inside if mountpoint -q /srv, which fits a host where /srv is itself a mount point. When the test fails it prints a disk is not mounted; scan of /srv skipped, which cron mails, and scans nothing.
  • The SFDUPES_DATABASE bullet now says to put the assignment directly before /usr/local/bin/sfdupes, since before if it is a syntax error.

Judgement calls:

  • The skip message says "a disk", not /srv, so it stays true when the test names several mount points.
  • The else branch prints its own line instead of falling through to tail, which would mail old log lines from an earlier scan.
  • mountpoint comes from util-linux, so the guard is Linux-only, as /etc/cron.d already is.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/sfdupes/issues/175. README only, as approved; no code changes. What changed, in "Daily scan from `cron`": - One new sentence says why the line is guarded: an unmounted disk leaves its mount point empty, `scan` deletes every record under it, and the next scan reads every file on the disk again. - One sentence says to test the mount point of each disk at or below `/srv`, joined with `&&`, and `/srv` only when it is a mount point. - The `cron` line now runs `scan` inside `if mountpoint -q /srv`, which fits a host where `/srv` is itself a mount point. When the test fails it prints `a disk is not mounted; scan of /srv skipped`, which `cron` mails, and scans nothing. - The `SFDUPES_DATABASE` bullet now says to put the assignment directly before `/usr/local/bin/sfdupes`, since before `if` it is a syntax error. Judgement calls: - The skip message says "a disk", not `/srv`, so it stays true when the test names several mount points. - The `else` branch prints its own line instead of falling through to `tail`, which would mail old log lines from an earlier scan. - `mountpoint` comes from util-linux, so the guard is Linux-only, as `/etc/cron.d` already is. Model: opus-5-5
clawbot added the needs-review label 2026-11-11 04:54:31 +01:00
clawbot self-assigned this 2026-11-11 04:54:33 +01:00
Author
Collaborator

FAIL (needs-rework).

  1. README.md, "Daily scan from cron", the bullet "To keep the database elsewhere, put SFDUPES_DATABASE=/path/to/db.sqlite before the command on the same line." The cron line now starts with if. A variable assignment placed before if is a shell syntax error, so a reader who follows the bullet gets a line that runs neither the test nor the scan. Acceptable: the bullet says the assignment goes directly before /usr/local/bin/sfdupes.
  2. README.md, the new paragraph above the cron line. The option approved on #175 is the guarded line plus "One sentence says why", and the owner added "let's not focus too much on the cron use case until post-1.0". The paragraph has six sentences. Two of them restate the line beneath it: "So the line below runs scan only when mountpoint reports /srv as mounted." and "Otherwise it prints a disk is not mounted; scan of /srv skipped, which cron mails, and scans nothing." Acceptable: one sentence of under 30 words saying why (an unmounted disk leaves its mount point empty, scan deletes every record under it, and the next scan reads every file on it again), then the sentence on further mount points, then "As the file /etc/cron.d/sfdupes:".

Judgement call: finding 2 reads the owner's "sure, update the readme" as approving the recommended option as written.

Model: opus-5-5

FAIL (needs-rework). 1. `README.md`, "Daily scan from `cron`", the bullet "To keep the database elsewhere, put `SFDUPES_DATABASE=/path/to/db.sqlite` before the command on the same line." The `cron` line now starts with `if`. A variable assignment placed before `if` is a shell syntax error, so a reader who follows the bullet gets a line that runs neither the test nor the scan. Acceptable: the bullet says the assignment goes directly before `/usr/local/bin/sfdupes`. 2. `README.md`, the new paragraph above the `cron` line. The option approved on https://git.eeqj.de/sneak/sfdupes/issues/175 is the guarded line plus "One sentence says why", and the owner added "let's not focus too much on the cron use case until post-1.0". The paragraph has six sentences. Two of them restate the line beneath it: "So the line below runs `scan` only when `mountpoint` reports `/srv` as mounted." and "Otherwise it prints `a disk is not mounted; scan of /srv skipped`, which `cron` mails, and scans nothing." Acceptable: one sentence of under 30 words saying why (an unmounted disk leaves its mount point empty, `scan` deletes every record under it, and the next scan reads every file on it again), then the sentence on further mount points, then "As the file `/etc/cron.d/sfdupes`:". Judgement call: finding 2 reads the owner's "sure, update the readme" as approving the recommended option as written. Model: opus-5-5
clawbot force-pushed issue-175-readme-unmounted-disk from d9e0a37b14 to 0a4db58fb4 2026-11-11 05:57:52 +01:00 Compare
Author
Collaborator
  1. Fixed: the bullet now says directly before /usr/local/bin/sfdupes.
  2. Fixed: one sentence says why, then the sentence on further mount points, then "As the file /etc/cron.d/sfdupes:".

Rebased onto next; the PR body now matches the reworked paragraph.

Model: opus-5-5

1. Fixed: the bullet now says directly before `/usr/local/bin/sfdupes`. 2. Fixed: one sentence says why, then the sentence on further mount points, then "As the file `/etc/cron.d/sfdupes`:". Rebased onto `next`; the PR body now matches the reworked paragraph. Model: opus-5-5
Author
Collaborator

FAIL (needs-rework).

  1. TODO.md, Completed Steps: the branch conflicts with current next, where #184 added its entry at the same place. Acceptable: rebase onto next and keep both entries, this one on top.
  2. README.md, "Daily scan from cron": the cron line and the sentence "For each other disk mounted below /srv, add && mountpoint -q and its mount point after the first test." both assume /srv is itself a mount point. Where /srv is a plain directory with disks mounted below it, mountpoint -q /srv always fails. The job then never scans, and every night it mails "a disk is not mounted", or nothing when the host cannot send mail. "each other disk" also first reads as "each other". Acceptable: replace that sentence with one of under 30 words saying the test names the mount point of each disk at or below /srv, joined with &&, and names /srv only when it is one.
  3. README.md, Description: "report and trees leave out a copy that was deleted after the scan." puts an exception in the opening. "Reading the reports" and "Goals" already say it. Acceptable: delete the sentence.

Judgement call: finding 3 is in text that #184 added; it is raised here because this PR changes README.md, and the opening of a changed README is reviewed with it.

Model: opus-5-5

FAIL (needs-rework). 1. `TODO.md`, Completed Steps: the branch conflicts with current `next`, where https://git.eeqj.de/sneak/sfdupes/pulls/184 added its entry at the same place. Acceptable: rebase onto `next` and keep both entries, this one on top. 2. `README.md`, "Daily scan from `cron`": the `cron` line and the sentence "For each other disk mounted below `/srv`, add `&& mountpoint -q` and its mount point after the first test." both assume `/srv` is itself a mount point. Where `/srv` is a plain directory with disks mounted below it, `mountpoint -q /srv` always fails. The job then never scans, and every night it mails "a disk is not mounted", or nothing when the host cannot send mail. "each other disk" also first reads as "each other". Acceptable: replace that sentence with one of under 30 words saying the test names the mount point of each disk at or below `/srv`, joined with `&&`, and names `/srv` only when it is one. 3. `README.md`, Description: "`report` and `trees` leave out a copy that was deleted after the scan." puts an exception in the opening. "Reading the reports" and "Goals" already say it. Acceptable: delete the sentence. Judgement call: finding 3 is in text that https://git.eeqj.de/sneak/sfdupes/pulls/184 added; it is raised here because this PR changes `README.md`, and the opening of a changed README is reviewed with it. Model: opus-5-5
clawbot force-pushed issue-175-readme-unmounted-disk from 0a4db58fb4 to f90398182f 2026-11-11 06:28:07 +01:00 Compare
Author
Collaborator
  1. Fixed: rebased onto next; both Completed Steps entries kept, this one on top.
  2. Fixed: the sentence now reads "Test the mount point of each disk at or below /srv with its own mountpoint -q, joined with &&, and test /srv only when it is one."
  3. Fixed: sentence deleted.

The PR body now matches.

Model: opus-5-5

1. Fixed: rebased onto `next`; both Completed Steps entries kept, this one on top. 2. Fixed: the sentence now reads "Test the mount point of each disk at or below `/srv` with its own `mountpoint -q`, joined with `&&`, and test `/srv` only when it is one." 3. Fixed: sentence deleted. The PR body now matches. Model: opus-5-5
clawbot force-pushed issue-175-readme-unmounted-disk from f90398182f to 9a1b9cdbee 2026-11-11 07:55:37 +01:00 Compare
Author
Collaborator
  1. Fixed again: rebased onto next, which gained two Completed Steps entries after the last rework; all kept, this one on top.
  2. No change needed: the sentence stands after the rebase.
  3. Already in next: the --help change (#189) deleted the same sentence, so this commit no longer touches the Description; the commit message and PR body drop it.

Model: opus-5-5

1. Fixed again: rebased onto `next`, which gained two Completed Steps entries after the last rework; all kept, this one on top. 2. No change needed: the sentence stands after the rebase. 3. Already in `next`: the `--help` change (https://git.eeqj.de/sneak/sfdupes/pulls/189) deleted the same sentence, so this commit no longer touches the Description; the commit message and PR body drop it. Model: opus-5-5
Author
Collaborator

PASS: the cron section now says what an unmounted disk does to the database and guards the scan as approved on #175.

Model: opus-5-5

PASS: the `cron` section now says what an unmounted disk does to the database and guards the scan as approved on https://git.eeqj.de/sneak/sfdupes/issues/175. Model: opus-5-5
Author
Collaborator

For the reworker: this PR passed review but now conflicts with next after other merges. Rebase onto next, resolve the conflicts keeping both sides' intent, run make check, push. Change nothing else.

Model: opus-5-5

For the reworker: this PR passed review but now conflicts with `next` after other merges. Rebase onto `next`, resolve the conflicts keeping both sides' intent, run `make check`, push. Change nothing else. Model: opus-5-5
clawbot force-pushed issue-175-readme-unmounted-disk from 9a1b9cdbee to 107b67bdd9 2026-11-11 08:38:42 +01:00 Compare
Author
Collaborator
  1. Rebased onto next: the only conflict was TODO.md Completed Steps, where the dwim scan-flags entry (#162) landed; both entries kept, this one on top. Nothing else changed.

Model: opus-5-5

1. Rebased onto `next`: the only conflict was `TODO.md` Completed Steps, where the `dwim` scan-flags entry (https://git.eeqj.de/sneak/sfdupes/issues/162) landed; both entries kept, this one on top. Nothing else changed. Model: opus-5-5
Author
Collaborator

For the reworker: this PR passed review but now conflicts with next after other merges. Rebase onto next, resolve the conflicts keeping both sides' intent, run make check, push. Change nothing else.

Model: opus-5-5

For the reworker: this PR passed review but now conflicts with `next` after other merges. Rebase onto `next`, resolve the conflicts keeping both sides' intent, run `make check`, push. Change nothing else. Model: opus-5-5
clawbot added 1 commit 2026-11-11 09:09:10 +01:00
A disk that is not mounted leaves its mount point an empty directory.
scan then deletes every record under it, and the next scan reads every
file again. The README now says so. Its cron line runs scan only when
mountpoint finds the disks mounted, and one sentence says which mount
points to test.

Model: opus-5-5
clawbot force-pushed issue-175-readme-unmounted-disk from 107b67bdd9 to 9c7c5ee1dc 2026-11-11 09:09:10 +01:00 Compare
Author
Collaborator
  1. Rebased onto next: the only conflict was TODO.md, where #180 removed the Completed Steps section. Took next's TODO.md unchanged, so the commit now touches only README.md; the PR body drops its TODO.md line. Nothing else changed.

Model: opus-5-5

1. Rebased onto `next`: the only conflict was `TODO.md`, where https://git.eeqj.de/sneak/sfdupes/pulls/180 removed the Completed Steps section. Took `next`'s `TODO.md` unchanged, so the commit now touches only `README.md`; the PR body drops its `TODO.md` line. Nothing else changed. Model: opus-5-5
clawbot merged commit 58d27a6df3 into next 2026-11-11 09:37:10 +01:00
Sign in to join this conversation.