fix(backend,orchestrator,chat): tour humain agent_send survit au self-restart — #290 (le tour humain direct agent_send/ws chat.send s'enregistre au RestartRendezvousCoordinator via StructuredHumanTurnGuard: Final/Error de l'ancien provider devient transition de contrôle et non le Final logique; transition_after_provider_terminal_async attend Ready puis accept_ready acquitte le handoff et libère le scheduler, Resume => drain de la session de remplacement avec SELF_RESTART_CONTINUATION_PROMPT, seul le terminal du remplacement est transmis au chat; Failed/Cancelled surfacés explicitement avec libération Busy/FIFO; send_with_tap en erreur pendant restart actif traité comme teardown attendu (stream vide puis attente du remplacement, plus de Final prématuré ni chat bloqué); StopLiveAgent câblé with_restart_rendezvous: stop utilisateur annule le rendez-vous restart; RestartRendezvousRegistration rendu public (state/changed/accept_ready); QA verte: backend self_restart_contract_tests 3/3 dont 2 nouveaux (old terminal ignoré + handoff accepté, failure explicite + busy libéré), application orchestrator_service restart 8/8 dont registration directe du rendez-vous, workstate_actions 9/9, app-tauri chat_bridge 31/31, web-server websocket_chat_send 3/3, cargo check --workspace, fmt --check, diff --check — reconfirmés par Git avant commit; réserves hors périmètre préexistantes: 7 échecs fixture PTY web-server + 2 échecs plugin application; carnet #290 + clôture store #289 inclus; scripts/ hors périmètre; aucun push)
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
---
|
||||
issueRef: "#289"
|
||||
version: 4
|
||||
version: 5
|
||||
updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"}
|
||||
updatedAt: 1788900709736
|
||||
updatedAt: 1788901112288
|
||||
---
|
||||
## 2026-09-08 — Main
|
||||
|
||||
@ -59,139 +59,29 @@ Tests QA ajoutés dans `crates/application/tests/orchestrator_service.rs` :
|
||||
- `ask_target_restart_cleans_busy_workstate_and_replaces_structured_registry_entry` : succès same-project post-restart, cible revenue `Idle`, FIFO vide, live-state `Done`, ancienne session structurée absente, session de remplacement enregistrée sur le même agent logique.
|
||||
- `same_project_stop_during_restart_releases_ask_and_leaves_no_replacement_session` : cancel/stop same-project pendant le gap de restart, ask réveillé en erreur explicite de cancel, busy/FIFO/live-state nettoyés, aucune session de remplacement enregistrée.
|
||||
|
||||
Commandes exécutées et sorties pertinentes :
|
||||
Commandes finales vertes :
|
||||
- `cargo fmt --all -- --check`
|
||||
- `cargo test -p application --test orchestrator_service` — 87 passés
|
||||
- `cargo test -p application --lib` — 171 passés
|
||||
- `cargo test -p backend --lib` — 89 passés, 7 ignorés
|
||||
- `cargo check -p backend` — OK
|
||||
|
||||
```bash
|
||||
git status --short --branch
|
||||
```
|
||||
Couverture validée : same-project, cross-project, faux no-reply interdit, failure restart explicite, cancel pendant restart, nettoyage busy/workstate/registry, watchdog réarmé par activité restart.
|
||||
|
||||
```text
|
||||
## fix/289-ask-agent-during-target-restart
|
||||
M .ideai/tickets/counter.json
|
||||
M .ideai/tickets/index.json
|
||||
M crates/application/src/lib.rs
|
||||
M crates/application/src/orchestrator/mod.rs
|
||||
M crates/application/src/orchestrator/service.rs
|
||||
M crates/application/tests/orchestrator_service.rs
|
||||
M crates/backend/src/lib.rs
|
||||
?? .ideai/tickets/289/
|
||||
?? scripts/
|
||||
```
|
||||
Risques résiduels : pas d'E2E vrai provider relancé dans QA ; les 7 tests backend ignorés demandent une permission locale de bind socket.
|
||||
|
||||
```bash
|
||||
cargo test -p application --test orchestrator_service ask_target_restart_keeps_logical_turn_and_returns_post_restart_final -- --nocapture
|
||||
```
|
||||
## 2026-09-08 — Git/Main clôture
|
||||
|
||||
```text
|
||||
test ask_target_restart_keeps_logical_turn_and_returns_post_restart_final ... ok
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 84 filtered out; finished in 0.02s
|
||||
```
|
||||
Git a committé le correctif sur la branche feature : `d6d9891`.
|
||||
|
||||
```bash
|
||||
cargo test -p application --test orchestrator_service cross_project_ask_preserves_correlation_across_target_restart -- --nocapture
|
||||
```
|
||||
Git a mergé localement dans `develop` avec merge commit : `321ebda`.
|
||||
|
||||
```text
|
||||
test cross_project_ask_preserves_correlation_across_target_restart ... ok
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 84 filtered out; finished in 0.02s
|
||||
```
|
||||
Aucun push distant effectué. État final après build : `develop...origin/develop [ahead 276]`, working tree propre sauf `scripts/` non suivi préexistant et hors périmètre.
|
||||
|
||||
```bash
|
||||
cargo test -p application --test orchestrator_service ask_target_restart_failure_is_explicit_not_no_reply -- --nocapture
|
||||
```
|
||||
Build AppImage exécuté via le skill `build-appimage` :
|
||||
- `npm --prefix frontend run build` — OK.
|
||||
- depuis `crates/app-tauri` : `CARGO_HOME=/tmp/idea-cargo-home APPIMAGE_EXTRACT_AND_RUN=1 NO_STRIP=1 ../../frontend/node_modules/.bin/tauri build --bundles appimage` — OK.
|
||||
|
||||
```text
|
||||
test ask_target_restart_failure_is_explicit_not_no_reply ... ok
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 84 filtered out; finished in 0.01s
|
||||
```
|
||||
Artefact produit : `target/release/bundle/appimage/IdeA_0.3.0_amd64.AppImage`.
|
||||
|
||||
```bash
|
||||
cargo test -p application --test orchestrator_service cross_project_cancel_during_restart_releases_ask_and_correlation -- --nocapture
|
||||
```
|
||||
|
||||
```text
|
||||
test cross_project_cancel_during_restart_releases_ask_and_correlation ... ok
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 84 filtered out; finished in 0.00s
|
||||
```
|
||||
|
||||
```bash
|
||||
cargo test -p application --lib restart_control_activity_rearms_inactivity_watchdog -- --nocapture
|
||||
```
|
||||
|
||||
```text
|
||||
test orchestrator::service::tests::restart_control_activity_rearms_inactivity_watchdog ... ok
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 170 filtered out; finished in 0.05s
|
||||
```
|
||||
|
||||
```bash
|
||||
cargo test -p application --test orchestrator_service ask_target_restart_cleans_busy_workstate_and_replaces_structured_registry_entry -- --nocapture
|
||||
```
|
||||
|
||||
```text
|
||||
test ask_target_restart_cleans_busy_workstate_and_replaces_structured_registry_entry ... ok
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 86 filtered out; finished in 0.02s
|
||||
```
|
||||
|
||||
```bash
|
||||
cargo test -p application --test orchestrator_service same_project_stop_during_restart_releases_ask_and_leaves_no_replacement_session -- --nocapture
|
||||
```
|
||||
|
||||
```text
|
||||
test same_project_stop_during_restart_releases_ask_and_leaves_no_replacement_session ... ok
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 86 filtered out; finished in 0.00s
|
||||
```
|
||||
|
||||
```bash
|
||||
cargo fmt --all -- --check
|
||||
```
|
||||
|
||||
```text
|
||||
OK (aucune sortie)
|
||||
```
|
||||
|
||||
```bash
|
||||
cargo test -p application --test orchestrator_service
|
||||
```
|
||||
|
||||
```text
|
||||
running 87 tests
|
||||
test result: ok. 87 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s
|
||||
```
|
||||
|
||||
```bash
|
||||
cargo test -p application --lib
|
||||
```
|
||||
|
||||
```text
|
||||
running 171 tests
|
||||
test result: ok. 171 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.15s
|
||||
```
|
||||
|
||||
```bash
|
||||
cargo test -p backend --lib
|
||||
```
|
||||
|
||||
```text
|
||||
running 96 tests
|
||||
test result: ok. 89 passed; 0 failed; 7 ignored; 0 measured; 0 filtered out; finished in 0.04s
|
||||
```
|
||||
|
||||
```bash
|
||||
cargo check -p backend
|
||||
```
|
||||
|
||||
```text
|
||||
Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.37s
|
||||
```
|
||||
|
||||
Couverture validée :
|
||||
- same-project : Final récupéré après restart et test QA de nettoyage busy/workstate/registre.
|
||||
- cross-project : corrélation conservée jusqu'au Final post-restart puis supprimée.
|
||||
- pas de faux no-reply/timeout pendant restart : failure restart reste `PROCESS` explicite, watchdog réarmé par activité de contrôle restart.
|
||||
- failure restart : erreur explicite contenant la cause provider.
|
||||
- cancel pendant restart : cross-project et same-project couverts.
|
||||
- nettoyage busy/workstate/registry : FIFO vide, `AgentBusyState::Idle`, live-state `Done`, registre structuré remplacé après succès et non recréé après cancel.
|
||||
|
||||
Risques résiduels :
|
||||
- Pas d'E2E AppImage / vrai provider relancé : la preuve porte sur les ports applicatifs, les sessions structurées de test et le câblage backend compilé.
|
||||
- Les 7 tests backend ignorés demandent une permission de bind socket locale ; ils restent hors preuve dans cet environnement.
|
||||
Étape non automatisée volontairement : remplacement de `/home/anthony/Documents/IdeA_0.1.0_amd64.AppImage` et relance d'IdeA, car cela tue l'orchestrateur actif. À faire manuellement quand l'utilisateur est prêt pour activer le correctif dans l'application lancée.
|
||||
Reference in New Issue
Block a user