You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found by: the PR #149 fix-forward (a new test perturbed a stale-cache hit into a non-deterministic ubuntu-py3.13 CI failure).
db/features.py's feature-probe cache is keyed by id() of the connection object. Python reuses id() values after an object is garbage-collected — so a new connection can collide with a GC'd one's cache entry and read stale feature-probe results (e.g. "sqlite-vec available" / FTS5 tokenizer support) for the wrong connection. This is non-deterministic and surfaced as a flaky test in #149 (worked around there by clearing the cache in the test db fixture — a band-aid, not a fix).
Fix: key the cache on something stable for the connection's lifetime (e.g. the resolved DB path + role, or a per-connection attribute set at open time) instead of id(). Audit for the same id()-keying pattern elsewhere.
Found by: the PR #149 fix-forward (a new test perturbed a stale-cache hit into a non-deterministic
ubuntu-py3.13CI failure).db/features.py's feature-probe cache is keyed byid()of the connection object. Python reusesid()values after an object is garbage-collected — so a new connection can collide with a GC'd one's cache entry and read stale feature-probe results (e.g. "sqlite-vec available" / FTS5 tokenizer support) for the wrong connection. This is non-deterministic and surfaced as a flaky test in #149 (worked around there by clearing the cache in the testdbfixture — a band-aid, not a fix).Fix: key the cache on something stable for the connection's lifetime (e.g. the resolved DB path + role, or a per-connection attribute set at open time) instead of
id(). Audit for the sameid()-keying pattern elsewhere.Target: v0.2.0.