Skip to content

Amend ADR-0007 for operator queries, and add the guest's query, verify and target_limit exports #1188

Open

Description

@coderdan

Background

ADR-0007 says a binding reaches the engine through a plan lowered from data. ADR-0009 makes the operator, not the index, the thing a query names, and gives probabilistic terms verify and target_limit. ADR-0009's appendix B sketches what then crosses the binding.

Problem

The data grammar a binding lowers names a field and, for a query, picks the term by the field's EQL type. It has no operator and no operator input, and no export can verify a decrypted value or size a fetch. Without them the Go SDK cannot offer per-operator queries, and a language SDK would have to reimplement the tokenizer to verify, which is the "lives twice" cost ADR-0007 accepts only for an encoder.

Proposal

  • Amend ADR-0007 with the query side, after ADR-0009 is accepted: the operator and its input in the data grammar, the term and its query domain back, and verify and target_limit as engine exports.
  • A guest export that derives a query term from a plan, a field, an operator name and its input. It refuses an operator the field's type does not answer, with the same shape of error as a mistyped field.
  • A batched verify export: one term and a page of decrypted values in, one boolean per value out.
  • A target_limit export: a term, want and the statistics in, the limit out.
  • The engine catalog reports, per EQL type, the operators it answers and the fidelity of each, so a generator can ask before the program runs.
  • Tests on the Rust side, and Go tests through the guest that hold the exports to the Rust results.

Related

Activity

  1. added
    enhancementNew feature or request
    rustPull requests that update Rust code
    on Oct 13, 2026
  2. self-assigned this
    on Oct 13, 2026
  3. added 20 commits that reference this issue on Oct 16, 2026
  4. added
    StagedDone in the next branch; closes when next merges into main
    on Oct 17, 2026
  5. coderdan commented on Oct 17, 2026

    @coderdan
    ContributorAuthor

    Staged: done in next by #1214 and #1215. This stays open until next merges into main, which closes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

SDKStagedDone in the next branch; closes when next merges into mainenhancementNew feature or requestrustPull requests that update Rust code

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions