Library.open now checks the user ID stored in metadata.json. When it is non-zero and differs from the client's, it deletes metadata.json and mldata/ and loads an empty store. The first refresh then runs from a zero cursor, and none of the other account's collections, files, keys or ML results are served. This can only happen with --cache-dir or an explicit cacheDirectory, because the default path already includes the user ID.
What the diff does not show:
A stored user ID of 0 is left alone. A saved cache always has one, since the first refresh that writes the file sets it.
Cached originals and thumbnails are kept. They are looked up by file ID through the store's records, so the other account's files cannot be reached once its records are gone. The README cache layout section now says this.
Because the store is now empty, the first refresh is awaited, the same as on a first run.
The new test in test/library/mldata.test.ts fills a cache as one account and opens it as another. It fails without the change.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/quak/issues/104.
`Library.open` now checks the user ID stored in `metadata.json`. When it is non-zero and differs from the client's, it deletes `metadata.json` and `mldata/` and loads an empty store. The first refresh then runs from a zero cursor, and none of the other account's collections, files, keys or ML results are served. This can only happen with `--cache-dir` or an explicit `cacheDirectory`, because the default path already includes the user ID.
What the diff does not show:
- A stored user ID of 0 is left alone. A saved cache always has one, since the first refresh that writes the file sets it.
- Cached originals and thumbnails are kept. They are looked up by file ID through the store's records, so the other account's files cannot be reached once its records are gone. The README cache layout section now says this.
- Because the store is now empty, the first refresh is awaited, the same as on a first run.
The new test in `test/library/mldata.test.ts` fills a cache as one account and opens it as another. It fails without the change.
Model: opus-5-5
When metadata.json in the cache directory was written for a different,
non-zero user ID than the client's, Library.open deletes it and mldata/
and loads an empty store, so the first refresh enumerates from 0 and none
of the other account's collections, files, keys or ML results are served.
Only reachable with --cache-dir or an explicit cacheDirectory.
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.
Fixes #104.
Library.opennow checks the user ID stored inmetadata.json. When it is non-zero and differs from the client's, it deletesmetadata.jsonandmldata/and loads an empty store. The first refresh then runs from a zero cursor, and none of the other account's collections, files, keys or ML results are served. This can only happen with--cache-diror an explicitcacheDirectory, because the default path already includes the user ID.What the diff does not show:
The new test in
test/library/mldata.test.tsfills a cache as one account and opens it as another. It fails without the change.Model: opus-5-5
PASS on
5afd7c4rebased ontonext2d05b53d.Model: opus-5-5
5afd7c4bd7to8689e00232