Address Cody review round 3: CODY-003 and CODY-006
CODY-003 Request identity is durable before submission. Storage results are
explicit at the DevicePort boundary (storageSet resolves true only
on the host's own timely confirmation; storageGet distinguishes
unknown from empty). A request is not sent until the phone has
confirmed storing its id; a timeout or refusal holds it back,
unsent and retryable under the same id. Unreadable storage at
start is not treated as unpaired; an unsaveable pairing is revoked.
CODY-006 The state directory is set to 0700 on every open, including when
it already existed, and the bridge refuses to start with an
operator-facing error if it cannot be. Deployment guide creates
it with install -d -m 0700.
Checks: typecheck clean; npm test 194 passed; client build ok;
test:real-stt 11 passed; test:real-hermes 9 passed; test:simulator 6
passed; git diff --check clean.
Not reviewed. No physical-device, droplet or production evidence.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -52,9 +52,13 @@ accurate) and run `fetch-model` again.
|
||||
3. **User and directories.**
|
||||
```sh
|
||||
useradd --system --home /opt/hermeven --shell /usr/sbin/nologin hermeven
|
||||
mkdir -p /opt/hermeven /var/lib/hermeven /etc/hermeven
|
||||
chown hermeven:hermeven /var/lib/hermeven
|
||||
mkdir -p /opt/hermeven /etc/hermeven
|
||||
# The state directory is the service user's alone: mode 0700, set explicitly.
|
||||
install -d -m 0700 -o hermeven -g hermeven /var/lib/hermeven
|
||||
```
|
||||
The bridge also enforces this itself: at start it sets the directory that holds the database
|
||||
to 0700 even if it already existed with looser permissions, and refuses to start if it
|
||||
cannot (for example a directory owned by another user).
|
||||
4. **Code.** Clone the repository into `/opt/hermeven`, then `npm ci`. (The dev dependencies are
|
||||
needed: the bridge runs through `tsx`.)
|
||||
5. **Configuration.** Copy `deploy/bridge.env.example` to `/etc/hermeven/bridge.env`, fill it
|
||||
|
||||
Reference in New Issue
Block a user