Skip to content

refactor(workload): separate query demand from data evidence - #442

Merged
zzylol merged 1 commit into
mainfrom
refactor/data-workload-parallel
Sep 18, 2026
Merged

zzylol merged 1 commit into
mainfrom
refactor/data-workload-parallel

Conversation

@zzylol

@zzylol zzylol commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Query demand and source-data evidence have independent update lifecycles. This PR separates their ownership and passes them as peer inputs through recurrence and lifecycle planning.

Before this PR

QueryWorkload embeds data_workload, so updating source evidence requires changing the query-workload object.

After this PR

PlanningWorkload { query_workload, data_workload } holds the two independently. QueryWorkload contains only language and query demand. WorkloadDemand carries query demand and optional data evidence together to planning boundaries, with explicit constructors for evidence presence or absence. Shared data validation preserves rejection of invalid ingestion rates and contradictory at-rest evidence.

This PR targets main and contains only the workload split, caller/test migrations, and its API documentation. Ingestion-interval fields, PromQL lowering, cadence freshness, and Post-ASAP IR handling are in #417, stacked on this PR. Merge this PR first.

Validation

  • Full workspace tests pass on the split-only tree.
  • Formatting, Clippy with warnings denied, and diff checks pass.
  • Lifecycle and recurrence regression coverage verifies independent data validation.

@zzylol

zzylol commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Removed the embedded QueryWorkload.data_workload compatibility field in e9d0c76. PlanningWorkload { query_workload, data_workload } is now the only plan-ready shape.

Current validation: cargo check --workspace passes. The test targets still need mechanical fixture migration to the new envelope before this PR is merge-ready.

@zzylol
zzylol changed the base branch from 408-promql-instant-aggregates-lose-their-evaluation-horizon-and-lower-directly-over-scan to main September 18, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant