Skip to content

Report ignored documents distinctly#667

Open
fa1k3 wants to merge 2 commits into
tobi:mainfrom
fa1k3:fix/ignored-document-error
Open

Report ignored documents distinctly#667
fa1k3 wants to merge 2 commits into
tobi:mainfrom
fa1k3:fix/ignored-document-error

Conversation

@fa1k3
Copy link
Copy Markdown

@fa1k3 fa1k3 commented May 20, 2026

Summary

  • return a distinct excluded_by_ignore lookup result when a requested document matches a configured collection ignore rule
  • surface that reason through the MCP get tool, qmd:// resource, and CLI qmd get instead of presenting it as a generic missing file
  • route CLI qmd get through the shared document lookup path so missing/ignored paths no longer fall back to an unrelated same-basename file
  • add regression tests for absolute-path, virtual-path, CLI ignored-path, and CLI missing-path lookups

Why

If a file is intentionally excluded by an ignore rule, get currently looks the same as a typo or stale path. Returning the matched collection/path/rule makes the failure actionable without scanning the index manually.

The CLI also had a separate fallback that matched only the last path component. A request like private/log.md could return a different indexed *log.md file. Reusing the shared lookup avoids that surprising cross-path fallback.

Tests

  • bun test test/cli.test.ts --timeout 60000 --preload ./src/test-preload.ts
  • npm run test:node -- test/cli.test.ts
  • bun test test/store.test.ts test/mcp.test.ts --timeout 60000 --preload ./src/test-preload.ts
  • npm run test:node -- test/store.test.ts test/mcp.test.ts
  • bun run build
  • npm run test:types

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