From 4b99a16b44ac10abe025a619e84482ed56c2123d Mon Sep 17 00:00:00 2001 From: GCWing Date: Fri, 6 Nov 2026 15:13:41 +0800 Subject: [PATCH] docs: keep pre-fix checks local --- AGENTS-CN.md | 15 +++------------ AGENTS.md | 23 +++++------------------ 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/AGENTS-CN.md b/AGENTS-CN.md index 57b2844839..3d42b0a173 100644 --- a/AGENTS-CN.md +++ b/AGENTS-CN.md @@ -66,18 +66,9 @@ Web UI、mobile、CLI、Desktop、Installer、打包及 focused test 命令由 ### 修复 bug 前先检查已有修复 -OpenBitFun 目前约每周发布一个版本,用户反馈的可能是已发布版本中的问题,而 `main` 上 -已经修复,或已有未合并 PR 正在处理。**修改 bug 相关代码前,必须同时检查:** - -- **最新 `main`:** 在不影响本地工作的前提下刷新上游 `main` 引用,阅读相关实现、测试 - 和提交历史。结合已知的反馈版本与复现条件,根据代码和实际行为判断,不能只看提交标题。 -- **未合并 PR(包括草稿):** 按问题现象和受影响模块检索,阅读相关 diff,确认是否覆盖 - 同一根因及场景,不能仅凭标题相似就认定已经有人处理。 - -若 `main` 已修复,应给出对应提交或代码依据,并说明是否已发布,避免重复实现。 -若已有 PR 覆盖,应引用该 PR,复用或协调已有工作,只针对确认尚未覆盖的部分补充修改。 -开始新修复前先说明检查结论;若无法访问上游代码或 PR,应明确说明未核实的范围,不能 -据此断言问题尚无人解决。 +修改 bug 相关代码前,只检查相关的本地代码和本地 Git 提交历史。结合已知的反馈版本和 +复现条件,判断已有修复是否覆盖该问题。开始新修复前先说明检查结论。若本地已有修复, +应给出对应的代码或提交依据,避免重复实现。 ### 流程产物 diff --git a/AGENTS.md b/AGENTS.md index 2b64c51a0c..2704ec7ac3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -83,24 +83,11 @@ commands, use the nearest local guide. The full script registry remains in ### Check for existing bug fixes before editing -OpenBitFun currently releases roughly once a week, so a user report may describe -a released version whose bug is already fixed on `main` or being addressed in an -open PR. **Before changing code for a bug, check both:** - -- **Latest `main`:** refresh the upstream `main` ref without disturbing local - work, then inspect the relevant implementation, tests, and commit history. - Check the reported version and reproduction conditions when available; base - the conclusion on code and behavior, not commit titles alone. -- **Open PRs, including drafts:** search by symptoms and affected modules, then - inspect relevant diffs to establish whether they cover the same root cause - and scenario. A similar title alone does not establish coverage. - -If `main` already contains the fix, report the supporting commit/code and whether -it is released; do not implement it again. If an open PR covers it, link that PR -and build on or coordinate with the existing work; limit new changes to verified -gaps. Record the check result before starting a new fix. If upstream code or PRs -cannot be checked, state that limitation explicitly instead of claiming that no -fix exists. +Before changing code for a bug, check only the relevant local code and local Git +commit history. Use the reported version and reproduction conditions when +available to determine whether an existing fix covers the report. Record the +result before starting a new fix. If a fix already exists locally, cite the +supporting code or commit to avoid duplicating it. ### Process artifacts