fix(input): fiabilise la livraison de délégation et journalise le submit
Durcit le portail d'écriture de délégation et son acheminement bout-en-bout (commande Tauri → orchestrateur → file d'entrée infrastructure → portail frontend), avec une journalisation du submit pour diagnostiquer les cas où la délégation n'était pas remise. Couvre le portail d'écriture côté front (useWritePortal) avec ses tests. QA : checks application/front/infrastructure/app-tauri verts. Les tests loopback socket Unix réels ne sont pas exécutables en sandbox (UnixListener::bind → PermissionDenied) ; alternatives avec skips vertes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -1288,13 +1288,11 @@ impl OrchestratorService {
|
||||
// Observability beacon only: never mutates the mailbox/busy state nor resolves
|
||||
// the ticket (that stays `idea_reply`-driven). Kept best-effort by construction —
|
||||
// a pure, infallible hook so a missing mediator/registry never breaks the
|
||||
// rendezvous. The application crate carries no logging framework (zero new dep);
|
||||
// the ack is materialised as an `eprintln!` trace, the same lightweight channel
|
||||
// the orchestrator already uses for best-effort diagnostics.
|
||||
// rendezvous.
|
||||
let _ = project;
|
||||
eprintln!(
|
||||
"[orchestrator] delegation delivered into agent {agent_id}'s native terminal \
|
||||
(front ack, ticket {ticket})"
|
||||
crate::diag!(
|
||||
"[delivery] front ack received: agent={agent_id} ticket={ticket} \
|
||||
(write-portal reports text+submit writes completed)"
|
||||
);
|
||||
}
|
||||
|
||||
@ -1313,8 +1311,14 @@ impl OrchestratorService {
|
||||
/// agent **headless** (délégué en arrière-plan, sans cellule) voit le médiateur écrire
|
||||
/// lui-même la tâche dans son PTY — sinon le tour est perdu. No-op sans médiateur.
|
||||
pub fn set_agent_front_attached(&self, agent: domain::AgentId, attached: bool) {
|
||||
crate::diag!("[delivery] front attachment changed: agent={agent} attached={attached}");
|
||||
if let Some(input) = &self.input {
|
||||
input.set_front_attached(agent, attached);
|
||||
} else {
|
||||
crate::diag!(
|
||||
"[delivery] front attachment ignored because input mediator is not wired: \
|
||||
agent={agent} attached={attached}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user