Skip to content

Mark Pathfinder retrieval failures as degraded - #322

Open
joei4cm wants to merge 1 commit into
CopilotKit:mainfrom
joei4cm:fix/244-pathfinder-degraded-retrieval
Open

joei4cm wants to merge 1 commit into
CopilotKit:mainfrom
joei4cm:fix/244-pathfinder-degraded-retrieval

Conversation

@joei4cm

@joei4cm joei4cm commented Dec 3, 2026

Copy link
Copy Markdown

Closes #244.

PathfinderClient.searchCode() historically caught tool and transport failures and returned [], the same value as a successful search with no matches. The legacy pipeline therefore kept a docs-only answer at full confidence when the code index was unavailable. The docs path had a parallel ambiguity when semantic search and its plain-text fallback failed.

Add status-bearing docs and code searches returning { results, degraded }. They preserve failure separately from healthy empty searches while the existing array-returning methods remain compatible. Docs search still uses the plain-text fallback when MCP fails, and records that semantic retrieval degraded. The pipeline keeps whichever sources remain available, lowers a HIGH result below the HIGH threshold when retrieval failed, and exposes retrievalDegraded on PipelineResult for its direct docs/code path.

Tests:

  • Pathfinder and pipeline regression suites — 228/228 passed
  • AI package typecheck, ESLint, Prettier, git diff --check passed
  • Full AI suite: 3807 passed; one concurrency-sensitive GitHub evidence auth test failed on each of two runs (a different case each time). No failures in the changed Pathfinder or pipeline suites.
  • Built-in medium code-review fallback, authorized by the user because copilotkit-internal:cr-loop is unavailable; addressed its findings about tolerant code hits, successful empty responses, docs-status coverage, retrieval handoff reasons, and the field's SupportAgent scope.

🤖 Generated with Claude Code

Pathfinder returned [] for both a successful search with no matches and a
failed retrieval call. When one source was unavailable the legacy pipeline
could answer from the other source with full confidence.

Add status-bearing docs and code searches while retaining the array-returning
wrappers for existing callers. The pipeline keeps any surviving sources,
marks retrieval degradation on its result, and caps HIGH confidence so the
answer keeps its disclaimer. Docs MCP failures still use the plain-text
fallback, and the result records that semantic retrieval degraded.

Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

A Pathfinder outage is indistinguishable from an empty result set

1 participant