attrsum check --continue is documented (README, flag help) as checking every file and keeping going after errors. It stops at the first file it cannot read. checkOne in attrsum.go returns the error from fileMultihash (for example permission denied) and from xattr.Get (any error other than "no such attribute") whatever cont says, and filepath.Walk then ends the walk. The files after it are never checked, and the summary under-reports.
Implementation
With --continue, a file that cannot be read, or whose checksum attribute cannot be read, counts as failed, is reported on stderr with its path and the error, and the walk goes on. A directory that cannot be listed is handled the same way.
Without --continue, behaviour is unchanged: the first error stops the run.
Either way the command exits non-zero when anything failed.
A test: a tree with an unreadable file between readable ones; check --continue verifies the readable ones, counts one failure, and returns an error. The tests already run as an unprivileged user in the Dockerfile, so the permission error is real there.
TODO.md updated in the same change.
Definition of done
The test above passes, and fails on the current code.
make check and script/cibuild pass. PR to next, independent review, squash.
Model: opus-5-5
`attrsum check --continue` is documented (README, flag help) as checking every file and keeping going after errors. It stops at the first file it cannot read. `checkOne` in `attrsum.go` returns the error from `fileMultihash` (for example permission denied) and from `xattr.Get` (any error other than "no such attribute") whatever `cont` says, and `filepath.Walk` then ends the walk. The files after it are never checked, and the summary under-reports.
## Implementation
- With `--continue`, a file that cannot be read, or whose checksum attribute cannot be read, counts as failed, is reported on stderr with its path and the error, and the walk goes on. A directory that cannot be listed is handled the same way.
- Without `--continue`, behaviour is unchanged: the first error stops the run.
- Either way the command exits non-zero when anything failed.
- A test: a tree with an unreadable file between readable ones; `check --continue` verifies the readable ones, counts one failure, and returns an error. The tests already run as an unprivileged user in the `Dockerfile`, so the permission error is real there.
- `TODO.md` updated in the same change.
## Definition of done
- The test above passes, and fails on the current code.
- `make check` and `script/cibuild` pass. PR to `next`, independent review, squash.
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.
attrsum check --continueis documented (README, flag help) as checking every file and keeping going after errors. It stops at the first file it cannot read.checkOneinattrsum.goreturns the error fromfileMultihash(for example permission denied) and fromxattr.Get(any error other than "no such attribute") whatevercontsays, andfilepath.Walkthen ends the walk. The files after it are never checked, and the summary under-reports.Implementation
--continue, a file that cannot be read, or whose checksum attribute cannot be read, counts as failed, is reported on stderr with its path and the error, and the walk goes on. A directory that cannot be listed is handled the same way.--continue, behaviour is unchanged: the first error stops the run.check --continueverifies the readable ones, counts one failure, and returns an error. The tests already run as an unprivileged user in theDockerfile, so the permission error is real there.TODO.mdupdated in the same change.Definition of done
make checkandscript/cibuildpass. PR tonext, independent review, squash.Model: opus-5-5