Skip to content

fix(search): one title rule for indexing, prefix and exact search (ENG-3299) - #336

Closed
adityamishra-hydradb wants to merge 1 commit into
mainfrom
vorflux/adityamishra/eng-3299-title-search-contract
Closed

adityamishra-hydradb wants to merge 1 commit into
mainfrom
vorflux/adityamishra/eng-3299-title-search-contract

Conversation

@adityamishra-hydradb

@adityamishra-hydradb adityamishra-hydradb commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

For humans

Documents the normalized title contract from https://linear.app/hydradb/issue/ENG-3299.

What changed

  • Defines NFKC normalization, invisible-formatting and decoration removal, lowercase conversion, whitespace collapse, and one known final extension removal.
  • Documents normalized prefix behavior for list-documents.
  • Documents normalized exact behavior for query and MCP title filters.
  • States that source IDs and titles are separate inputs and are never inferred from input shape.

Merge order

Merge after the app change reaches prod.

Related PRs

For agents

Check that all three surfaces describe the same extension allow-list and the same source-ID-versus-title rule.

Local validation:

npm run hygiene:strict: PASS
npm run verify:agents-endpoints: PASS

Decisions taken without review

  • I documented only behavior implemented by the paired application and ingestion changes.
  • I kept notes.v2 and .md as explicit non-stripping examples to define dotted-title edge cases.
  • I did not document or implement dashboard shape-based inference because ENG-3304 owns that behavior.
  • I ran validation only on this Vorflux machine. I made no staging or production data call.

Session Details


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Devin Review

@github-actions

Copy link
Copy Markdown

✅ Mintlify Hygiene

No issues found.

@mintlify

mintlify Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cortex-ai 🟢 Ready View Preview Oct 27, 2026, 11:17 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@adityamishra-hydradb

Copy link
Copy Markdown
Contributor Author

@greptileai review

@adityamishra-hydradb

Copy link
Copy Markdown
Contributor Author

/devin review

@openhack-agent

Copy link
Copy Markdown

✅ OpenHack Summary

Security review of fix(search): one title rule for indexing, prefix and exact search (ENG-3299). 3 changed files; 0 findings at or above the low reporting threshold.

P1: Critical 0   P2: High 0   P3: Medium 0   P4: Low 0

Confidence Score: 5/5

No reportable security findings were detected in this scan.

Security merge-readiness rubric: 1 = critical, 2 = high, 3 = medium, 4 = low, 5 = no reportable findings. This score reflects scan findings, not a guarantee of correctness or complete coverage.

Files Needing Attention: None

Important Files Changed
  • api-reference/v2/endpoint/list-documents.mdx (modified)
  • api-reference/v2/endpoint/query.mdx (modified)
  • plugins/mcp.mdx (modified)

Last reviewed commit: b8dac9c · View review on OpenHack


TIP: Mention @openhack-agent in a PR comment to request a review or ask a question. Use @openhack-agent fix all for every finding, or @openhack-agent fix unresolved threads for open review threads only.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Starting Devin Review.

Devin Review

@openhack-agent openhack-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenHack reviewed this commit. See the OpenHack Summary for the confidence score and fix actions.

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

| <Field name="collections" type="string[] or object" /> | Multi-collection scope. Send a list of collection IDs for equal weighting, or an object mapping collection ID to a positive relative weight (at most one decimal place, e.g. `{"finance": 1.5, "legal": 0.8}`) to bias ranking. Up to 100 collections. Do not combine with `collection`. |
| <Field name="query" type="string" required /> | Query terms or natural-language question. Cannot be empty. Maximum 5,000 words. |
| <Field name="titles" type="string[]" /> | Exact source titles, matched case-insensitively. Matches any listed title, then intersects with `ids` if both are sent. |
| <Field name="titles" type="string[]" /> | Exact normalized source titles. Normalization applies Unicode NFKC, removes invisible marks and decoration, lowercases, collapses spaces, and removes one final known file extension (`md`, `markdown`, `txt`, `pdf`, `doc`, `docx`, `rtf`, `odt`, `ppt`, `pptx`, `xls`, `xlsx`, `csv`, `tsv`, `json`, `html`, or `htm`) when text remains before it. Matches any listed title, then intersects with `ids` if both are sent. Use `ids` for source IDs and `titles` for titles; HydraDB never guesses from the input format. |

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.

