Skip to content

Intentional bug: invert blur detection condition in image quality scorer - #18

Draft
Anandb71 with Copilot wants to merge 6 commits into
main-1from
copilot/introduce-intentional-bug
Draft

Intentional bug: invert blur detection condition in image quality scorer#18
Anandb71 with Copilot wants to merge 6 commits into
main-1from
copilot/introduce-intentional-bug

Conversation

Copilot AI commented Apr 13, 2026

Copy link
Copy Markdown
  • Introduce small intentional bug: invert brightness detection condition (> instead of <) on line 42 of backend/app/services/quality.py
Original prompt

Create a pull request in repository Anandb71/FinShield that intentionally introduces a small, obvious bug for testing/demo purposes.

Requirements:

  1. Make a minimal code change that clearly introduces a bug (e.g., inverted condition, off-by-one error, or incorrect operator) in existing source code.
  2. Ensure the change is syntactically valid and can be committed.
  3. Keep the scope small (single file preferred).
  4. In the PR description, explicitly state:
    • that the bug is intentional,
    • what exact change introduced it,
    • expected incorrect behavior,
    • and how to revert/fix it.
  5. Use a clear branch name indicating intentional bug insertion.
  6. Open the PR against the repository’s default base branch unless a more appropriate base is detected.

Return the PR URL and summarize the intentional bug introduced.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: create a pr , intentional bug or something and tell me what it is

Assistant: I can do that, but I need one clarification before I proceed:

Do you want me to open a PR against Anandb71/FinShield that intentionally introduces a bug, and then explain exactly what the bug is in the PR description/message?

User: yes

Assistant: I’m waiting on your confirmation in the GitHub dialog (approve/reject) to continue and finish creating that PR.

This pull request was created from Copilot chat.

@Anandb71

Copy link
Copy Markdown
Owner

/fix

@presolution-ai

presolution-ai Bot commented Apr 13, 2026

Copy link
Copy Markdown

✅ PResolution — Fix Committed!

I've applied the fix and committed it to this branch.

Detail Value
File backend/app/services/quality.py
Commit 53c9c53
Time 8.4s

💡 Tip: Review the commit to make sure the fix looks correct. If it's not quite right, leave another comment and I'll try again!

Applied reviewer's suggested fix.

Co-authored-by: PResolution Bot <presolution[bot]@users.noreply.github.com>
Reviewed-by: @Anandb71
Copilot AI changed the title [WIP] Introduce intentional bug for testing/demo purposes Intentional bug: invert blur detection condition in image quality scorer Apr 13, 2026
Copilot AI requested a review from Anandb71 April 13, 2026 20:54
@Anandb71

Copy link
Copy Markdown
Owner

@copilot check if its fixed

Copilot AI commented Apr 13, 2026

Copy link
Copy Markdown
Author

@copilot check if its fixed

Yes, it's fixed. Line 40 of backend/app/services/quality.py is back to the correct if blur_metric < 50: condition (commit 53c9c53). Low Laplacian variance correctly triggers the "High blur detected" warning again.

@Anandb71

Copy link
Copy Markdown
Owner

/fix

@presolution-ai

presolution-ai Bot commented Apr 19, 2026

Copy link
Copy Markdown

✅ PResolution — Fix Committed!

I've applied the fix and committed it to this branch.

Detail Value
File backend/app/services/quality.py
Commit b142823
Time 9.5s

💡 Tip: Review the commit to make sure the fix looks correct. If it's not quite right, leave another comment and I'll try again!

Reverted blur detection condition to use '< 50' so that high blur is correctly flagged.

Co-authored-by: PResolution Bot <presolution[bot]@users.noreply.github.com>
Reviewed-by: @Anandb71
@Anandb71

Copy link
Copy Markdown
Owner

/fix

@presolution-ai

Copy link
Copy Markdown

🛠️ PResolution — Temporarily Paused

The bot is currently in maintenance mode, so I did not make any code changes.

Reason: The bot is paused by admin maintenance mode.

Processing time: 0ms

💡 Turn off maintenance mode in the admin portal to resume fix generation.

@Anandb71

Copy link
Copy Markdown
Owner

/fix

@presolution-ai

presolution-ai Bot commented Apr 20, 2026

Copy link
Copy Markdown

❌ PResolution — Fix Failed

I wasn't able to generate a fix for this review comment.

Reason: Could not determine which file to fix. Please make sure the review comment is on a specific file.

Processing time: 2.3s

💡 Tips:

  • Make sure the review comment clearly describes the issue
  • Try adding specific instructions: @PResolve /fix add a null check before the loop
  • Check that I have write access to this repository

@Anandb71

Copy link
Copy Markdown
Owner

@copilot do it again small intentional bug

@Anandb71 Anandb71 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

/fix

@Anandb71

Copy link
Copy Markdown
Owner

/fix

@presolution-ai

presolution-ai Bot commented Apr 20, 2026

Copy link
Copy Markdown

✅ PResolution — Fix Committed!

I've applied the fix and committed it to this branch.

Detail Value
File backend/app/services/quality.py
Commit 50a8e34
Time 8.2s

💡 Tip: Review the commit to make sure the fix looks correct. If it's not quite right, leave another comment and I'll try again!

Reverted brightness detection condition to correctly flag low brightness when brightness is below 60.

Co-authored-by: PResolution Bot <presolution[bot]@users.noreply.github.com>
Reviewed-by: @Anandb71
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.

2 participants