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
{{ message }}
Repository navigation
fix(cargo-target-broker): retain DB row when cache eviction fails #11417
infra/cargo-target-broker/bin/cargo_target_broker.py:265-282 chooses an idle LRU directory, calls shutil.rmtree(victim.path, ignore_errors=True), and then unconditionally deletes its dirs row and increments evictions. If removal fails (for example permissions or a filesystem error), the directory remains on disk but is no longer accounted for. The size cap can then be exceeded indefinitely; the orphan may later be re-adopted by adopt_strays (lines 236-255), repeating the accounting failure. The path is reachable through checkout() when the cache is over cap (line 320).
There are no tests for this broker module in the repository.
Suggested fix
Make eviction conditional on successful removal (surface/report failures and preserve the DB row), and add a test that injects a failed removal and verifies both the row and byte accounting remain intact.
Not enqueued in this pass: the dispatch explicitly prohibits creating/dispatching further tasks for findings.
Queue disposition: deliberately not enqueued because this dispatched suggestions pass explicitly prohibits creating or dispatching further tasks. The finding and proposed direction are captured above.
Activity
developing-today commentedon Nov 17, 2026
CODE-4125
dezren39 commentedon Nov 17, 2026
Queue disposition: deliberately not enqueued because this dispatched suggestions pass explicitly prohibits creating or dispatching further tasks. The finding and proposed direction are captured above.