Skip to content

Type the public surface and document it for language servers - #703

Merged
arrry-hydraDB merged 5 commits into
hydra-db:mainfrom
jaywyawhare:feat/typed-surface
Dec 5, 2026
Merged

arrry-hydraDB merged 5 commits into
hydra-db:mainfrom
jaywyawhare:feat/typed-surface

Conversation

@jaywyawhare

@jaywyawhare jaywyawhare commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Type the public surface so language servers resolve it without guessing, and document it for hover and completion. Python overloads distinguish query versus entity-seeded retrieval and name versus external-ID lookup, TypeScript citation evidence and read-only seed arrays are tightened, and strict type-checker coverage over the examples keeps it from regressing.

Maintainer decision needed: this adds class-level and Args/Returns docstrings to the public Python surface, as the issue asks, which conflicts with the method-only one-line Doxygen convention in AGENTS.md. Precheck verifies docblock presence and passes. Please confirm the format exception or ask for one-line docstrings before this leaves draft.

Implementation details

Decisions

  • Use Python overloads for query versus entity-seeded retrieval and for name versus external-ID lookup; typed keyword options preserve the existing runtime typo diagnostics.
  • Tighten TypeScript citation evidence and allow read-only seed ID arrays; verify SelfGraph hover documentation survives in the shipped declarations.
  • Add strict type-checker coverage for every Python example and a TypeScript compiler regression test; both checks fail on base and pass on the branch.
  • Highlight starter imports in both READMEs while preserving existing imports.

Validation

  • The type-checker-over-examples check and the TypeScript compiler regression test both fail on base; both conformance files are updated.
  • scripts/precheck.py passes (981 changed lines, clean trial merge). Full suites on Kuzu pass; the known macOS pipe failure did not reproduce this run.
  • Ruff check and format, TypeScript lint, typecheck, and build pass.

Limits

Deferred under the line cap: remaining synchronous proxy signatures, secondary API docstrings, and TypeScript overloads for query versus entity-seeded retrieval. No new error codes.

Linked issue

Closes #671

AI Assistance

AI tools helped write and test parts of this. I reviewed and ran every change.

Checklist

  • Implements an issue a maintainer has /approved.
  • Small and scoped to that issue.
  • New errors have a code and hint, the same on API, CLI, and MCP in both SDKs (see AGENTS.md). No new codes.
  • Breaking changes described below, or none.

Breaking changes

None. See the docstring-format note above for the one policy decision this needs.


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

@arrry-hydraDB arrry-hydraDB added feature New capability area: parity Python vs TypeScript, conformance effort: L Design change or many modules labels Dec 4, 2026
@arrry-hydraDB
arrry-hydraDB marked this pull request as ready for review December 4, 2026 22:29

@arrry-hydraDB arrry-hydraDB left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@arrry-hydraDB
arrry-hydraDB merged commit 20896da into hydra-db:main Dec 5, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: parity Python vs TypeScript, conformance effort: L Design change or many modules feature New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type the public surface and document it for language servers

2 participants