Adopt core 0.5.0: scoped command registration - #16
Merged
Conversation
Bump the edgecommons pin to the rust-lib/v0.5.0 tag (a14a328) and migrate the command surface to 0.5.0's breaking two-form registration (DESIGN-scoped-commands D-SC-1/D-SC-2): every verb declares a CommandScope and every handler receives the addressed instance. All four processor verbs declare CommandScope::Both (D-TP-9). A route is a component.instances[] entry, so a route-addressed delivery names exactly one route while a component-addressed one keeps its established "every route" meaning -- D-SC-3's dual-semantics use. Resolution is `addressed_instance ?? body.route`: the topic token is authoritative (D-SC-4) and the legacy `route` body selector is unchanged for component-addressed callers. get-stats and flush, which never had a body selector, now honor the topic token instead of ignoring it, so an addressed flush can no longer fan out to every route. Docs: the messaging-interface and how-to reference pages state each verb's scope and the per-route inbox topic; DESIGN.md carries the register entry and AGENTS.md the convention. The D-TP-8 panel rationale is rewritten -- both panels stay component-scoped because they render fleet-wide aggregates, not because routes are unaddressable. Validation: cargo test 101 (default features) / 114 (coverage feature set), clippy -D warnings clean, coverage 93.22% lines against the 90% gate.
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.
Part of the core 0.5.0 coordinated wave (
DESIGN-scoped-commands.md§3 step 3). This repo did not compile against coremainafter the breakingregistersignature change.What changed
36a70c4(pre-0.5.0) to therust-lib/v0.5.0tag,a14a328.Cargo.lockregenerated with the local[patch]override inactive, so it records the git pin (SD-B).register(verb, scope, handler)with(request, addressed_instance)handlers.Verb scope decisions
get-statsBothcomponent.instances[]entry. Component-addressed = every route's counters (today's reply); route-addressed = that route's counters.flushBothpauseBothbody.route, = one route.resumeBothpause.Componentwould refuse a legitimate per-route request;Instancewould make the established fleet-wide form an error. Resolution isaddressed_instance ?? body.route— the topic token is authoritative (D-SC-4) — and theroutebody selector is retained unchanged for component-addressed callers.get-stats/flushnever had a body selector and now honor the topic token rather than ignoring it. Unknown route ids stay non-fatal (they select nothing), matching the pre-existingpause/resumebehavior.The two edge-console panels stay
scope: "component", but D-TP-8's rationale is corrected: they are component-scoped because both render fleet-wide aggregates over every route — not because a route is unaddressable.Docs
docs/reference/messaging-interface.md(verb tables gain a Scope column, plus a "Verb scope and addressing" section and the per-route inbox topic),docs/how-to-guides.md,DESIGN.md(command table + new register entry D-TP-9, corrected D-TP-8, refreshed test count),AGENTS.md,CLAUDE.md(the pin note also drops the stale "private repo /EDGECOMMONS_READ_TOKEN" claim).Validation
cargo test— 101 passed (default features); 114 passed with the coverage job's feature set. Baseline on this branch before the change: 99 passed, green.cargo clippy --all-targets -- -D warnings— clean.cargo llvm-cov --locked --features streaming,streaming-file-parquet,streaming-file-avro,scripting-lua --ignore-filename-regex '(app|main|test_support)\.rs' --fail-under-lines 90— 93.22% lines, gate passes.