Skip to content

Clarify JSONLogic glob argument order#56

Open
fa1k3 wants to merge 1 commit into
cyanheads:mainfrom
fa1k3:fix/jsonlogic-arg-order
Open

Clarify JSONLogic glob argument order#56
fa1k3 wants to merge 1 commit into
cyanheads:mainfrom
fa1k3:fix/jsonlogic-arg-order

Conversation

@fa1k3
Copy link
Copy Markdown

@fa1k3 fa1k3 commented May 20, 2026

Summary

Clarifies the argument order for the custom JSONLogic glob and regexp operators used by obsidian_search_notes.

Why

The current recovery example shows the value before the pattern:

{"glob": [{"var": "path"}, "Projects/*.md"]}

The operator expects the pattern first. This can lead callers to construct valid-looking JSONLogic queries that return no matches.

Changes

  • Document that the custom operator argument order is [pattern, value].
  • Update the logic_required recovery example to use the pattern-first form.
  • Add a regression test so the recovery text does not drift back to the value-first example.

Tests

  • bunx vitest run tests/tools/obsidian-search-notes.test.ts — 31 passed
  • bun run build
  • bun run test — 397 passed

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