Skip to content

Analysis Progress Monitoring Improvement#419

Merged
fproulx-boostsecurity merged 5 commits intomainfrom
maint/progress
Apr 8, 2026
Merged

Analysis Progress Monitoring Improvement#419
fproulx-boostsecurity merged 5 commits intomainfrom
maint/progress

Conversation

@SUSTAPLE117
Copy link
Copy Markdown
Contributor

added the observer interface for monitoring analysis progress. converted progress bar to it.

Copy link
Copy Markdown

Copilot AI left a 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 introduces a progress-observer abstraction for analysis runs and wires the CLI progress bar implementation through that interface, replacing direct progress-bar manipulation in organization scans.

Changes:

  • Add a new ProgressObserver interface (with a noopObserver fallback) to emit structured analysis progress events.
  • Implement ProgressBarObserver to render progress via schollz/progressbar.
  • Update analyzer flows (org/repo/stale-branches) and CLI construction to use the observer.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
cmd/root.go Sets Analyzer.Observer to a progress-bar observer based on quiet.
analyze/observer.go Defines the ProgressObserver contract and a noop implementation.
analyze/progress_bar_observer.go Implements observer callbacks using progressbar output.
analyze/analyze.go Emits observer events during analysis instead of directly updating the org progress bar.
analyze/analyze_test.go Adds tests for observer nil-safety, interface conformance, and basic concurrency exercise.
Comments suppressed due to low confidence (1)

analyze/analyze.go:285

  • After emitting OnRepoStarted(repoString), error returns (e.g., fetch cone failure) don’t emit OnRepoError, so observers can’t accurately reflect failures for single-repo analysis. Emit OnRepoError(repoString, err) on each error path after OnRepoStarted.
	obs.OnRepoStarted(repoString)
	repoUrl := repo.BuildGitURL(a.ScmClient.GetProviderBaseURL())
	repoKey, err := a.fetchCone(ctx, repoUrl, a.ScmClient.GetToken(), "refs/heads/*:refs/remotes/origin/*", ".github/workflows")
	if err != nil {
		return nil, fmt.Errorf("failed to fetch cone: %w", err)
	}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ow everything goes through the observer interface
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fproulx-boostsecurity fproulx-boostsecurity merged commit 5ea29c5 into main Apr 8, 2026
15 checks passed
@fproulx-boostsecurity fproulx-boostsecurity deleted the maint/progress branch April 8, 2026 16:15
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.

3 participants