Skip to content

Adopt core 0.5.0: scoped command registration - #16

Merged
mbreissi merged 1 commit into
mainfrom
feat/core-0.5-adoption
Jul 28, 2026
Merged

Adopt core 0.5.0: scoped command registration#16
mbreissi merged 1 commit into
mainfrom
feat/core-0.5-adoption

Conversation

@mbreissi

Copy link
Copy Markdown
Contributor

Part of the core 0.5.0 coordinated wave (DESIGN-scoped-commands.md §3 step 3). This repo did not compile against core main after the breaking register signature change.

What changed

  • Pin bumped from 36a70c4 (pre-0.5.0) to the rust-lib/v0.5.0 tag, a14a328. Cargo.lock regenerated with the local [patch] override inactive, so it records the git pin (SD-B).
  • Command registration migrated to register(verb, scope, handler) with (request, addressed_instance) handlers.

Verb scope decisions

Verb Scope Why
get-stats Both A route is a component.instances[] entry. Component-addressed = every route's counters (today's reply); route-addressed = that route's counters.
flush Both Same dual semantics. Mutating, so an addressed request must not fan out to every route.
pause Both Component-addressed with no selector = all routes (unchanged); route-addressed, or the legacy body.route, = one route.
resume Both Inverse of pause.

Component would refuse a legitimate per-route request; Instance would make the established fleet-wide form an error. Resolution is addressed_instance ?? body.route — the topic token is authoritative (D-SC-4) — and the route body selector is retained unchanged for component-addressed callers. get-stats/flush never 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-existing pause/resume behavior.

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 test101 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 9093.22% lines, gate passes.

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.
@mbreissi
mbreissi merged commit 3afb225 into main Jul 28, 2026
4 checks passed
@mbreissi
mbreissi deleted the feat/core-0.5-adoption branch July 28, 2026 01:16
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