Skip to content

docs: teach the unified API across guides, reference, agent guide and cookbooks (ENG-1618) - #370

Open
SohamRatnaparkhi wants to merge 48 commits into
cloud/draft-nov-15from
soham/eng-1618-unified-docs
Open

SohamRatnaparkhi wants to merge 48 commits into
cloud/draft-nov-15from
soham/eng-1618-unified-docs

Conversation

@SohamRatnaparkhi

@SohamRatnaparkhi SohamRatnaparkhi commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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 context items and unified query results. Publish it with the unified API rollout, after its SDK dependencies are released.

Behavior

  • Text and conversations use context; files use documents. Examples omit the corpus selector. Deterministic relations retain the actual forceful_relations and query_explicit_relations field names.
  • Query examples use chunks, graph, forceful_relations, llm_prompt and tabular_data. Omitted collection scope reads the default collection.
  • Context polling stops on indexing errors and waits for every source to complete. Empty or partial status pages are not success. The company-search connector example uses the shared helper, which discovers every resource page.
  • Citation title lookups carry the same caller ACL as the query. The chief-of-staff example makes both sample records and saved decisions private to the configured executive and queries with that identity. Its regression test fails without the ACL and passes after the fix.
  • The cookbook checks require sample ingestion in every cookbook and connector operations where an executable production example includes them. Signature validation still uses the installed SDK without accepting unknown arguments.
  • The database guide explicitly limits unified examples to new unified databases. Existing split databases retain their original contracts and are not converted.

Current scope decisions

The latest founder decision removes context_category entirely. It is not a label to document. enrichment_kind, ingest instructions and 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

  1. Deploy application #3728 before promising type_ignored_on_unified.
  2. Enable the unified default and unified file ingestion with the coordinated production rollout. Collection creation changes are outside this review.
  3. Publish Python and TypeScript SDKs that accept context and 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

  • The new polling tests fail on the old guide for both errored indexing and empty status pages, then pass on this revision.
  • The company-search connection example passes the existing two-page discovery stub, including resource C3 from the second page. Its prior example also omitted the required connector name; using the helper fixes both issues.
  • Documentation consistency, discovery, connector-page and polling checks pass. The llms index is in sync.
  • The complete five-module docs suite runs 108 tests. Five cookbook subcases remain blocked by the installed Python SDK 2.1.7 rejecting 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.


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

SohamRatnaparkhi and others added 25 commits November 17, 2026 18:01
… 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-agent

openhack-agent Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

OpenHack Summary

Security 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.

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

Confidence Score: 2/5

Review 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
  • AGENTS.mdx (modified)
  • api-reference/v2/endpoint/byog-query-managed.mdx (modified)
  • api-reference/v2/endpoint/context-overview.mdx (modified)
  • api-reference/v2/endpoint/database-stats.mdx (modified)
  • api-reference/v2/endpoint/database-status.mdx (modified)
  • api-reference/v2/endpoint/databases-overview.mdx (modified)
  • api-reference/v2/endpoint/delete-collection.mdx (modified)
  • api-reference/v2/endpoint/delete-database.mdx (modified)
  • api-reference/v2/endpoint/delete-source.mdx (modified)
  • api-reference/v2/endpoint/fetch-content.mdx (modified)
  • api-reference/v2/endpoint/ingest-context.mdx (modified)
  • api-reference/v2/endpoint/list-context.mdx (modified)
  • api-reference/v2/endpoint/query-overview.mdx (modified)
  • api-reference/v2/endpoint/query.mdx (modified)
  • api-reference/v2/endpoint/source-relations.mdx (modified)
  • api-reference/v2/endpoint/source-status.mdx (modified)
  • api-reference/v2/endpoint/subgraph.mdx (modified)
  • api-reference/v2/endpoint/webhooks-overview.mdx (modified)
  • api-reference/v2/error-responses.mdx (modified)
  • api-reference/v2/index.mdx (modified)
  • api-reference/v2/openapi.json (modified)
  • api-reference/v2/sdks.mdx (modified)
  • cookbooks/v2/chief-of-staff.mdx (modified)
  • cookbooks/v2/competitive-intelligence.mdx (modified)
  • cookbooks/v2/cursor.mdx (modified)

