EverOS icon indicating copy to clipboard operation
EverOS copied to clipboard

IndexRepository: retire scope-blind read methods (find_by_owner, …)

Open gloryfromca opened this issue 1 month ago • 1 comments

The primary-key fix removes get_by_id from IndexRepository because id is unique only within (app_id, project_id). find_by_owner(owner_id, *, limit) (infra/persistence/index/protocols.py) has the same blind spot — it reads across every app/project for an owner — and currently has no caller in src/ besides the router pass-through.

Remove it (and any sibling that addresses rows without scope) or give it scope parameters. Left out of the fix on purpose: zero callers, not on the bleeding path.

gloryfromca avatar Oct 09 '26 08:10 gloryfromca

I'd like to take this. Since find_by_owner has no callers in src/, I'd remove it from the protocol, router, and both backends, keeping the scoped find_by_owner_entry / find_by_owner_entries as the only read paths. OK?

chuiwenwei avatar Oct 18 '26 11:10 chuiwenwei