Commit 3293a3e
committed
fix(index): keep the snapshot store out of the index-repo namespace
Verifying the guard on a real refresh showed it working — three index trees
archived, 3.2 MB, snapshot ids being the upstream commit shas — and also showed
where I had put the store: `<home>/registry/data/.index-snapshots`, i.e. inside
the directory that IS the index-repo namespace.
Everything that enumerates index repos does it by listing subdirectories of
`data/`. Fetcher::sorted_index_dirs returns every one of them with no filter,
and xlings walks the same tree. The store was being handed to those scanners as
if it were an index.
It happens to be harmless today: the store has no `pkgs/`, so a descriptor
lookup stats a path that does not exist and moves on. That is a property of
someone else's loop, not of this design, and it would stop holding the moment
the store's internal layout changed or a scanner started matching on something
other than `pkgs/`.
The store is now a sibling of the data root — `<home>/registry/index-snapshots`
— where no index scanner can reach it. The defensive skip in `index_dirs` stays:
that loop decides what gets archived, and an archive of the archive is the one
mistake that would grow without bound.
Verified on a real refresh: `data/` clean, store in the new location, same
3.2 MB. unit 55/55, e2e 176 passed / 0 failed.1 parent e01e6bf commit 3293a3e
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
67 | 77 | | |
68 | 78 | | |
69 | 79 | | |
| |||
187 | 197 | | |
188 | 198 | | |
189 | 199 | | |
190 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
191 | 205 | | |
192 | 206 | | |
193 | 207 | | |
| |||
212 | 226 | | |
213 | 227 | | |
214 | 228 | | |
215 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
216 | 233 | | |
217 | 234 | | |
218 | 235 | | |
| |||
0 commit comments