View all 40 changed files

AI Autofix in OpenHack Fix all in Codex Fix all in Claude Fix all in Cursor Fix all in Conductor

Prompt To Fix With AI
Review 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


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.

@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.

SohamRatnaparkhi and others added 2 commits November 17, 2026 18:22
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>

@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.

Comment thread llms.txt Resolved
SohamRatnaparkhi and others added 19 commits November 17, 2026 18:40
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>

@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.

Comment thread cookbooks/v2/chief-of-staff.mdx Resolved
@hydra-mira-review

hydra-mira-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Mira score 5/5 · 🟢 Good to merge

  • No findings in the code.
  • Ship with or after: type_ignored_on_unified warning support.
  • Confirm outside this PR: Unified ingestion, retrieval, and lifecycle backend contracts, Unified-compatible Python and TypeScript SDK releases.
  • Finish the requirement: Teach the five unified query result fields across guides and referenc…, Stop polling on indexing errors and reject empty or partial status re… and 2 more.
1 more
  • Read these high-risk changes closely: Read unified query results and resolve source details, Keep executive records and saved decisions private.

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
  • ⏳ type_ignored_on_unified warning support (order), needed in HydraDB application #3728. The PR description names application #3728 as the prerequisite for documenting type_ignored_on_unified. Deploy application #3728 before publishing the query reference's warning promise.
  • ❔ Unified ingestion, retrieval, and lifecycle backend contracts (contract), needed in HydraDB application and production configuration. The publication gates require coordinated unified defaults and file ingestion; their production activation is not established. Activate unified database creation and file ingestion before publishing examples that omit type and consume unified responses.
  • ❔ Unified-compatible Python and TypeScript SDK releases (contract), needed in hydradb-sdk, @hydradb/sdk, and documentation test dependencies. The SDK page marks the named releases incompatible, and scripts/requirements-test.txt still pins Python 2.1.7; compatible minimum versions are unspecified. Release compatible SDKs, verify their minimum versions, and update installation commands and test dependencies before publication.
How this PR works · 9 changes, 2 high risk, 2 medium risk, 5 low risk

New 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 · essentials/v2/databases-and-collections.mdx

Readers now get an explicit boundary between new unified databases and existing split databases. The guide also expands examples of matching write and query scopes.

Risk: Readers could apply unified requests to existing split databases and receive rejected ingestion requests or query the wrong collection.

Check:

  • Check that existing split database users can identify which examples apply before changing their integration.

In databases-and-collections.mdx:6-168.

2. Teach text and conversations through unified ingestion · 🟠 medium risk · essentials/v2/context.mdx +4

Integrations now send text and conversations together without selecting a corpus. Examples replace memories with context, retain file uploads through documents, and rename item fields.

Risk: Copied integrations could reject ingestion, replace an unintended source, or store conversation content in the wrong scope.

Check:

  • Try one text item, one conversation, and one file against a new unified database.
  • Check stable-ID replacement and both deterministic relation payload formats.

In context.mdx:8-347, context.mdx:496-601, ingest-context.mdx and 3 more.

3. Read unified query results and resolve source details · 🔴 high risk · essentials/v2/query.mdx +5

Applications now read one ranked result shape across documents and conversations. Examples replace split result fields with chunks, graph, and forceful_relations, alongside llm_prompt and tabular_data.

Risk: Applications could drop linked context, lose file citations, or retrieve source details without the caller's access restrictions.

Check:

  • Check that code-search output retains graph context, linked chunks, and original file paths.
  • Check that citation title requests carry the same caller ACL as their queries.

