Skip to content

Add incomplete-result signaling on parse failure #67

@bradjin8

Description

@bradjin8

Repository: cppa-cursor-browser
Assignee: Brad @bradjin8
Points: 3
Severity: High

Problem

When the bubble-processing pipeline encounters a parse failure, it silently returns a truncated result set. The API response contains no signal that data was dropped — a response listing 8 conversations may have silently omitted 3 others that failed to parse. Consumers of both the web UI and the HTTP API have no way to know whether they are seeing a complete or partial result. In a domain where Cursor's schema changes without notice, format drift will cause parse failures, and the current design will produce silently incomplete results with no operator visibility.

Acceptance Criteria

  • API responses that experienced parse failures include a structured field (e.g., "warnings": [{"type": "parse_error", "count": N, "detail": "..."}]) or equivalent metadata
  • The web UI displays a visible indicator when the displayed results are incomplete (e.g., a banner: "3 conversations could not be loaded")
  • The signaling mechanism is opt-in for API consumers (existing clients that don't check warnings are not broken)
  • At least 2 tests: one for clean results (no warnings), one for results with parse failures (warnings present)
  • Tests pass in CI
  • PR approved by at least 1 reviewer

Implementation Notes

Modify the service-layer functions in services/workspace_tabs.py and services/workspace_listing.py to return a result object or tuple that includes both the data and a list of errors/warnings, rather than just the data list. The API handlers in api/ can then include the warnings in the JSON response. For the web UI, the frontend JavaScript can check for the warnings field and display a notification banner. The SchemaError class already in the models layer provides a structured error pattern to follow — extend it or create a ParseWarning dataclass. This item depends on item 1 (replacing except-pass) — the logging and the signaling can be implemented together.

References

  • Eval finding: Test 7 (Misuse Resistance / Least Surprise) — part of the "Silent Failure Chain" compound
  • Related files: services/workspace_tabs.py, services/workspace_listing.py, api/workspaces.py, api/search.py

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions