Recent commits to derivepassphrase.git (27f35e7c4101164e42e08051b0698a55735f8322) https://git.schokokeks.org/derivepassphrase.git/tree/27f35e7c4101164e42e08051b0698a55735f8322 Recent commits feed provided by GitList. Re-align the stubbed SSH agent socket with "real world" behavior Let the stubbed SSH agent tolerate incomplete request messages, or multiple request messages at once, within the same `sendall` call. Furthermore, change the error type to OSError (EBADF) for I/O on closed socket connections (mirroring the behavior of UNIX domain sockets) and when closing the connection, assert that no incomplete requests have been issued to the agent. With this change, the stubbed SSH agent socket now usefully models the communication channel between agent and client, and can be sensibly used to simulate communication and protocol errors (or their absence). This differentiates it—in terms of scope and use cases—from the agent protocol response queue, which monkeypatches the client instead of faking a server, and which operates on full request/response messages. Add some commentary to the stubbed SSH agent socket docstring to this effect. https://git.schokokeks.org/derivepassphrase.git/commit/27f35e7c4101164e42e08051b0698a55735f8322 software@the13thletter.info (Marco Ricci) Thu, 18 Jun 2026 06:15:10 +0200 27f35e7c4101164e42e08051b0698a55735f8322 Serialize the SSH agent protocol numbers as request/response codes When calling `bytes` on the SSH agent protocol number enums, return their corresponding serialization as request codes or response codes. (A follow-up to 57e3b1ed832e865e9f9e8316f930b1beae3714f0.) https://git.schokokeks.org/derivepassphrase.git/commit/729c89799dc49635698c8f73a59ba79eb3c584a0 software@the13thletter.info (Marco Ricci) Tue, 16 Jun 2026 22:19:26 +0200 729c89799dc49635698c8f73a59ba79eb3c584a0 Rewrite test data initializers for nicer API docs In attribute declarations, `griffe`/`mkdocstring-python` elides the object on which the outermost method is called (but correctly autolinks the method itself). This looks good if the initializer is something like `base64.b64_decode(data)` (which gets shortened to `b64_decode(data)`), and terrible if the initializer is something like `base64.b64_decode(data).decode()` (which gets shortened to `decode()`). So, to get nicer API docs, rewrite some obvious cases where the object would otherwise be elided in the "class-bound method + self argument" style instead. https://git.schokokeks.org/derivepassphrase.git/commit/3790413fb35878eb8500e29e7c6923104869d854 software@the13thletter.info (Marco Ricci) Tue, 16 Jun 2026 19:55:01 +0200 3790413fb35878eb8500e29e7c6923104869d854 Note that "spawning" an SSH agent in the tests may actually be "interfacing" https://git.schokokeks.org/derivepassphrase.git/commit/c2efe74d47243d97f87240eee0045cbb58abff53 software@the13thletter.info (Marco Ricci) Tue, 16 Jun 2026 19:47:25 +0200 c2efe74d47243d97f87240eee0045cbb58abff53 Use the BuiltinSSHAgentSocketProvider type in the tests Again, instead of magic strings floating around in the test suite, use the already existing enum instead. https://git.schokokeks.org/derivepassphrase.git/commit/090f87b133247b5f688f5101f0229829616b22dd software@the13thletter.info (Marco Ricci) Mon, 15 Jun 2026 22:27:21 +0200 090f87b133247b5f688f5101f0229829616b22dd Use an enum for SSH agent configurations in the test suite Instead of having all these magic strings floating around all over the test suite, use a dedicated enum for consistency, discoverability, and typo-resistance. https://git.schokokeks.org/derivepassphrase.git/commit/7bccff34588cfb6ac90bc0d277a40cab5b9a5cf2 software@the13thletter.info (Marco Ricci) Mon, 15 Jun 2026 21:36:53 +0200 7bccff34588cfb6ac90bc0d277a40cab5b9a5cf2 Auto-format everything due to tooling update https://git.schokokeks.org/derivepassphrase.git/commit/b18d27971117d16358ddd511d69a11813464671e software@the13thletter.info (Marco Ricci) Mon, 15 Jun 2026 18:20:15 +0200 b18d27971117d16358ddd511d69a11813464671e Fix minor spelling/logic errors and missing TODOs in the test suite https://git.schokokeks.org/derivepassphrase.git/commit/68497eb1efa715ef461aaf33c5e55fc982b190cb software@the13thletter.info (Marco Ricci) Sun, 14 Jun 2026 22:46:36 +0200 68497eb1efa715ef461aaf33c5e55fc982b190cb Update tooling `ruff` now checks for too many statements in a `try` block (PLW0717), for non-trivial `__init__.py` files (RUF067), for explicitly comparing floats with `__eq__` (RUF069) and for bad control flow in a generator-based context manager (RUF075). We document our intentional RUF069 and RUF075 violations, we fix the other occurrences of RUF075, and we ignore PLW0717 and RUF067 for now. https://git.schokokeks.org/derivepassphrase.git/commit/6c704955736026fc4c77164542682cb2549f3e01 software@the13thletter.info (Marco Ricci) Sun, 14 Jun 2026 22:46:36 +0200 6c704955736026fc4c77164542682cb2549f3e01 Ensure better test suite behavior for regression-only testing Tweak the hypothesis settings for determinism and speed when running the test suite solely for the purpose of regression testing [1], in the new hypothesis profile "regression": test generation will be derandomized, stateful step counts and example counts will be set very low. As all of our slow-running tests are hypothesis-based, and all of our hypothesis-based tests are slow because of the high example count, this change alone immediately makes "regression-only" testing feasible for us without having to skip hypothesis-based tests. (In fact, the hypothesis derandomization feature appears to draw motivation from the same source [1] as we do.) As a counterpoint, mark test cases that are (or probably should be) hypothesis-based, but test for completion or correctness purposes rather than for regression purposes, with a custom marker `correctness_focused`. Also try to add at least one working example and one counterexample to each hypothesis-based test, if feasible. This buys us the flexibility (in the future) to remove test case generation from the "regression" profile, if desired. The test cases would then still run the explicit examples, and thus remain useful, instead of needing another separate set of non-hypothesis tests to cover the same ground. References: 1. Nelson Elhage: [Two kinds of testing][], particularly the section "Test budget". 2. Alex Kladov: [How to Test][], particularly the section "Make Tests Fast". [Two kinds of testing]: https://blog.nelhage.com/post/two-kinds-of-testing/ [How to Test]: https://matklad.github.io/2021/05/31/how-to-test.html#Make-Tests-Fast https://git.schokokeks.org/derivepassphrase.git/commit/bd1fc69133c0bb9cc8634ab9fb18bc5a91e21f4a software@the13thletter.info (Marco Ricci) Sun, 14 Jun 2026 22:46:36 +0200 bd1fc69133c0bb9cc8634ab9fb18bc5a91e21f4a