feat: migrate protocol and HTTP to structured interface references

T-20: identify interfaces by exact scope/name pairs; add optional opaque scope_ref metadata and separate shape validation from path-dependent scope compatibility. Preserve call error precedence, strict JSON, validators and transport boundaries. Mechanically migrate consumers and document API/wire compatibility and deferred lifecycle semantics.

Validation: cargo fmt --all --check; git diff --check; cargo check --workspace --all-targets; cargo test -p wip-protocol -p wip-http; cargo test --workspace (221 passing tests including doctests); cargo test --workspace --all-targets; nix develop --command cargo clippy --workspace --all-targets -- -D warnings; RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps. All pass. cargo/rustc 1.95.0; development-shell Clippy/rustc 1.97.1.
This commit is contained in:
2026-10-07 18:29:51 +09:00
parent bf5fa54f44
commit 8ecc307fc9
34 changed files with 2124 additions and 263 deletions
+4 -1
View File
@@ -98,6 +98,7 @@ fn real_listener_serves_three_core_interactions_and_write() {
validator: file.validator.clone(),
},
interface: InterfaceTarget {
scope_ref: None,
reference: file.interfaces[0].clone(),
validator: None,
},
@@ -141,6 +142,7 @@ fn real_listener_serves_three_core_interactions_and_write() {
validator: file.validator,
},
interface: InterfaceTarget {
scope_ref: None,
reference: file.interfaces[1].clone(),
validator: None,
},
@@ -412,7 +414,7 @@ fn call_argument_decoding_does_not_mask_missing_target() {
let config = ServerConfig::for_root(temporary.path());
let server = WipFsServer::new(config).expect("build server");
let endpoint = Endpoint::parse("http://localhost/wip").expect("endpoint");
let body = br#"{"target":{"path":"/missing"},"interface":{"reference":"unknown"},"operation":"missing","arguments":{"bytes":"not-base64"}}"#;
let body = br#"{"target":{"path":"/missing"},"interface":{"reference":{"scope":"/","name":"unknown"}},"operation":"missing","arguments":{"bytes":"not-base64"}}"#;
let request = http::Request::builder()
.method(http::Method::POST)
.uri(endpoint.route(Route::CallOperation).as_str())
@@ -490,6 +492,7 @@ fn read_response_size_failure_is_transport_local() {
validator: file.validator,
},
interface: InterfaceTarget {
scope_ref: None,
reference: file.interfaces[0].clone(),
validator: None,
},