refactor: network impl & cli improvements#3
Merged
zmh-program merged 11 commits intomainfrom Jul 10, 2025
Merged
Conversation
Contributor
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.
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 |
There was a problem hiding this comment.
[nitpick] The computed _largest_file value is never used. Consider removing this unused computation or using it to avoid dead code.
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.
Type of Change
Description