docs(arch): hub-wiring cluster — aggregated env, peer_operations, from_call cleanup, alknet-hub crate spec

Three ADRs addressing gaps surfaced by the first hub consumer (alkapi):

- ADR-067: Aggregated peer-env wiring — Dispatcher::with_aggregated_env hook
  so compose_root_env reads a shared PeerCompositeEnv across all calls,
  not a fresh per-call one. The hub-defining gap (alkapi OQ-08 / G.1).

- ADR-068: PeerCompositeEnv::peer_operations override — adds
  list_operation_names() to OperationEnv, overrides on OverlayOperationEnv
  and PeerCompositeEnv. Fixes services/list-peers returning empty operation
  lists for non-local peers (alkapi G.6).

- ADR-069: from_call is a manual free function, not auto-wired — reverses
  the aspirational OQ-27 resolution to match the implementation. Cleans
  the 'v1 default' hedging language in ADR-017 and client-and-adapters.md
  (alkapi G.4).

New crate spec: alknet-hub — reusable hub pattern (aggregated env,
connection lifecycle, worker supervision with backoff, service discovery).

Spec fixes: builder API drift (with_local/with_local_streaming separation),
ScopedOperationEnv → ScopedPeerEnv type name, OQ count 51→54.

Three new OQs: OQ-52 (wait_for_close), OQ-53 (backoff defaults),
OQ-54 (inbound hook placement).
This commit is contained in:
glm-5.2 committed 2026-07-09 16:01:30 +00:00
1 parent 2282647f8b
commit 87b2c2a5ef
15 files changed
+1052 -47

No files matched your search

@@ -1,15 +1,20 @@
# OQ-27: from_call Re-Import Trigger
- **Origin**: [client-and-adapters.md](crates/call/client-and-adapters.md), ADR-017 Assumption 4
- **Status**: **resolved** (2026-06-27)
- **Status**: **resolved** (2026-07-09 — amended from 2026-06-27 resolution)
- **Door type**: Two-way
- **Priority**: low
- **Resolution**: The decision is **auto-re-import on connection
establishment**. The overlay is per-connection (Layer 2, ADR-024), so a
stale overlay dies with the connection; re-import on reconnect is
naturally scoped to the new connection. This is the right default for the
runner pattern (a worker reconnects → the hub re-discovers the worker's
ops automatically). An explicit `CallConnection::refresh()` method is a
genuine feature addition — non-breaking, additive — if a deployment
needs manual control.
- **Resolution**: `from_call` is a **manual free function**; the assembly layer
calls it after `connect()`. The overlay is per-connection (Layer 2, ADR-024),
so a stale overlay dies with the connection; re-import on reconnect is
naturally scoped to the new connection. A `CallConnection::refresh()` method
for mid-connection re-discovery is a genuine feature addition —
non-breaking, additive — if a deployment needs manual re-discovery without
drop-and-reconnect. See [ADR-069](../decisions/069-from-call-manual-free-function.md)
for the full rationale.
The original 2026-06-27 resolution ("auto-re-import on connection
establishment") was aspirational — written before the implementation
existed. The implementation made the right call (manual free function);
this amendment aligns the spec with the implementation.
- **Cross-references**: ADR-017, ADR-024, [client-and-adapters.md](crates/call/client-and-adapters.md)