> Snapshot of projects/netsentry-iot/design/decision-log.md — 28 Nov 2026

# NetSentry-IoT — Decision Log (DAR)

> Project instance of `process/templates/decision-log.md` — CMMI-DEV v2.0, Level 3 (Defined).

## D-1 — Packet capture library

- **Criteria**: line-rate capture at 100 Mb/s, BPF filtering, low footprint, minimal dependencies.
- **Options**: raw `AF_PACKET`/socket · **Scapy** (sniff with BPF) · libpcap/Pcapy.
- **Decision**: **Scapy** for capture and offline analysis, with a documented fallback to raw
  `AF_PACKET` if line-rate drops are observed on the reference load.
- **Rationale**: Scapy is the chosen open-source brick (CBSE) and matches the project card; it is
  adequate at 100 Mb/s and provides offline PCAP replay for the test bench.
- **Impacted requirements**: REQ-NET-FUNC-001.
- **Status**: Accepted.

## D-2 — Detection approach: behavioral vs signature

- **Criteria**: detect spoofing and DoS without a Cloud signature database, with bounded false
  positives and < 5 ms latency.
- **Options**: static signatures (rejected — needs a signature DB) · **local behavioral baselines +
  thresholds** · machine learning (deferred to Phase 2).
- **Decision**: **local behavioral detection** — per-identity baselines (client-id, source) and
  rate/time-window thresholds for DoS and spoofing. No runtime signature lookup.
- **Rationale**: meets SEC-001 (no Cloud dependency), is explainable/traceable (ROB-001), and its
  O(1) thresholds keep the fast path < 5 ms.
- **Impacted requirements**: REQ-NET-FUNC-004, SEC-001, PERF-001.
- **Status**: Accepted.

## D-3 — Thresholds and anti-false-positive strategy

- **Criteria**: tunable, traceable detection thresholds with measurable false positives.
- **Options**: hard-coded constants (rejected) · **versioned, externalized thresholds with a clean
  baseline calibration**.
- **Decision**: thresholds are externalized (config), versioned, and calibrated against a committed
  clean-baseline capture; the false-positive rate is measured in CI (ROB-001).
- **Rationale**: separates detection policy from code, keeps thresholds auditable, and bounds false
  positives for operators.
- **Impacted requirements**: REQ-NET-ROB-001.
- **Status**: Accepted.

## D-4 — Isolation mechanism

- **Criteria**: local action < 5 ms, no Cloud round-trip, reversible by the operator.
- **Options**: application-level drop (rejected — traffic already received) · **firewall rule via
  `iptables`/`nft`** · switch/port shutdown (Phase 2).
- **Decision**: dispatch a local **`nft`/`iptables` drop rule** (and an alarm) for the offending
  source; the rule is logged and reversible.
- **Rationale**: blocks at the network layer, is fully local, and is the standard reversible
  mechanism on the Linux edge target.
- **Impacted requirements**: REQ-NET-FUNC-005, PERF-001.
- **Status**: Accepted.

## D-5 — Compliance report format

- **Criteria**: NIS2 incident traceability + GDPR minimization, machine-readable for audit.
- **Options**: free-text logs (rejected) · **structured append-only JSONL incident log** with no
  payload storage by default.
- **Decision**: append-only **JSONL** incident records (timestamp, source identity, rule id, action,
  evidence ref) with **no packet payload** stored; retention window is bounded and documented.
- **Rationale**: JSONL is machine-auditable (NIS2), and metadata-only retention satisfies GDPR
  minimization (COM-003).
- **Impacted requirements**: REQ-NET-COM-002, COM-003.
- **Status**: Accepted.

## D-6 — MVP de-escalation & convergence freeze

- **Criteria**: right-size the MVP; break any spec escalation loop; keep an upgrade path.
- **Options**: full IDS/NGFW scope (rejected) · **MVP (MQTT+HTTP, spoofing+DoS, < 5 ms, no Cloud)
  + Phase 2 backlog (Zigbee, encrypted-traffic, ML, fleet)**.
- **Decision**: freeze an MVP baseline and defer hardening to Phase 2; **no new Mandatory**
  requirement may be added post-freeze (except a blocking security flaw or factual error).
- **Rationale**: mirrors the Fog-Crypto Core Rev 2.0 de-escalation; a minimal, achievable MVP is
  delivered first and the freeze rule prevents re-escalation.
- **Impacted requirements**: FUNC-006, SEC-004, FUNC-004 (Phase 2 items).
- **Status**: Accepted.
