reproduce-bug
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReproduce Bug
复现缺陷
When to Use
使用时机
Use for the reproduction step of with one and a local
baseline checkout. Read the record contract.
Before target commands, follow its project guidance.
patching-bugsfinding.json用于 的复现阶段,配合一份 和本地基线检出副本。阅读记录契约。
执行目标命令前,遵循其中的项目指南。
patching-bugsfinding.jsonWhen NOT to Use
不适用场景
Do not use for bug discovery, patching, or a claim that cannot be exercised locally.
Report a blocker when the build or environment cannot exercise the claim.
不用于发现缺陷、修补缺陷,或验证无法在本地演练的主张。
如果构建或环境无法验证该主张,请报告 blocker。
Procedure
操作步骤
-
Selectfrom the record contract. Build the current baseline with the project's own command. Exercise the planned scoped inputs before any edit and retain their observations, including valid controls. Save raw stdout, stderr, exit status, and timing. If the behavior is absent with trustworthy evidence, report
failure_type; if setup or observations are unreliable, reportnot_reproduced.blocked -
Runtime: exercise the builtwith a PoC that records
target_artifactas defined in the contract, then printsPATCH_LOADEDimmediately before the assertion. Exit nonzero for the bug, zero otherwise; a setup crash is inconclusive. Compile: record the targetPATCH_REACHEDfrom the failed compiler invocation; use emptyexpected_diagnosticand nullpoc_argv.target_artifact -
Save any unchanged PoC source underand raw receipts under
reproduce/poc/. Writereproduce/receipts/with the baseline commit, command argument arrays, artifact path, observed result, outcome, and your agent identity. Setreproduce.jsontofinding.statusorreproducedfrom the result. If reproduction isnot_reproduced, leaveblockedasfinding.status.hypothesisReproduce record schema:
json
{
"schema_version": 1,
"failure_type": "runtime",
"outcome": "reproduced",
"baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"build_argv": ["python", "build.py"],
"poc_argv": ["python", "poc.py"],
"target_artifact": "dist/app.py",
"observed": "The PoC wrote outside uploads after PATCH_REACHED.",
"blocker": null,
"agent": "reproducer-1"
}- Manifest the complete directory, including the PoC and record, using the record helper: run
reproduce/. Then check the record before handoff. Stateuv run --no-project <script> manifest <reproduce-step-dir>with the actual failure when build or setup prevents a valid run.blocked
-
按照记录契约选择。使用项目自身的命令构建当前基线。在进行任何编辑前,演练计划范围内的输入,并保留观察结果,包括有效对照项。保存原始 stdout、stderr、退出状态和耗时。如果有可信证据表明未出现该行为,则报告
failure_type;如果设置过程或观察结果不可靠,则报告not_reproduced。blocked -
运行时:使用 PoC 演练已构建的,按契约定义记录
target_artifact,然后在断言前立即输出PATCH_LOADED。出现缺陷时以非零状态退出,否则以零状态退出;设置过程崩溃时无法得出结论。 编译器:从失败的编译器调用中记录目标PATCH_REACHED;使用空的expected_diagnostic和 nullpoc_argv。target_artifact -
将任何未经修改的 PoC 源代码保存在下,并将原始回执保存在
reproduce/poc/下。编写reproduce/receipts/,其中包含基线提交、命令参数数组、制品路径、观察结果、结果和 Agent 身份。根据结果将reproduce.json设置为finding.status或reproduced。 如果复现结果为not_reproduced,则将blocked保持为finding.status。hypothesis复现记录 Schema:
json
{
"schema_version": 1,
"failure_type": "runtime",
"outcome": "reproduced",
"baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"build_argv": ["python", "build.py"],
"poc_argv": ["python", "poc.py"],
"target_artifact": "dist/app.py",
"observed": "The PoC wrote outside uploads after PATCH_REACHED.",
"blocker": null,
"agent": "reproducer-1"
}- 使用记录辅助脚本为完整的 目录生成清单,其中应包含 PoC 和记录:运行
reproduce/。然后在交付前检查记录。如果构建或设置过程导致无法进行有效运行,请说明uv run --no-project <script> manifest <reproduce-step-dir>及实际失败情况。blocked
Rationalizations to Reject
应拒绝的简化做法
| Shortcut | Required action |
|---|---|
| A unit test imitates the bug. | Exercise the target compiler or built runtime artifact. |
| A nonzero exit proves reproduction. | Require the target diagnostic, or runtime marker and assertion. |
| 简化做法 | 必须采取的操作 |
|---|---|
| 使用单元测试模拟缺陷。 | 演练目标编译器或已构建的运行时制品。 |
| 以非零退出状态证明已复现。 | 必须获取目标诊断,或运行时标记和断言。 |