runtime-probes
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRuntime probes
Runtime探测
The twin of the spec-probes skill on the other side of the code. That one probes a requirement before anything runs. This one probes the running system after. Reach for it when nothing has been reported and the job is to find out what is wrong.
Two failure modes shape the design. An unbounded probe run burns budget and returns noise. A promoted finding no caller can reach wastes a maintainer's day. Pass 1 bounds the search. Pass 2 bounds what escapes it.
它是代码另一端spec-probes技能的孪生技能。后者在代码运行前探测需求,而本技能在系统运行后对其进行探测。当没有任何缺陷报告,任务是找出问题所在时,可使用本技能。
设计时考虑了两种失效模式:无限制的探测会消耗资源并返回无效信息;而真实用户无法触发的问题会浪费维护者的时间。第一阶段限制搜索范围,第二阶段限制最终输出的内容。
Before either pass
探测前准备
Name the scope, the surface, and the stop predicate, in that order.
Scope. A PR diff, one feature, or a whole product. For a diff, take the change map from the blast-radius skill and probe what it names rather than re-deriving it.
Surface. Probes run against the real thing through the project's driver, which the create-verification-skill skill builds when the project has none. A probe that never reached the running surface is , never a pass.
verify-<app>not runStop predicate. A budget and a floor, both written down before the first probe. "Two hours or four hundred probes, whichever comes first, and never fewer than ten probes per entry point" is the shape. The budget ends a run that is finding nothing. The floor stops a run ending early because it got lucky on probe three. When a loop-governance suite is installed, hand it the outer loop and keep this skill as the method that loop runs; otherwise this predicate bounds the run.
Open a through the show-me-your-work skill, one row per probe: id, entry point, category, probe, observed, reproduces, state, reason. A probe that produced no finding is , , or . Otherwise the row carries that finding's state from Pass 2. carries the dismissal reason, the guard name on a gap, or the open question on an escalation. Keep it out of the tree so it survives reverts.
findings.tsvpassnot rununclassifiedreason按顺序确定范围、界面和终止条件。
范围:PR差异、单个功能或整个产品。针对PR差异,可从blast-radius技能获取变更映射,直接探测其指定内容,无需重新推导。
界面:通过项目的驱动程序对真实系统进行探测,若项目没有该驱动,可使用create-verification-skill技能生成。未触达运行界面的探测标记为,而非通过。
verify-<app>not run终止条件:需提前记录资源预算和最低探测次数。例如“两小时或四百次探测,以先到者为准,且每个入口点的探测次数不得少于十次”。预算用于终止未发现任何问题的探测,最低次数则避免因前三次探测就发现问题而提前终止。若已安装循环治理套件,可将外部循环交由其处理,本技能作为循环执行的方法;否则,该条件将限制探测的运行。
通过show-me-your-work技能打开文件,每行记录一次探测:id、入口点、分类、探测内容、观测结果、可复现性、状态、理由。未发现问题的探测标记为、或。其他行则记录第二阶段后的问题状态。字段记录驳回理由、缺口对应的防护名称,或升级时的待解决问题。将该文件放在版本树之外,以便在代码回滚时保留记录。
findings.tsvpassnot rununclassifiedreasonPass 1: probe
第一阶段:探测
Inventory the entry points, classify each by shape, then raise only the categories whose shapes intersect it. A read-only query is never asked about interrupted sequences. The taxonomy is closed on purpose. Eight categories cleared beat forty nobody finishes.
| Category | Shapes | Probe |
|---|---|---|
| Malformed input | | What happens on the wrong type, the wrong encoding, or a field the caller was never meant to send? |
| Extreme size | | What happens at zero, at one, and far past the largest realistic value? |
| Interrupted sequence | | What survives when the operation is abandoned halfway by a closed tab, a killed process, or a dropped connection? |
| Repeat and replay | | What happens on the double submit, the back button, the retried request? |
| Stale state | | What happens when the client acts on state the server has since changed? |
| Dependency failure | | What does the user see when the thing it calls errors, returns nothing, or is gone? |
| Dependency slowness | | What happens when the call takes ten seconds instead of ten milliseconds? |
| Concurrent actors | | What happens when two actors touch the same record, file, or key at once? |
Fan the probes out with the swarm skill, partitioned by entry point. That skill resolves its own worker model and effort, so do not restate the choice here. Workers report , , or with evidence, which is swarm's own contract. Do not mint a second one.
PASSISSUESBLOCKEDAn entry point with no matching shape gets one soft "unclassified, probe by hand" row, not silence.
盘点所有入口点,按类型分类,仅针对与入口点类型匹配的分类进行探测。例如,只读查询无需测试中断序列。分类法是封闭的,完成8个明确分类的探测远胜于40个未完成的分类。
| 分类 | 类型 | 探测内容 |
|---|---|---|
| 畸形输入 | | 输入错误类型、错误编码或调用者不应发送的字段时,系统会如何处理? |
| 极端大小 | | 输入值为零、一或远超实际合理最大值时,系统会如何处理? |
| 中断序列 | | 当操作因标签页关闭、进程终止或连接中断而中途放弃时,哪些状态会保留? |
| 重复与重放 | | 重复提交、点击返回按钮或重试请求时,系统会如何处理? |
| 过期状态 | | 当客户端基于服务器已更新的状态执行操作时,系统会如何处理? |
| 依赖失效 | | 当依赖服务报错、无返回或不可用时,用户会看到什么? |
| 依赖延迟 | | 当调用耗时从10毫秒变为10秒时,系统会如何处理? |
| 并发操作 | | 当两个操作同时访问同一记录、文件或键时,系统会如何处理? |
使用swarm技能按入口点拆分探测任务,该技能会自行解决工作模型和执行力度问题,无需在此重复说明。工作节点会返回、或状态及证据,这是swarm技能的既定约定,无需另行定义。
PASSISSUESBLOCKED无匹配类型的入口点需添加一行“unclassified, probe by hand”(未分类,手动探测),而非留空。
Pass 2: promote
第二阶段:筛选
Every worker finding is a hypothesis. Judge each on your configured model, with its configured effort per the pstack-harness skill. A finding promotes only when all three hold.
judgment and prose- It reproduces. The harness replays it from a clean start and it fails again. A finding the harness cannot replay on demand does not promote, whatever the transcript showed.
- A real caller can reach it. Name the caller and the path from a real entry point to the failure. Strict reachability means a defect behind a guard no caller gets past does not promote.
- A maintainer would take the fix. The consequence is user-visible, data-affecting, or crosses a security or privacy boundary. Internal untidiness is not a defect.
Triage every finding against the / / rubric in , whose three verdicts are tagged on the states below. Record a learned dismissal pattern there in its own format instead of re-deriving it next run.
fixdismissask../poteto-mode/references/bugbot-triage.mdEach finding ends the run in exactly one state.
- promoted (): it clears all three conditions. It earns a regression test and a row in the issue list.
fix - dismissed (), with a reason. "Unreachable, the one caller validates this field against a bounded enum" is valid. Silence is not.
dismiss - gap: it reproduces but fails condition 2, and the row names the guard that makes it unreachable. Strict reachability buys a finding list nobody has to re-litigate. It costs you this row. Delete that guard later and the gap goes live, so the guard's name is the whole value of keeping the row. This state is produced by condition 2, not by the rubric, so it carries no rubric tag.
- escalated (): you cannot settle condition 2 or 3 yourself, and the finding touches security, privacy, auth, billing, data retention, or a permission boundary. Ask the user. Never spend an unsure call on a dismissal in those categories, which is that rubric's own standing rule. The run ends here for that finding, not the finding itself. Once the answer comes back it becomes promoted, dismissed, or a gap.
ask
每个工作节点发现的问题都是一个假设。需根据配置的模型,结合pstack-harness技能配置的执行力度进行判断。只有同时满足以下三个条件的问题才会被筛选通过:
judgment and prose- 可复现:从干净状态重新执行探测,问题会再次出现。无论记录显示如何,无法按需复现的问题不会被筛选通过。
- 真实用户可触发:明确指出触发问题的用户类型及从真实入口点到故障的路径。严格的可达性要求意味着,用户无法绕过防护措施触发的缺陷不会被筛选通过。
- 维护者会修复:问题会对用户可见、影响数据,或违反安全/隐私边界。内部代码不整洁不属于缺陷。
需根据中的准则对每个问题进行分类,三个 verdict 会标记在以下状态中。按指定格式在该文档中记录已验证的驳回模式,避免下次探测时重新推导。
../poteto-mode/references/bugbot-triage.md修复/驳回/询问每个问题最终会处于以下状态之一:
- promoted(已通过)():满足所有三个条件。需添加回归测试,并在问题列表中记录。
fix - dismissed(已驳回)():附上理由。例如“无法触发,唯一调用者已针对该字段验证了有限枚举值”是有效的理由,不能留空。
dismiss - gap(缺口):可复现但不满足条件2,记录中需注明阻止用户触发的防护措施名称。严格的可达性确保问题列表无需反复争论,但会产生该行记录。后续若移除该防护措施,缺口将变为可触发状态,因此防护措施名称是保留该行记录的核心价值。该状态由条件2产生,而非准则,因此不标记准则标签。
- escalated(已升级)():无法自行判断条件2或3,且问题涉及安全、隐私、认证、计费、数据保留或权限边界。需询问用户。对于这些分类的问题,切勿在不确定时驳回,这是准则的既定规则。该状态仅终止当前探测流程,问题本身仍需处理。待得到回复后,问题会变为已通过、已驳回或缺口状态。
ask
Residue
残留处理
The probe harness is the artifact, so commit it. A reviewer reruns it.
Each promoted finding becomes one failing test staged before its fix per the poteto-tdd skill, and the fix itself runs the Bug fix playbook (), one finding at a time. Do not batch fixes into one commit.
../poteto-mode/playbooks/bug-fix.mdA promoted test asserts an invariant, not a transcript. "Rejects a quantity below zero" survives a refactor. "Returns this exact error string for this exact byte sequence" does not. Put every promoted test through the verify-commands skill before it lands, because a generated test that passes green while measuring nothing is worse than no test at all.
Reply: scope and surface, the stop predicate and whether it was met, probes run per entry point, each promoted finding on one line with its test, the dismissed count, every gap with its named guard, every escalated finding with the question it needs answered, and the path.
findings.tsv探测工具是核心产物,需提交至版本库。评审者可重新运行该工具。
每个通过的问题需按照poteto-tdd技能的要求,在修复前添加一个失败测试,修复过程需遵循Bug修复手册(),逐个处理问题,切勿将多个修复合并为一次提交。
../poteto-mode/playbooks/bug-fix.md通过的测试需断言不变量,而非具体记录。例如“拒绝小于零的数值”在重构后仍有效,而“针对该字节序列返回此精确错误字符串”则无效。在提交测试前,需通过verify-commands技能验证,因为一个看似通过但未实际验证任何内容的生成测试,比没有测试更糟糕。
回复内容:范围和界面、终止条件及是否满足、每个入口点的探测次数、每个通过的问题(含对应测试)各占一行、驳回的问题数量、每个缺口(含对应的防护名称)、每个升级的问题(含待解答的问题),以及文件路径。
findings.tsv