From 3cacc4291e3d0f50edc5ba302bd29a02dbd1ff08 Mon Sep 17 00:00:00 2001 From: Baptiste LAFOURCADE Date: Wed, 29 Jul 2026 11:08:54 +0200 Subject: [PATCH] fix(intake): never reuse a revoked status index; unbork blafourcade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A revoked status_index is burned for life (its bit stays set in the status list). The next-index step only scanned active member records, so after all members were removed the counter fell back to 0 — a already-revoked index — and a freshly certified member was born "revoked". - certification-pr.yml: next index = max(active records, revoked.json) + 1. - blafourcade's record: move status_index 0 -> 1 (0 is revoked), so re-emit produces a valid badge. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01PC9TRnYr5AXe7GmBmHjkBy --- .github/workflows/certification-pr.yml | 11 +++++++++-- data/members/blafourcade/record.yml | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/certification-pr.yml b/.github/workflows/certification-pr.yml index 77f96d9..a3fc2a3 100644 --- a/.github/workflows/certification-pr.yml +++ b/.github/workflows/certification-pr.yml @@ -42,14 +42,21 @@ jobs: - name: Calculer l'index de statut suivant id: idx run: | - # Index permanent dans la Bitstring Status List : max existant + 1. - # (Volume faible, PR relues en série ; une collision improbable serait vue au merge.) + # Index permanent dans la Bitstring Status List : max(records actifs, index + # révoqués) + 1. Inclure revoked.json est ESSENTIEL : un index révoqué est + # brûlé à vie ; sans ça, retirer tous les membres actifs ferait retomber le + # compteur sur un index déjà révoqué -> un nouveau badge naîtrait « révoqué ». max=-1 shopt -s nullglob for f in data/members/*/record.yml; do i="$(grep -oE '^status_index:[[:space:]]*[0-9]+' "$f" | grep -oE '[0-9]+' || true)" if [ -n "$i" ] && [ "$i" -gt "$max" ]; then max="$i"; fi done + if [ -f data/revoked.json ]; then + while read -r i; do + if [ -n "$i" ] && [ "$i" -gt "$max" ]; then max="$i"; fi + done < <(grep -oE '[0-9]+' data/revoked.json) + fi echo "next=$((max+1))" >> "$GITHUB_OUTPUT" - name: Lire la demande d'inscription diff --git a/data/members/blafourcade/record.yml b/data/members/blafourcade/record.yml index 6381ae7..be0423b 100644 --- a/data/members/blafourcade/record.yml +++ b/data/members/blafourcade/record.yml @@ -3,6 +3,6 @@ role: "certifie" name: "Baptiste Lafourcade" linkedin: "https://www.linkedin.com/in/baptistelafourcade/" photo: "data/members/blafourcade/photo.webp" -status_index: 0 +status_index: 1 website: "https://www.ai-driven-dev.fr" description: "Head Of Community" \ No newline at end of file