MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Exercise: integrated documented action
Verify the documentary chain and unique effect with storage evidence and separate processes.
Objectives
- Use this page to understand: Integrated documented action.
Prepare three separate proposals
Follow the Demo470 procedure with three fresh directories: rejected, approved, invalid. Retain identifiers and exit codes. This exercise uses the model-free fixture; the decision belongs to the operator rather than generated output.
Establish evidence before and after resumption
1. Start rejected then read Waiting in another process. Copy identifier/quotation from Draft.Summary and locate the corpus passage. 2. Reject then replay rejection: no item. 3. Start invalid with --invalid-evidence: failure without approval. 4. Start approved, try maybe, confirm Waiting, approve and replay. 5. Try a conflicting decision then start in the same directory: expect two explicit failures.
For an additional pending proposal back up then edit only evidence.json with distinct diagnostic text. Read status and approve: Draft and StoredItem must remain identical to the initial proposal. This experiment demonstrates the file’s role; it demonstrates no resistance to direct business.db editing.
Produce a result matrix
| Mechanism | Scope |
|---|---|
| Invented citation | Failure before Approvals; no item |
| maybe | Failure; Waiting retained |
| reject + replay | Rejected; zero ApprovedBacklogItems |
| approve + replay | Completed; one row, same ItemId, Draft = StoredItem |
| Conflicting decision | Failure; first decision retained |
Explain each guard
AnswerGate rejects unknown identifiers. Register freezes a draft for one operation. Receipt and version reconstruct the same native request. RecordDecision retains the first decision; Apply uses stored Draft and the unique key in a transaction. To verify the outcome join tables by OperationId and count rows rather than relying on Completed prose. Attribute each observation to its command and directory.
public ApprovalState Apply(ApprovalDecision decision)
{
RecordDecision(decision);
using var connection = Open();
using var transaction = connection.BeginTransaction();
using var command = connection.CreateCommand();
command.Transaction = transaction;
command.CommandText = """
INSERT INTO ApprovedBacklogItems (OperationId,Draft,CreatedUtc)
SELECT OperationId,Draft,$utc FROM Approvals WHERE OperationId=$id AND Status IN ('Approved','Completed')
ON CONFLICT(OperationId) DO NOTHING;
UPDATE Approvals SET Status='Completed' WHERE OperationId=$id AND Status='Approved';
""";
command.Parameters.AddWithValue("$id", decision.OperationId);
command.Parameters.AddWithValue("$utc", DateTimeOffset.UtcNow.ToString("O"));
command.ExecuteNonQuery();
transaction.Commit();
return Read(decision.OperationId);
Verification hints
Before reading the correction, record prediction and observation. Separate generated text, terminal state, decision and persisted state. If they differ, follow the file and test named in the procedure; do not remove the guard to obtain the expected result.
Separate exercise and qualification
Success covers the local mechanism with controlled vectors and answer. It qualifies neither model, document truth nor operator identity. The unique effect applies to this key and database rather than a remote call. Do not edit original or historical databases to perform the exercise.
Revisit procedure and limits
Prerequisites
- Demo220 — Business Retrieval
- Demo320 — Durable Approval
- Demo430 — Business Audit
- Demo470 — Documented Approval
