136 lines
4.7 KiB
Markdown
136 lines
4.7 KiB
Markdown
<!-- file: deltas/0.3.3/pre.008.md -->
|
|
<!-- version: 1 -->
|
|
|
|
# Delta `0.3.3-pre.008` — conformance capabilities et dispatch Store
|
|
|
|
## 1. Base et gate d'entrée
|
|
|
|
Base opérateur obligatoire :
|
|
|
|
```text
|
|
0.3.3-pre.7.fix.1
|
|
```
|
|
|
|
Le gate opérateur fourni le 2026-08-30 est entièrement vert : audits Rust/Markdown, workspace check, Clippy, tests Store API/façade/PostgreSQL/Config et `ksp-store-lib --no-default-features` passent. `pre.007` est donc acquise.
|
|
|
|
## 2. Version
|
|
|
|
```text
|
|
workspace.package.version = 0.3.3-pre.8
|
|
```
|
|
|
|
## 3. Six capabilities sur `PostgresBackend`
|
|
|
|
`PostgresBackend` implémente désormais directement :
|
|
|
|
```text
|
|
RawTransactionRead
|
|
RawTransactionWrite
|
|
RawTransactionObservationRead
|
|
RawTransactionObservationWrite
|
|
RawTransactionRetentionRead
|
|
RawTransactionRetentionWrite
|
|
```
|
|
|
|
Les implémentations adaptent les méthodes physiques déjà acquises en `pre.004` à `pre.007` vers `StoreApiFuture` et `ksp_store_api::Result`. Aucun SQL n'est déplacé hors du backend et aucune capability `RawAccount*` n'est ouverte.
|
|
|
|
## 4. Six dispatches sur `Store`
|
|
|
|
`Store` implémente les mêmes six traits et dispatch vers `StoreRuntime::Postgres` lorsque la feature `postgres` est compilée. Aucun type `PostgresBackend`, pool, client, row, statement ou SQL n'entre dans la surface publique de `ksp-store-lib`.
|
|
|
|
Les consumers ordinaires continuent donc à dépendre uniquement de `ksp-store-lib`.
|
|
|
|
## 5. Validation réseau pré-I/O
|
|
|
|
La façade valide avant dispatch toutes les opérations dont l'input porte un réseau :
|
|
|
|
```text
|
|
get/list transaction
|
|
persist acquisition
|
|
record observation
|
|
retention read
|
|
retention transition
|
|
```
|
|
|
|
Une divergence retourne `store.wrong_network` sans rendre le réseau hostile. `RawTransactionObservationRead` reçoit uniquement une `RawObservationKey`; son scope réseau est celui de l'instance Store mono-réseau.
|
|
|
|
## 6. Taxonomie d'erreurs stabilisée
|
|
|
|
```text
|
|
Conflict -> store_api.raw_conflict
|
|
QueryInvalid -> store_api.raw_query_invalid
|
|
WrongNetwork -> store.wrong_network
|
|
ReferenceNotFound -> store.raw_reference_not_found
|
|
ReadFailed -> store.postgres_read_failed
|
|
WriteFailed -> store.postgres_write_failed
|
|
DataInvalid -> store.postgres_data_invalid
|
|
PageLimitUnsupported -> store.postgres_page_limit_unsupported
|
|
RetentionCompactionUnsupported -> store.postgres_retention_compaction_unsupported
|
|
```
|
|
|
|
Le mapping conserve seulement backend, réseau propre de l'instance et phase statique. Aucun SQLSTATE, SQL, bind ou texte serveur n'est exposé.
|
|
|
|
## 7. Feature mismatch
|
|
|
|
Le contrat `default = ["postgres"]` reste inchangé. Sans default feature, `Store::open` conserve le rejet pré-I/O `store.backend_not_compiled`; le gate `cargo check -p ksp-store-lib --no-default-features` reste obligatoire.
|
|
|
|
## 8. Migrations
|
|
|
|
Aucune ressource V000/V001 n'est modifiée. Checksums attendus :
|
|
|
|
```text
|
|
V000 d29068b8c13b9dc0cc9ef6aaadd0fa12d41e0fe4c56541a1118c4bfc846a1450
|
|
V001 31488cda2f08f3f46c4cdbdbb6c18c243662fada02eac4487040c8735d72cc51
|
|
```
|
|
|
|
## 9. Fichiers modifiés
|
|
|
|
```text
|
|
Cargo.toml
|
|
crates/ksp-store-lib/README.md
|
|
crates/ksp-store-lib/USAGE.md
|
|
crates/ksp-store-lib/src/error.rs
|
|
crates/ksp-store-lib/src/lib.rs
|
|
crates/ksp-store-lib/src/store.rs
|
|
crates/ksp-store-lib/tests/dependency_boundary.rs
|
|
crates/ksp-store-lib/tests/hardening_completeness.rs
|
|
crates/ksp-store-lib/tests/public_api.rs
|
|
crates/ksp-store-lib/unit_tests/store.rs
|
|
crates/ksp-store-postgres-lib/README.md
|
|
crates/ksp-store-postgres-lib/USAGE.md
|
|
crates/ksp-store-postgres-lib/src/lib.rs
|
|
crates/ksp-store-postgres-lib/src/runtime.rs
|
|
crates/ksp-store-postgres-lib/tests/dependency_boundary.rs
|
|
crates/ksp-store-postgres-lib/tests/hardening_completeness.rs
|
|
crates/ksp-store-postgres-lib/tests/public_api.rs
|
|
crates/ksp-store-postgres-lib/unit_tests/runtime.rs
|
|
docs/plans/024-V0_3_3_STORE_POSTGRES_RAW_TRANSACTION_PLAN.md
|
|
docs/validation/020-V0_3_3_STORE_POSTGRES_RAW_TRANSACTION.md
|
|
deltas/0.3.3/pre.008.md
|
|
```
|
|
|
|
Aucune suppression de fichier.
|
|
|
|
## 10. Gate opérateur demandé
|
|
|
|
```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
|
|
```
|
|
|
|
Le test PostgreSQL live reste ignoré dans ce gate ; la preuve métier/concurrence complète appartient à `pre.009`.
|
|
|
|
## 11. Suite si gate vert
|
|
|
|
```text
|
|
0.3.3-pre.009 — preuve PostgreSQL live complète RawTransaction
|
|
```
|