跳到正文
cccskills
免费在 GitHub 公开中文介绍

agent-harness-fault-injection

通过可重复的模拟故障,检查智能体流程能否恢复或安全停止。模拟工具超时、执行进程重启和记忆丢失,并生成故障矩阵、事件时间线及判定结果,用于检查重复操作和预算是否超限。

原文查看原文说明

Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.

实测评分 未实测

查看安装方法

适用场景

  • 验证 MCP 或工具超时后的恢复
  • 检查重启后能否恢复进度
  • 测试并行流程中的部分失败
  • 在固定条件下复现恢复问题

中文介绍

功能

此技能按固定顺序向智能体流程注入模拟故障,检查流程能否恢复或安全停止。测试范围包括工具调用超时、执行进程重启、已保存进度或临时记忆丢失,以及并行处理中的部分失败。它会生成故障矩阵、事件时间线、机器可读记录和简短总结,并区分已恢复、已控制并安全停止、无法恢复和证据不足等结果。

适用场景

为多步骤智能体流程添加重试或中断后续跑机制时,可以用它验证恢复行为。它也适用于在相同故障条件下检查操作是否重复、尝试次数或期限是否超限,以及失败分支是否漏记。

使用示例

  • “让第二次工具调用发生超时,并检查重试上限是否有效。”
  • “在保存进度后重启,确认已完成的操作不会重复。”

注意事项

不得在生产环境、真实数据或有效认证信息上使用。应使用一次性隔离环境、合成数据和替代工具。仅靠本地模拟无法证明已部署的 MCP 服务器或网络会如何运行。此技能用于测试流程,不会修复流程本身。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
A良好资料禁止测试生产目标,并要求使用隔离环境和合成输入。
安装难易度所需工具和 API 密钥是否少且有说明
A良好资料明确要求一次性沙盒、合成输入和替代工具。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月25日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md11.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Agent Harness Fault Injection

Overview

Use a deterministic, non-production fault schedule to test whether an agent workflow preserves state, budgets, safety boundaries, and evidence when a dependency fails. The output is a small fault matrix, an event timeline, and a verdict that distinguishes recovered, contained, unrecoverable, and inconclusive runs.

When to Use This Skill

  • Use when a multi-step agent, state machine, loop, or multi-agent workflow has a new recovery path.
  • Use when sandbox execution, an MCP/tool call, a worker, a checkpoint store, or memory can time out or disappear.
  • Use before claiming retry, resume, deadline, isolation, or partial-failure behavior is production-ready.
  • Use when a regression needs reproducible failure evidence instead of a random chaos run.

Do not use this skill against a production target, real user data, live credentials, or an unbounded external service. Convert those cases to a local simulator or an authorized staging harness first.

Safety and Boundary Preconditions

  1. Freeze the workflow revision, model/prompt configuration, tool schemas, seed, input fixture, timeout, retry budget, deadline, and expected terminal states.
  2. Run in a disposable sandbox with synthetic inputs and stubbed tools. Keep network disabled unless the test explicitly needs a local test server.
  3. Make every injected failure an in-memory or fixture-controlled event. Never delete real data, revoke real credentials, kill an unrelated process, or mutate a live service to create a failure.
  4. Record the test scope and a run identifier before starting. A missing scope, fixture, or recovery contract makes the verdict inconclusive.

Recovery Contract

Write the invariant before injecting a fault. A useful contract names the state that must survive and the side effects that must not repeat:

After recovery, resume from the latest durable checkpoint, preserve the task
identity and safety policy, spend no more than the remaining retry/deadline
budget, and commit each externally visible effect at most once.

Model the workflow with explicit states. For example:

created -> running -> checkpointed -> waiting_for_tool
                       |                |
                       v                v
                    failed <--------- recovering -> resumed -> completed

For each transition, define the owner, durable fields, allowed retry count, and terminal behavior. In-memory values are not checkpoints unless the harness proves they survive the simulated restart.

Fault Matrix

Select the smallest set of faults that covers the new recovery logic. Do not randomize the schedule until a deterministic schedule has passed.

FaultInjection boundaryRequired observationExpected containment
sandbox denialbefore a tool startsno unsafe side effect; reason is retainedretry only when policy allows
MCP/tool timeoutafter request id is assignedtimeout is attributed to that requestbounded retry with same idempotency key
worker restartafter checkpoint writeworker reloads the same task versionresume from latest checkpoint
missing/stale checkpointbefore resumestale data is rejected or markedstop safely; never invent progress
parallel branch failureone branch after fan-outsibling status is preservedjoin policy decides retry, degrade, or stop
memory lossclear ephemeral contextdurable facts are reconstructedask or stop when required facts are absent
retry/deadline exhaustionon the final attemptno extra call is scheduledterminal failed or timed_out

