Skip to content

Adopt core 0.5.0: scoped command registration - #7

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

Adopt core 0.5.0: scoped command registration#7
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.
  • Command registration migrated to register(verb, scope, handler) with (request, addressed_instance) handlers.

Verb scope decisions

Verb Scope No instance named One instance named Why
get-status Both component-wide roster + summary that instance's document "No instance named" has always been a meaningful component-wide answer here, not a default to resolve — D-SC-3's dual-semantics use.
trigger Both every active instance (scope: "all") that instance Same.
set-activation Instance INSTANCE_REQUIRED that instance It never had an "all" form. Per D-SC-4 the "no instance named" policy and the UNKNOWN_INSTANCE check stay component-side — the library owns addressing, not configuration knowledge.

A new address() folds the topic-addressed instance into the request's instance body selector, so each handler keeps reading exactly one selector whichever inbox the request arrived on. The topic wins (D-SC-4); in practice it can only fill in a missing value, because the library already refuses a topic/body.instance conflict with BAD_ARGS before dispatch. The instance body field is unchanged for component-addressed callers, so no existing caller breaks.

Two unit tests cover the new resolution (topic wins over body; a non-object body still carries the addressing).

Docs

docs/reference/messaging-interface.md (Scope column, new "Addressing an instance" section, the per-instance inbox topic, corrected {instance} grammar note), docs/reference/data-types.md, docs/how-to-guides.md (the activation recipe now shows the instance-addressed topic and its component-topic equivalent), DESIGN.md §16 (scope table + rationale in the migration banner), AGENTS.md.

Validation

  • cargo test --features dest-s3,dest-sftp,dest-ftps,dest-http,dest-azure,dest-gcs617 passed across all targets (583 lib + integration), 0 failed. Baseline on this branch before the change: green.
  • cargo clippy --all-targets --features <same> -- -D warnings — clean.
  • cargo llvm-cov with the CI feature set and ignore-regex, --fail-under-lines 9093.43% lines, gate passes (control.rs 99.11%).

Bump the edgecommons pin to the rust-lib/v0.5.0 tag (a14a328) and migrate
the control plane 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.

get-status and trigger declare CommandScope::Both. "No instance named" has
always carried a meaningful component-wide answer for these two -- the roster
plus summary, and "every active instance" -- rather than being a default to
resolve, which is exactly D-SC-3's dual-semantics use. set-activation
declares CommandScope::Instance: it never had an "all" form, and per D-SC-4
its INSTANCE_REQUIRED policy and the UNKNOWN_INSTANCE check stay
component-side, since the library owns addressing and not configuration
knowledge.

A new `address()` folds the topic-addressed instance into the request's
`instance` body selector, so each handler keeps reading exactly one selector
whichever inbox the request arrived on. The topic wins (D-SC-4); in practice
it can only fill in a missing value, because the library already refuses a
topic/body conflict with BAD_ARGS before dispatch. The `instance` body field
is unchanged for component-addressed callers.

Docs: messaging-interface gains a Scope column, an "Addressing an instance"
section, and the per-instance inbox topic; data-types and the how-to
activation recipe describe both ways to name an instance; DESIGN §16's
migration banner carries the scope table and rationale, and AGENTS.md the
convention.

Validation: cargo test 617 passed across all targets (583 lib) with the CI
feature set, clippy -D warnings clean, coverage 93.43% lines against the 90%
gate (control.rs 99.11%).
@mbreissi
mbreissi merged commit a8e2052 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