Skip to content

feat(mvp): validate versioned PhysicalPlan contract in ASAPCollector - #585

Merged
zzylol merged 5 commits into
mainfrom
feat/physical-plan-mvp-validation
Sep 4, 2026
Merged

zzylol merged 5 commits into
mainfrom
feat/physical-plan-mvp-validation

Conversation

@zzylol

@zzylol zzylol commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • consume ASAPQuery CollectorPlan generations with plan_id, globally monotonic plan_version, activation/expiry, backend compatibility, exact materialization fingerprints, and one-to-one TransmissionRules
  • stage a validated generation until activation_unix_ms, then validate every runtime target and cut over all shards as one boundary; report APPLIED only after the whole generation installs, otherwise report FAILED
  • reject unknown window_implementation_id values and align Go/Rust fail-closed behavior for exact sum
  • project plan-owned sampling, delta, and isotropic CountSketch GOS policy without local candidate selection or ID derivation
  • attach plan-derived frame identity in the production warm flush/sub-window path, with sequence/checkpoint continuity across windows and a fresh full checkpoint after restart
  • allocate identity for a drained envelope batch transactionally, so one invalid envelope cannot consume sequence numbers for its siblings
  • pin the cross-language JSON contract with shared Go/Rust tests and document the strict MVP path

Backend dependency

This validates the PhysicalPlan stack in ASAPQuery-backend PRs #472, #474, #475, #476, and #477. PR #477 includes atomic batch preflight, concrete-series delta lineage, cross-window sequencing, and STAGED activation synchronization found during this integration.

Validation

  • cargo fmt --manifest-path asap-precompute-rs/Cargo.toml -- --check
  • cargo clippy --manifest-path asap-precompute-rs/Cargo.toml --all-features --all-targets (passes with existing warnings)
  • cargo test --manifest-path asap-precompute-rs/Cargo.toml --all-features: 151 tests passed
  • (cd asap-precompute-go && go test ./...): passed
  • (cd opentelemetry-collector-contrib-patch/processor/asapedgeprocessor && go test ./...): passed
  • both Go suites also pass with the CI-pinned sketchlib-go commit 148643f
  • git diff --check

Fail-closed boundaries

The consumer rejects unsupported/unknown window realizations, exact sum until both runtime projections share its wire contract, keyed CMS heap serving, anisotropic GOS, non-integral delta thresholds, mismatched cadence/encoding/producer rules, stale or expired generations, global version resets across plan IDs, unknown schema fields, and any runtime executor whose window/family/algorithm parameters do not match the physical plan.

The current processor registry has one executor slot per metric name. Two materializations for the same metric therefore fail closed instead of being silently collapsed; supporting them requires the follow-up registry refactor to key executors by materialization fingerprint.

HTTP 2xx / gRPC OK remains the delivery acknowledgement, with no second application ACK or sender WAL. asap_edge assigns identity before exporter handoff; transport retry/persistence is the configured Collector exporter's responsibility.

@zzylol
zzylol force-pushed the feat/physical-plan-mvp-validation branch from 2cb8ca8 to e3749c4 Compare September 3, 2026 14:36
@zzylol

zzylol commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Updated after ASAPCollector docs PR #586: rebased onto current main and added strict consumption of Planner-owned abstract_window_framework plus backend-owned window_implementation_id/pane_secs/state_layout. The MVP accepts only tumbling + equal anchored panes + anchored-pane-v1 and atomically rejects unsupported or mismatched realizations in both Rust and Go.

@zzylol
zzylol force-pushed the feat/physical-plan-mvp-validation branch from 334579c to eca666f Compare September 3, 2026 20:22
@zzylol
zzylol merged commit 0dd3e2e into main Sep 4, 2026
1 of 2 checks passed
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