Implement struct and union search queries #34

Merged
JayKobe6k merged 16 commits from issue-16-search-struct into main 2026-09-06 04:45:44 +00:00
Owner

Summary

  • add typed struct and union search requests, durable record handles, exact occurrences, scopes, aliases, fields, and CLI/text/JSON output
  • persist explicit RecordIdentity and RecordOccurrence nodes with endpoint-typed relationships in the single greenfield schema v1
  • preserve target ABI size/alignment in canonical record identity and reject incompatible schema-v1 databases without modifying them
  • use bounded bulk LadybugDB queries and compose struct search through the shared application service

Closes #16

Validation

  • nix develop --command cargo fmt --all -- --check
  • nix develop --command cargo lint
  • nix develop --command cargo test --all-targets --all-features (353 tests)
  • nix develop --command cargo doc --no-deps --all-features
  • nix develop --command cargo check --target x86_64-pc-windows-gnu --all-targets --all-features
  • git diff --check
## Summary - add typed struct and union search requests, durable record handles, exact occurrences, scopes, aliases, fields, and CLI/text/JSON output - persist explicit RecordIdentity and RecordOccurrence nodes with endpoint-typed relationships in the single greenfield schema v1 - preserve target ABI size/alignment in canonical record identity and reject incompatible schema-v1 databases without modifying them - use bounded bulk LadybugDB queries and compose struct search through the shared application service Closes #16 ## Validation - `nix develop --command cargo fmt --all -- --check` - `nix develop --command cargo lint` - `nix develop --command cargo test --all-targets --all-features` (353 tests) - `nix develop --command cargo doc --no-deps --all-features` - `nix develop --command cargo check --target x86_64-pc-windows-gnu --all-targets --all-features` - `git diff --check`
Issue #16: add application-owned struct-target types in a new
search_struct module (RecordKind, RecordHandle, StructRecordField,
StructRecordDetail, StructSearchHitParts, struct_search_hit).
Shared search.rs changes are additive-only: one optional struct
detail on SearchHit plus a struct_record constructor and accessor.
No pipeline qualification, ordering, grouping, or truncation
behavior changes.
Issue #16: add LadybugStructSearchRepository implementing
SearchRepositoryPort for the struct target using only schema-v4
source-fact tables (no migration). Aggregate SourceType nodes map
through an explicit closed subtype to RecordKind, declarations
canonicalize to one durable RecordHandle per symbol with every
occurrence retained, and fields, typedef aliases, enclosing scopes,
and exact anchors decode to typed SearchHit values. Cypher stays in
the adapter; other targets report a typed unsupported-target error.
Issue #16: keep the CLI thin over typed SearchHit values. JSON
matches gain an optional typed record object (closed kind,
per-occurrence definition status, ordered fields with canonical
types, typedef aliases); text gains record and field sub-lines so
the canonical handle plus qualified name and exact anchor
disambiguate anonymous and same-named records. Production main
composes SearchService with LadybugStructSearchRepository while
update remains typed unavailable.
Issue #16: describe the closed struct/union record kind, canonical
identity and duplicate canonicalization, applicable and rejected
filter/group/order fields, the absence of lineage-specific value
options, and the text/JSON result shapes. Record the schema-v4
query mapping (no migration) and update the README status.
# Conflicts:
#	docs/search.md
#	src/application/search.rs
Harden struct search boundaries
Some checks failed
Validate / Formatting, linting, and tests (push) Failing after 7m32s
Validate / Formatting, linting, and tests (pull_request) Failing after 7m59s
824e62d3a7
Avoid duplicate branch validation
Some checks failed
Validate / Formatting, linting, and tests (pull_request) Failing after 2m16s
4c565dfec5
Bound enum CLI test concurrency
Some checks failed
Validate / Formatting, linting, and tests (pull_request) Failing after 7m25s
825bdca324
Serialize function search native tests
All checks were successful
Validate / Formatting, linting, and tests (pull_request) Successful in 9m47s
2f44b458fe
Sign in to join this conversation.
No description provided.