memoryd: [honcho] and its keys checked at start, and brokerd's state socket
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
@@ -872,3 +872,54 @@ identity entry that breaks a new refuse rule leaves the memory block at once (se
|
||||
|
||||
**Check.** `bxctl sanitize check` with the text gives the new answer (nothing, and exit 0, for a
|
||||
text that must pass). After the rebuild, the agent's next write of it is answered as expected.
|
||||
|
||||
## honcho-config-invalid
|
||||
|
||||
**What you see.** `memoryd` exits 1 at start, before it takes its lock or touches its home, with
|
||||
one line naming its config file and the reason, then this entry:
|
||||
|
||||
```text
|
||||
memoryd: /etc/boxmaker/memoryd.toml: [honcho] agent and owner are both "kyle": the agent's peer must not be the owner's
|
||||
see docs/runbook.md#honcho-config-invalid
|
||||
```
|
||||
|
||||
**Why.** `[honcho]` in `memoryd.toml` names this agent's peer, the owner's peer and the
|
||||
workspaces the agent writes to and reads in Honcho, and `[secrets.<name>]` where each workspace's
|
||||
key comes from (M5c spec, section 10). A wrong name would send turns and memory to a workspace
|
||||
they do not belong in, so `memoryd` checks the section before it starts. The reasons:
|
||||
|
||||
- `url` is not `http://` or `https://`, a host (letters, digits, `.` and `-`) and an optional
|
||||
port (1 to 65535), and nothing else: no path, not even a `/`, and no user or password. The line
|
||||
does not repeat the URL.
|
||||
- A name (`agent`, `owner`, `trusted`, `untrusted`, `fleet`, and each `[[honcho.read]]`'s `agent`
|
||||
and `workspace`) is not 1 to 512 of `a-z`, `A-Z`, `0-9`, `_` and `-`, Honcho's own rule: a `.`
|
||||
or a space is not allowed.
|
||||
- `agent` and `owner` are the same peer, or two of `trusted`, `untrusted` and `fleet` are the same
|
||||
workspace.
|
||||
- A `[[honcho.read]]` names this agent, names an agent twice, or names one of this agent's three
|
||||
workspaces; or its `trust` is not `trusted` or `untrusted`, or its `class` not `public`,
|
||||
`private` or `secret` (all lower case).
|
||||
- A `[secrets.<name>]` is not `honcho_trusted`, `honcho_untrusted`, `honcho_fleet` or
|
||||
`honcho_read_<agent>` for an agent in `[[honcho.read]]`; or it does not name exactly one
|
||||
well-formed `credential`, `env` or `file` (as in `secret-unavailable`); or there is no
|
||||
`[honcho]` section for it.
|
||||
|
||||
A key missing from `[honcho]` or `[[honcho.read]]`, an unknown key, or a value of the wrong type
|
||||
is a parse error instead, and points to `memoryd-start-failed`. A key's value is not read here,
|
||||
only where it comes from, and it is never printed. While `memoryd` is stopped nothing is synced,
|
||||
and `bxctl memory sync` cannot reach it.
|
||||
|
||||
**Confirm.** The line quotes the table and the value. Open the file it names and compare the
|
||||
section with the M5c spec, section 10 (`docs/specs/2026-09-27-m5c-honcho.md`):
|
||||
|
||||
```sh
|
||||
grep -n -A6 -e '^\[honcho\]' -e '^\[\[honcho.read\]\]' -e '^\[secrets\.' <config path>
|
||||
```
|
||||
|
||||
**Fix.** Correct the value. Keep a name that is already in use as it is: a new `trusted`,
|
||||
`untrusted` or `fleet` sends everything from then on to a new, empty workspace, and a new `agent`
|
||||
is a new peer. `agent` is this agent's own name, different on each agent; `owner` and `fleet` are
|
||||
the same in every agent's file. To turn Honcho off, remove `[honcho]`, its `[[honcho.read]]`
|
||||
tables and every `[secrets.honcho_…]`.
|
||||
|
||||
**Check.** `memoryd serve --config <path>` prints `memoryd: serving`.
|
||||
|
||||
Reference in New Issue
Block a user