WIP lot V : le tampon câblé dans le serveur (migration 0010, simulation, discard-simulation), tests en cours de reprise — repris tel quel après la coupure du 02/11

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-11-03 05:22:24 +01:00
co-authored by Claude Opus 5.5
parent ee37c3b4d5
commit 4b81a2e909
16 changed files with 1503 additions and 213 deletions
@@ -0,0 +1,19 @@
-- The buffer of the votes (2026-11-02, lot V, ADR 0012). Additive only: no
-- existing row is rewritten; an older image (rollback) reads the same tables.
--
-- A ballot is the intention of a vote, seen at once; its proof comes from the
-- chain (mode 'chain'), or, while the chain is closed, from the simulated
-- confirmer (mode 'simulated': no account, no amount, the voice of the session).
-- After each proof, the reconciliation keeps one voice per identity and per
-- version, the last in the order of the chain, and tells each proven line what
-- became of it.
ALTER TABLE ballots ADD COLUMN mode TEXT NOT NULL DEFAULT 'chain'; -- chain | simulated
ALTER TABLE ballot_lines ADD COLUMN outcome TEXT; -- counted | superseded | objection (NULL: not proven yet, or proven before 0010)
-- The intentions of a document, read with every view of it.
CREATE INDEX ballots_doc ON ballots(doc_id, status);
-- `votes.source` takes one more value, 'simulated'; `messages.topic` one more,
-- 'ballot' (kinds ballot_expired | ballot_refused | ballot_objection): text
-- columns, nothing to change.