feat(cost): share physical resources and consume offline evidence - #357
Merged
Merged
Conversation
This was referenced Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Refs #322. Provide shared physical-resource definitions and a conservative offline-evidence path for planning. This PR is the planner library foundation, not the backend-only execution prototype.
Before this PR
The planner lacked a versioned empirical provider and query-matched exact/sketch comparison. Analytical and measured resource fields were defined separately.
After this PR
PhysicalResources<Cpu, Bytes>,ModeledCpu,MeasuredCpu,Measurement, andMeasuredResourcesinasap-types::resources.Example: changing compatible update evidence can change candidate ranking; missing, stale or mismatched evidence keeps conservative behavior. A missing preparation measurement is not assumed free for arbitrary algorithms. Observed errors never become formal guarantees.
Scope and related work
This PR contains core code, consumer migrations, schemas, tests and developer documentation (15 files). It contains no benchmark runners, large generated results or synthetic execution benchmarks.
/mydata/metrics.txtplus o11y queries -> backend -> ASAPPlanner -> backend execution, with no Collector or Prometheus runtime. Actual result equivalence must precede latency/resource-benefit claims. That prototype is still being implemented and is not claimed complete here.Validation
358 mapping tests and 163 shared-types tests pass. Workspace formatting and strict all-target/all-feature clippy pass. Backend integration against the published shared-resource commit passes 7 integration tests, 633 control-plane tests and 973 data-plane tests.
No automatic issue closure or merge. Earlier large artifact commits remain recoverable in history; review the aggregate Files changed diff.