Skip to content

Adopt core 0.4.0: scoped instance routing - #12

Merged
mbreissi merged 1 commit into
mainfrom
feat/core-0.4-adoption
Jul 27, 2026
Merged

Adopt core 0.4.0: scoped instance routing#12
mbreissi merged 1 commit into
mainfrom
feat/core-0.4-adoption

Conversation

@mbreissi

Copy link
Copy Markdown
Contributor

Adopts the core 0.4.0 release (rust-lib/v0.4.0, ef4c6248) — the adapter-core enablers wave following the conformance PR (#11).

What changed

  • Pin bump: both edgecommons dependency tables → rev ef4c6248 (rust-lib/v0.4.0); Cargo.lock regenerated with the local [patch] inactive so it keeps the committed git source (D-CAM-27).
  • Scoped registration (SOUTHBOUND §2.2 / D-U28, D-CAM-29): every immediate-reply verb is registered via register_scoped. A new scoped_request reconciler enforces addressed-instance routing:
    • the delivery topic's {instance} token is authoritative — a conflicting body.instance is BAD_ARGS;
    • topic-only → the token is injected as the routing selector (unknown token → NO_SUCH_INSTANCE from the registry);
    • component-scoped delivery → the existing body routing (incl. the single-camera default) applies unchanged;
    • verbs whose closed schemas carry no camera selector (sb/list, sb/discover, sb/capture-group-submit, sb/capture-cancel) refuse an instance-addressed delivery with BAD_ARGS instead of silently ignoring the token.
    • Tests: the three §2.2 routing cases (pure), the refusal/deferral classification, and an integration test through the production dispatch stack against the real inbox.
  • Recorded gap, surfaced up front (D-CAM-29): the two deferred verbs (sb/capture, sb/capture-group) must stay on register_outcome — core 0.4.0 exposes the addressed-instance token only to the immediate-reply scoped registration, and trading away deferred settlement (dispatch-permit release during captures; sb/capture-cancel settling the held reply) is not an acceptable reduction. They therefore route by the body on either topic. Closing this needs a core scoped-outcome registration (core follow-up, not an adapter workaround).
  • set_command_availability: sb/discover is genuinely configuration-conditional (global.discovery.enabled: false refuses with UNSUPPORTED_CAPABILITY), so its describe entry is published disabled with a reason — set at startup and reapplied on committed configuration reloads. PTZ capability is per-camera and runtime-discovered, so it is deliberately not mirrored into component-scope availability.
  • receivedTs: N/A — direct camera client; no upstream hop stamps a receive time.
  • Docs: docs/reference/messaging-interface.md documents both command scopes, topic-authoritative routing, the refusal set, and the discover availability (present tense); DESIGN.md D-CAM-18 is refreshed, register line D-CAM-29 added, §12.1 topic prose and open question 8 updated; AGENTS.md routing convention updated.

Validation

  • Baseline cargo test green before changes (631 lib + 4 integration; one pre-existing local-only CRLF checkout artifact in deployment_config fixed by re-checking out k8s/configmap.yaml with LF — not a code change).
  • cargo test: 640 passed, 0 failed, 1 ignored (636 lib + 4 integration; +5 new tests).
  • cargo clippy --all-targets: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_014iQDskU2E1HLStYHoZrSTn

- Pin edgecommons at rust-lib/v0.4.0 (ef4c6248) in both dependency
  tables and regenerate Cargo.lock (git-sourced, per D-CAM-27).
- Register every immediate-reply verb via register_scoped; scoped_request
  enforces SOUTHBOUND §2.2 addressed-instance routing: the delivery
  topic's instance token is authoritative (conflicting body.instance ->
  BAD_ARGS; topic-only routes by the token; component scope keeps the
  existing body routing incl. the single-camera default). Verbs whose
  closed schemas carry no camera selector (sb/list, sb/discover,
  sb/capture-group-submit, sb/capture-cancel) refuse instance-addressed
  delivery. Tests cover all three routing cases, the refusal set, and
  the production dispatch stack (D-CAM-29).
- Recorded gap (D-CAM-29): sb/capture and sb/capture-group stay on
  register_outcome - core 0.4.0 exposes the topic token only to the
  immediate scoped registration, and deferred settlement is not
  negotiable - so they route by the body on either topic. Closing it
  needs a core scoped-outcome registration.
- set_command_availability: sb/discover is published `disabled` in
  describe while global.discovery.enabled is false, initially and on
  committed reloads (apply_discover_availability + config listener).
  PTZ capability stays per-camera/runtime and is not mirrored.
- receivedTs: N/A - direct camera client, no upstream hop.
- Docs: messaging-interface documents the two command scopes,
  topic-authoritative routing, and the discover availability; DESIGN
  D-CAM-18/D-CAM-29 + §12.1 prose + open question 8 refreshed;
  AGENTS.md routing convention updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014iQDskU2E1HLStYHoZrSTn
@mbreissi
mbreissi merged commit de5198b into main Jul 27, 2026
8 of 10 checks passed
@mbreissi
mbreissi deleted the feat/core-0.4-adoption branch July 27, 2026 19:07
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