🟡 Unsigned commit blocks the DCO check

The commit adding this title contract lacks a Signed-off-by trailer. The required DCO check fails, blocking the PR.

Learn more

Every PR commit must carry a Developer Certificate of Origin sign-off. The only commit in this PR has no Signed-off-by trailer, and the DCO check rejects any unsigned commit. Editing documentation text cannot fix the commit metadata.

Example: The check scans b8dac9c, finds no trailer, and exits with an error even if documentation validation passes.

Recommended fix: Amend the commit with git commit --amend -s --no-edit using a valid signing identity, then push the updated commit.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced by signed commit 8da3cf1 on #337. PR 336 is closed to avoid rewriting published history.

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The PR updates documentation for three title-search inputs.

The documentation appears safe to merge after the stated application rollout, with two non-blocking documentation gaps.

Findings

  1. P2 OpenAPI omits the new rule ▶
  2. P2 Source-ID guidance leaves users guessing ▶

Summary

Documents one normalized title rule across list, query, and MCP search.

  • Search docs use one title cleanup rule across list, query, and MCP.

Reviews (1) · Last reviewed commit: "docs(search): define normalized title ma..." · Reviewed by Greptile

| <Field name="collections" type="string[] or object" /> | Multi-collection scope. Send a list of collection IDs for equal weighting, or an object mapping collection ID to a positive relative weight (at most one decimal place, e.g. `{"finance": 1.5, "legal": 0.8}`) to bias ranking. Up to 100 collections. Do not combine with `collection`. |
| <Field name="query" type="string" required /> | Query terms or natural-language question. Cannot be empty. Maximum 5,000 words. |
| <Field name="titles" type="string[]" /> | Exact source titles, matched case-insensitively. Matches any listed title, then intersects with `ids` if both are sent. |
| <Field name="titles" type="string[]" /> | Exact normalized source titles. Normalization applies Unicode NFKC, removes invisible marks and decoration, lowercases, collapses spaces, and removes one final known file extension (`md`, `markdown`, `txt`, `pdf`, `doc`, `docx`, `rtf`, `odt`, `ppt`, `pptx`, `xls`, `xlsx`, `csv`, `tsv`, `json`, `html`, or `htm`) when text remains before it. Matches any listed title, then intersects with `ids` if both are sent. Use `ids` for source IDs and `titles` for titles; HydraDB never guesses from the input format. |

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.

P2 OpenAPI omits the new rule

The new title rule is missing from api-reference/v2/openapi.json. Its titles description still mentions only case-insensitive matching, and its list-title description mentions only case-insensitive prefix matching. Readers of that contract miss how extensions, Unicode, and spacing affect matches. Update those descriptions alongside these pages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed on replacement PR #337 in 668cb7c, with OpenAPI description sources updated in application commit 680b9a57d. PR 336 is closed.

Comment thread plugins/mcp.mdx
Comment on lines +489 to +490
Source IDs and titles are separate inputs. Use `ids` for source IDs and `titles`
for titles. HydraDB never guesses from the input format.

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.

P2 Source-ID guidance leaves users guessing

This new instruction tells users to pass ids inside the hydradb_query section, but that tool's parameter table does not list ids, and its example only shows titles. Document the supported source-ID input here, or name the tool users should call instead. Otherwise users must guess how to follow the new guidance.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed on replacement PR #337 in 668cb7c. The MCP-specific source-ID guidance now names the supported tools. PR 336 is closed.

@adityamishra-hydradb

Copy link
Copy Markdown
Contributor Author

Replaced by #337 because the original pushed commit lacked the required DCO sign-off. The replacement branch preserves the changes with a signed-off commit and avoids a force-push.

@mintlify

mintlify Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cortex-ai 🟡 Building – Oct 27, 2026, 11:16 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

This branch was successfully deployed

1 active deployment
staging — b8dac9c3 Deployed Oct 27, 2026 by mintlify[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