107 lines
2.8 KiB
Markdown
107 lines
2.8 KiB
Markdown
<!-- file: deltas/0.3.3/pre.007-fix.001.md -->
|
|
<!-- version: 1 -->
|
|
|
|
# Delta `0.3.3-pre.007-fix.001` — correction du canari de scope rétention
|
|
|
|
## 1. Base
|
|
|
|
Base opérateur obligatoire :
|
|
|
|
```text
|
|
0.3.3-pre.7
|
|
```
|
|
|
|
Le gate opérateur du 2026-08-30 est vert sur les audits, `cargo check`, Clippy, Store API, Store façade et Config. Il échoue uniquement dans :
|
|
|
|
```text
|
|
cargo test -p ksp-store-postgres-lib
|
|
```
|
|
|
|
sur le canari historique :
|
|
|
|
```text
|
|
pre_005_raw_write_sql_is_atomic_idempotent_and_keeps_later_scope_closed
|
|
```
|
|
|
|
Ce canari interdisait globalement `DELETE FROM` dans `raw_transaction.rs`. Cette interdiction était correcte en `pre.005`, mais elle devient obsolète en `pre.007` puisque `Archived -> Purged` doit supprimer atomiquement le payload archive.
|
|
|
|
## 2. Version
|
|
|
|
```text
|
|
workspace.package.version = 0.3.3-pre.7.fix.1
|
|
```
|
|
|
|
## 3. Correction
|
|
|
|
Le canari `pre.005` est renommé pour refléter le contrat qui reste valide :
|
|
|
|
```text
|
|
pre_005_raw_write_sql_is_atomic_idempotent_and_keeps_direct_trait_scope_closed
|
|
```
|
|
|
|
Il conserve toutes les preuves `pre.005` d'insertion/idempotence/rehydration et continue d'interdire :
|
|
|
|
```text
|
|
impl ksp_store_api::RawTransactionWrite
|
|
impl ksp_store_api::RawTransactionObservationWrite
|
|
```
|
|
|
|
Il n'interdit plus globalement `DELETE FROM`, car ce SQL appartient désormais légitimement à la tranche `pre.007`.
|
|
|
|
Le canari `pre.007_raw_retention_is_atomic_compare_and_transition_without_fake_compaction` reste inchangé et exige explicitement :
|
|
|
|
```text
|
|
DELETE_ARCHIVE_PAYLOAD_SQL
|
|
DELETE FROM ksp_raw_transaction_archive_payloads
|
|
UPDATE_PURGED_TRANSACTION_SQL
|
|
```
|
|
|
|
Aucun garde-fou fonctionnel n'est donc supprimé : il est simplement rattaché à la tranche qui possède désormais cette responsabilité.
|
|
|
|
## 4. Invariants
|
|
|
|
Ce fix ne modifie pas :
|
|
|
|
```text
|
|
src/raw_transaction.rs
|
|
src/raw_transaction/cursor.rs
|
|
runtime/error mapping
|
|
SQL lecture/écriture/pagination/rétention
|
|
migrations V000/V001
|
|
format cursor V1
|
|
surface publique backend
|
|
```
|
|
|
|
Checksums attendus inchangés :
|
|
|
|
```text
|
|
V000 d29068b8c13b9dc0cc9ef6aaadd0fa12d41e0fe4c56541a1118c4bfc846a1450
|
|
V001 31488cda2f08f3f46c4cdbdbb6c18c243662fada02eac4487040c8735d72cc51
|
|
```
|
|
|
|
## 5. Fichiers modifiés
|
|
|
|
```text
|
|
Cargo.toml
|
|
crates/ksp-store-postgres-lib/tests/dependency_boundary.rs
|
|
docs/validation/020-V0_3_3_STORE_POSTGRES_RAW_TRANSACTION.md
|
|
deltas/0.3.3/pre.007-fix.001.md
|
|
```
|
|
|
|
Aucune suppression de fichier.
|
|
|
|
## 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
|
|
```
|