-
Notifications
You must be signed in to change notification settings - Fork 10
feat: Add progress bar for file parsing workers (PR-04) #476
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
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #476 +/- ##
==========================================
- Coverage 79.97% 79.94% -0.03%
==========================================
Files 101 101
Lines 11114 11107 -7
==========================================
- Hits 8888 8880 -8
- Misses 1874 1879 +5
+ Partials 352 348 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
Replaces verbose worker status messages with clean progress bar tracking during code graph initialization. Workers no longer output per-file status messages; instead, progress is reported via callbacks to the logger. Changes: - Add ProgressCallbacks struct with OnStart/OnProgress callbacks - Update Initialize() signature to accept optional callbacks - Remove statusChan and progressChan worker communication - Remove all worker status logging (e.g., "Worker 1 ....... Done") - Integrate progress callbacks in scan.go and ci.go commands - Update all Initialize() callers to pass nil callbacks (tests) - Add comprehensive tests for progress callback functionality Test coverage: - TestInitializeWithProgressCallbacks: Verifies callbacks are invoked - TestInitializeWithNilCallbacks: Ensures nil handling works - TestInitializeWithPartialCallbacks: Tests partial callback configuration - Coverage: 75% for Initialize(), 89.8% for graph package Fixes #PR-04 - Clean up noisy worker output Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Silently skip container rule execution if no container rules are found instead of showing a warning. This reduces noise for projects that have Docker files but aren't scanning with container-specific rules. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Add comprehensive tests for progress callback error paths: - Dockerfile read errors (unreadable files) - Docker-compose parse errors (invalid YAML) - Valid Dockerfile/compose with callbacks - Java file read errors - Python file read errors - Java/Python file processing with callbacks Document unreachable code paths: - Default case in file type switch (defensive programming) - Tree-sitter ParseCtx errors (nearly impossible to trigger) Coverage improved from 75% to 90.9% for initialize.go. Remaining 9.1% is defensive code that cannot be practically tested. Test summary: - 13 new callback-related tests added - All tests pass - No regressions in existing functionality Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
The workerID parameter was unused after removing status printing. Fixes golangci-lint unparam check failure. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
9cfbc05 to
f0e70c3
Compare

Summary
Replaces noisy per-file worker status messages with clean progress bar tracking during code graph initialization. Workers now report progress via callbacks instead of direct logging.
Why this change?
Before (PR-03)
After (PR-04)
Changes
ProgressCallbacksstruct with OnStart/OnProgress callbacksInitialize()signature:func Initialize(directory string, callbacks *ProgressCallbacks)Technical Details
Callback Design:
Integration:
Testing
Stack
🤖 Generated with Claude Code