Repository navigation
[BROUILLON] NOESIS 13.6 — sauvegarde Supabase : phase A compatible, anti-contenu périmé, historique journalier - #35
Merged
Conversation
Add offline controller cases for the 'online', 'visibilitychange' and 'pageshow' resume listeners and for session expiry during read/write. These triggers existed in cloud-ui.js but had no test; a mutation that removes the online/visibilitychange listeners now fails 2 cases. Synthetic data only, no network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5jwZntqAvJaRThsuEjgja
…k resistance) A malicious or compromised server could serve an OLD progress ciphertext under a HIGHER revision; a non-dirty device decrypted and applied it silently because the AES-GCM AAD was a constant. - New progress envelopes keep the SQL-pinned v1 shape (no migration) but use AAD 'reconversion-control-progress-v2|<user_id>|<target revision>'. - openProgress() verifies the row's own user/revision; one PBKDF2 derivation, then bound AAD, then (optionally) legacy constant AAD. - Legacy envelopes stay readable until this device acknowledges a bound envelope for the account; then refusal is sticky (meta.bound=true in the per-user journal). A refused legacy head becomes an explicit conflict: only 'send this device' proceeds, after preserving the legacy copy. - Preserve-only copies and explicit history recovery still read legacy. - Session envelopes unchanged. Red: tests/cloud-rollback.cjs 3/9 on 0edcf3f (replay, touch-replay, cross-account, sticky, push cases failed). Green: 9/9. Test helpers that decrypted uploaded rows with the legacy API now use the bound API. Mixed-version: old main client cannot open bound envelopes and never writes over them (conditional PATCH + mandatory preserve before push). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5jwZntqAvJaRThsuEjgja
…r day, 30 days) History eviction kept only the last 20 revisions per user, so a burst of 25 quick edits evicted every earlier day. Prepared (NOT applied) migration 20261028120000_history_daily_retention.sql replaces only the eviction rule of the private trigger function (CREATE OR REPLACE, idempotent, guarded). RLS policies, grants, CHECK constraints, +1 revision rule unchanged. Red: cloud-history.cjs without the migration -> retention assertion fails (revisions 3 and 4 from earlier days evicted). Green: 11/11 groups, including policies/grants snapshot equality, double application, and clients still unable to delete/update/insert history (42501). Client history listing raised from 20 to 50 rows (20 + 30 days) so the retained daily versions are reachable; red 20 != 50, green 14/14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5jwZntqAvJaRThsuEjgja
- Header label said 'LOCAL + CLOUD CHIFFRÉ' whenever sync mode was active, even with a pending/failed upload. It now says 'sauvegarde confirmée (révision N)' only when the current snapshot equals the acknowledged revision with no outbox, else 'LOCAL · sauvegarde cloud en attente'. - Active-mode button renamed 'Sauvegarder maintenant'; same #rc-sync-now id and same tick() pipeline (no second loop). - Session expiry: retries no longer degrade to 'Non connecté'; status keeps asking to reconnect and states unsent changes are not yet in the cloud. - Intro lists what is sent and what stays local (display preferences, recovery copies); locked mode says edits stay local until unlock. Red: 4/32 UI cases failed on previous commit. Green: 32/32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5jwZntqAvJaRThsuEjgja
…s du format lié - X1 (preuve exécutable NOESIS 13.6) : inspect() associait la nouvelle tête distante au contenu déchiffré de la précédente quand le déchiffrement échouait ; « Récupérer le cloud » l'appliquait sous le nouveau numéro, puis la saisie suivante écrasait la tête. remoteData est effacé dès que la tête change, et chooseCloud re-déchiffre la version actuelle avant d'appliquer. - C3b : l'ancien client de production (0edcf3f) a le même défaut et peut écraser une tête LIÉE qu'il ne sait pas lire. Phase A livrée (BOUND_WRITES=false) : lecture des formats lié et hérité, écriture du format hérité, lisible par les anciens appareils. Phase B (une ligne) seulement après mise à jour de tous les appareils. - Tests : cloud-rollback 12/12 (cas existants exécutés en phase B, + X1, + 2 cas phase A).
…ocumentation du déploiement en deux phases Les aides qui décodent les lignes envoyées acceptent les formats lié et hérité (legacy:true) ; les assertions sont inchangées. Les tests qui scellent explicitement au format lié restent liés.
iPoower
marked this pull request as ready for review
October 29, 2026 07:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[BROUILLON] NOESIS 13.6 — sauvegarde Supabase : anti-rejeu, historique journalier, statut honnête
Ne pas fusionner. PR brouillon de certification. Base :
main0edcf3fe1728; tête :5621f98(6 commits).Changements
0edcf3fpeut écraser une tête liée qu'il ne sait pas lire (C3b). La phase B (BOUND_WRITES=true, une ligne) n'intervient qu'après mise à jour de tous les appareils.progress-v2|compte|révision). La forme de l'enveloppe est inchangée, la contrainte SQL intacte. Les anciennes enveloppes sont lues jusqu'au premier accusé lié, puis refusées définitivement.20261028120000_history_daily_retention.sqlpréparée, non appliquée : 20 dernières révisions + la dernière de chaque jour sur 30 jours. Idempotente ; RLS et droits inchangés.online,visibilitychange,pageshow, expiration de session.Preuves locales (SHA exact)
0edcf3f) ; preuve avec le vrai client0edcf3f: phase A 2/2, phase B (X1 corrigé ; C3b justifie la règle) ; historique PGlite 11 groupes ; sync 32/32 ; final-mile 14 ; restauration atomique 16.npm audit0.Déploiement futur
Phase A : compatible avec les appareils non mis à jour. Phase B : seulement après mise à jour de tous les appareils, sur GO séparé.
Generated by Claude Code