Demo: aido review - #64
Open
dvirdung wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
aido review |
|
🤖 Hi @dvirdung, I’ve queued your aido review request. Follow progress here: https://github.com/aido-dev/aido/actions/runs/29812281083 |
There was a problem hiding this comment.
This PR introduces several common Python anti-patterns and security vulnerabilities, including a mutable default argument, SQL injection, and a bare except clause. Addressing these issues will significantly improve the code's robustness, security, and maintainability.
Recommendation: Request changes
Faceted Notes:
- Security: Critical SQL injection vulnerability; bare
exceptmasks errors and potential security issues. - Correctness: Mutable default argument leads to unexpected state; missing input validation for order dictionary keys.
- Maintainability: Use of "magic numbers" reduces readability and makes updates difficult; bare
excepthinders debugging. - QA/Testing: Bare
exceptswallows all errors, making testing for specific failure modes difficult; lack of input validation can lead to runtime errors.
Response generated using gemini-2.5-flash
| total = total * 0.8 | ||
| if total > 1000: | ||
| total = total - 50 # magic number | ||
| return total |
There was a problem hiding this comment.
🟠 [HIGH] Mutable default argument coupons=[]. This list will be shared across all calls to apply_discount, leading to unexpected behavior.
Suggested change
| return total | |
| def apply_discount(total, tier, coupons=None): | |
| if coupons is None: | |
| coupons = [] | |
| coupons.append("applied") # mutable default arg bug |
dvirdung
added a commit
that referenced
this pull request
Jul 27, 2026
Surface real Aido output above the fold so a visitor can judge quality without installing. Adds a per-command demo-PR gallery (#64-69), two collapsed real-output samples (review bug-catching, explain walkthrough), a 60-second start, and points the Demo PRs badge at the new section. GIF hero slot is scaffolded but commented out until the recording lands (docs/media/ + shot list), so nothing renders broken in the meantime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sample order-processing code with a deliberate mix of patterns (mutable default arg, bare except, string-built SQL, magic numbers, missing validation) to showcase
aido review— consolidated review + applyable inline suggestions.Comment
aido reviewto see it in action. Part of the Aido demo set.