Observed conversation messages are smuggled through Event as "conversation_message", dropping trace and allowing spoofing

Aperta
#25 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
scala
Ambito
backend

Direzione di ricerca

Start with ScenarioRunner.scala:259, EvaluatedAgent.scala:109, EvaluatedAgent.generating, and EventSourceActor; trace how observed messages and emitted events flow through them. Add the dedicated participant command described in the issue, preserve the full Message, replace the string match noted in #24, and filter undeclared event names. Done when traces survive, spoofed events are dropped and logged, and missing fields no longer silently become fallback values.

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

Descrizione

bug

Problem

The runner forwards observed conversation messages to observers by packing them into an Event named "conversation_message" (ScenarioRunner.scala:259). EvaluatedAgent.absorbEvents then string-matches on that name and unpacks the JSON back into a history turn (EvaluatedAgent.scala:109). This overloads Event, which is otherwise meant for things event sources emit, and causes three bugs:

  1. The trace is dropped. The runner only puts conversation, sender and content into the event data, but absorbEvents reads data.get("trace"). Observed messages always reach the agent with no trace, even when the sender attached one.
  2. The name can be spoofed. EventSourceActor accepts any event name the LLM returns, without checking it against the source's declared emits, and the loader doesn't reserve conversation_message. An event source that emits an event with that name gets recorded in the agent's history as a real conversation turn, with conversation and sender defaulting to "unknown".
  3. Silent fallbacks. Missing fields are replaced with "unknown" or "" instead of failing.

Proposed fix

  • Add a dedicated participant command, e.g. Participant.ReceiveObserved(conversation: String, message: Message), and have the runner send it to observers instead of a conversation_message event. The full Message (including trace) travels intact and the agent dispatches on type, not on a string.
  • Keep Event for event-source emissions only. After this, the code has no built-in event names, so Event.name can stay a String (its values come from scenario YAML and the LLM at runtime, so a closed enum wouldn't fit).
  • In EventSourceActor, drop (and log) emitted events whose name isn't in that source's emits.

Observed messages are already turned into history before a step, so StepRequest and remote agents are unaffected.

Notes

#24 adds a third string match on "conversation_message" in EvaluatedAgent.generating; this change should replace it too.

Lingua principale
Scala
Stelle
0
Fork
7
Merge medio
2g 5h
PR unite (30g)
11

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 salesforce/evalon

Tutte le issue di salesforce/evalon

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.