Deterministic Injection Schedule

Use event numbers rather than wall-clock randomness. A schedule should be portable across harnesses:

{
  "seed": "harness-fixture-07",
  "faults": [
    {"event": "tool.call", "ordinal": 2, "kind": "timeout", "tool": "search"},
    {"event": "worker.start", "ordinal": 2, "kind": "restart"},
    {"event": "branch.join", "ordinal": 1, "kind": "partial_failure", "branch": "summarize"}
  ]
}

The harness should emit the schedule, not merely the seed. Keep fault identity separate from the observed error so a wrapper cannot accidentally turn a timeout into a generic failure. Run the same schedule twice and compare the normalized timeline before trying a different schedule.

Recovery Rules by Boundary

Sandbox and MCP/tool failures

  • Assign a request id and idempotency key before the call.
  • Distinguish timeout, explicit tool error, invalid output, and policy denial.
  • Retry only the declared retryable classes; preserve the original error and attempt count in the evidence.
  • Do not retry a side effect unless the tool contract says the key is safe to replay. A read timeout is not proof that a write did not happen.
  • When the deadline or retry budget is exhausted, emit one terminal event and stop scheduling work.

Worker restart and checkpoints

  • Persist task id, workflow version, state name, completed effects, remaining budgets, and the checkpoint sequence before a restart test.
  • Reload the newest valid checkpoint and reject a future-version or corrupted checkpoint instead of guessing.
  • Verify that resumption does not replay a committed effect. If exactly-once cannot be proven, downgrade the verdict and require reconciliation.

Parallel branches

Represent each branch as its own child attempt. The join record must retain success, failure, timeout, and not-started states. Choose one predeclared join policy:

  • all_required: any required branch failure stops the join;
  • best_effort: continue with an explicit degraded marker;
  • compensate: run a bounded compensating action and then stop or resume.

Never let a successful sibling erase a failed branch from the final ledger.

Memory loss

Clear only the ephemeral context named in the schedule. Rebuild from the checkpoint and durable evidence, then check that the agent does not fabricate missing user intent, tool output, or approval. If a required fact is absent, the safe result is inconclusive or a human clarification state.

Budgets and Terminal Verdicts

Track remaining attempts and remaining time after every event. Do not reset a budget on a worker restart or branch retry. Use these verdicts:

VerdictMeaning
recoveredThe declared invariant held and the workflow completed within budget.
contained_failureThe fault was isolated and the workflow stopped safely as designed.
unrecoverableRecovery violated an invariant, repeated a side effect, crossed a boundary, or exceeded budget.
inconclusiveThe fixture, checkpoint, contract, or evidence was insufficient to judge.

contained_failure is not autonomous success. Report it separately from completed work and include the terminal reason.

Evidence Output

Produce one machine-readable record and one concise human summary. Every event should include run_id, monotonic seq, logical time, state_before, state_after, actor, event, fault_id (when injected), attempt, checkpoint_seq, retry_remaining, deadline_remaining_ms, and a redacted evidence_ref.

{
  "run_id": "fi-2026-08-19-07",
  "verdict": "recovered",
  "invariants": {"resume_from_checkpoint": "pass", "effect_at_most_once": "pass", "budget": "pass"},
  "faults": [{"id": "f1", "kind": "tool_timeout", "at": "tool.call#2", "handled": true}],
  "timeline": [
    {"seq": 4, "event": "checkpoint.write", "checkpoint_seq": 3},
    {"seq": 5, "event": "tool.timeout", "fault_id": "f1", "retry_remaining": 1},
    {"seq": 8, "event": "workflow.completed", "checkpoint_seq": 4}
  ],
  "limitations": ["Tool output was synthetic; no deployed MCP was exercised."]
}

The human summary should state the frozen contract, injected schedule, verdict, failed invariants, budget consumption, and the narrowest next verification. Redact prompts, tokens, private records, and tool payloads; stable references are enough for replay.

Example: Local Harness Run

Fixture: checkout planner / seed harness-fixture-07
Schedule: search timeout on call 2; worker restart after checkpoint 3
Policy: one retry, 2s deadline, all_required branch join

Result: recovered
Proof: checkpoint 3 reloaded, search request key replayed once, no duplicate
commit, deadline remaining 640ms, final ledger contains both branch outcomes.

