Skip to content

fix(search): return actionable live read errors and drop unreadable Confluence matches - #8888

Merged
waleedlatif1 merged 6 commits into
stagingfrom
fix/live-read-errors
Oct 10, 2026
Merged

waleedlatif1 merged 6 commits into
stagingfrom
fix/live-read-errors

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • read_document turned every provider-side read failure into the generic "Knowledge operation failed", because NativeSearchError escaped readLiveDocument without being classified. Reads now return errors the model can act on:
    • a 404 or 410 becomes not_found, with a hint to search again or read a different result;
    • a revoked grant becomes unauthorized, naming the provider to reconnect;
    • rate limits, 5xx responses, provider timeouts, MCP request timeouts and the 15 s read deadline become a retryable LiveReadError.
  • The Assistant read_document tool now reports retryable (and retryAfterSeconds when set), the same way search_workspace does. The Search MCP read_document returns the classified message instead of the generic text.
  • Confluence search labeled every non-blogpost CQL hit a page. Native CQL that matched attachments, comments, whiteboards, folders or databases therefore produced references whose v2 page read returns 404. Those kinds are now dropped, and the result message says so.

Test plan

  • application.test.ts: covers 404, reconnect, rate limit, 503 and MCP timeout. All five fail with the fix reverted.
  • atlassian.test.ts: covers native CQL matches that a page read can't open. It fails with the fix reverted.
  • Focused suites pass locally: application, atlassian, policy, workspace-search, mcp server.
  • CI

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 10, 2026 9:25pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/sim-search/live/application.ts
Comment thread apps/sim/lib/sim-search/live/atlassian.ts
@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issue was found.

Summary

This PR gives callers clearer live document read errors and removes Confluence matches that the reader cannot open.

  • Live document reads tell callers what to do when a provider fails.
  • Confluence search returns only matches its reader can open.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Live document read fails] --> B{Caller cancelled?}
  B -->|Yes| C[Keep cancellation unchanged]
  B -->|No| D{Failure kind}
  D -->|Missing document| E[Search again or choose another result]
  D -->|Revoked grant| F[Reconnect provider]
  D -->|Temporary failure| G[Return retry guidance]
  D -->|Other failure| H[Keep existing error path]
  G --> I[Assistant receives retryable fields]
  G --> J[MCP receives actionable text]
Loading

Reviews (4) · Last reviewed commit: "fix(search): treat a provider 408 as a r..." · Reviewed by Greptile

Comment thread apps/sim/lib/sim-search/live/application.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/sim-search/live/application.ts
…onfluence matches

read_document collapsed every provider-side read failure into the generic
'Knowledge operation failed' because NativeSearchError escaped readLiveDocument
unclassified. Reads now map a 404/410 to not_found with a search-again hint, a
revoked grant to unauthorized naming the provider, and rate limits, 5xx,
provider timeouts, MCP request timeouts and the read deadline to a retryable
LiveReadError that the Assistant tool reports with retryable (and
retryAfterSeconds) like search_workspace.

Confluence search labeled every non-blogpost CQL hit a page, so native CQL
matching attachments, comments, whiteboards, folders or databases produced
references whose v2 page read 404s. Those kinds are now dropped and the page
message says so.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 558d96d into staging Oct 10, 2026
48 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/live-read-errors branch October 10, 2026 22:04

This branch was previously deployed

1 inactive deployment
Preview — 3c257501 Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant