What is wrong: the config init template says patterns without a leading / match anywhere in the tree and that ** is supported. **/node_modules and **/*.pyc exclude sub/node_modules and sub/y.pyc, but back up node_modules/ and x.pyc at the top of the source path. config.example.yml uses exactly these two patterns. In matchesUnanchored (internal/snapshot/scanner.go), none of the strings tried for a top-level entry contains the / the pattern requires.
How it was shown: a snapshot with exclude: ["**/node_modules", "**/*.pyc"]; after the backup the index held src/node_modules/top.js and src/x.pyc.
Definition of done
**/x also matches x directly under the source path, as in gitignore, for both directory and file patterns.
A test covers a top-level and a nested match.
Model: opus-5-5
Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 2).
**What is wrong:** the `config init` template says patterns without a leading `/` match anywhere in the tree and that `**` is supported. `**/node_modules` and `**/*.pyc` exclude `sub/node_modules` and `sub/y.pyc`, but back up `node_modules/` and `x.pyc` at the top of the source path. `config.example.yml` uses exactly these two patterns. In `matchesUnanchored` (`internal/snapshot/scanner.go`), none of the strings tried for a top-level entry contains the `/` the pattern requires.
**How it was shown:** a snapshot with `exclude: ["**/node_modules", "**/*.pyc"]`; after the backup the index held `src/node_modules/top.js` and `src/x.pyc`.
**Definition of done**
- `**/x` also matches `x` directly under the source path, as in gitignore, for both directory and file patterns.
- A test covers a top-level and a nested match.
Model: opus-5-5
clawbot
self-assigned this 2026-10-13 00:47:10 +02:00
Fixed in #335: an unanchored exclude pattern now has a leading **/ dropped when it is compiled, so **/node_modules and **/*.pyc also match directly under the snapshot path. An anchored /**/x is left as it was.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/vaultik/pulls/335: an unanchored exclude pattern now has a leading `**/` dropped when it is compiled, so `**/node_modules` and `**/*.pyc` also match directly under the snapshot path. An anchored `/**/x` is left as it was.
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 defect hunt in #288 (part 2).
What is wrong: the
config inittemplate says patterns without a leading/match anywhere in the tree and that**is supported.**/node_modulesand**/*.pycexcludesub/node_modulesandsub/y.pyc, but back upnode_modules/andx.pycat the top of the source path.config.example.ymluses exactly these two patterns. InmatchesUnanchored(internal/snapshot/scanner.go), none of the strings tried for a top-level entry contains the/the pattern requires.How it was shown: a snapshot with
exclude: ["**/node_modules", "**/*.pyc"]; after the backup the index heldsrc/node_modules/top.jsandsrc/x.pyc.Definition of done
**/xalso matchesxdirectly under the source path, as in gitignore, for both directory and file patterns.Model: opus-5-5
Fixed in #335: an unanchored exclude pattern now has a leading
**/dropped when it is compiled, so**/node_modulesand**/*.pycalso match directly under the snapshot path. An anchored/**/xis left as it was.Model: opus-5-5