How it works:

  1. Query examples omit type and describe an omitted collection scope as the default collection.
  2. The reference retains query_explicit_relations and distinguishes the request hint additional_graph_context from returned linked chunks.
  3. search_code preserves graph and linked chunks, then adds file paths from its local PATHS map.
  4. ask in the company-search cookbook deduplicates chunk source IDs and retrieves citation titles through context.list.

What it touches:

  • cookbooks/v2/glean.mdx: ask calls search.
  • cookbooks/v2/cursor.mdx: search_code.
  • POST /query.
  • POST /context/list.
  • The code-search tool exposed by the Cursor cookbook.
  • Examples consume context_id, content, and score instead of split chunk fields; citation titles require a separate list request.

In query.mdx, query.mdx, query-overview.mdx and 3 more.

4. Wait for every source and stop on indexing errors · 🟢 low risk · essentials/v2/context.mdx +2

The context guide no longer treats empty or partial status responses as completed ingestion. Its Python, TypeScript, and shell loops stop on errors and require all requested sources.

Risk: Readers could query before sources are ready or wait indefinitely after an indexing failure.

Check:

  • Check the sequence of an empty response, one completed source, and two completed sources.
  • Check that one completed source plus one errored source stops immediately.

In context.mdx:349-423, test_indexing_poll.py:1-27, .gitignore:11.

5. Make cookbooks start with unified sample ingestion · 🟠 medium risk · cookbooks/v2/glean.mdx +6

Company search, the personal assistant, and the executive assistant now start with sample records instead of live connector credentials. All six cookbooks use unified ingestion examples.

Risk: Cookbook users could ingest stale or incorrectly scoped samples, or configure only part of a connector's discovered resources.

Check:

  • Check that discovery configures C1, C2, and second-page resource C3.
  • Check that reingesting a competitive signal replaces its stable source ID.

In glean.mdx:21-67, glean.mdx:116-132, personal-assistant.mdx and 5 more.

6. Keep executive records and saved decisions private · 🔴 high risk · cookbooks/v2/chief-of-staff.mdx +1

The executive's sample records and saved decisions now carry the same private identity. remember writes acl=[EXECUTIVE_EMAIL], and brief queries both collections with that identity.

Risk: An incorrect identity or omitted ACL could expose an executive's records and decisions to another user.

Check:

  • Check both collections' writes and the combined query use the same trusted executive identity.
  • Try querying the private records as another executive.

How it works:

  1. The cookbook defines EXECUTIVE_EMAIL as trusted server configuration and requires authentication before exposing brief.
  2. Every sample record and decision write attaches the executive's ACL.
  3. The regression check inspects sample records, decision writes, and query arguments for the same identity.

What it touches:

  • cookbooks/v2/chief-of-staff.mdx: remember.
  • cookbooks/v2/chief-of-staff.mdx: brief.
  • scripts/test_cookbooks.py: test_executive_brief_preserves_acl_on_reads_and_writes.
  • POST /context/ingest.
  • POST /query.
  • The executive assistant example.
  • New sample records and decisions store the executive's ACL; no migration updates previously written records.

In chief-of-staff.mdx:20-103, test_cookbooks.py:464-482.

7. Gate SDK examples on unified-compatible releases · 🟢 low risk · api-reference/v2/sdks.mdx +3

Readers are warned that the named released SDKs cannot run unified examples. Installation guidance replaces previous minimum versions with upgrade commands and directs readers to HTTP meanwhile.

Risk: Readers could install an incompatible SDK and encounter rejected arguments or lose query context during response parsing.

Check:

  • Replace upgrade commands and the test dependency with verified compatible minimum versions before publication.
  • Check the compatible SDK formatting helpers preserve unified chunks and linked context.

In sdks.mdx, cookbook-setup.mdx:1-7, quickstart.mdx:18-47 and 1 more.

8. Remove documented enrichment-default warning examples · 🟢 low risk · api-reference/v2/openapi.json

