docs(arch): ADR-057 — alknet-tty does not depend on alknet-call (self-contained negotiation framing)
The earlier specs claimed alknet-tty reuses alknet-call's FrameFramedReader/FrameFramedWriter 'framing utility' (ADR-052 §6, ADR-003 Am. 1). A pre-implementation sanity check found this was unsound: FrameFramedReader::read_frame() is hardcoded to deserialize EventEnvelope — the length-prefix read and the type-specific deserialize are one entangled call, not a separable utility. alknet-tty's negotiation payload is a NegotiateRequest, not an EventEnvelope, so the claimed reuse did not exist in a usable form. ADR-057: alknet-tty implements its own ~30-line length-prefixed framing directly on tokio AsyncRead/AsyncWrite. The format coincides with alknet-call's framing by convention (both are length-prefixed JSON); the implementations are independent. alknet-tty depends on alknet-core only — no alknet-call dependency. The ~30 lines of framing is an idiom, not a domain abstraction worth a cross-crate dependency. Updates: - ADR-003 Amendment 2: clarifies alknet-tty does not depend on alknet-call; the Am. 1 protocol-foundation exception remains for alknet-http/agent/napi (actual type reuse), not alknet-tty. - ADR-052 §6: framing is self-contained in alknet-tty; format coincides by convention, not by code reuse. - overview.md: dependency block drops alknet-call; new 'Why no alknet-call dependency' subsection explains the unsound-reuse finding. - tty-wire.md, tty-backend.md, tty README, crates/tty/README.md, top-level README: ADR tables, Design Decisions tables, and dependency edges updated to reflect alknet-core-only dependency. - ADR-053, ADR-054: References updated to ADR-003 Am. 2 + ADR-057.
This commit is contained in:
1 parent
25f0f55592
commit
dbac972aaa
10 files changed
+297
-76
No files matched your search
@@ -191,7 +191,7 @@ is NOT" — door type classifies reversal cost, not urgency.
|
||||
|
||||
- `docs/research/alknet-tty/phase-0-findings.md` DP-1 — the placement
|
||||
question this ADR resolves
|
||||
- [ADR-003](003-crate-decomposition.md) + Amendment 1 — crate
|
||||
- [ADR-003](003-crate-decomposition.md) + Amendments 1 & 2 — crate
|
||||
decomposition rule (the sibling-crate placement preserves it)
|
||||
- [ADR-009](009-one-way-door-decision-framework.md) — door-type-as-deferral
|
||||
anti-pattern (this ADR's two-way-door classification is reversal cost,
|
||||
|
||||
Reference in new issue
Block a user