Bug Description
Follow-up to #1314. GoldenRepoManager.golden_repos is a per-worker read cache. After #1314 it uses reload-on-miss (a repo absent from the cache is fetched from the shared DB), which fixes the cross-worker "not found" MISS bug. But the cache is never invalidated on a cross-node mutation (branch change, temporal-option change, or removal on another node). So a worker that has a repo cached can act on a STALE POSITIVE until it restarts.
Impact / Scope (bounded)
Per code review of #1314, the residual is bounded and non-corrupting:
Expected Behavior
Cross-node mutations (branch change / temporal-option change / removal) should be visible to all workers without a restart.
Remediation Options
(a) Have mutation-path ops (change_branch, add_indexes_to_golden_repo, get_golden_repo_indexes) read the backend authoritatively instead of trusting a cached positive; or (b) add a lightweight version/invalidation signal (e.g. a DB-backed generation counter checked per request, or invalidate-on-remove/change broadcast). Keep the reload-on-miss cache for the common read case.
Severity
priority-3. Rare, non-corrupting, self-healing; not a blocker. Tracked separately from the #1314 MISS fix per code-review recommendation.
Bug Description
Follow-up to #1314.
GoldenRepoManager.golden_reposis a per-worker read cache. After #1314 it uses reload-on-miss (a repo absent from the cache is fetched from the shared DB), which fixes the cross-worker "not found" MISS bug. But the cache is never invalidated on a cross-node mutation (branch change, temporal-option change, or removal on another node). So a worker that has a repo cached can act on a STALE POSITIVE until it restarts.Impact / Scope (bounded)
Per code review of #1314, the residual is bounded and non-corrupting:
get_actual_repo_path/add_indexes/get_golden_repo_indexesreadclone_path(immutable per alias); removed-elsewhere fails loud on the shared FS.change_branch/change_branch_asyncread a stale cacheddefault_branch, producing a false "already on branch" no-op or a redundant idempotent reindex — no data corruption.Expected Behavior
Cross-node mutations (branch change / temporal-option change / removal) should be visible to all workers without a restart.
Remediation Options
(a) Have mutation-path ops (
change_branch,add_indexes_to_golden_repo,get_golden_repo_indexes) read the backend authoritatively instead of trusting a cached positive; or (b) add a lightweight version/invalidation signal (e.g. a DB-backed generation counter checked per request, or invalidate-on-remove/change broadcast). Keep the reload-on-miss cache for the common read case.Severity
priority-3. Rare, non-corrupting, self-healing; not a blocker. Tracked separately from the #1314 MISS fix per code-review recommendation.