The monolithic open-questions.md (1310 lines, 47 OQs) was large enough to be unmanageable, with high size variance (OQ-42 at 220 lines next to OQ-06 at 8). Decomposed into one file per OQ under docs/architecture/questions/ (NNN-slug.md, mirroring the ADR convention), with open-questions.md retained as the index: theme-grouped tables plus a cross-theme Deferred/Blocked section that surfaces the 6 deferred OQs with their Blocked-on conditions inline (the safe-exit visibility surface). Per-OQ content moved verbatim; all 62 inbound links stay valid (none used anchors). README's curated OQ summary dropped (now redundant with the index tables). Also seeds tasks/architecture/ with this task plus two follow-ups found during the decompose: OQ-09/10 missing structured Blocked-on fields, and the tasks/architecture/ blocker-task half of the Safe Exit protocol being unenforced.
1.5 KiB
1.5 KiB
OQ-43: TtyControl as a Clone trait object
- Origin: crates/tty/tty-backend.md
(the
TtyHandle.controlfield shape);docs/research/alknet-tty/phase-0-findings.mdOQ-TTY-01 (the trait- shape open question the local-PTY POC resolved). - Status: resolved
- Door type: One-way (the
TtyControltrait shape is part of theTtyBackendAPI surface — ADR-053), two-way (the concreteClonenewtype mechanism) - Priority: medium
- Resolution:
TtyHandle.controlisOption<Box<dyn TtyControl + Send + Unpin + Clone>>. TheClonetrait-object bound is satisfied via anArc-backedClonenewtype: a small struct holdingArc<dyn TtyControlInner>whereTtyControlInner: Send + Synchas theresize/signalmethods, and the publicTtyControlnewtype implementsCloneby cloning theArc. The local-PTY POC used a concretePtyControlstruct (inherentlyClone— it heldArc<Mutex<...>>fields); the trait-object form generalizes it so a backend can produce its own control type without the adapter knowing the concrete shape. TheCloneconstraint exists because the adapter's control-chunk dispatcher needs to be handed off to the spawned pump task (the POC'ssession::drive_sessionclonespty.controlfor the client→backend pump). See ADR-053 andtty-backend.md. - Cross-references: ADR-053, tty-backend.md,
/workspace/alknet-tty-poc/src/local_pty.rs(PtyControl)