Best Practices

  • Freeze inputs and schedules so a failure can be replayed from the evidence.
  • Test one boundary at a time, then add a combined schedule for interaction risk.
  • Assert invariants after every recovery transition, not only at final output.
  • Keep attempt-level faults and task-level outcomes in separate ledgers.
  • Treat missing evidence as inconclusive, never as a passing recovery.

Limitations

  • A local stub cannot prove behavior of a deployed model, MCP server, scheduler, filesystem, or network.
  • Deterministic schedules cover named paths; they do not estimate random-fault frequency or discover unknown failure modes.
  • At-most-once effects require an idempotent, observable contract; a timeline alone cannot prove an external write was not duplicated.
  • This skill does not select production SLOs, repair broken workflows, or grant permission to test systems outside the declared sandbox.

Security & Safety Notes

  • Keep tests local-only and read-only by default; use synthetic fixtures and fake credentials that cannot access a real account.
  • Require explicit authorization and a disposable staging boundary before any test that could contact a non-local service.
  • Do not include destructive commands, exploit payloads, credential material, or automatic cleanup of user data in a harness or report.
  • Redact secrets and personal data before storing timelines or attaching them to a pull request.

Common Pitfalls

  • Problem: A retry clears the original timeout and hides the fault. Solution: Keep fault id, original class, attempt, and retry lineage in the ledger.
  • Problem: A restart passes because the test reused in-memory state. Solution: Serialize, clear, and reload only the declared checkpoint fields.
  • Problem: A partial fan-out is reported as success. Solution: Preserve every branch state and apply the predeclared join policy.
  • Problem: A missing checkpoint is replaced with guessed progress. Solution: Stop safely and return inconclusive or unrecoverable with evidence.
  • Problem: A green final answer hides a deadline or duplicate-effect violation. Solution: Gate the verdict on invariants and remaining budget, not output text alone.

Related Skills

  • @agent-evaluation-reporting - Report autonomous, assisted, failed, timed-out, and invalid outcomes.
  • @cross-platform-contract-propagation-audit - Trace recovery fields and status contracts across consumers.
  • @multi-agent-patterns - Choose a multi-agent topology before testing its failure behavior.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

00-andruia-consultant

免费有简介

通过检查代码、目标和限制,评估新的或现有的 AI 项目;核对可用目录中的技能后提出建议,并制定包含依赖关系、完成条件和检查方式的任务清单与实施计划。

  • 规划新 AI 项目的启动
  • 梳理现有项目的技术问题
  • 从可用目录中挑选技能
sickn33/agentic-awesome-skills4.8万2026年10月24日 更新

007

免费有简介

检查代码和基础设施中的安全风险,梳理潜在威胁并规划防护改进。涵盖 OWASP 检查、攻击与防御验证及事件响应;操作范围需获明确授权,并结合具体环境验证结果。

  • 审查代码和基础设施安全
  • 用 STRIDE 或 PASTA 梳理威胁
  • 规划安全配置加固
sickn33/agentic-awesome-skills4.8万2026年10月24日 更新

10-andruia-skill-smith

免费有简介

将重复任务整理成 Andru.ia 技能,明确输入、输出、示例和限制;编写 `SKILL.md`,检查目录结构和验证要求,并准备供审阅的拉取请求。

  • 把重复工作整理成技能
  • 改进现有技能的示例或限制
  • 验证技能并准备拉取请求
sickn33/agentic-awesome-skills4.8万2026年10月24日 更新

项目行业确定后,整理行业背景、可能适用的法规、用户熟悉的界面模式、技术选择和风险,并区分已核实事实、假设及待专家确认的事项。

  • 设计前调查行业特有要求
  • 核对目标地区的法规
  • 研究用户熟悉的界面设计
sickn33/agentic-awesome-skills4.8万2026年10月24日 更新

2slides-ppt-generator

免费有简介

通过 2slides API 将文本、提纲或文档制作为演示稿,可参考图片风格、选择主题、添加人工智能旁白,并导出幻灯片图片或音频。

  • 将文本或提纲制作成演示稿
  • 把文档摘要整理成幻灯片
  • 参考图片风格设计幻灯片
sickn33/agentic-awesome-skills4.8万2026年10月24日 更新

360-feedback-system

免费有简介

规划360度评估或同伴反馈流程,并根据已确认的需求创建空白答复台账。可生成字段一致的CSV、SQL、JSON Schema或Notion属性映射,并将可见范围与评分配置分开整理。

  • 设计匿名同伴反馈流程
  • 创建答复记录CSV台账
  • 统一SQL与JSON Schema字段
sickn33/agentic-awesome-skills4.8万2026年10月24日 更新

查看 sickn33 的全部技能

报告此技能的问题