Lot T4 : les textes et la structure de l'Acte d'engagement (Yvv, 03/11) — I1, E1, E2 prennent les textes d'Yvv (fr, en, es ; « il y a une et une seule clé » lu comme la coquille de « il n'y a une et une seule ») ; E12 « Responsabilité civique », Proposition seed au cran 2, entre E1 et E2 ; les sections formule, inertie, ordonnancement sortent du document (ADR 0014). Migration 0012 additive (units.retired_at et retired_reason, retirement_amendments, article_amendments) ; une unité retirée n'est ni lue avec son document, ni listée, ni votée, ni proposée, corrigée, traduite ou objectée (404), ni comptée, ni publiée ; rien d'effacé. Amendements gardés, une fois par document : 2026-11-03-i1-amorce, -e1-amorce, -e2-amorce (Version::SeedProposal ; la ligne seed_proposal admise quand l'amendement de Proposition seed l'a écrite), 2026-11-03-e12-responsabilite-civique (article_amend : entre E1 et E2 tant que l'ordre de la section n'a pas de vote, sinon en fin de section), 2026-11-03-fonctionnement-hors-vote (retire : tous ou aucun, refus à la moindre trace d'une personne, avec sa raison et l'unité) ; les amendements dont le seed ne donne plus le texte, dépassés (superseded_by) ; seed::write_unit partagé

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-11-03 21:09:00 +01:00
co-authored by Claude Opus 5.5
parent 4365ed607a
commit dda1ca85dd
14 changed files with 1067 additions and 265 deletions
@@ -0,0 +1,49 @@
-- The information on how the vote works leaves the document (2026-11-03, lot T4,
-- ADR 0014). Additive only: no row is dropped, no column an older image reads is
-- rewritten.
--
-- Yvv, 2026-11-03: « les 3 derniers modules ne sont pas de votes : ordonnancement,
-- inertie, et formule de vote sont des infos de fonctionnement. Les votes se font à
-- leur place, et les infos doivent trouver leur place dans l'ux. » The articles of the
-- sections `formule`, `inertie` and `ordonnancement`, and the order of each, are no
-- texts to vote. A new base is born without them (the seed no longer holds them); an
-- existing base keeps every row of them — units, versions, revisions, translations —
-- and marks the units retired: the document no longer lists them, counts them,
-- votes on them or publishes them. An older image (rollback) ignores the column and
-- shows them again exactly as they were.
-- When the unit left the document (NULL: it is in it), and the amendment that took it out.
ALTER TABLE units ADD COLUMN retired_at TEXT;
ALTER TABLE units ADD COLUMN retired_reason TEXT;
-- The retirement of an existing document's units (src/retire.rs): decided once per
-- document, only where no person left a trace on any of them. Each decision is kept
-- here: applied (and the codes retired), refused (why, and on which unit), or present
-- (the document was born without them).
CREATE TABLE retirement_amendments (
amendment_id TEXT NOT NULL,
doc_id TEXT NOT NULL REFERENCES documents(id),
outcome TEXT NOT NULL, -- applied | refused | present
reason TEXT, -- why it was refused
unit_code TEXT, -- the unit the trace was found on
retired TEXT, -- JSON array of the codes retired
at TEXT NOT NULL,
PRIMARY KEY (amendment_id, doc_id)
);
-- An article the seed now holds, added to an existing document (src/article_amend.rs):
-- decided once per document. Each decision is kept here: applied (the unit created,
-- where it was placed and why), refused (why), or present (born with it).
CREATE TABLE article_amendments (
amendment_id TEXT NOT NULL,
doc_id TEXT NOT NULL REFERENCES documents(id),
unit_code TEXT NOT NULL,
unit_id TEXT, -- the unit created, or found
outcome TEXT NOT NULL, -- applied | refused | present
reason TEXT, -- why it was refused
placement TEXT, -- between (where the seed puts it) | end (of its section)
placement_reason TEXT, -- why at the end
position REAL,
at TEXT NOT NULL,
PRIMARY KEY (amendment_id, doc_id)
);