Skip to content

feat(discovery): network auto-discovery with rule-based provisioning - #41

Merged
ClaraVnk merged 1 commit into
mainfrom
feat/network-discovery
Jun 30, 2026
Merged

feat(discovery): network auto-discovery with rule-based provisioning#41
ClaraVnk merged 1 commit into
mainfrom
feat/network-discovery

Conversation

@ClaraVnk

Copy link
Copy Markdown
Contributor

Context

Phase 5 — network auto-discovery (engine + API). The "scale" half (distributed
collection, TSDB) is deliberately deferred (premature without load data; see roadmap).

Changes

  • DiscoveryRule (CIDR, ping/TCP + port, optional template, interval). A per-minute
    scheduler job scans due rules; reachable addresses not yet a host are provisioned
    (template applied), deduped by address, bounded concurrency, owner-scoped.
  • Guardrails: CIDR capped at 1024 hosts + validated (a /8 typo is rejected).
  • REST CRUD + scan-now under /api/discovery-rules with template-ownership validation.

Tests

Scan provision + dedupe (reachability stubbed), due gating, CIDR cap/validation, CRUD

  • scan API. Full suite 212 passed; ruff + mypy(strict) green; reversible migration.

Next

A web UI for discovery rules (PR B).

Scan a network range on a schedule and provision hosts for newly-reachable
addresses, optionally applying a template's items — the first half of Phase 5.

- DiscoveryRule (CIDR, ping/TCP method + port, optional template, interval). The
  scan reuses the existing ping/TCP probes, dedupes against existing hosts by
  address, bounds concurrency, and stamps last_run_at. A per-minute scheduler job
  scans due rules.
- Guardrails: the CIDR is capped at 1024 hosts and validated (schema), so a typo
  like a /8 can't launch millions of probes; everything is owner-scoped.
- REST CRUD + a scan-now endpoint under /api/discovery-rules, with template-ownership
  validation.

The "scale" half (distributed collection, TSDB) is deliberately deferred — premature
without real load data (documented in the roadmap).

Tests: scan provisions + dedupes (reachability stubbed), due-rule gating, the CIDR
cap/validation, and the CRUD + scan API. Full suite 212 passed; ruff + mypy(strict)
green; reversible migration (drops its enum on downgrade).
@ClaraVnk
ClaraVnk merged commit be8d732 into main Jun 30, 2026
4 checks passed
@ClaraVnk
ClaraVnk deleted the feat/network-discovery branch June 30, 2026 20:04
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.

1 participant