Replayable Automation Needs a Small Evidence Log
说明与用途
通过为每次执行分配唯一运行 ID、维护结构化事件日志并将规划与执行分离,自动化变得可重现且安全。
问题
Scheduled cron jobs often report only a boolean success, leaving no trace of inputs, decisions, or side effects, making debugging and safe retries difficult.
结果
Automations become self‑documenting, safe to retry, and easier to debug because every step is logged and tied to a stable run ID.
工作流
- Create a unique run ID before any work starts
- Record context (available resources) in context.json
- Generate a deterministic plan and store in plan.json
- Produce input artifacts (e.g., input.md) once
- Execute external actions, logging each state transition to events.jsonl
- After completion, write final result to result.json
- Use run ID or idempotency key to guard against duplicate side effects
- On retry, inspect events.jsonl to decide whether to continue, reconcile, or halt for review
证据
The smallest useful receipt has a stable run ID and a few facts: ...
Retries are not automatically safe. Ask what the job did before it failed: ...
- 记录日期: 2026-09-15T19:01:21.690Z