Identities for entities did.bot

feat(pds): enforce the sync spec's record and commit size limits on writes #2570

Merged permadeath.com
targeting main
Merged opened by and assigned to permadeath.com
targeting main

Closes #236.

New writes now meet the published sync spec's #commit limits. A record block over 1,000,000 bytes is refused with 413 RecordTooLarge. A write's tree nodes are only known once it is stored, so the commit gate counts a reserve per operation against the 2,000,000-byte blocks limit. The reserve is the new [capacity] commit_reserve_per_op key: 5,000 by default, 1,000 to 9,000 accepted, documented in docs/deployment.md. A write over it is refused with 413 CommitTooLarge. If a commit still comes out over 2,000,000 bytes, it is announced as #sync rather than a #commit a relay would drop. The 200-operation limit was already enforced.

The checks run only on the write path. Stored records are never checked on read, re-sync or export. This needs no deploy window: nothing about the data layout changes, and an older image reads everything this one writes. The new key is commented out in the config template, so a rollback reads the rendered config unchanged. The new wire test in crates/didbot-serve/tests/write_gates.rs fails on main, where both oversized writes return 200.

🤖 Generated with Claude Code

This pull request has no versions submitted yet.