Commit cd8af93e07
Verified · cmc
Layout: unified · split
docs/specs/2026-09-04-wiki-in-repo-design.md +16 −6
| @@ -57,12 +57,22 @@ but the parity gain is conditional and should not be claimed otherwise. | ||
| 57 | 57 | |
| 58 | 58 | ### Phase 1 — path filters (#169) |
| 59 | 59 | |
| 60 | `ci.Job` gains `Paths` and `PathsIgnore`, each a list of globs matched with | |
| 61 | `path.Match` against the changed-file list from `gitutil.DiffFiles(dir, old, | |
| 62 | new)`, which already exists (`internal/gitutil/merge.go:276`). | |
| 63 | ||
| 64 | A job runs when its `Paths` is empty or at least one changed file matches it, | |
| 65 | and no `PathsIgnore` pattern matches every changed file. | |
| 60 | `ci.Job` gains `Paths` and `PathsIgnore`, each a list of globs matched against | |
| 61 | the changed-file list from `gitutil.DiffFiles(dir, old, new)`, which already | |
| 62 | exists (`internal/gitutil/merge.go:276`). | |
| 63 | ||
| 64 | **Matching.** `path.Match` alone is not enough: Go's `*` does not cross `/`, so | |
| 65 | `.gitbay/wiki/**` matches `.gitbay/wiki/Home.md` but not | |
| 66 | `.gitbay/wiki/sub/Page.md` — a filter that appears to work and quietly misses | |
| 67 | nested files. Define it explicitly: a pattern ending in `/**` matches that | |
| 68 | directory and everything beneath it at any depth, implemented as a prefix | |
| 69 | check; every other pattern goes to `path.Match` against the full path. A test | |
| 70 | must cover the nested case, since that is the one a reader will assume works. | |
| 71 | ||
| 72 | **Selection.** A job runs when `Paths` is empty or at least one changed file | |
| 73 | matches one of its patterns. It is then skipped only when every changed file | |
| 74 | matches at least one `PathsIgnore` pattern. A push touching one ignored file | |
| 75 | and one other file runs the job. | |
| 66 | 76 | |
| 67 | 77 | **Fail open.** A job runs whenever the filter cannot be evaluated: a new branch |
| 68 | 78 | with no diff base (`old` is empty or all zeros), a `DiffFiles` error, or a job |