Conversation
…delivery (#80) - SP-5 (online_cost_model): expose OnlineMetricsStore from planner; wire into CostModelPlanner via with_online_store() so scoring uses EMA-blended costs - SP-8 (feedback loop): Scraper gains dynamic add/remove/set_sketch_type endpoints backed by Arc<RwLock<>>; new on_metrics callback feeds observed bandwidth + CPU/sample deltas into the EMA store after each scrape - OpAMP role tracking: X-Agent-Role header distinguishes agent vs backend collectors; push_to_role() delivers role-appropriate configs; on_connect / on_disconnect callbacks register/deregister scrape endpoints automatically - main.rs: initialise EMA store, wire Scraper + OpAMP callbacks, start scraper background loop, push agent config to Agent-role and backend config to Backend-role collectors on every plan Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6 tasks
5 tasks
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.
Summary
online_cost_modelwired intoCostModelPlannerviawith_online_store(). Scoring now uses a live-blended cost table (70 % online / 30 % benchmark after 5+ observations) instead of static benchmarks, so the planner converges toward real-world behaviour over time.Scrapergains dynamic endpoint management (add_endpoint,remove_endpoint,set_sketch_type) backed byArc<RwLock<Vec<Endpoint>>>. Newon_metricscallback deliversScrapedData(sketch_size_bytes + derived cpu_micros_per_sample) to the EMA store after each successful scrape.X-Agent-Role: agent|backendheader distinguishes edge collectors from aggregation backends.push_to_role()delivers role-appropriate configs: agent YAML toAgentrole, backend YAML toBackendrole.on_connect/on_disconnecthooks auto-register/deregister scrape endpoints.Scraperwith EMA callback → buildOpampServerwith connect/disconnect hooks →CostModelPlanner::with_online_store→ start scraper background loop. After each plan: push agent config to agent-role collectors, backend config to backend-role collectors, update endpoint sketch types for EMA attribution.Test plan
cargo test— all 128 tests passmonitor— 8 tests including newon_metrics_callback_firesandadd_remove_endpointopamp— role parsing, push_to_role, connect/disconnectplanner::online_cost_model— EMA blending, store init, effective_table fallback🤖 Generated with Claude Code