Signed Mind intake for sealed motions (stacked on #21) #22
Loading…
Reference in a new issue
No description provided.
Delete branch "heimdall/sealed-mind-intake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Now based on
main(#21 merged asb42b86f). Signed Mind intake for sealed-motion commit/reveal. No merge, no deploy. Design: the "Signed Mind intake" section ofdocs/sealed-ballot-motion.md.MindKeys), registered and revoked by a moderator through audited endpoints (/api/sealed-motions/mind-keys).POST /api/sealed-motions/{id}/mind: signed envelope (persona, verb, motion id, nonce, payload fields); no session, no cookie; runs the sameSealedBallotServiceverbs as the persona's member account. Persona id is bound into the commitment hash (andSealedBallotDocumentgainsPersona; empty for member casts)./etc/gamecult/minds/<p>/sealed-motion.key, mode 0400, owned by the Mind's user; Eureka generates it and prints only the public half; whoever reads that file votes as that Mind. Rotation: register new, revoke old, between motions.tools/sealed-motion-sign.mjssigns envelopes (pubkey/commit/reveal), posts nothing; one test runs it against the server.HeimdallTokenVerifier.cs:61).Tests: 6 new (
MindIntakeTests), full suite 565 with the same 38 baseline failures asmain(CultCache TS runtime absent etc.); run on .NET 10 runtime with roll-forward.Update
3213254(Libby, round 3): signature verified before any state-revealing 400 (route mismatch and clock window now come after it); a dummy Ed25519 verify for unknown/revoked persona and malformed signatures (counter-asserted, timing itself not measured); signedissuedAtwith a 10-minute window and nonce pruning at 20 minutes; per-source rate limit (30/min,FixedWindowBudget) and 4096-byte body cap before parsing;\zin patterns; one account per persona and the reverse (MindPersonas, unique on both columns) so a second persona cannot overwrite the first's commit, losing a registration race fails on the index;DbUpdateExceptionis a replay only when the nonce is actually there. Each fix has a test that fails without it (mutation-checked: dummy verify, prune, replay-only catch, account binding; the body cap and rate limit tests assert 413/429 directly). Tools helper and doc updated.Update
0d7c3ec: rebased on mainb42b86f. The nonce prune is a separate best-effort write: a prune that loses a race (concurrency exception) no longer fails a valid request (test fails without the fix). Added the test for #21's untested branch: five lost reveal races answer 409 "contended" and record nothing. Doc notes a retried reveal is judged for phase at request start but lands in the frozen digest throughRevealSeq.Unchecked:
AddMindKeys, edited snapshot, never run on Postgres. The unique nonce index is not enforced by the in-memory provider; the replay test runs the explicit check path only.🤖 Generated with Claude Code
2bc4215754to48bebec624heimdall referenced this pull request2026-11-09 20:42:13 +00:00
48bebec624to3213254b963213254b96to0d7c3ec078