Skip to content

Codacy: fix and annotate findings, add the grade badge - #2

Merged
ranjan-mohanty merged 1 commit into
mainfrom
codacy
Nov 15, 2026
Merged

ranjan-mohanty merged 1 commit into
mainfrom
codacy

Conversation

@ranjan-mohanty

Copy link
Copy Markdown
Contributor

Clears runway's 22 open Codacy findings.

Fixed

  • src/cli/create-app.ts: the local App server used an async request 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 uses crypto.randomInt.
  • An unused import in the agent tests; log_message matches BaseHTTPRequestHandler'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.yml excludes the demo-GIF script, and the README gets the Codacy grade badge.

npm run check passes (104 tests + the Python agent tests).

🤖 Generated with Claude Code

…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>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@ranjan-mohanty
ranjan-mohanty merged commit f924822 into main Nov 15, 2026
12 of 13 checks passed
@ranjan-mohanty
ranjan-mohanty deleted the codacy branch November 15, 2026 23:09
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.

1 participant