Repository navigation
docs: teach the unified API across guides, reference, agent guide and cookbooks (ENG-1618) - #370
SohamRatnaparkhi wants to merge 48 commits into
Conversation
… database (ENG-1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orceful relations (ENG-1618) The consistency tests pinned the split wording on this page (infer, type=knowledge, relations.ids); they now pin the unified equivalents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(ENG-1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead it (ENG-1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…618) The app-sources test now skips this one page, which names app_knowledge as a field older databases accept and points readers to connectors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…NG-1618) New databases are unified: one corpus, a context list on ingest, no type on any call, and the five-key query response. Split databases get a pointer to their own page. llms.txt regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndpoint pages (ENG-1618) Relations, subgraph, status, stats, inspect, list databases and the delete pages now describe one corpus of items, with a pointer to the split page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mple (ENG-1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e (ENG-1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-1618) The ingest stub takes context items or files and no type; the query stub refuses type, checks the attributes filter and returns the five-key unified body. The bind against the installed SDK is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…NG-1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…G-1618) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in unified wording in tests (ENG-1618) The three consistency assertions pinned the split type defaults and the memory-only enrichment wording that these pages no longer teach. They now pin that ingest and query tell readers not to send type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-1618) Ingest pages no longer document instructions, the spec no longer promises a warning the API does not send, and the agent guide says a query with no collection reads the default collection, as measured on staging. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
OpenHack SummarySecurity review of docs: teach the unified API across guides, reference, agent guide and cookbooks (ENG-1618). 40 changed files; 2 findings at or above the low reporting threshold. Confidence Score: 2/5Review the findings below before merging. 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: cookbooks/v2/chief-of-staff.mdx, llms.txt Important Files Changed
Prompt To Fix With AIReview the findings for https://github.com/hydra-db/mintlify-docs/pull/370 at commit 68303be70f54a7ffbff34e5024f58caac7dbf8f2. Verify each finding against the current code before fixing it. Preserve unrelated changes and run focused regression tests. ### Issue 1: [P2] Chief-of-staff query omits caller ACL and can expose executive records Vulnerability type: CWE-862: Missing Authorization cookbooks/v2/chief-of-staff.mdx:93 The changed brief() helper searches both the general work-records collection and the executive-specific collection without passing an acl. Under the documented query semantics, omitting acl disables caller filtering, including for restricted content synced by real connectors. The result is then supplied to answer(), so an unauthorized caller's question can cause executive-only records to be included in the generated answer. This is a pull-request regression. Previously, Gmail records were assigned acl=[EXECUTIVE_EMAIL] and brief() queried as that identity. The change removes the query ACL and replaces the connector example with meeting and email text items that have no source ACL. Applications following the revised cookbook can therefore expose executive records to any user able to invoke the shared helper. Recommendation: Require brief() to receive an identity derived from the verified server-side session and pass it on every query, for example acl=[user_email]. Never accept this identity from the question or other untrusted client input. Add acl values to every manually ingested meeting, email, and decision item; for this single-executive example, use acl=[EXECUTIVE_EMAIL]. When using connectors, preserve provider ACLs and keep query-side ACL enforcement enabled by supplying the caller identity. Update the cookbook text to warn that brief() must not be exposed without application authorization. --- ### Issue 2: [P3] Query-result title lookup omits caller ACL and can expose restricted item metadata Vulnerability type: Improper Authorization / Data Exposure · CWE-200 llms.txt:1073 The PR changes citation guidance so clients must resolve each query chunk's context_id through POST /context/list to obtain its title. The newly documented list example and parameter summary omit acl. POST /context/list does not inherit the ACL used for the preceding query, and its existing contract treats a missing ACL as disabling caller-supplied filtering. Consequently, an application using one database API key for multiple users can issue a correctly ACL-scoped query and then perform the recommended unscoped title lookup, exposing list-visible information for a restricted item when its ID is supplied or otherwise known. Previously, source_title was returned directly on each authorized query result, so citation did not require this second independently authorized read. Recommendation: Update every query-to-list citation example and instruction to pass the exact same trusted, session-derived acl used for the query, including adding `acl=caller_acl` to the list example. Explicitly warn that omission, an empty list, and `["*"]` disable caller-supplied filtering. Extend the ACL checklist to cover all user-scoped reads, not only queries. Strengthen cookbook tests so a context.list call that resolves query results must use the query's ACL. If compatibility permits, separately consider making the service default-deny ACL-protected rows when caller identity is absent. Last reviewed commit: 68303be · View review on OpenHack
|
The decision_trace label does not create a decision trace yet, so the docs do not mention it. The guide's category table drops that column and the chief-of-staff cookbook labels its items business_knowledge. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Unknown-key wording is scoped to JSON bodies and items, llm_prompt is an empty string in structured format, the split page says reads ignore a split type, and the spec file no longer shows warnings the API does not send. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…-1618) Removes the Split databases page and every pointer to it. Databases and Collections now carries the single line: databases are unified, and knowledge and memory are internal to HydraDB. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The founder's call: an item is text or a conversation, and that shape is its type. There is no category label beside it. - Context guide: the category table is replaced by two paragraphs on what HydraDB does with whatever you send. - context_category is gone from every item table and example, and enrichment_kind from the query chunk examples and field lists. - List Context: the example filters on additional_metadata instead, and context_category is gone from source_fields, include_fields and the response. - AGENTS.mdx says the shape is the type; llms.txt regenerated. - test_docs_consistency pins that no live page, llms.txt or the spec names context_category, enrichment_kind or the compatibility warning. - test_cookbooks no longer accepts context_category on an item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…G-1618) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ses (ENG-1618) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ified databases (ENG-1618) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- Tests pin the redo's facts instead of the earlier rewrite's wording: section names (Ingesting context, 6. Source ingestion), "No call takes `type`", and the query reference's `type` row. - test_docs_examples imports CONTEXT_ITEM_KEYS (MEMORY_KEYS was gone, so the module failed to import) and checks ingest bodies send no `type` and only `text` or `conversation` items. - Query reference `type` row starts "Do not send."; List Context names `sources` instead of `data.sources[]`; Context overview names `forceful_relations.context_ids` for context items. - Bring your own graph: drop the `-F "type=knowledge"` line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…or unified databases (ENG-1618) Start from the origin/main text of each page and change only what is false for a unified database: no `type`, one `context` list of `text` or `conversation` items in place of `memories`, `enrich` in place of `infer`, no app sources, and the unified query response keys. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…r unified databases (ENG-1618) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ified databases (ENG-1618) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…do (ENG-1618) - Links from the API reference to the metadata guide use the branch's headings (operators, size caps, two layers, list). - Query guide keeps the old "query on behalf of a user" anchor that four endpoint pages link to. - `enrich: false` no longer promises that nothing is extracted: entity and graph extraction may still run (Context and Ingest Context). - Databases and Collections grammar fix. - Tests read the live-page wording: Save context section, query_by, alpha and mode lines, the agent guide title, and the Cursor search shape. The check for the draft-only authorization paragraph is removed with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mira score 5/5 · 🟢 Good to merge
1 more
Developers get guides and examples for ingesting and querying data through the unified API. The changes update request formats, query results, indexing checks, and access controls across documentation and cookbooks. Publication depends on compatible SDK releases and the coordinated application rollout. Before this ships · 1 with another PR, 2 to confirm
How this PR works · 9 changes, 2 high risk, 2 medium risk, 5 low riskNew unified databases reject the split-ingest examples in the published documentation. This PR replaces those examples with context items and unified query results across guides, reference pages, agent guidance, and six cookbooks. Publication depends on the coordinated backend rollout and compatible SDK releases. 1. Limit unified examples to new unified databases · 🟢 low risk ·
|
There was a problem hiding this comment.
Mira Review Summary
The polling examples in essentials/v2/context.mdx treat failed indexing as successful, and Glean sync can leave channels beyond the first discovery page unsynced. The cookbook suite still fails once the unified SDK is available, while the SDK install ranges admit versions that reject the new examples. Owners of existing split databases also lack compatible ingestion guidance in essentials/v2/databases-and-collections.mdx.
Key Issues
| Issue | Location | |
|---|---|---|
| 🔴 | Existing split databases have no compatible guidance after the rewrite. | essentials/v2/databases-and-collections.mdx:8 |
| 🔴 | Documented dependency ranges admit SDKs known to reject the unified examples. | api-reference/v2/sdks.mdx:274 |
Why
New unified databases reject the split-ingest examples in the published docs. This PR rewrites the guides, reference, agent guide and six cookbooks around
contextitems and unified query results. Publish it with the unified API rollout, after its SDK dependencies are released.Behavior
context; files usedocuments. Examples omit the corpus selector. Deterministic relations retain the actualforceful_relationsandquery_explicit_relationsfield names.chunks,graph,forceful_relations,llm_promptandtabular_data. Omitted collection scope reads the default collection.Current scope decisions
The latest founder decision removes
context_categoryentirely. It is not a label to document.enrichment_kind, ingestinstructionsand caller-supplied traces are deliberately absent from public guidance. The separate trace feature remains off by default in application #3757. No dedicated split-database page is added by this revision. The hidden Archive version is preserved.Publication gates
type_ignored_on_unified.contextand parse unified responses. Python 2.1.7 and TypeScript 2.1.8 are incompatible. The SDK page and cookbook prerequisites state that explicitly and direct readers to HTTP until compatible releases exist. Before publication, replace the upgrade commands and test dependency with verified minimum compatible release versions. No future release number is invented here.Verification
context. These are real release-dependency failures, not skipped or weakened tests. A compatible SDK must pass the suite before this PR is published.Base:
cloud/draft-nov-15. Nothing is published by this change until the publication gates are met.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.