mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 17:22:36 +00:00
LockedListProxy and LockedDictProxy subclass `list` and `dict` but initialize the parent as empty (`super().__init__()`), delegating all access to an internal `self._list` / `self._dict`. However, several inherited methods were not overridden, causing them to silently operate on the empty parent instead of the real data. Most critically, `list.index()` always raises `ValueError` because it searches the empty parent list. Other broken methods include `count()` (always returns 0), `sort()`/`reverse()` (no-ops), `copy()` (returns empty), and arithmetic operators (`+`, `*`). All mutating operations acquire the lock; read-only operations delegate directly to the underlying collection, consistent with existing pattern.