v0.3.7-pre.008-fix.002
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# file: Cargo.toml
|
||||
# version: 428
|
||||
# version: 429
|
||||
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = ["crates/ksp-app-backfill-desk", "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-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-store-api", "crates/ksp-store-lib", "crates/ksp-store-postgres-lib", "crates/ksp-wallet-lib"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.3.7-pre.8.fix.1"
|
||||
version = "0.3.7-pre.8.fix.2"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-backfill-desk/tests/desktop_contract.rs
|
||||
// version: 8
|
||||
// version: 9
|
||||
|
||||
//! Structural desktop contract checks for the Backfill Desk scaffold.
|
||||
|
||||
@@ -315,11 +315,11 @@ fn pre_008_start_installs_handle_before_non_blocking_spawn_and_keeps_single_run_
|
||||
assert!(run.contains("std::sync::Mutex<std::option::Option<ActiveBackfillRun>>"));
|
||||
assert!(tauri.contains("backfill_start"));
|
||||
let prepare_index = tauri.find("state.prepare_backfill_start(request)");
|
||||
let spawn_index = tauri.find("tauri::async_runtime::spawn(async move");
|
||||
assert!(prepare_index.is_some());
|
||||
assert!(spawn_index.is_some());
|
||||
if let (std::option::Option::Some(prepare_index), std::option::Option::Some(spawn_index)) = (prepare_index, spawn_index) {
|
||||
assert!(prepare_index < spawn_index);
|
||||
if let std::option::Option::Some(prepare_index) = prepare_index {
|
||||
let start_tail = &tauri[prepare_index..];
|
||||
let spawn_index = start_tail.find("tauri::async_runtime::spawn(async move");
|
||||
assert!(spawn_index.is_some());
|
||||
}
|
||||
assert!(html.contains("startBackfillRequest"));
|
||||
assert!(html.contains("Démarrer le backfill"));
|
||||
|
||||
111
deltas/0.3.7/pre.008-fix.002.md
Normal file
111
deltas/0.3.7/pre.008-fix.002.md
Normal file
@@ -0,0 +1,111 @@
|
||||
<!-- file: deltas/0.3.7/pre.008-fix.002.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# Delta `0.3.7-pre.008-fix.002` — canari Start ciblé sur le spawn du run
|
||||
|
||||
## 1. Base requise
|
||||
|
||||
```text
|
||||
0.3.7-pre.008-fix.001
|
||||
workspace.package.version = 0.3.7-pre.8.fix.1
|
||||
```
|
||||
|
||||
## 2. Objectif
|
||||
|
||||
Corriger le dernier échec du gate `pre.008` sans modifier le runtime : le canari `desktop_contract` comparait l'admission Start au premier `tauri::async_runtime::spawn` du fichier Tauri, qui appartient au shutdown Store et précède légitimement la commande `backfill_start`.
|
||||
|
||||
## 3. Cause
|
||||
|
||||
Le code de production respecte déjà l'ordre attendu :
|
||||
|
||||
```text
|
||||
prepare_backfill_start(request)
|
||||
-> BackfillJobRuntime::new
|
||||
-> runtime.handle()
|
||||
-> single-run install
|
||||
-> Transport/Store acquisition
|
||||
-> BackfillRunLaunch
|
||||
-> tauri::async_runtime::spawn(run)
|
||||
```
|
||||
|
||||
Le test utilisait cependant une recherche globale du premier marqueur `tauri::async_runtime::spawn(async move`, et sélectionnait le spawn antérieur de fermeture de Store.
|
||||
|
||||
## 4. Correction
|
||||
|
||||
- conserver le contrôle `runtime.handle()` avant `single-run install` dans `AppState` ;
|
||||
- localiser `state.prepare_backfill_start(request)` dans `src/tauri.rs` ;
|
||||
- rechercher ensuite le spawn uniquement dans le suffixe de source suivant cette admission ;
|
||||
- ne modifier aucun code de production.
|
||||
|
||||
## 5. Version
|
||||
|
||||
```text
|
||||
workspace.package.version = 0.3.7-pre.8.fix.2
|
||||
label = 0.3.7-pre.008-fix.002
|
||||
```
|
||||
|
||||
## 6. Fichiers ajoutés
|
||||
|
||||
```text
|
||||
deltas/0.3.7/pre.008-fix.002.md
|
||||
```
|
||||
|
||||
## 7. Fichiers modifiés
|
||||
|
||||
```text
|
||||
Cargo.toml
|
||||
crates/ksp-app-backfill-desk/tests/desktop_contract.rs
|
||||
docs/validation/024-V0_3_7_BACKFILL_DESK.md
|
||||
```
|
||||
|
||||
## 8. Fichiers supprimés
|
||||
|
||||
Aucun.
|
||||
|
||||
## 9. Gate opérateur ayant déclenché le fix
|
||||
|
||||
```text
|
||||
cargo fmt --all exécuté
|
||||
python3 scripts/audit_rust_workspace_rules.py PASS
|
||||
python3 scripts/audit_markdown_tables.py ... deltas/0.3.7 PASS
|
||||
cargo check --workspace PASS
|
||||
cargo clippy --workspace --all-targets PASS
|
||||
cargo test -p ksp-job-backfill-lib PASS — 49 unitaires + suites d'intégration
|
||||
cargo test -p ksp-app-backfill-desk FAIL — 11/12 desktop_contract, faux ordre prepare/spawn
|
||||
```
|
||||
|
||||
La correction `Send` de `pre.008-fix.001` est donc confirmée par le gate ; ce fix ne la rouvre pas.
|
||||
|
||||
## 10. Validations exécutées dans l'environnement d'assemblage
|
||||
|
||||
```text
|
||||
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.7
|
||||
```
|
||||
|
||||
Contrôles ciblés :
|
||||
|
||||
- le test conserve la vérification handle avant installation ;
|
||||
- la recherche du spawn commence après `prepare_backfill_start(request)` ;
|
||||
- le spawn de shutdown ne peut plus être confondu avec celui du run ;
|
||||
- aucun fichier de production Backfill Desk ou Job Backfill n'est modifié.
|
||||
|
||||
## 11. Validations non exécutées dans l'environnement d'assemblage
|
||||
|
||||
`cargo` et `rustfmt` ne sont pas disponibles dans l'environnement d'assemblage. Gate opérateur :
|
||||
|
||||
```text
|
||||
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.7
|
||||
cargo check --workspace
|
||||
cargo clippy --workspace --all-targets
|
||||
cargo test -p ksp-job-backfill-lib
|
||||
cargo test -p ksp-app-backfill-desk
|
||||
cargo tree -p ksp-app-backfill-desk --edges normal
|
||||
cargo tree -p ksp-app-backfill-desk -e features
|
||||
```
|
||||
|
||||
## 12. Questions ouvertes
|
||||
|
||||
Aucune pour ce correctif.
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- file: docs/validation/024-V0_3_7_BACKFILL_DESK.md -->
|
||||
<!-- version: 12 -->
|
||||
<!-- version: 13 -->
|
||||
|
||||
# Validation v0.3.7 — Backfill Desk
|
||||
|
||||
@@ -380,4 +380,24 @@ Le gate opérateur de `pre.008` confirme que les audits Rust/Markdown sont propr
|
||||
- [X] aucune API publique Job, logique de requête, Start Desk, Store, Transport ou frontend n'est modifiée ;
|
||||
- [X] audits statiques Rust/Markdown rejoués dans l'environnement d'assemblage ;
|
||||
- [ ] replay opérateur `cargo fmt/check/clippy/test` de `pre.008-fix.001` à exécuter.
|
||||
## 18. `pre.008-fix.002` — canari d'ordre Start local au bon spawn
|
||||
|
||||
Le replay opérateur de `pre.008-fix.001` confirme que la correction `Send` est effective : audits, `cargo check --workspace`, Clippy et `ksp-job-backfill-lib` passent. La suite Backfill Desk atteint alors le canari `pre_008_start_installs_handle_before_non_blocking_spawn_and_keeps_single_run_backend_owned`, qui échoue sur `prepare_index < spawn_index`.
|
||||
|
||||
La production respecte pourtant l'invariant : `AppState::prepare_backfill_start` construit le runtime, récupère son handle, installe le slot single-run, acquiert Transport/Store puis retourne `BackfillRunLaunch`; ensuite seulement la commande Tauri `backfill_start` appelle `tauri::async_runtime::spawn`. Le défaut vient du test, qui utilisait `tauri.find("tauri::async_runtime::spawn(async move")` sur tout `src/tauri.rs` et capturait ainsi le spawn antérieur du shutdown Store.
|
||||
|
||||
Le fix rend le canari contextuel : après localisation de `state.prepare_backfill_start(request)`, la recherche du spawn est limitée au suffixe de source qui suit cette admission. Aucun code de production, DTO, frontend, contrat Job, Store ou Transport n'est modifié.
|
||||
|
||||
Gate opérateur requis après application :
|
||||
|
||||
```text
|
||||
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.7
|
||||
cargo check --workspace
|
||||
cargo clippy --workspace --all-targets
|
||||
cargo test -p ksp-job-backfill-lib
|
||||
cargo test -p ksp-app-backfill-desk
|
||||
cargo tree -p ksp-app-backfill-desk --edges normal
|
||||
cargo tree -p ksp-app-backfill-desk -e features
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user