Skip to content

Audit ASAPQuery precompute-engine changes for backend parity #532

Open

Description

@milindsrivastava1997

We need to audit if/which of these ASAPQuery precompute-engine changes are not in ASAPQuery-backend, then document the gaps and create follow-up work for required ports.

ASAPQuery PR inventory:

For each PR, identify whether its behavior already exists in ASAPQuery-backend, is intentionally superseded, or requires a backend change. Record supporting evidence and file or link follow-up issues for every required change.

Activity

  1. added
    meta: trackingUmbrella issue coordinating multiple implementation gaps
    area: data planeRuntime ingestion, storage, and query-serving data paths
    on Sep 9, 2026
  2. milindsrivastava1997 commented on Sep 9, 2026

    @milindsrivastava1997
    ContributorAuthor

    Parity audit (2026-09-09)

    Compared the listed ASAPQuery PRs against backend main at d5dc72f. This is a static source audit; no repository changes were made.

    Already present or represented by the current backend contract

    Intentionally superseded / outside the backend contract

    Required follow-up work

    1. Introduce WindowBoundaryType as the authoritative four-case contract: OpenOpen (start,end), OpenClosed (start,end], ClosedOpen [start,end), and ClosedClosed [start,end].

      • Migrate promql_right_closed: true to OpenClosed while preserving state-identity separation from existing half-open states.
      • Define tumbling/sliding, timestamp-zero, watermark-closure, and boundary-sample behavior; test every variant.
    2. Port Execute completed cohorts at every materialized maintenance frontier #665/Remove test-only query planning and unused backend APIs and dependencies #717 count semantics for raw precompute. Bare CMS and MultipleSum currently add sample values. Add an explicit count-vs-value contract so count mode adds one per observation, as heap Top-K already does through weight_mode. THIS IS DONE.

    3. Port Remove the unreferenced legacy planning endpoints #715 fail-fast configuration validation. Invalid HLL precision and invalid Min/Max subtype must be rejected at plan/config installation, rather than falling through to a warning/default accumulator path.

    4. Port refactor: split the MinMax aggregation family into Min and Max #716 ingest-throughput diagnostics. samples_ingested is maintained but not periodically reported; add a bounded periodic debug metric/log with a testable interval or metric surface.

    5. Re-evaluate whether SetAggregator and DeltaSetAggregator should return. Decide whether the system needs exact, enumerable key membership / exact distinct semantics. If yes, define the supported query path, state model, chronological-merge contract for deltas, persistence/late-data semantics, and tests before restoring either accumulator.

    6. Port docs(control_plane): design doc for BackendPlan wire format #389 before supporting SQL Top-K. Add SQL parsing/planning/execution for GROUP BY with COUNT(...), descending aggregate order, and LIMIT k, backed by a heap-bearing frequency sketch. This is separate from PromQL/query-plan Top-K.

    7. Port SummaryExecutor: permanent self-exclusions + upstream composition gaps leave some PromQL shapes always on the legacy/archive path #436 before supporting SQL materializations. Define a typed source-column-to-ingest-value contract so a SQL materialization uses its declared value_column rather than always using the wire scalar.

    No follow-up issues have been filed by this audit.

  3. milindsrivastava1997 commented on Sep 10, 2026

    @milindsrivastava1997
    ContributorAuthor

    Audit update (2026-09-10)

    Follow-up item 4 is complete via #578: backend ingest throughput is now exposed as periodic diagnostics and Prometheus metrics.

    The merged change records monotonic accepted-sample, processed-update, and materialized-output counters; the 30-second log derives elapsed-time rates without resetting shared state. Regression coverage verifies non-destructive observations, correct interval deltas, and ticker cancellation.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: data planeRuntime ingestion, storage, and query-serving data pathsmeta: trackingUmbrella issue coordinating multiple implementation gaps

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions