GitHub
05/20/2026, 6:21 PMCreateQueryCarve, the function returned an empty slice — silently targeting zero nodes
• The legacy admin blocked this client-side with a modal warning, but the API and React SPA allowed empty-target submissions through
• Now defaults to all active nodes in the environment when no filters are specified, matching operator expectation
Context
The Intersect() utility returns slice2 when slice1 is empty, but when targetNodesID starts as []uint{} and no target blocks execute, it stays empty. Downstream, QueriesRunHandler / CarvesRunHandler check if len(targetNodesID) != 0 — so the query/carve was created but never dispatched to any node.
Test plan
• Run a query with no targets selected → should target all active nodes in the environment
• Run a carve with no targets selected → same behavior
• Run a query with specific targets → unchanged behavior
• Verify the SPA's "No targets selected — the query will fire against all nodes in this env" message is now accurate
jmpsec/osctrlGitHub
05/20/2026, 9:06 PM