v0.2.7-pre.002
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<!-- file: docs/validation/010-V0_2_7_ONCHAIN_WEBSOCKET.md -->
|
||||
<!-- version: 3 -->
|
||||
<!-- version: 4 -->
|
||||
|
||||
# Validation `0.2.7` — WebSocket Solana standard
|
||||
|
||||
> **Statut : matrice initiale ouverte par `0.2.7-pre.001`.** Les colonnes de preuve seront consolidées au fil des prereleases puis fermées avant `0.2.7-rel.001`.
|
||||
> **Statut : matrice active, `0.2.7-pre.002`.** Le gate normatif `pre.001` est clos ; les settings, identités, états lifecycle et snapshots sûrs sont maintenant matérialisés. Les preuves runtime socket/subscription restent ouvertes.
|
||||
|
||||
## 1. Baseline normative
|
||||
|
||||
@@ -195,8 +195,8 @@ Les votes observés sont gossip/pre-consensus ; aucune garantie d'entrée dans l
|
||||
| plusieurs subs / session | registry actor par session | `pre.006` |
|
||||
| ID public subscription | local KSP stable | `pre.006` |
|
||||
| ID serveur | éphémère interne et remappé | `pre.006`/`pre.007` |
|
||||
| session states | Disconnected/Connecting/Active/Reconnecting/Closing/Closed/Failed | `pre.002` |
|
||||
| subscription states | Requested/Active/Resubscribing/Cancelling/Closed/Failed | `pre.002` |
|
||||
| session states | Disconnected/Connecting/Active/Reconnecting/Closing/Closed/Failed | **Done `pre.002`** |
|
||||
| subscription states | Requested/Active/Resubscribing/Cancelling/Closed/Failed | **Done `pre.002`** |
|
||||
| reconnect | physique uniquement, budget/backoff finis | `pre.007` |
|
||||
| resubscribe | policy `Never` ou `ActiveSubscriptions`, ordre local déterministe | `pre.007` |
|
||||
| continuity | gap observable, aucune promesse lossless | `pre.007` |
|
||||
@@ -206,22 +206,22 @@ Les votes observés sont gossip/pre-consensus ; aucune garantie d'entrée dans l
|
||||
|
||||
## 7. Threat/security compliance initiale
|
||||
|
||||
| Invariant | Preuve attendue | Statut |
|
||||
|---------------------------------------------------|-----------------------------------|---------|
|
||||
| URL/credentials absents de `Debug` | unit tests URL wrapper | Planned |
|
||||
| URL/credentials absents des erreurs | adversarial connection errors | Planned |
|
||||
| URL/credentials absents des logs | writer/capture KSP logging | Planned |
|
||||
| snapshots sans URL/raw payload | public API canary | Planned |
|
||||
| frame/message finis | oversized server fixture | Planned |
|
||||
| JSON borné indirectement par message | oversized + malformed fixture | Planned |
|
||||
| queues notifications bornées | slow consumer fixture | Planned |
|
||||
| pending RPC borné + timeout | no-response fixture | Planned |
|
||||
| reconnect loop bornée | repeated disconnect fixture | Planned |
|
||||
| unsubscribe pendant reconnect ne resubscribe pas | race fixture | Planned |
|
||||
| signature terminale ne resubscribe pas | terminal fixture | Planned |
|
||||
| shutdown ne bloque pas | peer hostile/no close ack fixture | Planned |
|
||||
| no Store/Program/Wallet/Config dep dans Transport | cargo tree + source canary | Planned |
|
||||
| no direct `tracing` dans Transport | workspace audit/canary | Planned |
|
||||
| Invariant | Preuve attendue | Statut |
|
||||
|---------------------------------------------------|---------------------------------------------|--------------------|
|
||||
| URL/credentials absents de `Debug` | unit tests URL wrapper | **Done `pre.002`** |
|
||||
| URL/credentials absents des erreurs | validation URL + future connection errors | Partial `pre.002` |
|
||||
| URL/credentials absents des logs | safe fields `pre.002`, capture actor future | Partial `pre.002` |
|
||||
| snapshots sans URL/raw payload | unit shape + public contract | **Done `pre.002`** |
|
||||
| frame/message finis | settings bornés, enforcement socket futur | Partial `pre.002` |
|
||||
| JSON borné indirectement par message | oversized + malformed fixture | Planned |
|
||||
| queues notifications bornées | capacité settings, channel futur | Partial `pre.002` |
|
||||
| pending RPC borné + timeout | settings bornés, runtime futur | Partial `pre.002` |
|
||||
| reconnect loop bornée | repeated disconnect fixture | Planned |
|
||||
| unsubscribe pendant reconnect ne resubscribe pas | race fixture | Planned |
|
||||
| signature terminale ne resubscribe pas | terminal fixture | Planned |
|
||||
| shutdown ne bloque pas | peer hostile/no close ack fixture | Planned |
|
||||
| no Store/Program/Wallet/Config dep dans Transport | cargo tree + source canary | Planned |
|
||||
| no direct `tracing` dans Transport | workspace audit + source audit | **Done `pre.002`** |
|
||||
|
||||
## 8. Dependency compliance initiale
|
||||
|
||||
@@ -268,6 +268,51 @@ Le type Transport correspondant au discriminateur est prévu `#[non_exhaustive]`
|
||||
|
||||
La schema V1 n'est pas assouplie. Une schema V2 explicite remplace la fixture standard au moment où l'adapter est matérialisé.
|
||||
|
||||
## 9.1 Checkpoint settings/lifecycle `pre.002`
|
||||
|
||||
Surface publique matérialisée :
|
||||
|
||||
```text
|
||||
WsEndpointUrl
|
||||
WsProviderName
|
||||
WsClusterName
|
||||
WsProtocolKind::SolanaStandard
|
||||
WsReconnectSettings
|
||||
WsResubscribePolicy::{Never, ActiveSubscriptions}
|
||||
WsSessionSettings
|
||||
WsEndpointSettings
|
||||
WsTransportSettings
|
||||
WsSessionId
|
||||
WsSubscriptionId
|
||||
WsSessionState
|
||||
WsSubscriptionState
|
||||
WsSubscriptionKind
|
||||
WsSessionSnapshot
|
||||
WsSubscriptionSnapshot
|
||||
```
|
||||
|
||||
Gates déterministes ajoutés :
|
||||
|
||||
```text
|
||||
ws:// et wss:// acceptés
|
||||
HTTP rejeté par WsEndpointUrl
|
||||
Debug URL redacted
|
||||
erreur de scheme sans URL/credential
|
||||
settings session default bornés
|
||||
zero runtime bound rejeté
|
||||
reconnect backoff inversé rejeté
|
||||
endpoint names uniques
|
||||
au moins un endpoint enabled
|
||||
Debug WsTransportSettings sans URL/credential
|
||||
9 familles standard WsSubscriptionKind
|
||||
snapshots sans URL ni remote subscription id
|
||||
public API canary crate-root
|
||||
```
|
||||
|
||||
Logging : `TRACING_TARGET` reste défini dans `constants.rs`; les nouveaux événements utilisent exclusivement `ksp_logging_lib::trace!`, `debug!` et `warn!` avec des fields sûrs. Aucun `tracing` direct n'est ajouté.
|
||||
|
||||
Les defaults de taille/queue sont des **policies KSP locales**, pas des limites Solana. Leur enforcement réel et leurs tests oversized/slow-consumer restent attendus dans les tranches socket/backpressure.
|
||||
|
||||
## 10. Validation du gate `pre.001`
|
||||
|
||||
Exécuté dans le sandbox :
|
||||
|
||||
Reference in New Issue
Block a user