]> git.giacomolli.uk - onehouse/commit
Queue device commands and replay first results
authorAnderson A. Giacomolli <redacted>
Tue, 10 Nov 2026 22:26:27 +0000 (19:26 -0300)
committerAnderson A. Giacomolli <redacted>
Tue, 10 Nov 2026 22:45:13 +0000 (19:45 -0300)
commit1f9ad21ee18e1952cdcf3cec07314309e5c7d3d8
tree32d995c52e855fb84a38c54c400cff16106b7974
parenta5486293282c47e6bca115c05ddde6e39ba4930c
Queue device commands and replay first results

The router parses each delivery once and keeps singles and ordered
batches in one bounded queue per device. Expiry, ownership, and caller
cancellation limit intake and queue backpressure. The device consumer
checks physical access and expiry again before work.

A shared per-device ledger retains the first 256 results with stable
metadata. Duplicate requests replay that result after uncertain delivery
without another action. Insertion order bounds memory, and callers
cannot mutate stored timestamps. The command and framework documents
state the signal behavior and the memory-only safety limits.

Issue: 40b314f
12 files changed:
README.rst
doc/driver.rst
driver/command.go [new file with mode: 0644]
driver/command_test.go [new file with mode: 0644]
driver/driver_result.go [new file with mode: 0644]
driver/ledger.go [new file with mode: 0644]
driver/ledger_test.go [new file with mode: 0644]
driver/publisher_test.go
driver/result_record.go [new file with mode: 0644]
driver/router.go [new file with mode: 0644]
driver/router_test.go [new file with mode: 0644]
driver/runner.go