Repository: cppa-cursor-browser
Assignee: Brad @bradjin8
Points: 3
Severity: High
Problem
Multiple from_dict call sites in the services layer use bare except Exception: pass to silently discard schema parse errors. The eval identifies services/workspace_listing.py as the primary offender, where failed composer parsing is caught and discarded with no log entry, no counter, and no signal to the operator. This is inconsistent with services/workspace_tabs.py, which logs the same class of error with context. The inconsistency is stamped across multiple call sites because the from_dict pattern is repeated manually across five model files. In a domain where the upstream Cursor schema is undocumented and changes without notice, silent data loss is the failure mode that most needs to be observable.
Acceptance Criteria
Implementation Notes
The affected files are in services/workspace_listing.py (primary) and potentially services/workspace_db.py. Follow the pattern already established in services/workspace_tabs.py which does log errors — standardize on that approach. Use Python's logging module rather than print(). Set the log level to WARNING for recoverable parse failures (the session is skipped but others continue). Include the raw dict's identifying key (e.g., composer ID, workspace ID) so operators can investigate which records failed. Do not change the control flow — continuing past failed records is correct behavior.
References
- Eval finding: Test 11 (Exception Safety) — part of the "Silent Failure Chain" compound
- Related files:
services/workspace_listing.py, services/workspace_tabs.py (reference pattern), services/workspace_db.py
Repository: cppa-cursor-browser
Assignee: Brad @bradjin8
Points: 3
Severity: High
Problem
Multiple
from_dictcall sites in the services layer use bareexcept Exception: passto silently discard schema parse errors. The eval identifiesservices/workspace_listing.pyas the primary offender, where failed composer parsing is caught and discarded with no log entry, no counter, and no signal to the operator. This is inconsistent withservices/workspace_tabs.py, which logs the same class of error with context. The inconsistency is stamped across multiple call sites because thefrom_dictpattern is repeated manually across five model files. In a domain where the upstream Cursor schema is undocumented and changes without notice, silent data loss is the failure mode that most needs to be observable.Acceptance Criteria
except Exception: passblocks atfrom_dictcall sites are replaced with structuredlogging.warning()orlogging.error()callslogging.getLogger(__name__)except: passorexcept Exception: passpatterns remain inservices/filescaplogfixture in pytest)Implementation Notes
The affected files are in
services/workspace_listing.py(primary) and potentiallyservices/workspace_db.py. Follow the pattern already established inservices/workspace_tabs.pywhich does log errors — standardize on that approach. Use Python'sloggingmodule rather thanprint(). Set the log level toWARNINGfor recoverable parse failures (the session is skipped but others continue). Include the raw dict's identifying key (e.g., composer ID, workspace ID) so operators can investigate which records failed. Do not change the control flow — continuing past failed records is correct behavior.References
services/workspace_listing.py,services/workspace_tabs.py(reference pattern),services/workspace_db.py