178 lines
6.8 KiB
Markdown
178 lines
6.8 KiB
Markdown
<!-- file: deltas/0.3.15/pre.012.md -->
|
|
<!-- version: 1 -->
|
|
|
|
# Delta `0.3.15-pre.012`
|
|
|
|
## Base
|
|
|
|
```text
|
|
base archive : ksp-general-0.3.15-pre.011-fix.001.zip
|
|
base SHA-256 : 5da2d7bf343d20354b941ef9158004c3dabf521251bb346ef3aaf20586342a04
|
|
base version : 0.3.15-pre.11.fix.1
|
|
```
|
|
|
|
Le gate opérateur du 16 septembre 2026 confirme la base : audits Rust/Markdown, `cargo check --workspace`, Clippy strict, tests Raw Transaction Ingest Desk/Worker et workspace all-targets/all-features passent. Le live Mainnet valide aussi plusieurs cycles Yellowstone + HTTP Block Polling simultanés avec Stop ciblé dans les deux ordres et fermeture du Store seulement après la dernière route.
|
|
|
|
## Objectif
|
|
|
|
Fermer les races Start/Stop, stale inventory, shutdown applicatif et les surfaces IPC hostiles sans modifier Config, Transport, Store, Worker, Common RAW ni les stratégies d'acquisition.
|
|
|
|
## Race Start / Stop
|
|
|
|
Une route réservée mais pas encore activée possède maintenant un marqueur `stop_requested`.
|
|
|
|
```text
|
|
Stop sur Active -> request_stop Worker puis attente terminal/cleanup
|
|
Stop sur Starting -> stop_requested=true puis attente cleanup
|
|
Start active après Stop -> request_stop avant acknowledgement
|
|
Start échoue avant activation -> rollback retient terminal Stopped
|
|
```
|
|
|
|
La route n'est donc plus faussement déclarée `not_active` pendant sa fenêtre de démarrage. Le timeout de cleanup Desk est porté à `15 s`, au-dessus du drain Worker borné, afin de ne pas transformer un arrêt coopératif encore valide en erreur Desk prématurée.
|
|
|
|
## Shutdown applicatif
|
|
|
|
`RouteRuntimeState` possède désormais un état `shutting_down` one-shot. Le `CloseRequested` de la fenêtre principale est intercepté :
|
|
|
|
```text
|
|
prevent_close
|
|
begin_shutdown
|
|
fermeture admission Start
|
|
marquage des Starting
|
|
request_stop de tous les Active
|
|
attente bornée routes + Store
|
|
exit(0) si cleanup complet
|
|
exit(1) si échec/timeout sûr
|
|
```
|
|
|
|
Un second événement de fermeture pendant ce cycle ne lance pas une seconde séquence concurrente. L'admission shutdown est vérifiée avant la préparation Start puis atomiquement lors de la réservation runtime, ce qui ferme la race entre un Start déjà en vol et la fermeture de l'application.
|
|
|
|
## Stale inventory
|
|
|
|
Le Start conserve le verrou de génération pendant toute la préparation synchrone qui revalide l'inventaire et reconstruit Config/Transport. Le verrou est explicitement libéré avant le premier `await` d'ouverture Store. Un refresh d'inventaire ne peut donc pas intercaler une nouvelle génération entre le contrôle de génération et cette reconstruction.
|
|
|
|
## Sécurité IPC
|
|
|
|
Les requêtes Start/Stop sont maintenant `deny_unknown_fields` et valident `profile_id` avant reconstruction :
|
|
|
|
```text
|
|
non vide
|
|
<= 256 octets
|
|
aucun trim implicite
|
|
aucun caractère de contrôle
|
|
```
|
|
|
|
Le bridge frontend Logging est également shape-strict et borné :
|
|
|
|
```text
|
|
level / target <= 16 octets
|
|
message <= 8192 octets
|
|
aucun caractère de contrôle
|
|
aucune allocation lowercase du selector hostile
|
|
```
|
|
|
|
Le frontend borne le message technique à `1024` code units avant IPC, ce qui laisse une marge sûre pour l'encodage UTF-8. Les erreurs Tauri restent projetées uniquement par `domain/code` ; les payloads hostiles ne sont jamais journalisés.
|
|
|
|
## Canaris
|
|
|
|
Ajouts/renforcements :
|
|
|
|
```text
|
|
pre_012_route_requests_reject_unknown_fields_and_bound_free_form_profile_identity
|
|
pre_012_frontend_log_ipc_rejects_unknown_fields_and_unbounded_or_control_messages
|
|
pre_012_stop_racing_start_marks_the_reservation_for_cooperative_stop
|
|
pre_012_application_shutdown_is_one_shot_and_marks_starting_routes_before_activation
|
|
pre_012_window_shutdown_and_start_stop_races_are_bounded_backend_owned
|
|
pre_012_hostile_ipc_is_shape_strict_bounded_and_safely_projected
|
|
pre_012_race_shutdown_and_ipc_hardening_adds_no_production_module_or_lower_layer_growth
|
|
```
|
|
|
|
Le canari de race Start/Stop vérifie aussi que le rollback d'une réservation déjà stoppée retient un terminal logique `Stopped`.
|
|
|
|
## Frontières inchangées
|
|
|
|
Aucune modification de :
|
|
|
|
```text
|
|
ksp-config-lib
|
|
ksp-onchain-transport-lib
|
|
ksp-store-lib / backend Store
|
|
ksp-worker-raw-transaction-ingest-lib
|
|
ksp-raw-transaction-lib
|
|
pipeline RAW / replay / repair
|
|
```
|
|
|
|
Le module Rust de production du Desk reste à `16` modules et aucun nouvel edge lower-layer n'est introduit.
|
|
|
|
## Version
|
|
|
|
```text
|
|
workspace.package.version : 0.3.15-pre.12
|
|
root Cargo header counter : 622
|
|
```
|
|
|
|
## Validation d'assemblage
|
|
|
|
Exécuté 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.15
|
|
canaris statiques pre.012 de surface/race/IPC
|
|
TypeScript auxiliary no-emit du frontend_log avec bindings temporaires
|
|
```
|
|
|
|
Cargo/rustfmt ne sont pas disponibles dans cet environnement ; aucun gate Cargo de `pre.012` n'est déclaré PASS ici.
|
|
|
|
Le gate opérateur attendu reste :
|
|
|
|
```bash
|
|
cargo fmt --all
|
|
cargo fmt --all -- --check
|
|
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.15
|
|
cargo check --workspace
|
|
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
cargo test -p ksp-app-raw-transaction-ingest-desk --all-targets --all-features
|
|
cargo test -p ksp-worker-raw-transaction-ingest-lib --all-targets --all-features
|
|
cargo test --workspace --all-targets --all-features
|
|
(cd crates/ksp-app-raw-transaction-ingest-desk && cargo tauri dev)
|
|
```
|
|
|
|
Aucun `npm run build` manuel n'est demandé.
|
|
|
|
## Inventaire exact du delta
|
|
|
|
Ajout :
|
|
|
|
```text
|
|
deltas/0.3.15/pre.012.md
|
|
```
|
|
|
|
Modifications :
|
|
|
|
```text
|
|
Cargo.toml
|
|
crates/ksp-app-raw-transaction-ingest-desk/README.md
|
|
crates/ksp-app-raw-transaction-ingest-desk/USAGE.md
|
|
crates/ksp-app-raw-transaction-ingest-desk/frontend/ts/frontend_log.ts
|
|
crates/ksp-app-raw-transaction-ingest-desk/src/app_state.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/src/dto_route.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/src/errors.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/src/frontend_logging.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/src/lib.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/src/route_runtime.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/src/route_start.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/src/tauri.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/tests/desktop_contract.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/tests/desktop_security.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/tests/release_completeness.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/unit_tests/dto_route.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/unit_tests/frontend_logging.rs
|
|
crates/ksp-app-raw-transaction-ingest-desk/unit_tests/route_runtime.rs
|
|
docs/plans/036-V0_3_15_RAW_TRANSACTION_INGEST_DESK_PLAN.md
|
|
docs/validation/032-V0_3_15_RAW_TRANSACTION_INGEST_DESK.md
|
|
```
|
|
|
|
Suppressions : aucune.
|