Skip to content

fix: extend bad_spec to cover data-loss findings within story domain#2139

Open
gabadi wants to merge 2 commits intobmad-code-org:mainfrom
gabadi:fix/quick-dev-review-data-loss-classification
Open

fix: extend bad_spec to cover data-loss findings within story domain#2139
gabadi wants to merge 2 commits intobmad-code-org:mainfrom
gabadi:fix/quick-dev-review-data-loss-classification

Conversation

@gabadi
Copy link
Copy Markdown
Contributor

@gabadi gabadi commented Mar 27, 2026

What

Extends the bad_spec classification in quick-dev step-04-review to cover findings where data is silently dropped or never reaches its destination within the story's domain — even if the code predates the diff.

Why

In a real-world quick-dev run, an edge case hunter correctly identified a missing field mapping (data silently dropped at a domain boundary). The finding was misclassified as defer because the diff didn't touch that line. The bug shipped and was only caught by human review.

Fixes #2138

How

  • Added one sentence to the bad_spec definition in step-04-review.md: data-loss findings within the story's domain qualify as bad_spec, not defer
  • No changes to defer definition — the gate lives where the reviewer looks when deciding what qualifies as bad_spec

Testing

Validated through adversarial review and edge case analysis of the proposed change. The rule correctly reclassifies the original finding (missing learningPopulation on CreditCheck builder) as bad_spec while leaving genuinely out-of-scope pre-existing issues as defer.

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 27, 2026

🤖 Augment PR Summary

Summary: Extends the quick-dev step-04-review guidance so in-scope data-loss findings are treated as bad_spec rather than defer.
Why: Prevents silently-dropped data issues at story-domain boundaries from being misclassified and shipped when the underlying code predates the current diff.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

2. Classify each finding. The first three categories are **this story's problem** — caused or exposed by the current change. The last two are **not this story's problem**.
- **intent_gap** — caused by the change; cannot be resolved from the spec because the captured intent is incomplete. Do not infer intent unless there is exactly one possible reading.
- **bad_spec** — caused by the change, including direct deviations from spec. The spec should have been clear enough to prevent it. When in doubt between bad_spec and patch, prefer bad_spec — a spec-level fix is more likely to produce coherent code.
- **bad_spec** — caused by the change, including direct deviations from spec. The spec should have been clear enough to prevent it. When in doubt between bad_spec and patch, prefer bad_spec — a spec-level fix is more likely to produce coherent code. Also applies when a finding reveals data silently dropped or never reaching its destination within the story's domain — even if the code predates the diff.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bad_spec definition still starts with “caused by the change” but then says it applies even if the code predates the diff, which could confuse reviewers about when pre-existing issues should be treated as this story’s problem. Consider clarifying what qualifies as “within the story’s domain” (and whether being merely in-scope vs. caused/exposed-by-change is the deciding factor) to keep classifications consistent.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3357d1cf-91d1-4439-afd9-1dc4148b7b65

📥 Commits

Reviewing files that changed from the base of the PR and between 1040c3c and 229c1c5.

📒 Files selected for processing (1)
  • src/bmm-skills/4-implementation/bmad-quick-dev/step-04-review.md

📝 Walkthrough

Walkthrough

Documentation update to the quick-dev review classification process. The bad_spec category definition is expanded to include findings where data is silently dropped or fails to reach its intended destination within the story's domain, regardless of whether the code predates the change.

Changes

Cohort / File(s) Summary
Quick-Dev Review Documentation
src/bmm-skills/4-implementation/bmad-quick-dev/step-04-review.md
Expanded bad_spec classification to cover data-loss findings (silent drops or missed destinations) within the story's domain, preventing misclassification as pre-existing findings when they fall under initiative scope.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • BMAD-METHOD#2007: Introduces or relates to the five-category review-finding classification system (including bad_spec) that this PR refines.

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: extending bad_spec to cover data-loss findings within the story domain, matching the actual modification to the review classification definition.
Description check ✅ Passed The description clearly explains what, why, and how the change addresses the problem, with relevant context about the real-world scenario that motivated the fix.
Linked Issues check ✅ Passed The PR fully addresses issue #2138 by extending the bad_spec definition to include data-loss findings within the story's domain, preventing misclassification as defer.
Out of Scope Changes check ✅ Passed The changes are narrowly scoped to the bad_spec definition in step-04-review.md, directly addressing issue #2138 without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: quick-dev review classification misses data-loss findings as defer

1 participant