Skip to content

test(exa_search): add unit tests for the ExaSearchChannel doctor branches - #571

Closed
nyxst4ck wants to merge 1 commit into
Panniantong:mainfrom
nyxst4ck:test-exa-search-channel
Closed

test(exa_search): add unit tests for the ExaSearchChannel doctor branches#571
nyxst4ck wants to merge 1 commit into
Panniantong:mainfrom
nyxst4ck:test-exa-search-channel

Conversation

@nyxst4ck

@nyxst4ck nyxst4ck commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What

Dedicated offline tests for the exa_search channel — the channel had no dedicated test file. 6 tests covering:

  • can_handle: always False (search-only channel), pinned so a future URL route can't slip in silently
  • check() all five branches:
    • mcporter missing → off with both install prescriptions (npm install -g mcporter + mcporter config add exa)
    • unreadable mcporter config → error (and stale active_backend cleared)
    • exa present in config → warn, never ok — Doctor never probes the remote MCP, so config presence alone must not be sold as usable
    • editor imports left unexpanded → warn (credential-read boundary)
    • mcporter installed but Exa unconfigured → off with the exact add command

How

inspect_mcporter_config and shutil.which are stubbed at the channel module, so every branch runs offline and deterministic — same approach as the merged channel-test series.

Test plan

  • pytest tests/test_exa_search_channel.py -v → 6 passed
  • Full suite: 416 passed (the 10 failures in test_private_file_writes.py are pre-existing Windows symlink-permission failures on my machine, untouched by this PR)

Follow-up to #331 — continues the dedicated channel coverage series after rss (#360), github (#361), web (#363), reddit (#364), xueqiu (#365), v2ex (#366) and youtube (#367).

@Panniantong

Copy link
Copy Markdown
Owner

感谢补充 ExaSearchChannel Doctor 分支测试。merged #577 已在 tests/test_channels.py 覆盖 mcporter 缺失、配置错误、精确 server name、editor imports 与未配置路径,并同步了当前 Exa 工具契约,因此关闭此重复测试 PR。

@Panniantong Panniantong closed this Aug 6, 2026
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.

2 participants