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
+3
View File
@@ -51,10 +51,13 @@ pub async fn sample(state: &AppState, group: &str, since: &str) -> sqlx::Result<
JOIN units u ON u.id = p.unit_id
JOIN documents d ON d.id = u.doc_id
WHERE d.group_slug = ? AND p.status IN ('open', 'in_force', 'applied') AND v.revision = p.revision
AND (v.source <> 'simulated' OR ?)
GROUP BY v.proposal_id
HAVING MAX(v.cast_at) >= ?",
)
.bind(group)
// The simulated votes weigh here as they weigh in adoption (ADR 0012).
.bind(state.vote_rules().adopts(ld_engine::buffer::Stage::Simulated))
.bind(since)
.fetch_all(&state.db)
.await?;