-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: network impl & cli improvements #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
bradar | 84e023f | Jul 10 2025, 08:47 AM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the network implementation and enhances the CLI with customizable progress and credential support, while cleaning up legacy code and tests.
- Swapped
set_github_tokenfor a genericset_provider_credentialsAPI and overhauledProviderConfig/GitProvidertraits. - Streamlined CLI tests, progress bar styling, and removed trivial assertions and WASI incompatibilities.
- Removed the old
core/net.rsimplementation andserver/mod.rsentry point, improving maintainability.
Reviewed Changes
Copilot reviewed 40 out of 46 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/integration_tests.rs | Removed dummy assert!(true) calls in integration tests. |
| tests/cli_tests.rs | Updated CLI tests to use set_provider_credentials, removed trivial assertions and legacy async tests. |
| src/worker.rs | Simplified IntelligentFilter construction and silenced unused variable. |
| src/server/mod.rs | Deleted legacy analyze_url_server implementation. |
| src/net/traits.rs | Added full ProviderConfig struct and expanded GitProvider trait. |
| src/net/stream.rs | Introduced StreamReader and async tarball processing. |
| src/net/mod.rs | Rewrote RemoteAnalyzer with global/provider configs. |
| src/lib.rs | Re-exported RemoteAnalyzer from the new net module. |
| src/core/registry.rs | Derived Default on enums and removed manual impls. |
| src/core/net.rs | Removed outdated legacy network analyzer implementation. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)
tests/integration_tests.rs:145
- This test contains no assertions and will always pass. Consider adding checks (e.g., default timeout or config values) to validate the analyzer's state.
let _default_analyzer = RemoteAnalyzer::default();
tests/cli_tests.rs:11
- No assertions follow this configuration change, so the test cannot catch regressions. Add assertions to verify
timeoutwas applied correctly.
analyzer.set_timeout(120);
| let summary = analysis.get_summary(); | ||
|
|
||
| let largest_file = analysis | ||
| let _largest_file = analysis |
Copilot
AI
Jul 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The computed _largest_file value is never used. Consider removing this unused computation or using it to avoid dead code.
Type of Change
Description