v0.3.3-pre.010-fix.001
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
# file: Cargo.toml
|
# file: Cargo.toml
|
||||||
# version: 359
|
# version: 360
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "3"
|
resolver = "3"
|
||||||
members = ["crates/ksp-app-config-desk", "crates/ksp-app-solprices-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-interface-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-program-api", "crates/ksp-store-api", "crates/ksp-store-lib", "crates/ksp-store-postgres-lib", "crates/ksp-wallet-lib"]
|
members = ["crates/ksp-app-config-desk", "crates/ksp-app-solprices-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-interface-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-program-api", "crates/ksp-store-api", "crates/ksp-store-lib", "crates/ksp-store-postgres-lib", "crates/ksp-wallet-lib"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.3.3-pre.10"
|
version = "0.3.3-pre.10.fix.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"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: crates/ksp-store-postgres-lib/tests/hardening_completeness.rs
|
// file: crates/ksp-store-postgres-lib/tests/hardening_completeness.rs
|
||||||
// version: 10
|
// version: 11
|
||||||
|
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
#![deny(unreachable_pub)]
|
#![deny(unreachable_pub)]
|
||||||
@@ -291,7 +291,8 @@ fn pre_010_raw_transaction_private_sql_keeps_keyset_navigation_and_bounded_state
|
|||||||
"ORDER BY slot DESC, signature DESC",
|
"ORDER BY slot DESC, signature DESC",
|
||||||
"LIMIT $5",
|
"LIMIT $5",
|
||||||
"FOR UPDATE",
|
"FOR UPDATE",
|
||||||
"ON CONFLICT DO NOTHING",
|
"ON CONFLICT (signature) DO NOTHING",
|
||||||
|
"ON CONFLICT (observation_key) DO NOTHING",
|
||||||
"ksp_raw_transaction_archive_payloads",
|
"ksp_raw_transaction_archive_payloads",
|
||||||
] {
|
] {
|
||||||
assert!(source.contains(required), "required hardened RawTransaction SQL contract missing: {required}");
|
assert!(source.contains(required), "required hardened RawTransaction SQL contract missing: {required}");
|
||||||
|
|||||||
83
deltas/0.3.3/pre.010-fix.001.md
Normal file
83
deltas/0.3.3/pre.010-fix.001.md
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<!-- file: deltas/0.3.3/pre.010-fix.001.md -->
|
||||||
|
<!-- version: 1 -->
|
||||||
|
|
||||||
|
# Delta `0.3.3-pre.010-fix.001` — correction du canari `ON CONFLICT`
|
||||||
|
|
||||||
|
## 1. Cause
|
||||||
|
|
||||||
|
Le gate opérateur de `pre.010` est propre jusqu’au hardening PostgreSQL, où le test :
|
||||||
|
|
||||||
|
```text
|
||||||
|
pre_010_raw_transaction_private_sql_keeps_keyset_navigation_and_bounded_statement_surface
|
||||||
|
```
|
||||||
|
|
||||||
|
échoue sur la recherche littérale :
|
||||||
|
|
||||||
|
```text
|
||||||
|
ON CONFLICT DO NOTHING
|
||||||
|
```
|
||||||
|
|
||||||
|
Les statements de production sont pourtant volontairement ciblés :
|
||||||
|
|
||||||
|
```text
|
||||||
|
ON CONFLICT (signature) DO NOTHING
|
||||||
|
ON CONFLICT (observation_key) DO NOTHING
|
||||||
|
```
|
||||||
|
|
||||||
|
La sous-chaîne générique n’existe donc pas textuellement. Le défaut appartient au canari `pre.010`, pas au SQL de production.
|
||||||
|
|
||||||
|
## 2. Correction
|
||||||
|
|
||||||
|
Le test exige désormais exactement les deux formes réellement requises :
|
||||||
|
|
||||||
|
```text
|
||||||
|
ON CONFLICT (signature) DO NOTHING
|
||||||
|
ON CONFLICT (observation_key) DO NOTHING
|
||||||
|
```
|
||||||
|
|
||||||
|
Les autres garanties restent inchangées : keyset ASC/DESC, `LIMIT`, `FOR UPDATE`, archive séparée, absence de `OFFSET`, `SELECT *`, `ON CONFLICT DO UPDATE` et policies worker.
|
||||||
|
|
||||||
|
## 3. Version
|
||||||
|
|
||||||
|
```text
|
||||||
|
workspace.package.version = 0.3.3-pre.10.fix.1
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. Fichiers modifiés
|
||||||
|
|
||||||
|
```text
|
||||||
|
Cargo.toml
|
||||||
|
crates/ksp-store-postgres-lib/tests/hardening_completeness.rs
|
||||||
|
docs/validation/020-V0_3_3_STORE_POSTGRES_RAW_TRANSACTION.md
|
||||||
|
deltas/0.3.3/pre.010-fix.001.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucune suppression.
|
||||||
|
|
||||||
|
## 5. Production et migrations
|
||||||
|
|
||||||
|
Aucun fichier de production et aucune migration SQL ne sont modifiés.
|
||||||
|
|
||||||
|
Checksums inchangés :
|
||||||
|
|
||||||
|
```text
|
||||||
|
V000 d29068b8c13b9dc0cc9ef6aaadd0fa12d41e0fe4c56541a1118c4bfc846a1450
|
||||||
|
V001 31488cda2f08f3f46c4cdbdbb6c18c243662fada02eac4487040c8735d72cc51
|
||||||
|
```
|
||||||
|
|
||||||
|
## 6. Gate opérateur
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo fmt --all
|
||||||
|
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/0.3.3
|
||||||
|
cargo check --workspace
|
||||||
|
cargo clippy --workspace --all-targets
|
||||||
|
cargo test -p ksp-store-api
|
||||||
|
cargo test -p ksp-store-lib
|
||||||
|
cargo test -p ksp-store-postgres-lib
|
||||||
|
cargo test -p ksp-config-lib
|
||||||
|
cargo check -p ksp-store-lib --no-default-features
|
||||||
|
```
|
||||||
|
|
||||||
|
Aucun live PostgreSQL supplémentaire n’est requis : le runtime et les migrations restent byte-identiques à la base live validée de `pre.009-fix.006`.
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<!-- file: docs/validation/020-V0_3_3_STORE_POSTGRES_RAW_TRANSACTION.md -->
|
<!-- file: docs/validation/020-V0_3_3_STORE_POSTGRES_RAW_TRANSACTION.md -->
|
||||||
<!-- version: 21 -->
|
<!-- version: 22 -->
|
||||||
|
|
||||||
# Validation `0.3.3` — Store/PostgreSQL RawTransaction vertical slice
|
# Validation `0.3.3` — Store/PostgreSQL RawTransaction vertical slice
|
||||||
|
|
||||||
@@ -821,8 +821,15 @@ cargo check -p ksp-store-lib --no-default-features
|
|||||||
|
|
||||||
- [PASS statique] inventaire exact d’une implémentation de chacun des six traits `RawTransaction` côté `PostgresBackend` et côté `Store` ;
|
- [PASS statique] inventaire exact d’une implémentation de chacun des six traits `RawTransaction` côté `PostgresBackend` et côté `Store` ;
|
||||||
- [PASS statique] absence d’implémentation `RawAccountState` et de ressource `ksp_raw_account*` ;
|
- [PASS statique] absence d’implémentation `RawAccountState` et de ressource `ksp_raw_account*` ;
|
||||||
- [PASS statique] canari SQL conserve keyset ASC/DESC, `LIMIT`, `FOR UPDATE`, `ON CONFLICT DO NOTHING` et archive séparée, sans `OFFSET`, `SELECT *`, `ON CONFLICT DO UPDATE` ni policy worker ;
|
- [PASS statique] canari SQL conserve keyset ASC/DESC, `LIMIT`, `FOR UPDATE`, les deux formes ciblées `ON CONFLICT (...) DO NOTHING` et archive séparée, sans `OFFSET`, `SELECT *`, `ON CONFLICT DO UPDATE` ni policy worker ;
|
||||||
- [PASS statique] les 18 variantes actuelles de `PostgresBackendErrorKind` sont couvertes par le mapping capability backend et par le mapping façade ;
|
- [PASS statique] les 18 variantes actuelles de `PostgresBackendErrorKind` sont couvertes par le mapping capability backend et par le mapping façade ;
|
||||||
- [PASS statique] aucun fichier de production ou migration n’est modifié ; checksums V000/V001 inchangés ;
|
- [PASS statique] aucun fichier de production ou migration n’est modifié ; checksums V000/V001 inchangés ;
|
||||||
- [À FAIRE] gate Cargo opérateur complet de `pre.010`.
|
- [FAIL local] premier gate opérateur : le canari SQL cherchait littéralement `ON CONFLICT DO NOTHING`, sous-chaîne absente des formes réelles `ON CONFLICT (signature) DO NOTHING` et `ON CONFLICT (observation_key) DO NOTHING`.
|
||||||
|
|
||||||
|
### `pre.010-fix.001` — correction du canari `ON CONFLICT`
|
||||||
|
|
||||||
|
- [PASS statique] le canari exige désormais explicitement `ON CONFLICT (signature) DO NOTHING` et `ON CONFLICT (observation_key) DO NOTHING` ;
|
||||||
|
- [PASS statique] l’idempotence canonique et observation est donc vérifiée contre les deux statements réellement possédés par `raw_transaction.rs` ;
|
||||||
|
- [PASS statique] aucune logique runtime, SQL de production, migration ou checksum V000/V001 n’est modifié ;
|
||||||
|
- [À FAIRE] gate Cargo opérateur complet de `pre.010-fix.001`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user