MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Deterministic regression
Test application controls with a real agent and controlled outputs before measuring the model.
Objectives
- Test pyramid and model-free CI
- Fixtures and contracts
- Limits compared with live evaluation
Define the property being tested
Continuous integration builds and tests changes; continuous delivery prepares distribution, and continuous deployment adds release to service. For an agent component, the fast base verifies parsing, contracts and host decisions. Provider downtime must not randomize a business-rule test. Real calls retain their place in identified campaigns with their own prerequisites and outcomes.
Place the double at the model boundary
- Base: parsing, domains, required fields, permissions
- Integration: real MAF agent + deterministic IChatClient
- Transport: real SQLite, MCP and HTTP with controlled models
- Campaigns: actual candidate and judge, then human domain review
AgentCiCd.Tests keeps a MAF agent and replaces IChatClient with DeterministicChatClient. Tests choose JSON outputs to exercise a specific branch. This verifies orchestration and policy; the double does not discover a good answer to the user request. An assertion that merely checks for a word in the prompt has limited scope.
Read contracts and effects
Console.Write("Support request > ");
var input = Console.ReadLine();
if (string.IsNullOrWhiteSpace(input)) return;
var result = await SupportTicketAgentFactory.Create(client).HandleAsync(input, stop.Token);
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(result));
Console.WriteLine("Classification only; no ticket was created. Tests exercise rules, not model quality.");
Source code · Demo450 · Folder
Demo450 is a live classification console: it asks for input and calls the configured provider. Deterministic regression runs in AgentCiCd.Tests, rather than treating the console as model-free. Policy routes riskScore >=70 to human_review and rejects forbidden actions, out-of-domain scores and blank reasons. A historical creation-test name does not mean a SQLite ticket was written: the console announces Classification only.
A deserializable contract can remain invalid in business terms. Also test missing fields, refusals and errors. For writes, verify permission, exact approval and storage readback in Maf.Backlog.Tests; for resumption, use Maf.Durable.Tests. A judge cannot replace these executable boundaries with a favorable opinion about prose.
Build an interpretable CI result
dotnet build BaseTechnique.slnx -m:1 -c Releasedotnet test tests/AgentCiCd.Tests/AgentCiCd.Tests.csproj -m:1 -c Release --no-build --no-restoredotnet test tests/Episode17Demo.Tests/Episode17Demo.Tests.csproj -m:1 -c Release --no-build --no-restoreRun from the complete repository root with the pinned SDK and restored locked dependencies. Every build/test retains -m:1. Keep TRX files, exit status and revision; a skipped or interrupted suite has not passed. Contract tests and fixtures remain separate from live campaigns and qualification. Historical Verify-Lot014.ps1 recipes remain archived; these commands target distributed projects.
What application success establishes
Tests establish program behavior under controlled inputs. They do not certify that granite4:3b understands requests, always follows policy or produces faithful answers. Transport tests do not establish graphical WPF acceptance. Actual campaigns, business references and independent human validation remain separate evidence; the latter has not been established.
Move from rules to the model
Prerequisites
Continue reading
Previous
Next
