Repository navigation
Codacy: fix and annotate findings, add the grade badge - #2
Merged
Merged
Conversation
…e badge Fixes: the local App server's async request handler (an error now ends the flow instead of becoming an unhandled rejection); the browser-open error says to open the link; shuffle uses crypto.randomInt; an unused test import; log_message matches its base signature. Annotated with reasons (intended behaviour): the agent's subprocess use, the hook server on 0.0.0.0, /tmp on Lambda, the MicroVM running as root, the CloudFormation response URL, and async functions whose errors propagate to their callers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
✅ No blocking issues noticed
No blocking implementation issues were identified. Three substantive behavior changes lack dedicated automated tests, so their regressions cannot be verified from the available review data.
About this PR
- Please add automated tests covering the new error handling and secure-shuffling behavior; these changes are currently not directly verified.
Test suggestions
- Verify unexpected local GitHub App HTTP errors reject setup without causing an unhandled rejection.
- Verify browser-launch process errors produce an informational message.
- Verify EC2 instance-type shuffling uses secure randomness and returns a permutation.
- Verify agent hook handling, Lambda preparation, and invocation behavior.
- Verify fixed subprocess commands, Docker startup, and retry paths.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify unexpected local GitHub App HTTP errors reject setup without causing an unhandled rejection.
2. Verify browser-launch process errors produce an informational message.
3. Verify EC2 instance-type shuffling uses secure randomness and returns a permutation.
TIP Add a Jira or Linear ticket key to the branch or title so the reviewer can check the PR against it. Using another tracker? Tell us.
TIP How was this review? Give us feedback
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.
Clears runway's 22 open Codacy findings.
Fixed
src/cli/create-app.ts: the local App server used anasyncrequest listener; an unexpected error now ends the setup flow instead of becoming an unhandled rejection.src/cli/github-app.ts: if no browser opens, say so instead of an empty error handler.src/providers/ec2.ts: the instance-type shuffle usescrypto.randomInt.log_messagematchesBaseHTTPRequestHandler's signature.Annotated with the reason (the behaviour is intended): the agent's subprocess calls (fixed argument lists), the hook server on
0.0.0.0(MicroVM hooks arrive over the VM interface),/tmp(Lambda's only writable path), the MicroVM image running as root (it starts containerd and dockerd; one job per VM), CloudFormation's response URL, and async functions whose errors propagate to their callers.Also:
.codacy.ymlexcludes the demo-GIF script, and the README gets the Codacy grade badge.npm run checkpasses (104 tests + the Python agent tests).🤖 Generated with Claude Code