srql builder integration / sweep config updates #2654
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!2654
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2654/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub pull request.
Original GitHub pull request: #2268
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2268
Original created: 2026-01-12T05:48:19Z
Original updated: 2026-01-12T07:30:36Z
Original head: carverauto/serviceradar:update/srql-builder-network-sweep
Original base: staging
Original merged: 2026-01-12T07:30:35Z by @mfreeman451
User description
IMPORTANT: Please sign the Developer Certificate of Origin
Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:
Describe your changes
Issue ticket number and link
Code checklist before requesting a review
PR Type
Enhancement
Description
Refocus SRQL builder integration on leveraging existing capabilities for network sweep targeting
Replace OR group grammar expansion with SRQL-based target extraction in SweepCompiler
Add periodic config refresh worker to handle device inventory changes
Ensure full device field/operator coverage in targeting rules UI
Diagram Walkthrough
File Walkthrough
design.md
Redesign from OR grammar to SRQL-based targetingopenspec/changes/update-srql-builder-grammar/design.md
target extraction approach
execution → results processing
builder capabilities
refresh worker pattern
target extraction
operator coverage verification
proposal.md
Refocus proposal on builder integration over grammar changesopenspec/changes/update-srql-builder-grammar/proposal.md
sweep targeting
builder capabilities
SRQL spec
parser/planner changes
spec.md
Replace OR grammar requirements with SRQL extraction and refreshopenspec/changes/update-srql-builder-grammar/specs/srql/spec.md
keyword and parentheses
extraction
combined via AND
inventory changes
detection
requirements
tasks.md
Shift tasks from parser work to compiler and refresh workeropenspec/changes/update-srql-builder-grammar/tasks.md
grammar extensions)
extraction
execution and hash comparison
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2268#issuecomment-3736979345
Original created: 2026-01-12T05:48:57Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
No security concerns identified
No security vulnerabilities detected by AI analysis. Human verification advised for critical code.🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
Generic: Meaningful Naming and Self-Documenting Code
Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting
Status: Passed
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2268#issuecomment-3736981301
Original created: 2026-01-12T05:49:59Z
PR Code Suggestions ✨
Explore these optional code suggestions:
✅
Sort targets before hashing for determinismSuggestion Impact:
The documentation was updated to specify that the SweepConfigRefreshWorker computes a SHA256 hash of a sorted IP list (Enum.sort) before hashing, explicitly addressing determinism concerns in target hashing.code diff:
To ensure deterministic hashing, sort the list of target IPs from the SRQL query
before computing the hash. This prevents unnecessary cache invalidations caused
by inconsistent result ordering.
openspec/changes/update-srql-builder-grammar/design.md [88-92]
[Suggestion processed]Suggestion importance[1-10]: 9
__
Why: This suggestion correctly identifies a critical flaw in the hashing logic that would lead to non-deterministic behavior and spurious cache invalidations. Sorting before hashing is essential for the correctness of the
SweepConfigRefreshWorker.✅
Distribute worker load to prevent spikesSuggestion Impact:
The commit removed the proposed periodic SweepConfigRefreshWorker entirely and changed the design so targets are recomputed on each agent config poll, eliminating the periodic "process all sweep groups" refresh workload (and thus the potential spike) rather than implementing batching/sharding.code diff:
To prevent system load spikes, distribute the
SweepConfigRefreshWorker'sworkload over time using batching or sharding instead of processing all sweep
groups at once.
openspec/changes/update-srql-builder-grammar/design.md [86-93]
[Suggestion processed]Suggestion importance[1-10]: 7
__
Why: The suggestion raises a valid scalability concern about the "thundering herd" problem and proposes sensible mitigation strategies. This is a valuable performance and reliability improvement for the proposed background job.
Imported GitHub PR review comment.
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2268#discussion_r2681094039
Original created: 2026-01-12T07:13:37Z
Original path: elixir/serviceradar_core/lib/serviceradar/infrastructure/state_monitor.ex
Original line: 351
no bueno