forked from yvv/decision
Fusion de chantier/acte-certification (lots H et S) dans le lot V : le tampon et ses états, avec le quorum et les Propositions seed
- conflits résolus des deux côtés : kept_params garde le quorum (S) et la part simulée, la version déplacée, le cran d'avant (V) ; proposals.rs garde seedMinimal / seedProposal (S) et tallyPending / tallySimulated / myVoteState (V) ; - simulation::reexamine juge sur le quorum gardé par l'adoption (params.quorum, à défaut celui de l'article) ; - l'acte répété n'examine plus une adoption qui tient (params.reexamined) ; - tests V repris sans texte en vigueur au départ (I1, E1 : la Proposition seed) et sur un quorum 2 (small_web) ; le test overview d'une personne invitée dans Monnaie libre suit la simulation (elle vote, chaîne fermée). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
-- Propositions seed (2026-11-02, ADR 0011). Additive only: nothing is dropped,
|
||||
-- nothing an older image needs is rewritten.
|
||||
--
|
||||
-- Yvv, 2026-11-02: « pour le démarrage, conserve un statut particulier pour les
|
||||
-- 3 premiers modules. Mais ils ne sont pas en vigueur. Appelle les "Proposition
|
||||
-- seed" (intégré par un ou deux clients pour amorcer le mouvement de vote). »
|
||||
--
|
||||
-- A seed proposal is an open proposal of the seed put forward to start the vote
|
||||
-- (I1, E1, E2 of the certification act). It is not in force: it enters like any
|
||||
-- proposal, by its threshold. The mark stays on the row once written; what the
|
||||
-- API calls `seedProposal` is read from it while the version is open and was
|
||||
-- never voted into force (src/docs.rs). An older image ignores the column and
|
||||
-- reads the version as an open proposal of the seed.
|
||||
ALTER TABLE proposals ADD COLUMN seed_featured INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
-- The starting texts in force made seed proposals in an existing base
|
||||
-- (src/seed_proposal_amend.rs): decided once per document and article, and
|
||||
-- only where nobody has touched the text. With the status, the article's level
|
||||
-- of inertia goes low (Yvv, 2026-11-02: « l'amorcer avec une inertie basse »),
|
||||
-- only where nobody has touched it either. Each decision is kept here, for the
|
||||
-- status and for the level: applied, refused (and why), or present (the base
|
||||
-- was born with the seed proposal, at the low level).
|
||||
CREATE TABLE seed_proposal_amendments (
|
||||
amendment_id TEXT NOT NULL,
|
||||
doc_id TEXT NOT NULL REFERENCES documents(id),
|
||||
unit_code TEXT NOT NULL,
|
||||
proposal_id TEXT, -- the version examined: in force, or the seed proposal found
|
||||
outcome TEXT NOT NULL, -- applied | refused | present (the status)
|
||||
reason TEXT, -- why it was refused
|
||||
from_level TEXT, -- the level found
|
||||
to_level TEXT NOT NULL, -- the level seed proposals start at
|
||||
level_outcome TEXT NOT NULL, -- applied | refused | present (the level)
|
||||
level_reason TEXT, -- why it was refused
|
||||
at TEXT NOT NULL,
|
||||
PRIMARY KEY (amendment_id, doc_id)
|
||||
);
|
||||
@@ -0,0 +1,48 @@
|
||||
-- The quorum (2026-11-03, ADR 0013). Additive only: nothing is dropped, nothing
|
||||
-- an older image needs is rewritten. (0010 is kept for lot V: the gap is meant.)
|
||||
--
|
||||
-- Yvv, 2026-11-02: « C suit le cran, mais c'est une proposition par défaut,
|
||||
-- variable modifiable par l'auteur initial du texte… c'est plutôt un quorum ».
|
||||
-- The floor C of *for* votes put in front of the formula gives way to a quorum Q
|
||||
-- by level: from Q voters on, the share of the inertia applies; below it, the
|
||||
-- voters missing count as against (2026-11-03: « Ils comptent comme non »).
|
||||
-- `documents.vote_floor` stays: the reference quorum Q₀, read for the reference
|
||||
-- participation p0 = 2Q₀/W only (never an article's quorum), and as every
|
||||
-- level's quorum while `quorums` is NULL. An older image ignores both columns.
|
||||
|
||||
-- The quorum of each level, 1 to 5, as JSON `[Q1, Q2, Q3, Q4, Q5]`: the default
|
||||
-- of an article at that level (Yvv: « 12 · 12 · 50 · 50 · 50 » in Monnaie libre,
|
||||
-- 1 everywhere in the test group). NULL: a base the quorum amendment
|
||||
-- (src/quorum_amend.rs) has not reached yet.
|
||||
ALTER TABLE documents ADD COLUMN quorums TEXT;
|
||||
|
||||
-- The quorum of an article, set by the author of its first version before the
|
||||
-- first vote (src/quorum.rs; Yvv: « L'auteur, avant le 1er vote »). NULL: the
|
||||
-- quorum of its level. A change of its inertia is judged on it too.
|
||||
ALTER TABLE units ADD COLUMN quorum INTEGER;
|
||||
|
||||
-- Every change of an article's own quorum: who, from what, to what.
|
||||
CREATE TABLE quorum_changes (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
unit_id TEXT NOT NULL REFERENCES units(id),
|
||||
doc_id TEXT NOT NULL REFERENCES documents(id),
|
||||
from_quorum INTEGER, -- NULL: the quorum of its level
|
||||
to_quorum INTEGER, -- NULL: back to the quorum of its level
|
||||
identity_id TEXT NOT NULL REFERENCES identities(id),
|
||||
at TEXT NOT NULL
|
||||
);
|
||||
CREATE INDEX quorum_changes_unit ON quorum_changes(unit_id);
|
||||
|
||||
-- Quorum amendments (src/quorum_amend.rs): the quorums by level of the seed,
|
||||
-- written into an existing document that holds none, decided once per document.
|
||||
-- Each decision is kept here: applied, refused (and why), or present.
|
||||
CREATE TABLE quorum_amendments (
|
||||
amendment_id TEXT NOT NULL,
|
||||
doc_id TEXT NOT NULL REFERENCES documents(id),
|
||||
from_quorums TEXT, -- what the document held: NULL, or its JSON
|
||||
to_quorums TEXT NOT NULL, -- the seed's, JSON
|
||||
outcome TEXT NOT NULL, -- applied | refused | present
|
||||
reason TEXT, -- why it was refused
|
||||
at TEXT NOT NULL,
|
||||
PRIMARY KEY (amendment_id, doc_id)
|
||||
);
|
||||
Reference in New Issue
Block a user