0.3.17-pre.001
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
# file: Cargo.toml
|
# file: Cargo.toml
|
||||||
# version: 651
|
# version: 652
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "3"
|
resolver = "3"
|
||||||
members = ["crates/ksp-app-backfill-desk", "crates/ksp-app-config-desk", "crates/ksp-app-raw-transaction-ingest-desk", "crates/ksp-app-solprices-desk", "crates/ksp-app-store-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-interface-lib", "crates/ksp-job-api", "crates/ksp-job-backfill-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-program-api", "crates/ksp-raw-transaction-lib", "crates/ksp-store-api", "crates/ksp-store-lib", "crates/ksp-store-postgres-lib", "crates/ksp-wallet-lib", "crates/ksp-worker-api", "crates/ksp-worker-raw-transaction-ingest-lib"]
|
members = ["crates/ksp-app-backfill-desk", "crates/ksp-app-config-desk", "crates/ksp-app-raw-transaction-ingest-desk", "crates/ksp-app-solprices-desk", "crates/ksp-app-store-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-interface-lib", "crates/ksp-job-api", "crates/ksp-job-backfill-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-program-api", "crates/ksp-raw-transaction-lib", "crates/ksp-store-api", "crates/ksp-store-lib", "crates/ksp-store-postgres-lib", "crates/ksp-wallet-lib", "crates/ksp-worker-api", "crates/ksp-worker-raw-transaction-ingest-lib"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.3.16"
|
version = "0.3.17-pre.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
||||||
|
|||||||
287
deltas/0.3.17/pre.001.md
Normal file
287
deltas/0.3.17/pre.001.md
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
<!-- file: deltas/0.3.17/pre.001.md -->
|
||||||
|
<!-- version: 1 -->
|
||||||
|
|
||||||
|
# Delta `0.3.17-pre.001` — gate d'audit, architecture et sizing
|
||||||
|
|
||||||
|
## Base requise
|
||||||
|
|
||||||
|
```text
|
||||||
|
v0.3.16
|
||||||
|
workspace.package.version = 0.3.16
|
||||||
|
```
|
||||||
|
|
||||||
|
Ne pas appliquer sur une `0.3.16-pre.*` ou sur un état intermédiaire.
|
||||||
|
|
||||||
|
## Objet
|
||||||
|
|
||||||
|
Exécuter le gate obligatoire de lecture, audit, brainstorming et sizing défini par `prompts/036-V0_3_17_START_PROMPT.md` avant toute implémentation du cycle de vie complet des conflict cases, du retry Store ou du hardening reconnect.
|
||||||
|
|
||||||
|
Cette tranche :
|
||||||
|
|
||||||
|
- vérifie l'archive stable reçue et son handoff `0.3.16` ;
|
||||||
|
- réaudite intégralement les règles KSP demandées ;
|
||||||
|
- inventorie les contrats Store API/Store/PostgreSQL/Worker/Transport/Config/Backfill ;
|
||||||
|
- réaudite les sources upstream nécessaires ;
|
||||||
|
- fixe le modèle conflict case/participants/history/resolution/reopen ;
|
||||||
|
- fixe la double revision conflict/selector et l'ordre de locks ;
|
||||||
|
- fixe les semantics de rétention/restore/purge guards ;
|
||||||
|
- fixe la classification Store `Transient/Terminal` ;
|
||||||
|
- fixe le retry Worker, la backpressure et `WorkerActivity::Blocked` ;
|
||||||
|
- confirme que les reconnects existants doivent être durcis et non réimplémentés ;
|
||||||
|
- recalibre les prereleases `0.3.17` ;
|
||||||
|
- ne modifie aucun Rust, SQL, migration ou UI.
|
||||||
|
|
||||||
|
## Version workspace
|
||||||
|
|
||||||
|
`Cargo.toml` :
|
||||||
|
|
||||||
|
```text
|
||||||
|
header version : 651 -> 652
|
||||||
|
workspace : 0.3.16 -> 0.3.17-pre.1
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucune autre modification sémantique du `Cargo.toml` racine n'est prévue.
|
||||||
|
|
||||||
|
## Fichiers ajoutés
|
||||||
|
|
||||||
|
```text
|
||||||
|
docs/plans/039-V0_3_17_RAW_OPERATIONAL_RESILIENCE_PLAN.md
|
||||||
|
docs/validation/034-V0_3_17_RAW_OPERATIONAL_RESILIENCE.md
|
||||||
|
deltas/0.3.17/pre.001.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## Fichiers modifiés
|
||||||
|
|
||||||
|
```text
|
||||||
|
Cargo.toml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Fichiers supprimés
|
||||||
|
|
||||||
|
```text
|
||||||
|
aucun
|
||||||
|
```
|
||||||
|
|
||||||
|
## Audit baseline réellement exécuté
|
||||||
|
|
||||||
|
```text
|
||||||
|
General Rust rule audit: clean
|
||||||
|
Rust export completeness audit: 0 candidate(s)
|
||||||
|
KSP workspace Rust rule audit: clean
|
||||||
|
Markdown table audit: clean (352 table(s), 962 file(s))
|
||||||
|
```
|
||||||
|
|
||||||
|
Contrôle complémentaire :
|
||||||
|
|
||||||
|
```text
|
||||||
|
workspace version stable 0.3.16
|
||||||
|
workspace members 22
|
||||||
|
deltas 0.3.16 présents 21
|
||||||
|
handoff prompt/plan/validation complet
|
||||||
|
lockfiles/target/node_modules absents
|
||||||
|
manifest inheritance cohérente
|
||||||
|
root lint contract cohérent
|
||||||
|
```
|
||||||
|
|
||||||
|
Le toolchain Cargo n'est pas installé dans l'environnement d'assemblage ; aucun PASS Cargo post-bump n'est inventé.
|
||||||
|
|
||||||
|
## Décisions principales
|
||||||
|
|
||||||
|
### Conflict case
|
||||||
|
|
||||||
|
Identité backend-neutral : `RawTransactionReference` encapsulée par une référence de conflict case.
|
||||||
|
|
||||||
|
Etats :
|
||||||
|
|
||||||
|
```text
|
||||||
|
Open
|
||||||
|
Resolved
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucun état supplémentaire n'est justifié.
|
||||||
|
|
||||||
|
Chaque mutation réelle incrémente une revision `u64` monotone ; une réobservation identique est idempotente.
|
||||||
|
|
||||||
|
### Participants et historique
|
||||||
|
|
||||||
|
V004 doit ajouter un participant ledger monotone et un journal append-only. Le bootstrap depuis V003 ne reconstruit jamais un historique non prouvé.
|
||||||
|
|
||||||
|
Le journal n'enregistre que références, enums/codes KSP et timestamps bornés ; aucun payload RAW, texte DB ou acteur libre.
|
||||||
|
|
||||||
|
### Actions
|
||||||
|
|
||||||
|
Les contrats futurs couvrent :
|
||||||
|
|
||||||
|
```text
|
||||||
|
keep current canonical
|
||||||
|
promote variant
|
||||||
|
restore variant
|
||||||
|
resolve
|
||||||
|
reopen
|
||||||
|
```
|
||||||
|
|
||||||
|
Toute action mutable compare à la fois :
|
||||||
|
|
||||||
|
```text
|
||||||
|
expected_conflict_revision
|
||||||
|
expected_canonical_revision
|
||||||
|
```
|
||||||
|
|
||||||
|
Une action déjà exactement appliquée est idempotente `AlreadyAtTarget`; une action concurrente incompatible est `StaleRevision`.
|
||||||
|
|
||||||
|
### Rétention
|
||||||
|
|
||||||
|
Les rows de variantes référencées restent durables comme identités.
|
||||||
|
|
||||||
|
Purge payload interdite pour :
|
||||||
|
|
||||||
|
```text
|
||||||
|
canonical selector courant
|
||||||
|
participants d'un conflict case Open
|
||||||
|
mutation en cours
|
||||||
|
```
|
||||||
|
|
||||||
|
L'historique conserve l'identité mais ne pin pas éternellement les bytes. Un restore utilise uniquement des bytes locaux Full/Archived ; après purge explicite, il échoue clairement sans fetch réseau.
|
||||||
|
|
||||||
|
### Store error class
|
||||||
|
|
||||||
|
Type public backend-neutral retenu :
|
||||||
|
|
||||||
|
```text
|
||||||
|
Transient
|
||||||
|
Terminal
|
||||||
|
```
|
||||||
|
|
||||||
|
La classification est un contrat Store, pas une liste PostgreSQL codée dans le Worker. Un code inconnu est `Terminal`.
|
||||||
|
|
||||||
|
SQLSTATE retryables initiaux :
|
||||||
|
|
||||||
|
```text
|
||||||
|
40001 serialization_failure
|
||||||
|
40P01 deadlock_detected
|
||||||
|
57P01 admin_shutdown
|
||||||
|
57P02 crash_shutdown
|
||||||
|
57P03 cannot_connect_now
|
||||||
|
```
|
||||||
|
|
||||||
|
Pool timeout/connection loss sont Transient après configuration valide. Config, migration/schema mismatch, wrong network, data invalid, stale revision et retention conflicts sont Terminal.
|
||||||
|
|
||||||
|
### Worker retry
|
||||||
|
|
||||||
|
Le Worker possède le retry :
|
||||||
|
|
||||||
|
```text
|
||||||
|
default retries 5
|
||||||
|
maximum retries 20
|
||||||
|
initial backoff 250 ms
|
||||||
|
max backoff default 5 s
|
||||||
|
absolute backoff max 30 s
|
||||||
|
jitter none in first implementation
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucune retry queue : un item conserve son persistence slot jusqu'au résultat/exhaustion. L'admission queue existante fournit la backpressure.
|
||||||
|
|
||||||
|
Pendant retry :
|
||||||
|
|
||||||
|
```text
|
||||||
|
state Running
|
||||||
|
activity Blocked
|
||||||
|
health Degraded
|
||||||
|
```
|
||||||
|
|
||||||
|
Après exhaustion/Terminal : `Faulted/Unhealthy`.
|
||||||
|
|
||||||
|
### Transport reconnect
|
||||||
|
|
||||||
|
Les acteurs Transport existants restent propriétaires. Le principal gap statique identifié est l'absence de borne maximale KSP explicite sur `WsReconnectSettings::max_retries`, alors que Yellowstone possède `MAX_GRPC_RECONNECT_RETRIES = 100`.
|
||||||
|
|
||||||
|
Reconnect, resubscribe/from_slot, replay delivery et coverage restent des concepts distincts.
|
||||||
|
|
||||||
|
### Backfill
|
||||||
|
|
||||||
|
Aucune dépendance Worker <-> Backfill. Les nouveaux contrats sont ajoutés comme traits séparés afin de ne pas casser `RawTransactionWrite` et les producteurs actuels.
|
||||||
|
|
||||||
|
## Migration
|
||||||
|
|
||||||
|
Une V004 additive est justifiée après les contrats `pre.002`.
|
||||||
|
|
||||||
|
V000/V001/V002/V003 restent byte/checksum-identiques.
|
||||||
|
|
||||||
|
V004 doit au minimum matérialiser :
|
||||||
|
|
||||||
|
```text
|
||||||
|
participants
|
||||||
|
history append-only
|
||||||
|
projection de résolution
|
||||||
|
support physique de rétention de variante réellement nécessaire
|
||||||
|
```
|
||||||
|
|
||||||
|
## Découpage recalibré
|
||||||
|
|
||||||
|
```text
|
||||||
|
pre.001 audit + architecture + sizing + plan
|
||||||
|
pre.002 Store API variants/conflicts/history/actions + StoreErrorClass
|
||||||
|
pre.003 PostgreSQL V004 additive + bootstrap legacy
|
||||||
|
pre.004 PostgreSQL lifecycle/actions/CAS/races/history
|
||||||
|
pre.005 variant retention/archive/purge guards/restore
|
||||||
|
pre.006 Store facade + physical error classification + Backfill compatibility
|
||||||
|
pre.007 Worker Store retry/backpressure/Blocked/cancellation
|
||||||
|
pre.008 Transport/Config reconnect bounds/hardening
|
||||||
|
pre.009 technical/live final gate
|
||||||
|
pre.010 documentation reconciliation
|
||||||
|
pre.011 publication preparation
|
||||||
|
rel.001 stable mechanical publication
|
||||||
|
```
|
||||||
|
|
||||||
|
## Hors périmètre
|
||||||
|
|
||||||
|
```text
|
||||||
|
Store Desk -> 0.3.18
|
||||||
|
Backfill multi-route -> 0.3.19
|
||||||
|
Backfill Desk -> 0.3.20
|
||||||
|
RAW -> STRUCTURAL
|
||||||
|
STRUCTURAL persistence
|
||||||
|
DECODED / DOMAIN
|
||||||
|
provider majority/priority
|
||||||
|
heuristic merge
|
||||||
|
unbounded/hidden Store retry
|
||||||
|
Worker network stack
|
||||||
|
Worker <-> Backfill dependency
|
||||||
|
network rollback
|
||||||
|
invented operator authentication
|
||||||
|
```
|
||||||
|
|
||||||
|
## Validations exécutées après assemblage
|
||||||
|
|
||||||
|
Après création de cette tranche :
|
||||||
|
|
||||||
|
```text
|
||||||
|
General Rust rule audit clean
|
||||||
|
Rust export completeness audit 0 candidate(s)
|
||||||
|
KSP workspace Rust rule audit clean
|
||||||
|
Markdown table audit clean (352 table(s), 965 file(s))
|
||||||
|
workspace.package.version 0.3.17-pre.1
|
||||||
|
byte-diff contre archive source PASS
|
||||||
|
fichiers ajoutés exactement 3
|
||||||
|
fichiers modifiés exactement Cargo.toml
|
||||||
|
fichiers supprimés 0
|
||||||
|
Cargo gates NOT RUN (toolchain absent)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Gate demandé après application
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo fmt --all -- --check
|
||||||
|
python3 scripts/audit_rust_workspace_rules.py
|
||||||
|
python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas
|
||||||
|
cargo check --workspace
|
||||||
|
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucun test PostgreSQL live n'est requis pour `pre.001`.
|
||||||
|
|
||||||
|
La tranche suivante, seulement après gate propre, est :
|
||||||
|
|
||||||
|
```text
|
||||||
|
0.3.17-pre.002
|
||||||
|
```
|
||||||
1278
docs/plans/039-V0_3_17_RAW_OPERATIONAL_RESILIENCE_PLAN.md
Normal file
1278
docs/plans/039-V0_3_17_RAW_OPERATIONAL_RESILIENCE_PLAN.md
Normal file
File diff suppressed because it is too large
Load Diff
570
docs/validation/034-V0_3_17_RAW_OPERATIONAL_RESILIENCE.md
Normal file
570
docs/validation/034-V0_3_17_RAW_OPERATIONAL_RESILIENCE.md
Normal file
@@ -0,0 +1,570 @@
|
|||||||
|
<!-- file: docs/validation/034-V0_3_17_RAW_OPERATIONAL_RESILIENCE.md -->
|
||||||
|
<!-- version: 1 -->
|
||||||
|
|
||||||
|
# Validation `0.3.17` — résilience opérationnelle et cycle de vie des variantes RAW
|
||||||
|
|
||||||
|
## 1. Objet
|
||||||
|
|
||||||
|
Ce document suit les preuves de `0.3.17`.
|
||||||
|
|
||||||
|
La révision initiale correspond au gate `0.3.17-pre.001`. Elle valide le point de départ, l'audit des règles, le modèle conceptuel, le sizing et la matrice de preuves à construire. Elle ne déclare aucune implémentation future comme acquise.
|
||||||
|
|
||||||
|
## 2. Base source reçue
|
||||||
|
|
||||||
|
Archive source fournie pour l'ouverture :
|
||||||
|
|
||||||
|
```text
|
||||||
|
khadhroony-solana-project-v0.3.16.zip
|
||||||
|
```
|
||||||
|
|
||||||
|
SHA-256 local de l'archive reçue :
|
||||||
|
|
||||||
|
```text
|
||||||
|
db3cc1b3fc3fb07ee864b02e2a7346c673d4cf63b33e8e872aca6c6458856ca0
|
||||||
|
```
|
||||||
|
|
||||||
|
L'arbre extrait déclare :
|
||||||
|
|
||||||
|
```text
|
||||||
|
workspace.package.version = 0.3.16
|
||||||
|
edition = 2024
|
||||||
|
workspace members = 22
|
||||||
|
```
|
||||||
|
|
||||||
|
Le handoff stable est complet : `pre.001` à `pre.010`, les `fix.*` réellement publiés et `rel.001` sont présents sous `deltas/0.3.16/`.
|
||||||
|
|
||||||
|
L'archive contient également le prompt `036` attendu et les plans/validations de fermeture `0.3.16`.
|
||||||
|
|
||||||
|
## 3. Limite de vérification du tag
|
||||||
|
|
||||||
|
La provenance annoncée par l'opérateur est le ZIP téléchargé depuis le tag Gitea `v0.3.16`.
|
||||||
|
|
||||||
|
L'environnement local d'assemblage ne dispose pas d'un accès Git/DNS exploitable vers le dépôt permettant de comparer indépendamment le SHA du commit taggé avec cette archive.
|
||||||
|
|
||||||
|
Le gate ne transforme donc pas cette absence de comparaison réseau en faux PASS.
|
||||||
|
|
||||||
|
Contrôles réellement établis sur les bytes fournis :
|
||||||
|
|
||||||
|
```text
|
||||||
|
version stable interne = 0.3.16
|
||||||
|
rel.001 présent
|
||||||
|
prompt 036 présent
|
||||||
|
inventaire deltas 0.3.16 complet
|
||||||
|
manifests membres cohérents
|
||||||
|
aucun lockfile versionné
|
||||||
|
aucun target/node_modules/.git distribué
|
||||||
|
aucune clé .pem/.key détectée
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. Audit des règles avant modification
|
||||||
|
|
||||||
|
Commandes réellement exécutées dans l'environnement d'assemblage :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 scripts/audit_rust_workspace_rules.py
|
||||||
|
python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas
|
||||||
|
```
|
||||||
|
|
||||||
|
Résultat :
|
||||||
|
|
||||||
|
```text
|
||||||
|
General Rust rule audit: clean
|
||||||
|
Rust export completeness audit: 0 candidate(s)
|
||||||
|
KSP workspace Rust rule audit: clean
|
||||||
|
Markdown table audit: clean (352 table(s), 962 file(s))
|
||||||
|
```
|
||||||
|
|
||||||
|
Contrôle statique complémentaire :
|
||||||
|
|
||||||
|
```text
|
||||||
|
workspace_version = 0.3.16
|
||||||
|
workspace_members = 22
|
||||||
|
delta_0.3.16_count = 21
|
||||||
|
manifest members inherit workspace version/edition = PASS
|
||||||
|
mandatory rule/handoff files present = PASS
|
||||||
|
forbidden distribution artifacts = absent
|
||||||
|
root rust/clippy lint contract = exact
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5. Gate Cargo de la stable fourni par l'opérateur
|
||||||
|
|
||||||
|
Le log joint à la session de démarrage documente sur la stable `0.3.16` :
|
||||||
|
|
||||||
|
```text
|
||||||
|
cargo fmt --all
|
||||||
|
cargo fmt --all -- --check
|
||||||
|
Rust audits
|
||||||
|
Markdown audit
|
||||||
|
cargo check --workspace
|
||||||
|
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||||
|
```
|
||||||
|
|
||||||
|
ainsi que les suites ciblées :
|
||||||
|
|
||||||
|
```text
|
||||||
|
ksp-store-api
|
||||||
|
ksp-store-lib
|
||||||
|
ksp-store-postgres-lib
|
||||||
|
ksp-job-backfill-lib
|
||||||
|
ksp-worker-raw-transaction-ingest-lib
|
||||||
|
```
|
||||||
|
|
||||||
|
Ces résultats appartiennent au checkout utilisateur `0.3.16` et ne sont pas présentés comme réexécutés dans l'environnement d'assemblage.
|
||||||
|
|
||||||
|
## 6. Limitation Cargo de `pre.001`
|
||||||
|
|
||||||
|
Le binaire `cargo` n'est pas disponible dans l'environnement d'assemblage.
|
||||||
|
|
||||||
|
Les commandes suivantes sont donc `NOT RUN` ici après le bump `0.3.17-pre.1` :
|
||||||
|
|
||||||
|
```text
|
||||||
|
cargo fmt --all -- --check
|
||||||
|
cargo check --workspace
|
||||||
|
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||||
|
cargo test ...
|
||||||
|
```
|
||||||
|
|
||||||
|
`pre.001` ne modifie aucun Rust. Le gate opérateur demandé après application reste néanmoins obligatoire.
|
||||||
|
|
||||||
|
## 7. Sources internes auditées
|
||||||
|
|
||||||
|
Relues conformément au prompt :
|
||||||
|
|
||||||
|
```text
|
||||||
|
gouvernance/règles complètes
|
||||||
|
handoff 0.3.16 complet
|
||||||
|
Store API README/USAGE/src/tests
|
||||||
|
Store lib README/USAGE/src/tests
|
||||||
|
PostgreSQL README/USAGE/src/tests/unit_tests/resources
|
||||||
|
Common RAW README/USAGE/src/tests
|
||||||
|
Worker API + Worker RAW README/USAGE/src/tests/unit_tests
|
||||||
|
Transport README/USAGE/src/tests
|
||||||
|
Config README/USAGE/src/tests
|
||||||
|
Backfill README/USAGE + persistence/tests ciblés
|
||||||
|
architectures 004/009/011
|
||||||
|
validation 033
|
||||||
|
```
|
||||||
|
|
||||||
|
## 8. Constat Store API
|
||||||
|
|
||||||
|
Acquis :
|
||||||
|
|
||||||
|
```text
|
||||||
|
variant identity/reference/origin
|
||||||
|
variant relation + reason
|
||||||
|
shared fail-closed comparator
|
||||||
|
variant-aware acquisition outcome
|
||||||
|
minimal conflict status Open/Resolved
|
||||||
|
canonical/observation inspection
|
||||||
|
canonical retention contracts
|
||||||
|
```
|
||||||
|
|
||||||
|
Manquant pour `0.3.17` :
|
||||||
|
|
||||||
|
```text
|
||||||
|
variant inspection capability
|
||||||
|
conflict inspection capability
|
||||||
|
participant projection
|
||||||
|
history read capability
|
||||||
|
resolution/reopen action capability
|
||||||
|
expected conflict revision
|
||||||
|
expected canonical revision
|
||||||
|
stable stale-action outcome
|
||||||
|
backend-neutral StoreErrorClass
|
||||||
|
```
|
||||||
|
|
||||||
|
Verdict du gate :
|
||||||
|
|
||||||
|
```text
|
||||||
|
CONTRACT GAP CONFIRMED
|
||||||
|
```
|
||||||
|
|
||||||
|
## 9. Constat PostgreSQL V003
|
||||||
|
|
||||||
|
V003 est additive et fournit :
|
||||||
|
|
||||||
|
```text
|
||||||
|
variants
|
||||||
|
canonical selector + revision
|
||||||
|
observation -> variant mapping
|
||||||
|
minimal conflict current row
|
||||||
|
```
|
||||||
|
|
||||||
|
La table conflit courante est une projection, pas un historique complet.
|
||||||
|
|
||||||
|
Manquant :
|
||||||
|
|
||||||
|
```text
|
||||||
|
participants monotones
|
||||||
|
append-only transitions
|
||||||
|
resolved target/action
|
||||||
|
legacy bootstrap qualification
|
||||||
|
operator CAS actions
|
||||||
|
variant archive sidecar/purge guards
|
||||||
|
```
|
||||||
|
|
||||||
|
Verdict :
|
||||||
|
|
||||||
|
```text
|
||||||
|
V004 ADDITIVE REQUIRED
|
||||||
|
V000/V001/V002/V003 MUST REMAIN IMMUTABLE
|
||||||
|
```
|
||||||
|
|
||||||
|
## 10. Constat locks/races
|
||||||
|
|
||||||
|
L'acquisition actuelle verrouille d'abord la row canonical V001 puis manipule V003 dans la même transaction. La promotion canonique utilise un selector revisionné et CAS ; le conflict current row utilise lui aussi une revision monotone.
|
||||||
|
|
||||||
|
Le gate fixe l'ordre cible :
|
||||||
|
|
||||||
|
```text
|
||||||
|
V001 transaction identity
|
||||||
|
-> selector
|
||||||
|
-> conflict current row
|
||||||
|
-> variants ordered by variant_id if lock needed
|
||||||
|
-> participant/history/retention sidecars
|
||||||
|
-> projection updates
|
||||||
|
-> commit
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucune attente externe n'est autorisée sous transaction.
|
||||||
|
|
||||||
|
Scénarios obligatoires :
|
||||||
|
|
||||||
|
```text
|
||||||
|
ingestion vs resolution
|
||||||
|
promotion auto vs manual resolution
|
||||||
|
resolution A vs resolution B
|
||||||
|
resolved -> new divergence -> reopen
|
||||||
|
retention vs resolution
|
||||||
|
ForceRehydrate exact/different
|
||||||
|
late failure -> full rollback
|
||||||
|
```
|
||||||
|
|
||||||
|
Verdict :
|
||||||
|
|
||||||
|
```text
|
||||||
|
CAS MODEL DEFINED
|
||||||
|
RACE MATRIX DEFINED
|
||||||
|
IMPLEMENTATION PENDING pre.003-pre.005
|
||||||
|
```
|
||||||
|
|
||||||
|
## 11. Constat rétention
|
||||||
|
|
||||||
|
V003 conserve un `retention_state` sur chaque variante mais ne matérialise pas encore l'archive locale complète des payloads de variante.
|
||||||
|
|
||||||
|
Politique validée au gate :
|
||||||
|
|
||||||
|
```text
|
||||||
|
variant row identity never deleted when referenced
|
||||||
|
current canonical payload cannot be purged
|
||||||
|
Open conflict participant payload cannot be purged
|
||||||
|
history retains identity but is not an eternal payload pin by itself
|
||||||
|
archive is allowed when guards permit
|
||||||
|
purge is explicit, never automatic Store policy
|
||||||
|
restore uses local Full/Archived bytes only
|
||||||
|
purged restore target -> explicit VariantPayloadUnavailable
|
||||||
|
network is not normal rollback
|
||||||
|
ForceRehydrate does not select a historical variant
|
||||||
|
```
|
||||||
|
|
||||||
|
Verdict :
|
||||||
|
|
||||||
|
```text
|
||||||
|
RETENTION/PIN SEMANTICS DEFINED
|
||||||
|
PHYSICAL ARCHIVE IMPLEMENTATION PENDING pre.005
|
||||||
|
```
|
||||||
|
|
||||||
|
## 12. Constat Store errors
|
||||||
|
|
||||||
|
Aujourd'hui :
|
||||||
|
|
||||||
|
```text
|
||||||
|
Deadpool timeout -> PoolTimeout
|
||||||
|
Deadpool backend/closed -> ConnectFailed
|
||||||
|
statement/transaction errors -> frequently ReadFailed/WriteFailed
|
||||||
|
```
|
||||||
|
|
||||||
|
La dernière catégorie perd trop tôt le SQLSTATE et ne permet pas une classification retry sûre.
|
||||||
|
|
||||||
|
Politique retenue :
|
||||||
|
|
||||||
|
```text
|
||||||
|
StoreErrorClass = Transient | Terminal
|
||||||
|
classifier contract backend-neutral
|
||||||
|
unknown code -> Terminal
|
||||||
|
SQLSTATE inspected privately before redaction
|
||||||
|
no free-form DB text in public errors
|
||||||
|
```
|
||||||
|
|
||||||
|
Transient initialement autorisés :
|
||||||
|
|
||||||
|
```text
|
||||||
|
connection/reset/unavailable after valid config
|
||||||
|
pool timeout/unavailable
|
||||||
|
40001 serialization_failure
|
||||||
|
40P01 deadlock_detected
|
||||||
|
57P01 admin_shutdown
|
||||||
|
57P02 crash_shutdown
|
||||||
|
57P03 cannot_connect_now
|
||||||
|
```
|
||||||
|
|
||||||
|
Terminal initialement autorisés :
|
||||||
|
|
||||||
|
```text
|
||||||
|
config/secret/TLS local invalid
|
||||||
|
backend not compiled
|
||||||
|
wrong network
|
||||||
|
model/query/data invalid
|
||||||
|
migration mismatch/schema newer
|
||||||
|
KSP invariant constraint failure
|
||||||
|
legacy raw conflict
|
||||||
|
stale revision
|
||||||
|
retention/pin conflict
|
||||||
|
missing/unavailable variant for local action
|
||||||
|
```
|
||||||
|
|
||||||
|
`23505` et `23P01` ne sont jamais generic-retry par défaut.
|
||||||
|
|
||||||
|
Verdict :
|
||||||
|
|
||||||
|
```text
|
||||||
|
CLASSIFICATION POLICY DEFINED
|
||||||
|
PHYSICAL MAPPING PENDING pre.006
|
||||||
|
```
|
||||||
|
|
||||||
|
## 13. Constat Worker retry/Blocked
|
||||||
|
|
||||||
|
Le Worker a aujourd'hui :
|
||||||
|
|
||||||
|
```text
|
||||||
|
admission queue bounded: default 256, max 65536
|
||||||
|
persistence concurrency: default 8, max 64
|
||||||
|
shutdown drain timeout: default 10 s, max 30 s
|
||||||
|
no Store retry settings
|
||||||
|
WorkerActivity = Unknown/Idle/Active
|
||||||
|
```
|
||||||
|
|
||||||
|
Politique retenue :
|
||||||
|
|
||||||
|
```text
|
||||||
|
retry owned by Worker
|
||||||
|
no retry queue
|
||||||
|
persistence permit held across retry sequence
|
||||||
|
max_retries default 5, maximum 20
|
||||||
|
initial backoff default 250 ms
|
||||||
|
max backoff default 5 s
|
||||||
|
absolute settings backoff max 30 s
|
||||||
|
no jitter in first implementation
|
||||||
|
sleep stop-preemptible
|
||||||
|
Transient -> Running/Blocked/Degraded
|
||||||
|
recovery -> Running/Active-or-Idle
|
||||||
|
exhaustion/Terminal -> Faulted/Unhealthy
|
||||||
|
```
|
||||||
|
|
||||||
|
Verdict :
|
||||||
|
|
||||||
|
```text
|
||||||
|
RETRY/BACKPRESSURE MODEL DEFINED
|
||||||
|
WORKER IMPLEMENTATION PENDING pre.007
|
||||||
|
```
|
||||||
|
|
||||||
|
## 14. Constat Transport/Config
|
||||||
|
|
||||||
|
WebSocket : reconnect déjà existant avec max retries/backoff/resubscribe et stop-aware actor.
|
||||||
|
|
||||||
|
Yellowstone : reconnect déjà existant, `from_slot`, `SubscribeReplayInfo`, compteurs replay et distinction explicite `replay_coverage_unproven`.
|
||||||
|
|
||||||
|
Config projette déjà les settings/overrides reconnect.
|
||||||
|
|
||||||
|
Gap observé :
|
||||||
|
|
||||||
|
```text
|
||||||
|
Yellowstone max_retries possède une borne KSP explicite = 100
|
||||||
|
WebSocket max_retries ne possède pas encore de borne maximale KSP équivalente
|
||||||
|
```
|
||||||
|
|
||||||
|
Décision : durcir la pile existante en `pre.008`, sans nouveau reconnect Worker.
|
||||||
|
|
||||||
|
Verdict :
|
||||||
|
|
||||||
|
```text
|
||||||
|
RECONNECT OWNERSHIP ALREADY CORRECT
|
||||||
|
BOUNDS/PARITY HARDENING REQUIRED
|
||||||
|
COVERAGE SEMANTICS UNCHANGED
|
||||||
|
```
|
||||||
|
|
||||||
|
## 15. Réaudit upstream
|
||||||
|
|
||||||
|
Faits confirmés :
|
||||||
|
|
||||||
|
```text
|
||||||
|
PostgreSQL 17
|
||||||
|
row locks et deadlock detection documentés
|
||||||
|
consistent lock order recommandé
|
||||||
|
serialization_failure SQLSTATE 40001 retryable
|
||||||
|
deadlock_detected SQLSTATE 40P01 retryable lorsque pertinent
|
||||||
|
|
||||||
|
tokio-postgres
|
||||||
|
DbError::code() -> SqlState structuré
|
||||||
|
|
||||||
|
deadpool-postgres
|
||||||
|
PoolError distingue Timeout/Backend/Closed/config-hook classes
|
||||||
|
|
||||||
|
Solana PubSub
|
||||||
|
subscription semantics documentées
|
||||||
|
signatureSubscribe one-shot auto-cancel serveur
|
||||||
|
aucune preuve générale de replay/coverage après reconnect
|
||||||
|
|
||||||
|
Yellowstone upstream
|
||||||
|
SubscribeRequest.from_slot existe
|
||||||
|
replay availability est une notion distincte
|
||||||
|
|
||||||
|
Tokio
|
||||||
|
cancellation safety doit être raisonnée autour de select!/queues fair
|
||||||
|
```
|
||||||
|
|
||||||
|
Politique KSP correspondante documentée dans le plan 039.
|
||||||
|
|
||||||
|
## 16. Compatibilité Job Backfill
|
||||||
|
|
||||||
|
Le Backfill actuel passe par les contrats Store communs et ne dépend ni du Worker ni du backend PostgreSQL direct.
|
||||||
|
|
||||||
|
Décision :
|
||||||
|
|
||||||
|
```text
|
||||||
|
nouveaux traits séparés
|
||||||
|
pas d'ajout obligatoire à RawTransactionWrite
|
||||||
|
pas de retry live Worker dans Job
|
||||||
|
QuarantinedConflict reste compatible
|
||||||
|
pas de scope multi-route dans 0.3.17
|
||||||
|
```
|
||||||
|
|
||||||
|
Verdict :
|
||||||
|
|
||||||
|
```text
|
||||||
|
BACKFILL BOUNDARY PRESERVED BY DESIGN
|
||||||
|
REGRESSION TESTS REQUIRED pre.006/pre.009
|
||||||
|
```
|
||||||
|
|
||||||
|
## 17. Migration sizing
|
||||||
|
|
||||||
|
Migration prévue :
|
||||||
|
|
||||||
|
```text
|
||||||
|
V004 additive
|
||||||
|
participants
|
||||||
|
append-only history
|
||||||
|
resolved projection fields
|
||||||
|
variant archive support if needed by final retention design
|
||||||
|
```
|
||||||
|
|
||||||
|
La migration doit conserver strictement les resources/checksums V000-V003.
|
||||||
|
|
||||||
|
Le bootstrap V003 -> V004 ne peut créer que des faits prouvables depuis l'état courant ; aucun historique antérieur détaillé n'est reconstruit artificiellement.
|
||||||
|
|
||||||
|
## 18. Prévision de prereleases validée par le gate
|
||||||
|
|
||||||
|
```text
|
||||||
|
pre.001 audit + architecture + sizing + plan
|
||||||
|
pre.002 Store API variants/conflicts/history/actions + StoreErrorClass
|
||||||
|
pre.003 PostgreSQL V004 additive + bootstrap legacy
|
||||||
|
pre.004 PostgreSQL lifecycle/actions/CAS/races/history
|
||||||
|
pre.005 variant retention/archive/purge guards/restore
|
||||||
|
pre.006 Store facade + physical error classification + Backfill compatibility
|
||||||
|
pre.007 Worker Store retry/backpressure/Blocked/cancellation
|
||||||
|
pre.008 Transport/Config reconnect bounds/hardening
|
||||||
|
pre.009 technical/live final gate
|
||||||
|
pre.010 documentation reconciliation
|
||||||
|
pre.011 publication preparation
|
||||||
|
rel.001 stable mechanical publication
|
||||||
|
```
|
||||||
|
|
||||||
|
Cette prévision peut recevoir des `fix.*` ou subdivisions si une tranche ne peut pas rester petite et validable.
|
||||||
|
|
||||||
|
## 19. Matrice de preuve à remplir
|
||||||
|
|
||||||
|
Etat au gate `pre.001` :
|
||||||
|
|
||||||
|
```text
|
||||||
|
base archive internal consistency PASS
|
||||||
|
rules static audit PASS
|
||||||
|
Markdown audit baseline PASS
|
||||||
|
Cargo post-bump in assembly environment NOT RUN (toolchain absent)
|
||||||
|
Store API contract model DEFINED
|
||||||
|
conflict lifecycle model DEFINED
|
||||||
|
revision/CAS model DEFINED
|
||||||
|
race matrix DEFINED
|
||||||
|
retention/pin model DEFINED
|
||||||
|
Store Transient/Terminal policy DEFINED
|
||||||
|
Worker retry/backpressure/Blocked policy DEFINED
|
||||||
|
Transport reconnect ownership/bounds DEFINED
|
||||||
|
Backfill compatibility strategy DEFINED
|
||||||
|
V004 migration strategy DEFINED
|
||||||
|
PostgreSQL live 0.3.17 PENDING pre.009
|
||||||
|
Store outage/recovery proof PENDING pre.009
|
||||||
|
reconnect live/deterministic proof PENDING pre.009
|
||||||
|
workspace final technical gate PENDING pre.009
|
||||||
|
documentation reconciliation PENDING pre.010
|
||||||
|
publication preparation PENDING pre.011
|
||||||
|
```
|
||||||
|
|
||||||
|
## 20. Hors périmètre validé
|
||||||
|
|
||||||
|
```text
|
||||||
|
Store Desk Tauri -> 0.3.18
|
||||||
|
Backfill multi-route -> 0.3.19
|
||||||
|
Backfill Desk multi-route -> 0.3.20
|
||||||
|
RAW -> STRUCTURAL
|
||||||
|
STRUCTURAL persistence
|
||||||
|
DECODED / DOMAIN
|
||||||
|
provider voting/priority
|
||||||
|
heuristic JSON merge
|
||||||
|
unbounded Store retry
|
||||||
|
hidden backend retry loop
|
||||||
|
Worker-owned network stack
|
||||||
|
Worker <-> Backfill dependency
|
||||||
|
network rollback of old variant
|
||||||
|
free-form operator identity without auth contract
|
||||||
|
```
|
||||||
|
|
||||||
|
## 21. Gate `pre.001`
|
||||||
|
|
||||||
|
Le gate conceptuel est fermé :
|
||||||
|
|
||||||
|
```text
|
||||||
|
archive/rules audit CLOSED
|
||||||
|
Store API proposal CLOSED
|
||||||
|
conflict lifecycle CLOSED
|
||||||
|
revision/races CLOSED
|
||||||
|
retention/pins CLOSED
|
||||||
|
Transient/Terminal CLOSED
|
||||||
|
Worker retry/Blocked CLOSED
|
||||||
|
Transport reconnect ownership CLOSED
|
||||||
|
Backfill compatibility CLOSED
|
||||||
|
migration strategy CLOSED
|
||||||
|
live proof plan CLOSED
|
||||||
|
prerelease sizing CLOSED
|
||||||
|
out-of-scope CLOSED
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucune implémentation Rust/SQL lourde n'est autorisée dans `pre.001`.
|
||||||
|
|
||||||
|
La tranche suivante est :
|
||||||
|
|
||||||
|
```text
|
||||||
|
0.3.17-pre.002 — Store API variants/conflicts/history/actions + StoreErrorClass
|
||||||
|
```
|
||||||
|
|
||||||
|
## 22. Gate opérateur après application de `pre.001`
|
||||||
|
|
||||||
|
Comme seuls `Cargo.toml` et des Markdown sont modifiés/ajoutés :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo fmt --all -- --check
|
||||||
|
python3 scripts/audit_rust_workspace_rules.py
|
||||||
|
python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas
|
||||||
|
cargo check --workspace
|
||||||
|
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucun test live n'est requis par cette tranche documentaire de planning.
|
||||||
Reference in New Issue
Block a user