The reference no longer explains the inference-default and enrichment-default warning codes. Their accepted-response examples are removed, leaving a generic queued-response description.

Risk: Integrators could overlook notices about implicit enrichment and misunderstand why accepted content was processed differently.

Check:

  • Confirm whether these warning codes remain part of the deployed ingestion contract.

In openapi.json:3868-3875, openapi.json:5902-5905, openapi.json:11574-11577 and 1 more.

9. Supporting changes · 🟢 low risk · scripts/test_cookbooks.py +21

Checks now validate unified payloads and require ingestion in every cookbook while retaining installed SDK signature validation. Remaining references and generated agent text adopt unified terminology.

Risk: Incorrect checks could accept broken examples, while inconsistent endpoint guidance could lead readers to parse the wrong fields.

Check:

  • Check that unknown SDK arguments still fail signature binding.
  • Check generated llms.txt matches the agent guide.

In test_cookbooks.py, test_docs_examples.py, test_docs_consistency.py and 19 more.

Not explained by the ticket or the description:

  • The OpenAPI edits remove enrichment-default and inference-default warning documentation without a corresponding explanation in the PR description.
  • The SDK reference removes the entire Bring Your Own Graph method table and client.byog namespace listing.

Questions for the author:

  • Will the unified OpenAPI schema land here or in a named prerequisite before publication?
  • Which compatible SDK releases will gate publication, and who will update installation commands and scripts/requirements-test.txt?
  • What holds publication until application #3728 and the coordinated unified rollout are live?
Requirement check · 9 met, 4 partly met, 2 for another PR · from the PR description
  • ✅ Use context for text and conversations, documents for files, and omit corpus selectors from examples (met). essentials/v2/context.mdx, the quickstart, and all six cookbook revisions use the unified request shapes.
  • ✅ Retain the actual deterministic relation field names (met). The context guide uses forceful_relations.context_ids; query guidance retains query_explicit_relations.
  • 🟡 Teach the five unified query result fields across guides and reference (partial). Narrative references show all five fields, but openapi.json retains split ingestion fields and the old search.V2RetrievalResult schema.
  • ✅ Document omitted query collection scope as the default collection (met). essentials/v2/query.mdx and AGENTS.mdx explicitly describe the default collection.
  • 🟡 Stop polling on indexing errors and reject empty or partial status responses as success (partial). The context guide checks errors and response counts; shared cookbook wait_indexed still uses all without checking the returned count.
  • ✅ Use the shared connector helper and discover every resource page in the company-search example (met). glean.mdx calls connect; the shared helper follows discovery cursors and supplies a connector name.
  • 🟡 Carry the query caller's ACL into citation title lookups (partial). AGENTS.mdx requires matching ACLs, but glean.mdx calls context.list without the acl passed by search.
  • ✅ Make executive sample records and saved decisions private, and query as the configured executive (met). chief-of-staff.mdx applies EXECUTIVE_EMAIL to records, remember, and brief; its regression check covers these arguments.
  • ✅ Require ingestion in every cookbook and connector operations in executable connector examples without weakening SDK signature validation (met). test_every_cookbook_runs_against_the_sdk_signatures requires ingestion and status calls; Stubs.checked retains signature.bind.
  • ✅ Limit unified examples to new unified databases and preserve existing split database contracts (met). essentials/v2/databases-and-collections.mdx:8 states the boundary and says existing databases are not converted.
  • ✅ Exclude removed category fields and internal enrichment, instruction, and trace guidance (met). The revised public item tables omit these fields; consistency checks reject category fields and ingest instruction guidance.
  • ✅ Preserve the hidden Archive version without adding a dedicated split-database page (met). docs.json retains the hidden Archive version; split compatibility is documented in the existing database guide.
  • 🟡 Warn about incompatible SDKs and use verified compatible minimum versions before publication (partial). SDK guidance identifies Python 2.1.7 and TypeScript 2.1.8 as incompatible; commands remain unpinned and test requirements retain Python 2.1.7.
  • ➖ Deploy warning support and coordinate unified defaults and file ingestion before publication (for another PR). The publication gates assign warning support to application #3728 and unified activation to the coordinated production rollout.
  • ➖ Keep collection creation changes and the separate trace feature outside this revision (for another PR). The description excludes collection creation changes and assigns the disabled trace feature to application #3757.
