mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-28 14:59:47 +00:00
resolveHardExcludes() only ran at DB-query build time (cache miss), so query_cache rows written by a process without GBRAIN_SEARCH_EXCLUDE could be served to a process with it (and vice versa), leaking excluded slugs. hybridSearchCached now resolves the effective hard-exclude list exactly as the engines' query-build path does and folds it (sorted, append-only hx= part) into knobsHash via a new KnobsHashContext.hardExcludes field. KNOBS_HASH_VERSION 11 -> 12: one-time global cache cold-miss on upgrade, refills within cache.ttl_seconds. Co-authored-by: Sinabina <sinabina@Sinabinas-MacBook-Pro-4.local> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>