???? ?? ? ??? ???? workbook/deck ?? ??? ??
?? ?? - AgentLoopService? ?? ?? ? ?? ??? ?? ??? ??? ?? ??? ? ??? ??? ??? ?? - XLSX dashboard workbook? PPT deck? ?? ?? ??? ??? ?? dashboard, storyline ?? ????? ? ? ????? ?? ?? ???? - AgentQueuedCommandProjector? ??? queued command ??? queued_input_interrupt, queue_notification, queue_resume, queued_prompt ?? ???? thinking/user ???? ???? ?? helper? ?? - AgentLoopService? drain? ? ??? ?? switch? ?? ?? projector ??? ???? ??? ??? - ArtifactQualityReviewService? dashboard sheet? KPI, trend, decision ?? ?? ??? ???? workbook review ??? ?? - ArtifactRepairGuideService? ? dashboard ??? core story ?? ?? ???? ????? ?? - DeckQualityReviewService? storyline? Options, Roadmap, Appendix? ????? ?? ????? ?? ? ?? ?? ??? ????? ?? - DeckRepairGuideService? storyline ?? ??? deck storyline ?? ???? ????? ?? - AgentQueuedCommandProjectorTests, DeckQualityReviewServiceTests, ArtifactQualityReviewServiceTests, ArtifactRepairGuideServiceTests, DeckRepairGuideServiceTests? ??? ??? ?? - README.md? docs/DEVELOPMENT.md? 2026-04-15 09:24 (KST) ?? ??? ?? ??? ?? ?? ?? - dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_loop_doc_finish2\\ -p:IntermediateOutputPath=obj\\verify_loop_doc_finish2\\ : ?? 0 / ?? 0 - dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "AgentQueuedCommandProjectorTests|AgentCommandQueueTests|ArtifactQualityReviewServiceTests|ArtifactRepairGuideServiceTests|DeckQualityReviewServiceTests|DeckRepairGuideServiceTests|PptxSkillGoldenDeckTests|ExcelSkillDashboardSummaryTests" -p:OutputPath=bin\\verify_loop_doc_finish2_tests\\ -p:IntermediateOutputPath=obj\\verify_loop_doc_finish2_tests\\ : ?? 25
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
using AxCopilot.Models;
|
||||
using AxCopilot.Services.Agent;
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
|
||||
namespace AxCopilot.Tests.Services;
|
||||
|
||||
public class AgentQueuedCommandProjectorTests
|
||||
{
|
||||
[Fact]
|
||||
public void Project_ShouldCreateInterruptMessageAndDeferredEvent()
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
var commands = new List<AgentQueuedCommand>
|
||||
{
|
||||
new(1, AgentCommandKind.Steering, AgentQueuePriority.Now, "steer-now", now, true),
|
||||
new(2, AgentCommandKind.Notification, AgentQueuePriority.Now, "later-note", now.AddSeconds(1), false),
|
||||
};
|
||||
|
||||
var projection = AgentQueuedCommandProjector.Project(commands, deferredCount: 2);
|
||||
|
||||
projection.Messages.Should().ContainSingle(message =>
|
||||
message.MetaKind == "queued_input_interrupt" &&
|
||||
message.Role == "system");
|
||||
projection.Messages.Should().Contain(message =>
|
||||
message.MetaKind == "queued_steering" &&
|
||||
message.Role == "user" &&
|
||||
message.Content == "steer-now");
|
||||
projection.Messages.Should().Contain(message =>
|
||||
message.MetaKind == "queue_notification" &&
|
||||
message.Role == "system" &&
|
||||
message.Content == "later-note");
|
||||
projection.Events.Should().Contain(evt =>
|
||||
evt.Type == AgentEventType.Thinking &&
|
||||
evt.Summary.Contains("Deferred 2 lower-priority", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Project_ShouldMapPermissionResumeAndPromptKindsConsistently()
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
var commands = new List<AgentQueuedCommand>
|
||||
{
|
||||
new(1, AgentCommandKind.PermissionContinuation, AgentQueuePriority.Now, "continue-tool", now, true),
|
||||
new(2, AgentCommandKind.Resume, AgentQueuePriority.Now, "resume-run", now.AddSeconds(1), false),
|
||||
new(3, AgentCommandKind.Prompt, AgentQueuePriority.Now, "follow-up", now.AddSeconds(2), false),
|
||||
new(4, AgentCommandKind.UserDecision, AgentQueuePriority.Now, "choose-option-b", now.AddSeconds(3), false),
|
||||
};
|
||||
|
||||
var projection = AgentQueuedCommandProjector.Project(commands, deferredCount: 0);
|
||||
|
||||
projection.Messages.Should().Contain(message =>
|
||||
message.MetaKind == "queue_permission_continuation" &&
|
||||
message.Role == "system");
|
||||
projection.Messages.Should().Contain(message =>
|
||||
message.MetaKind == "queue_resume" &&
|
||||
message.Role == "system");
|
||||
projection.Messages.Should().Contain(message =>
|
||||
message.MetaKind == "queued_prompt" &&
|
||||
message.Role == "user");
|
||||
projection.Messages.Should().Contain(message =>
|
||||
message.MetaKind == "queued_user_decision" &&
|
||||
message.Role == "user");
|
||||
projection.Events.Should().Contain(evt =>
|
||||
evt.Type == AgentEventType.UserMessage &&
|
||||
evt.Summary == "follow-up");
|
||||
projection.Events.Should().Contain(evt =>
|
||||
evt.Type == AgentEventType.Thinking &&
|
||||
evt.Summary == "continue-tool");
|
||||
}
|
||||
}
|
||||
@@ -106,5 +106,6 @@ public class ArtifactQualityReviewServiceTests
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("highlights or actions", StringComparison.OrdinalIgnoreCase));
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("supporting detail sheets", StringComparison.OrdinalIgnoreCase));
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("trend or variance formulas", StringComparison.OrdinalIgnoreCase));
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("KPI, trend, or decision content", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ public class ArtifactRepairGuideServiceTests
|
||||
68,
|
||||
["Includes summary sheet"],
|
||||
[
|
||||
new ArtifactReviewIssue("Dashboard sheet lacks KPI, trend, or decision content.", ArtifactReviewSeverity.Info),
|
||||
new ArtifactReviewIssue("Workbook could benefit from a dashboard sheet to summarize multi-sheet trends.", ArtifactReviewSeverity.Info),
|
||||
new ArtifactReviewIssue("Summary sheet does not link to detail sheets.", ArtifactReviewSeverity.Warning)
|
||||
]);
|
||||
@@ -21,6 +22,7 @@ public class ArtifactRepairGuideServiceTests
|
||||
var guide = ArtifactRepairGuideService.BuildGuide(review);
|
||||
|
||||
guide.Should().Contain("dashboard sheet");
|
||||
guide.Should().Contain("core story");
|
||||
guide.Should().Contain("detail sheets");
|
||||
}
|
||||
|
||||
|
||||
@@ -83,4 +83,28 @@ public class DeckQualityReviewServiceTests
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("headline is too long"));
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("comparison slide needs at least two options"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReviewDeck_ShouldFlagMissingStorylineSlides_WhenHintsAreProvided()
|
||||
{
|
||||
using var slides = JsonDocument.Parse(
|
||||
"""
|
||||
[
|
||||
{ "layout": "title", "title": "PMO Steering" },
|
||||
{ "layout": "executive_summary", "title": "Executive Summary", "headline": "Message", "summary_points": ["A", "B"], "recommendation": "Proceed" },
|
||||
{ "layout": "recommendation", "title": "Recommendation", "recommendation": "Proceed", "summary_points": ["Reason"] }
|
||||
]
|
||||
""");
|
||||
|
||||
var review = DeckQualityReviewService.ReviewDeck(
|
||||
"Storyline Deck",
|
||||
slides.RootElement,
|
||||
hasTemplate: false,
|
||||
autoRepairCount: 0,
|
||||
storyline: ["Executive Summary", "Options", "Roadmap", "Appendix"]);
|
||||
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("Storyline expects an options or comparison slide", StringComparison.OrdinalIgnoreCase));
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("Storyline expects a roadmap slide", StringComparison.OrdinalIgnoreCase));
|
||||
review.Issues.Should().Contain(issue => issue.Message.Contains("Storyline expects appendix or evidence support", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,4 +53,21 @@ public class DeckRepairGuideServiceTests
|
||||
guide.Should().Contain("appendix");
|
||||
guide.Should().Contain("distinct message");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildGuide_ShouldTranslateStorylineGapIntoConcreteAction()
|
||||
{
|
||||
var report = new DeckQualityReport(
|
||||
63,
|
||||
[],
|
||||
[
|
||||
new DeckReviewIssue("Storyline expects an options or comparison slide but none is present.", DeckReviewSeverity.Warning)
|
||||
],
|
||||
["Executive Summary", "Options"]);
|
||||
|
||||
var guide = DeckRepairGuideService.BuildGuide(report);
|
||||
|
||||
guide.Should().Contain("comparison slide");
|
||||
guide.Should().Contain("storyline");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user