Show the service's reason when an agent's start is refused

Aperta Adatta ai principianti
#273 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
desktop

Direzione di ricerca

Inizia dalla gestione dei rifiuti in crates/roster/src/lifecycle.rs e crates/app/src/desktop/profile_management/setup.rs, poi leggi i test correlati e scopri come viene rappresentata la prova relativa a POST /api/agents/start. Per ok: false, mostra l’ultima riga non vuota della prova dopo aver rimosso i caratteri di controllo e limitato la lunghezza; mantieni ogni riga fissa attuale quando la prova è assente. Aggiungi test con fixture su più righe per entrambi i percorsi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When the Backbone service refuses to start an agent (POST /api/agents/start answers ok: false), it says why in the last line of evidence, in plain words that also say what ends the condition. The app does not show it:

  • Start and Resume in the roster (crates/roster/src/lifecycle.rs) show a fixed line, "The agent could not start. Check its saved configuration in Backbone.", whatever the service said.
  • A profile's first agent (crates/app/src/desktop/profile_management/setup.rs) shows the first evidence line, behind "It stopped right after starting:", although the service's reason is the last line and the agent may never have started.

This matters more now: the service can refuse a start for a moment while a profile's granted names are not known to be current on the machine. That ends by itself, and the fixed line sends the person to check a configuration that is fine.

Change

On ok: false, show the last non-empty evidence line (control characters removed, length bounded) as the reason, in both places. Keep the current fixed lines only for a reply with no evidence.

Done when

  • A refused start shows the service's reason in the roster and in first-agent setup.
  • A reply without evidence shows the fixed line as today.
  • Tests cover both, with a multi-line evidence fixture.
Lingua principale
Rust
Stelle
2
Fork
0
Merge medio
4h 30m
PR unite (30g)
193

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eandualem/agent-interface

Tutte le issue di eandualem/agent-interface

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.