Repository navigation
Description
What is wrong
HOST_DAEMON_PROTOCOL_VERSION (packages/host-daemon-contract/src/protocol.ts:1, currently 286) is the only wire-compatibility signal, and compatibility is exact-equality (HOST_DAEMON_COMPATIBLE_PROTOCOL_VERSIONS, protocol.ts:8-10; enforced in apps/server/src/internal/session.ts:196-218). AGENTS.md requires a bump for any change to server/daemon wire fields (type, requiredness, default, meaning). Five recent commits touching commands.ts changed wire shapes and merged with the version unchanged (verified with git show <commit>^:packages/host-daemon-contract/src/protocol.ts == git show <commit>:...):
d12945e8dd(Ship only SKILL.md frontmatter in the per-turn workspace agent-context read #8119, 282→282): required fields renamedmaxContentBytes→maxFrontmatterBytes,content→frontmatteron a.strict()schema.63a7e5d207(Refresh project branches in one daemon round trip #8120, 282→282):remoteRefreshenum["background","none"]→["background","blocking"](commands.ts:1004) — changed the meaning of a wire value.66e94b287d(Keep small daemon messages ahead of bulk data; stream file chunks as binary #7874, 276→276):content: z.string()→z.instanceof(Uint8Array);HOST_FILE_CHUNK_MAX_BYTES1 MiB → 64 KiB.c6816e9e87(Slash menu, skill list and skill open: one host round trip each #8123, 282→282): 45 new strict request/response fields.
Impact
An enrolled daemon reporting the same number with an older schema passes the version gate, then hard-fails zod parse on the changed fields. apps/host-daemon/src/protocol-self-update.ts:288 only self-updates when server.protocolVersion > HOST_DAEMON_PROTOCOL_VERSION, so this state never heals.
Why nothing catches it
packages/host-daemon-contract/test/contract.test.ts:1118 asserts toBe(286) — a hand-edited literal. Schema changes without a bump pass CI silently.
Proposed fix
- Bump to 287 once (invalidates every possibly-drifted ≤286 daemon; exact-match gate then triggers the existing self-update path).
- Add a checked-in wire baseline:
{ version, hash }where hash is a stable sha256 overz.toJSONSchemaof everyhostDaemonCommandRegistryentry (request + result), the settled/online RPC type lists, the ws resume schema, and wire constants (HOST_FILE_CHUNK_MAX_BYTES,HOST_ARTIFACT_MAX_BYTES,HOST_FIND_GIT_REPOS_*). A test recomputes and fails on drift; a regen script refuses to update the hash unless the version changed. Schema change without bump then fails CI mechanically.
Ruled out: no other test or workflow currently derives the version from the schemas; grep shows the only hardcoded 286 expectation is contract.test.ts:1118.
AGENT GENERATED
Activity
bb-slop-cop commentedon Dec 2, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassification: Bug · Medium priority · Medium effort ·
host,confirmed-reproREPRODUCED (high confidence): Reproduction and root-cause report. In two clean checkouts, a one-line schema change made a previously valid RPC request fail validation at the same protocol version, while all 98 contract tests passed. The version assertion checks a number, not compatibility with the previous wire schema. No installed release pair was tested.
No PR: Forcing an update changes the public protocol, and a lasting guard needs a decision about which wire changes it must detect.