Skip to content

feat: concurrent DNS resolution and partial scan on nmap failure - #58

Merged
reloadfast merged 1 commit into
mainfrom
feat/improvements-50-51
Feb 28, 2026
Merged

reloadfast merged 1 commit into
mainfrom
feat/improvements-50-51

Conversation

@reloadfast

Copy link
Copy Markdown
Owner

Closes #50, Closes #51

…51)

#51 — Concurrent hostname resolution:
- Replace sequential SIGALRM loop with ThreadPoolExecutor (max 20 workers)
- All PTR lookups run in parallel — eliminates serial ~1-2s DNS overhead
- socket.setdefaulttimeout(2) per thread replaces signal-based timeout
- signal/contextmanager imports removed (not safe in threads)
- Test: 5-host batch all resolved correctly via concurrent mock

#50 — Partial scan persists ARP results when nmap fails:
- ScanResult gains warnings: list[str] field
- orchestrate_scan() catches RuntimeError from run_nmap_scan(), appends
  warning, continues with ARP-only results (no longer raises)
- scan_runner sets scan.warning_message when warnings present
- Scan model gains warning_message: Text nullable column
- ScanOut schema and _scan_to_out updated to include warning_message
- Frontend Scan type updated; Dashboard last-scan card shows ⚠ warning
- HistoryPage scan table shows ⚠ icon (tooltip) on rows with warnings
- Test: mock nmap failure → ARP device persisted, scan completed + warning

Closes #50
Closes #51

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@reloadfast
reloadfast merged commit 0a1656d into main Feb 28, 2026
5 checks passed
@reloadfast
reloadfast deleted the feat/improvements-50-51 branch February 28, 2026 19:10
@reloadfast
reloadfast restored the feat/improvements-50-51 branch March 26, 2026 19:35
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.

feat: concurrent hostname resolution during scan feat: partial scan result when nmap fails but ARP succeeds

1 participant