added cloud versioning
This commit is contained in:
@@ -8,6 +8,12 @@ It is intentionally broader than the current Node server. The Node server is a p
|
|||||||
|
|
||||||
Day-to-day feature sequencing now lives in [feature-backlog.md](/C:/Projects/JiboExperiments/OpenJibo/docs/feature-backlog.md).
|
Day-to-day feature sequencing now lives in [feature-backlog.md](/C:/Projects/JiboExperiments/OpenJibo/docs/feature-backlog.md).
|
||||||
|
|
||||||
|
Cloud release hygiene:
|
||||||
|
|
||||||
|
- keep a visible OpenJibo Cloud version string
|
||||||
|
- expose it through diagnostics such as `/health` and the spoken `cloud version` command
|
||||||
|
- bump the shared version constant whenever we deploy a meaningful hosted-cloud change
|
||||||
|
|
||||||
## Current Scope
|
## Current Scope
|
||||||
|
|
||||||
- stable .NET cloud scaffold
|
- stable .NET cloud scaffold
|
||||||
|
|||||||
@@ -6,6 +6,13 @@
|
|||||||
|
|
||||||
This is the production-oriented path for restoring device connectivity and creating a foundation for future runtime, AI, and OTA work.
|
This is the production-oriented path for restoring device connectivity and creating a foundation for future runtime, AI, and OTA work.
|
||||||
|
|
||||||
|
Current spoken cloud version: `Open Jibo Cloud version 1.0.10.`
|
||||||
|
|
||||||
|
Release hygiene reminder:
|
||||||
|
|
||||||
|
- bump [OpenJiboCloudBuildInfo.cs](/C:/Projects/JiboExperiments/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/OpenJiboCloudBuildInfo.cs) whenever we ship a meaningful hosted-cloud update
|
||||||
|
- keep the spoken version response and `/health` version field aligned from that single source of truth
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
The first implementation is a modular monolith:
|
The first implementation is a modular monolith:
|
||||||
|
|||||||
@@ -125,7 +125,12 @@ app.Use(async (context, next) =>
|
|||||||
await telemetrySink.RecordConnectionClosedAsync(closeEnvelope, closeSession, $"socket-loop-ended{(isPrematureClose ? "-prematurely" : string.Empty)}", context.RequestAborted);
|
await telemetrySink.RecordConnectionClosedAsync(closeEnvelope, closeSession, $"socket-loop-ended{(isPrematureClose ? "-prematurely" : string.Empty)}", context.RequestAborted);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapGet("/health", () => Results.Json(new { ok = true, service = "OpenJibo Cloud Api" }));
|
app.MapGet("/health", () => Results.Json(new
|
||||||
|
{
|
||||||
|
ok = true,
|
||||||
|
service = "OpenJibo Cloud Api",
|
||||||
|
version = OpenJiboCloudBuildInfo.Version
|
||||||
|
}));
|
||||||
|
|
||||||
app.MapMethods("/{**path}", ["GET", "POST", "PUT"], async (HttpContext context, JiboCloudProtocolService service, IProtocolTelemetrySink telemetrySink, CancellationToken cancellationToken) =>
|
app.MapMethods("/{**path}", ["GET", "POST", "PUT"], async (HttpContext context, JiboCloudProtocolService service, IProtocolTelemetrySink telemetrySink, CancellationToken cancellationToken) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public sealed class JiboInteractionService(
|
|||||||
"dance" => BuildDanceDecision(catalog),
|
"dance" => BuildDanceDecision(catalog),
|
||||||
"time" => new JiboInteractionDecision("time", $"It is {DateTime.Now:h:mm tt}."),
|
"time" => new JiboInteractionDecision("time", $"It is {DateTime.Now:h:mm tt}."),
|
||||||
"date" => new JiboInteractionDecision("date", $"Today is {DateTime.Now:dddd, MMMM d}."),
|
"date" => new JiboInteractionDecision("date", $"Today is {DateTime.Now:dddd, MMMM d}."),
|
||||||
|
"cloud_version" => new JiboInteractionDecision("cloud_version", OpenJiboCloudBuildInfo.SpokenVersion),
|
||||||
"radio" => BuildRadioLaunchDecision(),
|
"radio" => BuildRadioLaunchDecision(),
|
||||||
"radio_genre" => BuildRadioGenreLaunchDecision(lowered),
|
"radio_genre" => BuildRadioGenreLaunchDecision(lowered),
|
||||||
"hello" => new JiboInteractionDecision("hello", randomizer.Choose(catalog.GreetingReplies)),
|
"hello" => new JiboInteractionDecision("hello", randomizer.Choose(catalog.GreetingReplies)),
|
||||||
@@ -169,6 +170,18 @@ public sealed class JiboInteractionService(
|
|||||||
return "joke";
|
return "joke";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MatchesAny(
|
||||||
|
loweredTranscript,
|
||||||
|
"cloud version",
|
||||||
|
"open jibo cloud version",
|
||||||
|
"openjibo cloud version",
|
||||||
|
"what version is the cloud",
|
||||||
|
"what s the cloud version",
|
||||||
|
"what's the cloud version"))
|
||||||
|
{
|
||||||
|
return "cloud_version";
|
||||||
|
}
|
||||||
|
|
||||||
if (TryResolveRadioGenre(loweredTranscript) is not null)
|
if (TryResolveRadioGenre(loweredTranscript) is not null)
|
||||||
{
|
{
|
||||||
return "radio_genre";
|
return "radio_genre";
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Jibo.Cloud.Application.Services;
|
||||||
|
|
||||||
|
public static class OpenJiboCloudBuildInfo
|
||||||
|
{
|
||||||
|
public const string Version = "1.0.10";
|
||||||
|
|
||||||
|
public static string SpokenVersion => $"Open Jibo Cloud version {Version}.";
|
||||||
|
}
|
||||||
@@ -200,6 +200,21 @@ public sealed class JiboInteractionServiceTests
|
|||||||
Assert.DoesNotContain("future cloud integration", decision.ReplyText, StringComparison.OrdinalIgnoreCase);
|
Assert.DoesNotContain("future cloud integration", decision.ReplyText, StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task BuildDecisionAsync_CloudVersion_UsesSharedBuildInfo()
|
||||||
|
{
|
||||||
|
var service = CreateService();
|
||||||
|
|
||||||
|
var decision = await service.BuildDecisionAsync(new TurnContext
|
||||||
|
{
|
||||||
|
RawTranscript = "what's the cloud version",
|
||||||
|
NormalizedTranscript = "what's the cloud version"
|
||||||
|
});
|
||||||
|
|
||||||
|
Assert.Equal("cloud_version", decision.IntentName);
|
||||||
|
Assert.Equal(OpenJiboCloudBuildInfo.SpokenVersion, decision.ReplyText);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task BuildDecisionAsync_WordOfDayGuess_UsesStructuredClientNluGuess()
|
public async Task BuildDecisionAsync_WordOfDayGuess_UsesStructuredClientNluGuess()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user