Bug. An exclude pattern that does not compile, in exclude or in a snapshot's exclude, is skipped with a log warning during the backup (compileExcludePatterns in internal/snapshot/scanner.go). The config still loads, and the backup goes on to store what the user meant to leave out. A set but invalid config value must fail loudly at startup.
Definition of done
Config.Validate in internal/config refuses an exclude pattern that does not compile, naming the setting (exclude[2] or snapshots.home.exclude[0]) and quoting the pattern. It uses the same compile step as the scanner, through one shared function, so the two cannot disagree.
With every pattern checked at load, the scanner no longer needs its skip-and-warn path. Remove it.
A test that fails on current next loads a config with a pattern that does not compile, both in the global and in a snapshot's exclude, and checks the error.
Add nothing to docs/TODO.md. Change no README.md text unless a sentence becomes false; #399 rewrites the README.
make check passes.
Package. The compile step moves to a function both internal/config and internal/snapshot can call. Put it in internal/config, which internal/snapshot already imports.
Model: opus-5-5
Found by the review of https://git.eeqj.de/sneak/vaultik/pulls/399 (https://git.eeqj.de/sneak/vaultik/pulls/399#issuecomment-178232).
**Bug.** An exclude pattern that does not compile, in `exclude` or in a snapshot's `exclude`, is skipped with a log warning during the backup (`compileExcludePatterns` in `internal/snapshot/scanner.go`). The config still loads, and the backup goes on to store what the user meant to leave out. A set but invalid config value must fail loudly at startup.
**Definition of done**
- `Config.Validate` in `internal/config` refuses an exclude pattern that does not compile, naming the setting (`exclude[2]` or `snapshots.home.exclude[0]`) and quoting the pattern. It uses the same compile step as the scanner, through one shared function, so the two cannot disagree.
- With every pattern checked at load, the scanner no longer needs its skip-and-warn path. Remove it.
- A test that fails on current `next` loads a config with a pattern that does not compile, both in the global and in a snapshot's `exclude`, and checks the error.
- Add nothing to `docs/TODO.md`. Change no `README.md` text unless a sentence becomes false; https://git.eeqj.de/sneak/vaultik/pulls/399 rewrites the README.
- `make check` passes.
**Package.** The compile step moves to a function both `internal/config` and `internal/snapshot` can call. Put it in `internal/config`, which `internal/snapshot` already imports.
Model: opus-5-5
clawbot
self-assigned this 2026-11-11 09:18:05 +01:00
Built in #456: Config.Validate refuses an exclude pattern that does not compile, global or per snapshot, naming the setting and quoting the pattern. The compile step is now config.CompileExcludePattern, shared with the scanner; the scanner's skip-and-warn path is gone.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/vaultik/pulls/456: `Config.Validate` refuses an exclude pattern that does not compile, global or per snapshot, naming the setting and quoting the pattern. The compile step is now `config.CompileExcludePattern`, shared with the scanner; the scanner's skip-and-warn path is gone.
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.
Found by the review of #399 (#399 (comment)).
Bug. An exclude pattern that does not compile, in
excludeor in a snapshot'sexclude, is skipped with a log warning during the backup (compileExcludePatternsininternal/snapshot/scanner.go). The config still loads, and the backup goes on to store what the user meant to leave out. A set but invalid config value must fail loudly at startup.Definition of done
Config.Validateininternal/configrefuses an exclude pattern that does not compile, naming the setting (exclude[2]orsnapshots.home.exclude[0]) and quoting the pattern. It uses the same compile step as the scanner, through one shared function, so the two cannot disagree.nextloads a config with a pattern that does not compile, both in the global and in a snapshot'sexclude, and checks the error.docs/TODO.md. Change noREADME.mdtext unless a sentence becomes false; #399 rewrites the README.make checkpasses.Package. The compile step moves to a function both
internal/configandinternal/snapshotcan call. Put it ininternal/config, whichinternal/snapshotalready imports.Model: opus-5-5
Built in #456:
Config.Validaterefuses an exclude pattern that does not compile, global or per snapshot, naming the setting and quoting the pattern. The compile step is nowconfig.CompileExcludePattern, shared with the scanner; the scanner's skip-and-warn path is gone.Model: opus-5-5