Add wish sans-io
Marco Ricci

Marco Ricci commited on 2026-08-31 15:24:09
Zeige 2 geänderte Dateien mit 35 Einfügungen und 1 Löschungen.

... ...
@@ -11,7 +11,7 @@
11 11
     <i>no entries</i>
12 12
 
13 13
 ???+ wish "things to add"
14
-    <i>no entries</i>
14
+    - [sans-io][]{: .scheduled-next }
15 15
 
16 16
 ??? bug-success "things fixed"
17 17
     <i>no entries</i>
... ...
@@ -37,6 +37,8 @@
37 37
     Like PuTTY, `fakesshagent` is a "more serious free-software hobby project" developed by one principal author who also cannot definitively commit to any specific time plan.
38 38
     As such, `fakesshagent` also does not have a formal plans table (beyond the very coarse <b>Priority</b> field).
39 39
 
40
+  [sans-io]: sans-io.md
41
+
40 42
   [ENTRY_SPEC]: spec.md
41 43
 
42 44
   [PUTTY_WISHLIST]: https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/ "PuTTY Known Bugs and Wish List"
... ...
@@ -0,0 +1,32 @@
1
+# `fakesshagent` wish sans-io
2
+
3
+???+ wish "Wish details: `fakesshagent` should be a Sans-I/O implementation of the SSH agent protocol"
4
+    <table id="bug-summary" markdown>
5
+        <tr><th scope=col>Class<td><i>wish</i><td>This is a request for an enhancement.
6
+        <tr><th scope=col>Priority<td><i>high</i><td>This should be fixed in the next release.
7
+        <tr><th scope=col>Difficulty<td><i>fun</i><td>Just needs tuits, and not many of them.
8
+        <tr><th scope=col>Requested-in<td colspan=2>0.1
9
+    </table>
10
+
11
+The fake/stub SSH agent in version 0.1 of `fakesshagent` is almost a [Sans-I/O][SANS_IO] protocol parser.[^sans-io]
12
+However, it currently neither has separate business logic---the "stub" part is intertwined with the "parser" part---nor does it implement a Sans-I/O-style "stream of events" interface (because the business logic is not yet separate).
13
+It should have/do both.
14
+
15
+Actually separating the business logic from the parser, Sans-I/O-style, would also enable porting the remaining SSH test double of [`derivepassphrase`][DERIVEPASSPHRASE]: the `AgentRequestResponseQueue`, which maps protocol requests to a list of protocol responses.[^difference-queue-and-stub-agent]
16
+The queue thus already operates on (a primitive version of) the event-based interface.
17
+
18
+* * *
19
+
20
+<b>Therefore</b>, rewrite the fake/stub agent into a parser and a (proper) stub agent, and have the parser expose a Sans-I/O-style "stream of events" interface.
21
+
22
+[^sans-io]:
23
+  In a Sans-I/O network protocol parser, the parser and the network I/O machinery are completely separate, enabling the parser to be used under all kinds of different I/O paradigms.
24
+  Porting I/O paradigms is usually practically infeasible, and if the protocol parser were intertwined with the I/O, then the parser would likely need to be rewritten from scratch.
25
+
26
+[^difference-queue-and-stub-agent]:
27
+  The `AgentRequestResponseQueue` differs from the fake/stub agent in that the queue only understands the protocol framing, not the protocol contents.
28
+  The queue requires and enforces well-formed requests and responses, and will always answer the same request in the same way, irrespective of session state.
29
+  It is thus less flexible, but also easier to set up.
30
+
31
+[DERIVEPASSPHRASE]: https://the13thletter.info/derivepassphrase/
32
+[SANS_IO]: https://sans-io.readthedocs.io/
0 33