October 12, 2026
1 pull request merged across 1 repo
Offline-Protocol/offline-protocol-sdk
Two things in one branch: a sweep of every tracked document against the code at d43f4aba, and the fixes an outside review of the service image, HTTP front and offline-first demo asked for before the demo is shown to anyone.
The documentation sweep (45375ce1)
Every tracked markdown file was read against the code, and each edit corrects a claim the code contradicts. The larger ones:
- Defaults that drifted: the deduplicator is 5000 ids for 7 days (docs said 1000 for 1 hour), the retry ceiling is 5 minutes (said 30 s), pending decryption lives 24 hours (said 30 minutes), and the internet connect timeout is 10 s.
- Behaviour added since the docs were written: the
undecryptableanswer and fifth receive outcome (#543), sealed service bodies andsvc_versions(#544), resends offered to the mesh (#540), sessions through a third device (#537), and the Python peripheral's hello (#542). - Removed or renamed surface: the
pathconfig and top-K relays,Error::LastAdmin,PeerDiscovered/TransportChanged,userIdin config examples, scripts that moved underbindings/react-native/scripts. - Indexes: the ADR count, the HTTP front chapter, and the examples are now listed in
docs/README.md. - Two source comments said custody receipts and multi-hop discovery responses were unimplemented. Both are implemented.
ADRs keep their reasoning; three gain a one-line "see also" where later code changed what they describe.
The review fixes
- Caller trust (880212f4).
X-Offline-Protocol-Sendercannot be forged through the front, but it is an unsigned header on the callback request. The chapter, R23 and the image README now say a provider may authorize on it only when nothing but the front reaches its callback, and that withauto_key_exchangeany SDK device reaching a host can call every registered service. - A 504 can still run (880212f4). The request is not withdrawn, and a provider that receives it within 60 s past its deadline still serves it. The chapter, its error table and R23 now say so and recommend an application idempotency key.
- Packaging (880212f4). The Python README gains a Linux wheel recipe that runs entirely in a container. The image README says how an application container reaches the front, what host networking means on Docker Desktop, and why
OP_LISTENmust be a reserved address. The docker0 sentence was also wrong: a record that lists docker0 first never connects from the dialling side, rather than backing off and recovering. - Two-box HTTP demo (5cfd6875).
examples/http-front/compose.ymlruns two boxes with the provider and client sharing each box's network namespace.client.pyreplaces curl, which the image lacks. The provider gains--allowand prints its own address. - Harness (f2d2b55f). Scenario 4 no longer pairs A and C first, so on fresh identities they have never met. New scenario 5 delivers through B while the sender is off.
How it was verified
| Check | Result |
|---|---|
cargo clippy --workspace -- -D warnings | clean |
cargo test --workspace --lib | 3201 passed |
cargo fmt --all -- --check, cargo doc -p offline-protocol under -D warnings | clean |
tests/http_front/test_demo.py | 5 passed; both new tests fail when the allowlist check or the client's error path is removed |
| Entrypoint guard, shellcheck | pass |
| Relative links and anchors in every changed file | all resolve |
| Linux wheel built by the new recipe, then the image built by its own Dockerfile | manylinux_2_34_aarch64 wheel; image has the front and the verifier |
run.py --fresh, run.py twice, run.py --fresh --scenario 5 on that image | 1, 2, 4, 5 pass every run; 4 reported "A and C had never met" on fresh identities |
| Two-box HTTP compose on that image | 200 with box A as caller; --allow gives 403 and 200; 504 at the requested timeout with box B off; 502 after a box B restart until the provider is recreated (documented) |
Not run: anything on two physical hosts, host networking, Bluetooth, the relay, Reticulum, phones.
Not in this PR
- No release. The image still needs a checkout wheel until a release ships the
httpextra and the verifier. - No front or engine changes. A per-registration secret so the provider can authenticate the front, a per-sender share of the 32 callback slots, and skipping a refused endpoint when dialing a peer stream are each worth a separate PR.
- Doc items the sweep flagged but did not change, for lack of certainty:
preferOnlineis described as "always use Internet", but it is a scoring bonus indors.rs.- The capability table in
mls-integration.mdlacksdata_versions,ctrl_versionsandack_versions. docs/react-native-integration.mdlists 45 of about 80 event types.- The BLE spec requires a peripheral to refuse a prepared write, and BlueZ cannot.
- Several pre-existing em dashes remain in
bindings/python/README.md.