e-naxosMAF COURSE / COURS
Français

MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1

Demo470 — Documented Approval

Run valid evidence, fabricated citation, rejection, restart, approval and replay in separate processes.

Objectives

Prepare the console and dependencies

At the BaseTechnique root build the solution using the pinned SDK. Demo470.App.csproj references Maf.Rag, Maf.Durable and Maf.Observability; corpus and connection settings are copied beside the executable. Shared projects remain required: downloading an isolated demo folder is insufficient. The default fixture requires no model, vector server or Docker.

dotnet build BaseTechnique.slnx -m:1 -c Release

Cite then reject in a first directory

$proposalRoot = Join-Path $env:TEMP ("maf-documented-" + [guid]::NewGuid().ToString("N"))
$rejected = Join-Path $proposalRoot "rejected"
$approved = Join-Path $proposalRoot "approved"
$invalid = Join-Path $proposalRoot "invalid"
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- start $rejected
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- status $rejected

Read Business state: Waiting, Decision=null, ItemId=null and Draft.Summary containing the quoted passage and identifier. Each dotnet run ends: the next command restores the same state from disk. Inspect evidence.json to understand evidence, then business.db as the proposal authority. Do not publish these files.

dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- resume $rejected reject
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- resume $rejected reject
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- status $rejected

Expect Rejected and no ItemId, including on identical replay. Trying approve on this directory must then fail: the first decision is retained. To approve another proposal use the still-new approved directory.

Reject fabricated evidence then approve

dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- start $invalid --invalid-evidence

This command must fail. It may create the directory, host.lock, vector index or checkpoint directory, but must register no approval or business row. Do not confuse directory existence with chain success. The invented identifier is rejected before Waiting.

dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- start $approved
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- resume $approved maybe
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- status $approved
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- resume $approved approve
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- resume $approved approve
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- status $approved

maybe must fail and leave Waiting. approve must yield Completed with ItemId and StoredItem matching Draft; replay must retain the same ItemId and a single row. A later reject must fail. start on an already-used directory must be rejected. For live mode choose another directory and pass --live to start: embeddings and answer then use the common connection without fixture fallback.

$live = Join-Path $proposalRoot "live"
dotnet run --project demos/Demo470_DocumentedApproval/Demo470.App.csproj -c Release --no-build -- start $live --live

Check storage independently

In a local SQLite reader open business.db and read Approvals then ApprovedBacklogItems by OperationId. Compare Draft in both tables and count business rows. After rejection: zero. After approval and two resumptions: one. The same printed identifier is an indication; the database query confirms effect count. Maf.Durable tests also cover concurrency, conflicting decisions, correlation and insertion rollback.

dotnet test tests/Maf.Durable.Tests/Maf.Durable.Tests.csproj -m:1 -c Release --no-build --no-restore
dotnet test tests/Maf.Rag.Tests/Maf.Rag.Tests.csproj -m:1 -c Release --no-build --no-restore

Read the exact console scope

Question, reference date 2026-10-23, course scope and business fields are fixed. Each phase has a three-minute bound. No --fail-after-write is exposed here: that case belongs to Demo320 and shared tests. Historical Verify scripts cited in Scenario.md are archived rather than shipped commands. Approval is unauthenticated operator input; the effect remains local.

Understand the chain

Prerequisites

Continue reading

Complete demo folder · README

lot013-integration-1 · 2026-10-24 · 9a895c94534cd5fc6f3da883e37e5f7856e588c1