Check by hand · 2
  • Before publication, verify compatible SDK minimum versions and replace the provisional installation commands and test dependency.
  • Before publication, confirm application #3728 and the coordinated unified database and file-ingestion rollout are deployed.
⚠️ Other open PRs change the same code · 5

Merge them in order, or check that they agree.

  • #349 (duplicate effort + merge-conflict risk). Both document tabular_data query results and edit the query guide, query reference and OpenAPI schema for that response contract. Shared: api-reference/v2/endpoint/query.mdx, api-reference/v2/openapi.json, essentials/v2/query.mdx
  • #368 (duplicate effort + merge-conflict risk). Both update spreadsheet query-result documentation in the query guide, creating redundant coverage and competing edits. Shared: essentials/v2/connectors.mdx, essentials/v2/query.mdx, llms.txt
  • #358 (merge-conflict risk). Moving versioned pages and updating their links, agent guidance, schema labels and checks collides with edits to those same pages and checks. Shared: AGENTS.mdx, api-reference/v2/endpoint/databases-overview.mdx, api-reference/v2/endpoint/fetch-content.mdx, api-reference/v2/error-responses.mdx, api-reference/v2/index.mdx, api-reference/v2/openapi.json, api-reference/v2/sdks.mdx, get-started/v2/quickstart.mdx, llms.txt, scripts/test_cookbooks.py, scripts/test_docs_consistency.py, scripts/test_docs_discovery.py, scripts/test_docs_examples.py
  • #360 (merge-conflict risk). Both rewrite ingestion examples and the same cookbooks, with connector-only app ingestion competing with the unified context examples. Shared: AGENTS.mdx, api-reference/v2/endpoint/context-overview.mdx, api-reference/v2/endpoint/ingest-context.mdx, api-reference/v2/endpoint/list-context.mdx, api-reference/v2/endpoint/query-overview.mdx, api-reference/v2/endpoint/query.mdx, api-reference/v2/endpoint/source-status.mdx, api-reference/v2/endpoint/webhooks-overview.mdx, api-reference/v2/error-responses.mdx, api-reference/v2/index.mdx, api-reference/v2/sdks.mdx, cookbooks/v2/chief-of-staff.mdx, cookbooks/v2/competitive-intelligence.mdx, cookbooks/v2/cursor.mdx, cookbooks/v2/glean.mdx, cookbooks/v2/index.mdx, cookbooks/v2/personal-assistant.mdx, cookbooks/v2/support-agent.mdx, essentials/v2/bring-your-own-graph.mdx, essentials/v2/connectors.mdx, essentials/v2/context.mdx, essentials/v2/databases-and-collections.mdx, essentials/v2/query.mdx, get-started/v2/quickstart.mdx, scripts/test_cookbooks.py, scripts/test_docs_consistency.py, scripts/test_docs_examples.py, snippets/cookbook-setup.mdx
  • #356 (merge-conflict risk). The generated OpenAPI replacement competes with the unified API schema edits and could overwrite them. Shared: api-reference/v2/openapi.json

Comment @hydra-mira-review help for commands.

@hydra-mira-review hydra-mira-review 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.

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

Comment thread essentials/v2/context.mdx Resolved
Comment thread cookbooks/v2/glean.mdx Resolved
Comment thread cookbooks/v2/chief-of-staff.mdx Resolved
Comment thread api-reference/v2/sdks.mdx Resolved

This branch has not been deployed

No deployments
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