Implements ADR-049 Unit 1 — the open-op wrapper gains an awaited,
bounded establishment phase, and the client stops erasing the error.
- OpenEstablisher hook + Establishment/EstablishmentError types:
register_openable_with_establisher awaits the establisher bounded
(earlier of dispatch deadline and per-registration timeout, else
ESTABLISHMENT_TIMEOUT = 10s) after allocation, before the reply and
before the pump handler is spawned (ADR-049 §1/§2). Implementation
note: the establisher takes (input, auth) only — the channel's
yield-once BiStream belongs exclusively to the pump handler
(amendment recorded in ADR-049).
- Establishment failure: teardown_channel + opener-ledger take +
policy.on_close un-increment (allocation and teardown balance;
the ledger take is the atomic gate, ADR-047 §7), reply
channel:open_failed with details {reason, message} — reason ∈
dial_failed / unknown_resource / resource_shortage / handler_error
/ timeout (ADR-049 §3). SSH contract consumer-visible: a failed
open never returns a channel_id.
- register_openable unchanged (no establisher = always-OK; existing
registrations compile and behave identically — compat gate test).
- ChannelClient::open_channel returns ChannelOpenError (breaking at
0.5.0): CallFailed { error: CallError } carries the wire error
verbatim (establishment_reason() branches on details.reason);
MissingChannelId / AdoptFailed cover the local-only shapes
(ADR-049 §4, review 006 N-1).
- Tests cover all four verification gates from the review: e2e
establisher failure through a real channels connection (typed
reason + no-channel + ledger un-increment), bounded timeout,
no-establisher compat, establisher-success pump round-trip; plus
reason-vocabulary mapping and bound arithmetic.
- Bump to 0.5.0 (open_channel error-type change is semver-relevant).
Verification: cargo test (608 passed), clippy --all-targets -D
warnings, fmt --check, doc --no-deps, wasm32 check — all clean.
34 lines
1.1 KiB
TOML
34 lines
1.1 KiB
TOML
[package]
|
|
name = "alkcall"
|
|
version = "0.5.0"
|
|
edition = "2021"
|
|
rust-version = "1.85"
|
|
license = "MIT OR Apache-2.0"
|
|
description = "Call + channels RPC: structured JSON operations, streaming subscriptions, service discovery, and N-channel multiplexing over one transport stream"
|
|
readme = "README.md"
|
|
repository = "https://git.alk.dev/alkdev/alkcall"
|
|
keywords = ["rpc", "json-rpc", "multiplexing", "wire-format", "alpn"]
|
|
categories = ["network-programming", "asynchronous", "encoding"]
|
|
exclude = [".opencode/", "AGENTS.md", "docs/reviews/", "docs/sdd_process.md"]
|
|
|
|
[lib]
|
|
name = "alkcall"
|
|
|
|
[features]
|
|
default = []
|
|
gateway = []
|
|
|
|
[dependencies]
|
|
jsonschema = { version = "0.46", default-features = false }
|
|
tokio = { version = "1", features = ["rt", "sync", "time", "io-util", "macros"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
async-trait = "0.1"
|
|
tracing = "0.1"
|
|
thiserror = "2"
|
|
uuid = { version = "1", features = ["v4", "rng-getrandom"] }
|
|
getrandom = { version = "0.4", features = ["wasm_js"] }
|
|
futures = "0.3"
|
|
parking_lot = "0.12"
|
|
bytes = "1"
|
|
zeroize = { version = "1", features = ["alloc", "derive"] } |