Provide a private Unix listener for owner-metered Messages
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a07ff8-19d0-7820-b4d0-1353833cb7fc
This commit is contained in:
tegwick 2026-09-09 22:20:55 +02:00
parent dc77f434a8
commit 718e6730e4
4 changed files with 143 additions and 4 deletions

View file

@ -81,3 +81,16 @@ Protocol references inspected 2026-09-09:
[streaming](https://platform.claude.com/docs/en/build-with-claude/streaming),
[context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing),
[prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching).
## Private Unix hosting
`MessagesServer(..., unix_path=Path(...))` binds AF_UNIX only, mode 0600 inside
an owner-owned mode 0700 directory. It refuses an existing path rather than
unlinking another listener, and removes only its own socket inode on stop.
At most 16 request handlers are active; idle header reads time out. TCP host/port
selection cannot coexist with Unix mode. The protocol and durable meter interface
are unchanged. Rein's MessagesOwner supplies the private listener, accepted lease
and cancellation hooks; sand-boxer mounts only the socket and enforces sole routing.
The provider key and ledger remain outside the workload. This source/library path
is tested with a fake provider; accepted custody, protected bootstrap/artifact and
Railiance placement are still required by LLM-WP-0009-T03.