Two defects in findDCFMountPoints (pkg/dcf/helpers.go), found while bringing the repo to standards. Both predate that work and its PR leaves the behaviour exactly as it was, because deciding either is a behaviour change rather than a lint fix.
1. The marker directory checked is M4ROOT, not PRIVATE/M4ROOT.
The original code computed filepath.Join(mountpoint, "PRIVATE") and then immediately overwrote it with filepath.Join(mountpoint, "M4ROOT"), so only the second was ever stat'd. That dead store was a lint finding and had to go; the surviving check is the one that was live, so a Sony card is detected only if it happens to have M4ROOT at the filesystem root. README and the spec both say the directory is PRIVATE/M4ROOT.
2. requestedCount returns one fewer store than asked for.
The loop breaks on len(filteredMountpoints)+1 >= requestedCount, so requestedCount == 2 returns 1 store and requestedCount == 3 returns 2. Only requestedCount == 1 and 0 (all) behave as documented.
Both want a decision about intended behaviour, plus a test each.
Two defects in `findDCFMountPoints` (`pkg/dcf/helpers.go`), found while bringing the repo to standards. Both predate that work and its PR leaves the behaviour exactly as it was, because deciding either is a behaviour change rather than a lint fix.
**1. The marker directory checked is `M4ROOT`, not `PRIVATE/M4ROOT`.**
The original code computed `filepath.Join(mountpoint, "PRIVATE")` and then immediately overwrote it with `filepath.Join(mountpoint, "M4ROOT")`, so only the second was ever stat'd. That dead store was a lint finding and had to go; the surviving check is the one that was live, so a Sony card is detected only if it happens to have `M4ROOT` at the filesystem root. README and the spec both say the directory is `PRIVATE/M4ROOT`.
**2. `requestedCount` returns one fewer store than asked for.**
The loop breaks on `len(filteredMountpoints)+1 >= requestedCount`, so `requestedCount == 2` returns 1 store and `requestedCount == 3` returns 2. Only `requestedCount == 1` and `0` (all) behave as documented.
Both want a decision about intended behaviour, plus a test each.
Plan. The repo's own documents settle both points, so this needs no decision from sneak.
Marker path. The README says cameras put files in DCIM and PRIVATE/M4ROOT. Keep a mount point when it has DCIM or PRIVATE/M4ROOT at its root; drop the check for a bare M4ROOT at the root. Fix the function comment to match.
Count. The function comment says the argument is how many mount points to return, 0 meaning all. Return exactly that many when at least that many match.
Return the error from listing partitions instead of discarding it, if the standards PR (#1) has not already.
Tests: split the per-mount-point check and the counting from the partition listing, so a test can hand it temporary directories. Cases: a directory with only PRIVATE/M4ROOT is kept; one with only a root M4ROOT is not; one with DCIM is kept; with three matching directories, asking for 0, 1, 2 and 3 returns 3, 1, 2 and 3.
Depends on #1 (no make check before it). Done: those tests pass under make check; README, comment and code agree.
Model: opus-5-5
Plan. The repo's own documents settle both points, so this needs no decision from sneak.
1. **Marker path.** The README says cameras put files in `DCIM` and `PRIVATE/M4ROOT`. Keep a mount point when it has `DCIM` or `PRIVATE/M4ROOT` at its root; drop the check for a bare `M4ROOT` at the root. Fix the function comment to match.
2. **Count.** The function comment says the argument is how many mount points to return, 0 meaning all. Return exactly that many when at least that many match.
3. Return the error from listing partitions instead of discarding it, if the standards PR (https://git.eeqj.de/sneak/dcf/issues/1) has not already.
Tests: split the per-mount-point check and the counting from the partition listing, so a test can hand it temporary directories. Cases: a directory with only `PRIVATE/M4ROOT` is kept; one with only a root `M4ROOT` is not; one with `DCIM` is kept; with three matching directories, asking for 0, 1, 2 and 3 returns 3, 1, 2 and 3.
Depends on https://git.eeqj.de/sneak/dcf/issues/1 (no `make check` before it). Done: those tests pass under `make check`; README, comment and code agree.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Two defects in
findDCFMountPoints(pkg/dcf/helpers.go), found while bringing the repo to standards. Both predate that work and its PR leaves the behaviour exactly as it was, because deciding either is a behaviour change rather than a lint fix.1. The marker directory checked is
M4ROOT, notPRIVATE/M4ROOT.The original code computed
filepath.Join(mountpoint, "PRIVATE")and then immediately overwrote it withfilepath.Join(mountpoint, "M4ROOT"), so only the second was ever stat'd. That dead store was a lint finding and had to go; the surviving check is the one that was live, so a Sony card is detected only if it happens to haveM4ROOTat the filesystem root. README and the spec both say the directory isPRIVATE/M4ROOT.2.
requestedCountreturns one fewer store than asked for.The loop breaks on
len(filteredMountpoints)+1 >= requestedCount, sorequestedCount == 2returns 1 store andrequestedCount == 3returns 2. OnlyrequestedCount == 1and0(all) behave as documented.Both want a decision about intended behaviour, plus a test each.
Plan. The repo's own documents settle both points, so this needs no decision from sneak.
DCIMandPRIVATE/M4ROOT. Keep a mount point when it hasDCIMorPRIVATE/M4ROOTat its root; drop the check for a bareM4ROOTat the root. Fix the function comment to match.Tests: split the per-mount-point check and the counting from the partition listing, so a test can hand it temporary directories. Cases: a directory with only
PRIVATE/M4ROOTis kept; one with only a rootM4ROOTis not; one withDCIMis kept; with three matching directories, asking for 0, 1, 2 and 3 returns 3, 1, 2 and 3.Depends on #1 (no
make checkbefore it). Done: those tests pass undermake check; README, comment and code agree.Model: opus-5-5
State, 2026-10-03: queued behind #1, not dispatched. The plan above is the worker's brief.
Model: opus-5-5