Adopt core 0.4.0: scoped instance routing - #12
Merged
Conversation
- 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
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.
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
edgecommonsdependency tables → revef4c6248(rust-lib/v0.4.0);Cargo.lockregenerated with the local[patch]inactive so it keeps the committed git source (D-CAM-27).register_scoped. A newscoped_requestreconciler enforces addressed-instance routing:{instance}token is authoritative — a conflictingbody.instanceisBAD_ARGS;NO_SUCH_INSTANCEfrom the registry);sb/list,sb/discover,sb/capture-group-submit,sb/capture-cancel) refuse an instance-addressed delivery withBAD_ARGSinstead of silently ignoring the token.sb/capture,sb/capture-group) must stay onregister_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-cancelsettling 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/discoveris genuinely configuration-conditional (global.discovery.enabled: falserefuses withUNSUPPORTED_CAPABILITY), so itsdescribeentry is publisheddisabledwith 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/reference/messaging-interface.mddocuments both command scopes, topic-authoritative routing, the refusal set, and the discover availability (present tense);DESIGN.mdD-CAM-18 is refreshed, register line D-CAM-29 added, §12.1 topic prose and open question 8 updated;AGENTS.mdrouting convention updated.Validation
cargo testgreen before changes (631 lib + 4 integration; one pre-existing local-only CRLF checkout artifact indeployment_configfixed by re-checking outk8s/configmap.yamlwith 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