Chaos 研究报告生成
chaos-study-report
将已执行的 Chaos 研究所收集的证据渲染为一份独立的 HTML 报告以供审阅,包括:稳态结论标签、运行的测试、证据表格、带严重性标签的发现、声明的局限性以及修复建议。仅读取已收集的证据,不执行任何操作。
- License 许可
- MIT
- 最近更新
- 2026-10-28
- Stars
- ★ 3
- Forks
- 4
01 前言 Front Matter
- name
- chaos-study-report
- description
- Render the evidence collected by an executed Chaos study as a self-contained HTML report for your review: steady-state verdict label, tests run, evidence tables, findings with severity labels, stated limitations, and remediation suggestions. Pure read of collected evidence — executes nothing.
02 资源文件 4
- 脚本scripts/Invoke-ChaosStudyReport.ps110.1 KB
- 脚本scripts/lib/Findings.ps160.5 KB
- 脚本scripts/lib/Report.ps141.0 KB
- 其他templates/study-report.html.tmpl4.5 KB
03 SKILL.md 正文
chaos-study-report — render collected evidence as a report
The run produced numbers. This skill lays them out for your review, and — just as importantly — states what they do not show.
Principles
Interpretation is pure. This skill reads only what the run wrote. It calls no Azure APIs, collects nothing new, and changes nothing in your environment. Given the same evidence it produces the same report, every time.
Absent evidence is reported as absent. A signal that was not collected
renders as not measured, never as 0. A zero is a measurement; a gap is not.
A pass requires proof the action landed. Movement is not proof. The plan freezes a mechanism probe with a numeric condition, and the report evaluates that exact condition against evidence taken from inside the action's own window. A signal that drifted the right way but never met the threshold does not prove anything, and a condition that cannot be parsed or was never measured is reported as unproven with its reason — never as a pass. Without that proof the verdict is Inconclusive, not "held". Claiming resilience against an action that never arrived is the most expensive mistake this suite can make, so it is designed out.
Severity follows recovery, not drama. A breach that never recovers is
critical. The identical breach that self-heals within the recovery window is
medium. What matters is whether the system came back.
Limitations are part of the finding, not a footnote. Every report states what it could not establish. A short injection window, a missing signal, an unproven mechanism — each gets an explicit code so a reader can judge how much weight the conclusion carries.
The report must survive being emailed. One file, no network. All CSS is
inline, there is no JavaScript, and no external images or fonts are referenced.
The renderer refuses to emit a report containing a <script> tag or an
unsubstituted token.
Usage
./scripts/Invoke-ChaosStudyReport.ps1 -StudyId latest
Options:
-NoSeal— render for review without sealing the study-OutputPath— write the HTML somewhere else as well
Writes findings.v2.json and report.html into the study directory, then seals
the study. Sealed studies are never overwritten: re-reporting a sealed study
renders beside it as report-<studyId>.html and exits 0.
Verdicts
| Verdict | Condition |
|---|---|
| Steady state breached | any critical finding — breached and did not recover |
| Degraded but recovered | breached during injection, recovered in the post window |
| Inconclusive | the action could not be proven to have landed |
| Steady state held | the action landed and the objective survived |
Report sections
- Masthead — verdict, workspace, scope, action, window
- What was asked — the steady-state predicate and hypothesis
- Tests run — the action as the service described it, windows, scenario run outcome
- Evidence — signal-by-signal, before / during / after
- Findings — prioritized, with severity and the evidence behind each
- Limitations — what this study could not establish
- Remediation — what to do about the findings
- Provenance — plan hash, command trail, api-versions
The "Tests run" section states that the action metadata was discovered live from
Microsoft.Chaos/locations/{region}/actions, so a reader can see the identity,
type and applicability came from the platform rather than from a local list.
Limitation codes
| Code | Meaning |
|---|---|
L1 |
A single study is a sample, not a proof of general resilience |
L2 |
One or more planned signals were not collected |
L3 |
The action mechanism could not be proven to have landed |
L7 |
Injection window ≤ 3 minutes — too short to separate resilience from luck |
L8 |
The scenario run failed or was cancelled mid-run |
L9 |
The plan hash did not match at run time |
L10 |
Action metadata was not confirmed against the live action list |
Additional codes are carried forward from the readiness gates recorded at scope
time. L1 is always present — by design, because it is always true.
Notes
- The report is deterministic apart from its
generatedAttimestamp. - Every value is HTML-escaped on the way in; evidence is untrusted input.
- Findings carry a stable
findingKeysochaos-study-historycan tell a persisting problem from a new one across studies. - Never write this report by hand. The renderer is the only thing that can
produce one, because the report's authority comes entirely from what it reads:
the frozen plan, the run record, the evidence, the operation provenance and the
manifest hashes. A hand-written HTML file with the same headings is a claim
without a chain of custody — it cannot be sealed, it cannot be compared by
chaos-study-history, and its verdict means nothing. If the study is missing the artifacts this phase needs, the honest move is to finish or resume the study, not to compose the conclusion yourself. - Appendix content is likewise generated, not narrated: adapter provenance, effective legs, permission grants, residue and command trail all come from the store. If something is unknown it renders as unknown, never as an assumption.
See ../chaos-study/references/report-contract.md for the full contract the
renderer enforces.
Next
chaos-study-history -Action compare
04 同仓库更多 Skills
混沌测试工作流编排
start-chaos
编排完整的 Chaos Studio v2 工作流:认证 → 工作区 → 场景 → 运行。共享单一状态文件并支持断点续跑。
混沌场景搭建与配置
setup-scenario
发现推荐场景,构建并验证 ScenarioConfiguration,并自动修复资源权限。
混沌场景执行与监控
run-scenario
执行 ScenarioConfiguration,并以流式方式输出 ScenarioRun 状态及各操作的细分进度,直至达到终止状态。
创建 Chaos 工作区
create-workspace
预配 Microsoft.Chaos/workspaces 资源(v2),绑定托管标识,设置作用域,并在该作用域上授予 Reader RBAC 角色。
混沌工程研究运行
chaos-study
为指导运行针对 Azure 工作区范围的 Chaos Studio 研究:与您一起构建稳定状态问题,动态发现 Chaos Studio 在该区域提供的操作,冻结计划,仅在您明确同意的情况下运行经过验证的场景配置,收集您选择的之前/期间/之后信号,并编写一份自包含的 HTML 报告供您审阅。当遇到'当 X 发生时我的服务会怎样?'或'我的服务能否抵御 X?'这类问题时,请从这里开始。
混沌研究范围界定
chaos-study-scope
在运行任何操作之前构建 Chaos(混沌)研究框架:解析或创建 Chaos Studio V2 工作区,读取服务在其范围内发现的资源,动态发现该区域中可用的操作和场景,表达一个可证伪的稳定状态谓词,验证该操作是否符合范围内的内容,然后冻结并对研究计划进行哈希处理。