Skip to content

fix(scan): surface tier1 finalize failures with a retry (REA-454)#1330

Closed
Benjamin Barslev Nielsen (barslev) wants to merge 2 commits into
v1.xfrom
barslev/rea-454-tier-1-analysis-runs-stuck-in-init-even-when-analysis
Closed

fix(scan): surface tier1 finalize failures with a retry (REA-454)#1330
Benjamin Barslev Nielsen (barslev) wants to merge 2 commits into
v1.xfrom
barslev/rea-454-tier-1-analysis-runs-stuck-in-init-even-when-analysis

Conversation

@barslev
Copy link
Copy Markdown
Contributor

@barslev Benjamin Barslev Nielsen (barslev) commented May 22, 2026

Summary

handleCreateNewScan was calling finalizeTier1Scan and discarding the CResult. When the finalize POST failed (transient 5xx, network blip, etc.) the CLI logged nothing and exited 0, while tier1 reachability scan row stayed in INIT forever.

This change captures the result, retries once on any failure, and surfaces a clear logger.error (including the scan id and tier1 reachability scan id) if both attempts fail. The user-facing exit code is intentionally unchanged: the full scan upload already succeeded, and finalize is metadata-only.

handleCreateNewScan was calling finalizeTier1Scan and discarding the
CResult. When the finalize POST failed (transient 5xx, network blip,
etc.) the CLI logged nothing and exited 0, while depscan's tier1
reachability scan row stayed in INIT forever. Investigation found
>60k stuck INIT-with-metadata rows in coreweave that had a
socket_cli_version set, confirming socket-cli was the lost finalizer.

Capture the result, retry once on any failure, and surface a clear
error including the scan id and tier1 reachability scan id if both
attempts fail. Exit code is intentionally unchanged: the full scan
upload above already succeeded, and finalize is metadata-only.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e90c2c9. Configure here.

Comment thread src/commands/scan/handle-create-new-scan.mts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant