Skip to content

improvement(search): log the shape of each search and the source, kind, and size of each read - #10042

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/search-read-diagnostics
Nov 14, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/search-read-diagnostics

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Each live search summary now logs the shape of the request, never its text: query word count, sortBy, the date window in days (from the same bounds the providers receive), and per native query its provider, kind, browse mode, and whether it had text, modifiers, a cursor, a project, an account target, or term clauses. A queryIndex on a provider summary now resolves to a provider, and the shape is logged even when validation rejects the search
  • Each document read gets its own trace: a summary with the source, the document kind (bounded to a token, anything else logs as other), the full and returned character counts, hasMore, and whether it continued an earlier window, plus a provider summary with the read's request waterfall and stages. MCP reads log as surface: mcp; a copilot read joins its tool call's trace
  • Every trace summary logs the class of the failure that ended it (an orchestration code, provider_retryable / provider_error for read failures, or the existing network reasons), including when an outer tool call turns the error into a result. LiveReadError reports its class through diagnosticCode like NativeSearchError
  • Provider adapters can count fixed, content-free signals on their provider summary. Slack records how many channels it listed and what each in:#name channel lookup concluded (exists, missing, unresolved, lookup failed)

Type of Change

  • Improvement

Testing

  • New tests: request shape without text, modifiers, cursor or account; document kind bounding; failure class without message, including a failure swallowed by an outer tool call; read summary fields without title or text; Slack lookup signals. Each fails on the old code and passes on the new
  • lib/knowledge/search, lib/sim-search/live, lib/knowledge/mcp, and the copilot knowledge tools suites pass (631 tests); bun run lint clean

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 14, 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 Nov 14, 2026 6:53am 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 10 files

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

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds content-free search and document-read logs.

  • Live searches log request shape without logging the search text.
  • Each live document read leaves a trace of its source, size, and result window.
  • Slack search summaries count channel listings and channel-filter outcomes.

Reviews (2) · Last reviewed commit: "improvement(search): log a document kind..." · Reviewed by Greptile

@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 Nov 14, 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 10 files

Confidence score: 5/5

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

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 13949ec into staging Nov 14, 2026
80 checks passed

This branch was previously deployed

1 inactive deployment
Preview — d03fd9f2 Deployed Nov 14, 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