鼎味肉市DESIGN ATELIER
← 资料目录docs/rules/bugfix-review.md阅读原文

Bugfix Review Rule


rule_id: R-P06 legacy_id: "024" category: Process status: locked owner: Project Manager / Architect / Verifier scope: bugfixes, regressions, state machines, read models, data repair, admin/API contracts

1. Rule

Do not start a bugfix review from the diff.

First define a Closing Contract: field-level assertions proving what must be true after the fix.

2. Closing Contract Minimum

Before diff review, write:

Closing Contract
- user-visible contradiction:
- states that must not reappear:
- API fields and values that must change:
- data pollution to repair:
- historical samples to regress:
- tests that fail before and pass after:

Use executable assertions when possible:

assert progress.current_stage == "waiting_dependency"
assert progress.progress_percent < 100
assert response["reason"] == "waiting_kyc"

3. Bug ID Assignment

Parallel QA agents do not allocate bug IDs by themselves.

Use one of these flows:

If two reports describe the same defect, keep one canonical BUG and mark the other duplicate in its status/history.

4. Review Layers

Layer Check
state machine status, stage, reason, terminal states, retry, dependency
data model fields, identity, aggregation keys, null meaning, migration/backfill
flow paths write path, read path, retry/fallback, admin/API/manual path
tests old behavior fails, new behavior passes, historical samples regress

5. Test Validity Questions

Ask:

6. Data Repair Gates

Any write repair must include:

7. Output

Bugfix review output must include:

8. Forbidden