Skip to content
Agent Field Notes
Course contentsExpand a topic to choose a lesson.

SYSTEMATIC LEARNING / FOUR-LEVEL COURSE

A controlled task chain from evidence to publication

Connect identity, knowledge permissions, structured tools, persistence tasks, and audit releases into a recoverable system.

Learning objectives: Enterprise tasks should be recorded separately for reading evidence, generating drafts and publishing results, and then connecting them with versions and authorizations. Durable orchestration restores control flow but does not automatically guarantee consistent evidence or that external writes occur only once.

Content checked: 2026-10-03 · Each level has independent explanations, tasks and inspections

Choose a starting point based on your familiarity with this topic. Current level: Debugging · Diagnose failures. After completing the task, continue to the next level. Reading and self-checks alone do not establish mastery.

On this level

Review the prerequisites

Suitable for: Backend developers learning Agent applications.

A controlled task chain from evidence to publication
Enterprise tasks should be recorded separately for reading evidence, generating drafts and publishing results, and then connecting them with versions and authorizations. Durable orchestration restores control flow but does not automatically guarantee consistent evidence or that external writes occur only once.

How does the mechanism work?

Step-by-step explanation
  1. Reports involve multiple documents that are constantly updated. How to define a consistent snapshot of evidence?

    Reports draw on multiple changing sources, so explain the scope of evidence consistency.

  2. The worker crashes after a successful release. How to avoid repeated releases during recovery?

    Durable-task recovery must handle the window where an external action succeeds but is not recorded locally.

  3. When the user cancels the task, how to handle the external requests that have been sent?

    The task chain must define how cancellation relates to an irreversible commit.

Debugging · Diagnose failures

Diagnose failures · A controlled task chain from evidence to publication

Objectives of this level: Locate unsafe resend and revoked-authority transitions on fixed evidence.

Visual guide · Publish from current facts

Publish from current facts

This planner only recommends a next step. Check current authority first; stale approval cannot turn committed or unknown receipts into a fresh send. Select the figure to open it at full size.

Same after-sales project

The after-sales Agent publishes a reviewed refund-policy notice. A stored checkpoint is control-flow data; current publishing authority, current document version, approval binding and the external receipt are separate facts. This local planner recommends a next step; it does not commit a database transaction, publish remotely or prove enterprise readiness.

The existing capstone main-return creates a return application; it does not execute a refund. These manifests are independent fictional extensions or policy/evidence/counting exercises. They do not add real refunds, publication, model calls or Java execution to the capstone runtime.

Same-input fault reproduction

In a copy, treat unknown receipts as none. On the exact unknown-receipt payload the first wrong transition is reconcile → publish. Record the operation key, expected/actual next step and source diff; fix the transition before adding retries. A second negative control revokes current authority while retaining the old approval.

{
  "current": {
    "tenant": "t1",
    "version": "v2",
    "can_publish": true
  },
  "document": {
    "tenant": "t1",
    "version": "v2"
  },
  "approval": {
    "tenant": "t1",
    "version": "v2",
    "expires_at": 101
  },
  "receipt": {
    "status": "unknown",
    "operation_key": "publish-42-v2"
  },
  "operation_key": "publish-42-v2",
  "now": 100
}

Use this expected result from the foundation sample, unchanged:

{
  "expected": {
    "next": "reconcile",
    "reason": "unknown_receipt",
    "operation_key": "publish-42-v2"
  },
  "error": null
}

Evidence before repair

After implementing, preserve a faulty student-before.py. Run the before command, inspect its first actual mismatch, then repair student.py and rerun the after command. Keep both reports, source hashes/diff, an evidence→hypothesis→distinguishing-evidence note and the named negative control. Reports may contain an earlier first mismatch than the named probe; explain both. The public suggested fault is a reproducible exercise, not an unannounced incident or unseen test.

python3 lab_runner.py grade --course enterprise-agent-design --module student-before.py --out before-report.json
python3 lab_runner.py grade --course enterprise-agent-design --module student.py --out report.json
import json
from pathlib import Path
report = json.loads(Path("before-report.json").read_text())
first = next((row for row in report["checks"] if not row["passed"]), None)
print(json.dumps(first, indent=2, ensure_ascii=False))

Optional retrospective after evidence

Query the authoritative target by the original operation key; a timeout log alone cannot distinguish them.

code example

Preserve the same-input red/green repair

In a copy, treat unknown receipts as none. On the exact unknown-receipt payload the first wrong transition is reconcile → publish. Record the operation key, expected/actual next step and source diff; fix the transition before adding retries. A second negative control revokes current authority while retaining the old approval.

Acceptance task for this level

Freeze a faulty copy, submit evidence and competing hypotheses, reproduce the same-input failure, repair it and preserve red/green reports plus a negative control. Contract: plan_publication(payload).

Acceptance self-checks

Reading this browser’s record…

Hide the answer and check your understanding

Which evidence distinguishes timeout-before-write from receipt-lost-after-write?

Further explanations and practice

When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.

All linked explanations and exercises (1 )

Sources and verification scope

The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.