fix(thread-safety): lock disc_entries reads/writes in HookServer, remove debug logs

This commit is contained in:
2026-03-02 10:37:33 -05:00
parent eb293f3c96
commit 57efca4f9b
3 changed files with 5 additions and 5 deletions

View File

@@ -792,7 +792,6 @@ class App:
with self._disc_entries_lock:
self.disc_entries = _parse_history_entries(disc_data.get("history", []), self.disc_roles)
self.ai_status = f"discussion: {name}"
sys.stderr.write(f'[DEBUG] Switched to {name}. disc_entries len: {len(self.disc_entries)}\n')
def _flush_disc_entries_to_project(self) -> None:
history_strings = [project_manager.entry_to_str(e) for e in self.disc_entries]
@@ -1069,7 +1068,6 @@ class App:
disc_data["last_updated"] = project_manager.now_ts()
with self._disc_entries_lock:
self.disc_entries.append(item)
print(f'[DEBUG] Added to disc_entries. Current len: {len(self.disc_entries)}')
def _handle_approve_script(self) -> None:
"""Logic for approving a pending script via API hooks."""