Skip to content

feat(emit): fail-fast guard on status-index integrity - #101

Merged
blafourcade merged 1 commit into
mainfrom
fix/status-index-guard
Jul 29, 2026
Merged

feat(emit): fail-fast guard on status-index integrity#101
blafourcade merged 1 commit into
mainfrom
fix/status-index-guard

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

Defense in depth against the class of bug that shipped a "revoked" badge.
Before any signing/deploy, validate every active record's status_index:
integer >= 0, distinct across members (no shared status bit), and absent from
the revocation ledger (no active member on a burned index). On violation the
build fails loudly instead of silently publishing broken data.

This catches what the sequential next-index fix cannot: two near-simultaneous
inscriptions that computed the same index before either merged. Pure logic in
lib/member-indices.mjs with tests (incl. the exact blafourcade-on-revoked case).

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PC9TRnYr5AXe7GmBmHjkBy

Defense in depth against the class of bug that shipped a "revoked" badge.
Before any signing/deploy, validate every active record's status_index:
integer >= 0, distinct across members (no shared status bit), and absent from
the revocation ledger (no active member on a burned index). On violation the
build fails loudly instead of silently publishing broken data.

This catches what the sequential next-index fix cannot: two near-simultaneous
inscriptions that computed the same index before either merged. Pure logic in
lib/member-indices.mjs with tests (incl. the exact blafourcade-on-revoked case).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PC9TRnYr5AXe7GmBmHjkBy
@blafourcade
blafourcade requested review from a team as code owners July 29, 2026 09:15
@blafourcade
blafourcade merged commit 11fb9d1 into main Jul 29, 2026
2 checks passed
@blafourcade
blafourcade deleted the fix/status-index-guard branch July 29, 2026 09:16
blafourcade added a commit that referenced this pull request Aug 11, 2026
@jdm-web (#106) et @tkman59 (#108) ont reçu le même status_index (3) :
certification-pr.yml le calcule à l'ouverture de PR en scannant main, sans
tenir compte des PR d'inscription encore ouvertes. Les deux issues traitées
avant que l'une des deux merge ont donc lu le même main. Le fail-fast (#101)
a correctement bloqué le déploiement au merge de tkman59, empêchant aussi
templth (#110) de publier — directory.json reste figé à 2 membres alors que
4 sont enregistrés.

- data: réassigne @tkman59 à l'index 5 (libre après templth=4)
- ci: le calcul d'index scanne aussi les PR certif/* ouvertes, et le
  workflow est sérialisé (groupe de concurrency partagé) pour que chaque
  run voie la réservation du précédent avant de calculer la sienne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant