Repository navigation
Conversation
🦋 Changeset detectedLatest commit: f97eec3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The service already records a machine-readable cause for a failed job (today: the agent never joined the room), but SimulationRun.Job had no field for it, so API clients could only pattern-match the error text.
u9g
force-pushed
the
jason/simulation-job-failure-reason
branch
from
October 19, 2026 20:40
68da9ab to
7604ce1
Compare
…er sounded like JobMetrics gains end_reason, caller_language, caller_listen_language, impairments and conversation.backchannel_count. The simulator knows all of them, but until now they only reached its logs.
A job's transcript reached only the simulator's logs, so a client reading the job (lk agent simulate export, a CI check) could see each turn's timings and scores but not the words that were scored.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds to
SimulationRunwhat agent-service already knows about each simulation job but couldn't return through the API. Today a client such aslk agent simulate exportor a CI check sees only that a job failed and its timings and scores. It can't see why the job failed, how the call ended, or what was said.SimulationRun.Job.failure_reason(field 19)A machine-readable cause for a failed job, with a
FailureReasonenum. Its one cause so far isFAILURE_REASON_AGENT_JOIN_TIMEOUT, meaning the agent under test never joined. agent-service already stores it on every failed job and gives it to the summarizer. Without the field, a client has to match on the human-readableerror. The enum numbers match agent-service's internaljobs.FailureReason, so the service copies the stored value straight across. It's field 19 because #1862 claims 17 and 18 on the same message.SimulationRun.JobMetrics: how the call ranThese are facts the simulator already knows, which until now only reached its logs:
end_reasonerror.caller_languagecaller_listen_language""means the same ascaller_language.impairments"cafe"), and whether low-quality microphone or packet loss was applied. Absent for a clean call.conversation.backchannel_countSimulationRun.JobMetrics.Turn.text(field 18)Each turn's words as the simulation's judges read them: the speaker's own words, or, when those are unknown, the words as the other side heard them. The agent's own words are unknown when it has no RemoteSession, e.g. over SIP.
A job already reports one row per turn with timings and scores, but not what was said. So a reader can see that a turn was slow or interrupted but not what it said. They also can't check the judged transcript's shape, such as one caller line per turn with each reply after the line it answers.
Consumers
lk agent simulate exportkeeps them.