Repository navigation
OSS-119 ci(docs): test docs code samples against the latest SDKs, with a printed known-failure list - #409
OSS-119 ci(docs): test docs code samples against the latest SDKs, with a printed known-failure list#409adityamishra-hydradb wants to merge 4 commits into
Conversation
…ted known-failure list (OSS-119) - Pin the SDKs the examples run against to the latest releases: hydradb-sdk 2.1.8 (was 2.1.7) and @hydradb/sdk 2.1.9 (was 2.1.8). 2.1.8 parses every response into a model with required fields, so the canned test responses get those fields. The pin line and those hunks are the same as in mintlify-docs PR 407 (OSS-118), so the two pull requests merge cleanly in either order. - Dependabot opens a bump PR for either SDK every day. The new sdk-drift workflow fails every day while a pin is behind, and runs the examples against the latest SDKs. - scripts/known_example_failures.py lists the blocks that fail for a reason an open PR decides (app_knowledge, decision D9 in PR 400; the spec sync in PR 400; request= in PR 407). CI prints each one as a warning, and an entry that no longer fails fails the run. - The TypeScript check reports per block, the field-table check per field, and the cookbook check per file, so one failure no longer hides the others. - essentials/v2/query.mdx: the TypeScript sample read sourceTitle and chunkContent on a chunk union that @hydradb/sdk 2.1.9 added; narrow it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityamishra-hydradb <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
@hydra-mira-review review |
|
/devin review |
✅ Mintlify HygieneNo issues found. |
Mira score 5/5 · 🟢 Good to merge
Documentation samples now run against newer SDK releases, with known failures printed separately and unexpected failures still failing CI. Daily dependency updates and drift checks track releases, while the query example handles both chunk formats. Before this ships · 1 in place
How this PR works · 7 changes, 5 medium risk, 2 low riskDocumentation checks used older SDKs and mixed expected failures with new regressions. This PR updates the SDK versions, adds explicit failure allowances, and checks daily for newer releases. It also updates test responses and fixes the query example for both chunk shapes. 1. Test examples against newer SDK versions · 🟠 medium risk ·
|
…t unified query chunks - TypeScript: each tsc diagnostic is matched on its own, so a known appKnowledge error does not hide another error in the same block. - curl: only the known field mismatch is skipped; the payload, query parameters, required fields and endpoint checks still run. - Print the known-failure warnings before any assertion can stop the test. - essentials/v2/query.mdx: print contextId and content for unified chunks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityamishra-hydradb <[email protected]>
|
@hydra-mira-review review |
|
/devin review |
Keep both sides in scripts/test_docs_examples.py: the known-failure list from this branch and the app_knowledge exemption and multipart schema pick from main. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityamishra-hydradb <[email protected]>
PR 400 removed app_knowledge from most pages and synced the spec (acl_inherit). Those 10 entries no longer match a failing block, so the stale check failed. The 9 entries that still match stay. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityamishra-hydradb <[email protected]>
|
@hydra-mira-review review |
|
/devin review |
Signed-off-by: adityamishra-hydradb <[email protected]>
For humans
The docs repo already tests its code samples (
scripts/test_docs_examples.py,scripts/test_cookbooks.py, CI jobvalidate). The check was not trustworthy:hydradb-sdk2.1.7 and@hydradb/sdk2.1.8. Users install 2.1.8 and 2.1.9. So it passed samples that break for users.mainfor 6 runs (until PR 400 merged on 12-04), so a new failure was not visible.This PR:
hydradb-sdk2.1.8,@hydradb/sdk2.1.9.SDK drift, fails while a pin is older than the latest release, and runs the samples against the latest SDKs.app_knowledge(D9 is decided: keep it, per OSS-101; app PR 4472 restored it, but the published SDKs, PyPI 2.1.8 and npm 2.1.9, do not have it yet, so these entries stay until the SDKs are regenerated) andrequest=(PR 407, OSS-118). They are listed inscripts/known_example_failures.py. CI prints each one with its link. Every other failure fails CI. An entry that stops failing also fails CI, so the list cannot go stale.essentials/v2/query.mdx: the TypeScript sample did not compile with@hydradb/sdk2.1.9 (chunks are now a union of split and unified chunks). It now prints both kinds.TypeScript blocks were already type-checked (113 blocks). This PR keeps that, runs it on 2.1.9, and reports it per diagnostic.
For agents
hydradb-sdk2.1.8, and 2.1.8 dropsapp_knowledge, which pages outside both PRs still use (D9). This PR's allow-list is what lets 2.1.8 run. Theirvalidateis red until this PR lands. Test merges of this head (3c01a6d) with each branch: PR 408 passes unchanged (OK, 42 tests); PR 407 then only has to delete the 2REQUEST_KWARGentries (CI names them).hydradb-sdk==2.1.8pin and the canned-response hunks inscripts/test_docs_examples.py/scripts/test_cookbooks.pyare byte-identical to PR 407 (test merge has no conflicts).mainwas merged in (7ba11f0, conflict inscripts/test_docs_examples.pyresolved by keeping both: this PR's known-failure plumbing and PR 400'sapp_knowledgeexemption and multipart schema pick).3c01a6ddeletes the 10 entries PR 400 fixed (and the unusedSPEC_SYNC); the stale check named them. This PR does not decide D9 (decided since: keepapp_knowledge, see OSS-101).::warning file=...,line=...::KNOWN FAILURE ...(GitHub shows the first 10 as annotations; the log has all).scripts/is in.gitignore; the 2 new files are force-added like the others.Proof
A = base
main@efa6f55· B = this PR @3c01a6dRe-run on 2026-12-04 (14:25 to 15:05 UTC) on the final head. Local Python 3.12 (uv venvs), Node 22.23.4 for Mintlify. Raw outputs:
~/hydradb/dogfood/docs-sdk/proof/409/final/(A-efa6f55-pins.txt,A-efa6f55-latest.txt,B-3c01a6d.txt,B-3c01a6d-after-revert.txt,edge-*.txt,smoke-pins-*.txt,mintlify-*.txt).1. A/B on the real repro
Command:
python -m unittest discover -s scripts -p 'test_*.py'(the CIvalidatestep). "Latest SDKs" =hydradb-sdk2.1.8 (PyPI latest) and@hydradb/sdk2.1.9 (npm latest), what users install today.::warningwith linkvalidate/examples-on-latest-sdks/pins-are-latestvalidatesuccess onmain(run 47346317128); the SDK-drift jobs do not exist3c01a6dThe doc fix in this PR, rendered by
mintlify dev(TypeScript tab of the "Use the results" accordion onessentials/v2/query). A on@hydradb/sdk2.1.9:query__line_32.ts(13,21): error TS2339: Property 'sourceTitle' does not exist on type 'SearchV2Chunk | SearchQueryChunk'. B: compiles.What fails on A with the latest SDKs, and what B does:
essentials/v2/query.mdx:32(TS)sourceTitle/chunkContentnot on the 2.1.9 chunk unionAGENTS.mdx:266,connectors.mdx:24, :136, :175, :384,get-metadata-schema.mdx:12,metadata.mdx:441; cookbookscursor,support-agentconnectors.mdx:421, :580,update-connector-resource.mdx:12(Python)update_resource_acl(request=...)removed in 2.1.8context.mdx:229(Python);AGENTS.mdx:657,context.mdx:256(TS); cookbookschief-of-staff,competitive-intelligence,glean,personal-assistantapp_knowledge/appKnowledgeremoved from the SDKs2. Regression
pnpm mintlify validate(Node 22)pnpm mintlify broken-linkspython .github/verify_v2_public_contract.pytest_v2_schema_types.py,test_docs_consistency.py,verify_agents_endpoints.py,generate_llms_index.py --checkfaq-sync-tests,hygiene,dco-check, Mintlify link-rot / vale3. Smoke
python scripts/check_sdk_pins.py(B's script, run in each tree). A:DRIFT hydradb-sdk ... tested 2.1.7, latest 2.1.8andDRIFT @hydradb/sdk ... tested 2.1.8, latest 2.1.9, exit 1. B:OK hydradb-sdk ... 2.1.8/OK @hydradb/sdk ... 2.1.9, exit 0.4. Stress
N/A: no performance, limit or concurrency change. The suite runs in about 4 s.
5. Edge cases (on B @3c01a6d in a scratch worktree, each change reverted after; suite OK again after revert)
max_results=5→max_result=5inessentials/v2/query.mdxquery.mdx:20 TypeError: HydraDB.query() got an unexpected keyword argument 'max_result'maxResults→maxResultinessentials/v2/query.mdxTS2561 ... 'maxResult' does not exist in type 'SearchQueryRequest'appKnowledgeblock (AGENTS.mdx:657)TS2322; the knownappKnowledgediagnostic is still printed as allowedmax_results→max_result(query.mdx:48)JSON body has fields the spec does not declare: ['.max_result']essentials/v2/query.mdx,app_knowledge)these [python] known failures now pass: ['essentials/v2/query.mdx (app_knowledge)']Reviews
Mira 5/5 on
3c01a6d(comment updated 14:13 UTC, after the last commit at 14:07). Devin Review check passed on3c01a6d, no new threads. No unresolved threads.🤖 Generated with Claude Code