possible fix for word of the day

This commit is contained in:
Jacob Dubin
2026-04-18 22:14:28 -05:00
parent d4dbfefa06
commit b77f332350
15 changed files with 4444 additions and 3 deletions

View File

@@ -103,6 +103,7 @@ Evidence from the smaller `2026-04-18/19` hotphrase and word-of-the-day verifica
- hotphrase silence can still auto-finalize into a generic `heyJibo` fallback, which sounds confused on-robot compared with a dedicated greeting path
- voice-triggered `loadMenu + destination=word-of-the-day` reaches Nimbus successfully, but Nimbus still expects a follow-up cloud skill response and times out if launch stops at `LISTEN` + `EOS`
- the newer `jibo test 2` bundle shows voice launch now reaches Nimbus and receives a cloud response, but a generic `SLIM/RUNTIME_PROMPT` just says "starting word of the day" instead of performing the menu-style redirect the on-screen path uses
- the local buffered-audio seam is still producing repeated `whisper.cpp returned no transcript` and `ffmpeg ... Codec not found` failures, so lightweight waveform or energy screening is worth considering once the core launch flow is stable
Near-term interaction work should now prioritize:

View File

@@ -227,9 +227,13 @@ public sealed class JiboInteractionService(
return new JiboInteractionDecision(
"word_of_the_day",
"Starting word of the day.",
"@be/word-of-the-day",
SkillPayload: new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase)
{
["destination"] = "word-of-the-day"
["destination"] = "word-of-the-day",
["skillId"] = "@be/word-of-the-day",
["redirectIntent"] = "menu",
["redirectDomain"] = "word-of-the-day"
});
}

View File

@@ -306,8 +306,13 @@ public sealed class ResponsePlanToSocketMessagesMapper
var isJoke = string.Equals(plan.IntentName, "joke", StringComparison.OrdinalIgnoreCase) ||
string.Equals(skill?.SkillName, "@be/joke", StringComparison.OrdinalIgnoreCase);
var isDance = string.Equals(plan.IntentName, "dance", StringComparison.OrdinalIgnoreCase);
if (isWordOfTheDay)
{
return BuildWordOfTheDayLaunchSkillPayload(transId, skillPayload);
}
var payloadSkill = ReadPayloadString(skillPayload, "skillId");
var skillId = isWordOfTheDay ? "@be/word-of-the-day" : string.IsNullOrWhiteSpace(payloadSkill) ? isJoke ? "@be/joke" : skill?.SkillName ?? "chitchat-skill" : payloadSkill;
var skillId = string.IsNullOrWhiteSpace(payloadSkill) ? isJoke ? "@be/joke" : skill?.SkillName ?? "chitchat-skill" : payloadSkill;
var esml = ReadPayloadString(skillPayload, "esml") ?? (isDance
? "<speak>Okay.<break size='0.2'/> Watch this.<anim cat='dance' filter='music, rom-upbeat' /></speak>"
: isJoke
@@ -358,6 +363,56 @@ public sealed class ResponsePlanToSocketMessagesMapper
};
}
private static object BuildWordOfTheDayLaunchSkillPayload(string transId, IDictionary<string, object?>? payload)
{
var skillId = ReadPayloadString(payload, "skillId") ?? "@be/word-of-the-day";
var redirectIntent = ReadPayloadString(payload, "redirectIntent") ?? "menu";
var redirectDomain = ReadPayloadString(payload, "redirectDomain") ?? "word-of-the-day";
return new
{
type = "SKILL_ACTION",
ts = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
msgID = CreateHubMessageId(),
transID = transId,
data = new
{
skill = new
{
id = skillId
},
action = new
{
config = new
{
jcp = new
{
type = "REDIRECT",
config = new
{
nlu = new
{
intent = redirectIntent,
entities = new
{
domain = redirectDomain
}
},
asr = new
{
text = string.Empty,
confidence = 1.0
}
}
}
}
},
analytics = new Dictionary<string, object?>(),
final = true
}
};
}
private static object BuildGenericFallbackSkillPayload(string transId)
{
return new

View File

@@ -143,8 +143,10 @@ public sealed class JiboInteractionServiceTests
Assert.Equal("word_of_the_day", decision.IntentName);
Assert.Equal("Starting word of the day.", decision.ReplyText);
Assert.Equal("@be/word-of-the-day", decision.SkillName);
Assert.Equal("word-of-the-day", decision.SkillPayload!["destination"]);
Assert.Null(decision.SkillName);
Assert.Equal("menu", decision.SkillPayload["redirectIntent"]);
Assert.Equal("word-of-the-day", decision.SkillPayload["redirectDomain"]);
}
[Fact]

View File

@@ -495,6 +495,10 @@ public sealed class JiboWebSocketServiceTests
using var skillPayload = JsonDocument.Parse(replies[2].Text!);
Assert.Equal("@be/word-of-the-day", skillPayload.RootElement.GetProperty("data").GetProperty("skill").GetProperty("id").GetString());
Assert.Equal("REDIRECT", skillPayload.RootElement.GetProperty("data").GetProperty("action").GetProperty("config").GetProperty("jcp").GetProperty("type").GetString());
Assert.Equal("menu", skillPayload.RootElement.GetProperty("data").GetProperty("action").GetProperty("config").GetProperty("jcp").GetProperty("config").GetProperty("nlu").GetProperty("intent").GetString());
Assert.Equal("word-of-the-day", skillPayload.RootElement.GetProperty("data").GetProperty("action").GetProperty("config").GetProperty("jcp").GetProperty("config").GetProperty("nlu").GetProperty("entities").GetProperty("domain").GetString());
Assert.Equal(string.Empty, skillPayload.RootElement.GetProperty("data").GetProperty("action").GetProperty("config").GetProperty("jcp").GetProperty("config").GetProperty("asr").GetProperty("text").GetString());
var session = _store.FindSessionByToken("hub-wod-launch-token");
Assert.NotNull(session);