feat(v3): SNMP Probe + NinjaOne Live Query (Sprint 1 PR 3) #3

Merged
andre merged 1 commit from a1/sentinel-v3-ground-truth into main 2026-06-12 20:00:37 +00:00
Owner

Summary

  • src/snmp-probe.js: queryArpTable / queryMacTable / queryInterfaceStatus / getNetworkSegmentSnapshot — RFC1213/1493 OIDs, net-snmp, MAC-Normalisierung, Timeout-Race-Pattern, MOCK_SOURCES+SNMP_COMMUNITY Guards
  • src/live-query.js: shouldFetchLive (DRIFT_CRITICAL|MEDIUM-Confidence → trigger, 15min-Cooldown gesetzt in shouldFetchLive) + fetchLiveState (NinjaOne script-run → poll bis COMPLETED/FAILED)
  • src/ninjaone-client.js: getNinjaToken als öffentlichen Export
  • src/db.js: storeLiveSnapshot — ninja_live-Snapshots aus PS-Script-Output in snapshots-Tabelle
  • src/sentinel.js: Draft-Verdict → shouldFetchLivefetchLiveStatestoreLiveSnapshotbuildDriftSummary Recompute → emitVerdict

Test plan

  • 244 Tests grün (npm test)
  • CRA: RFC-8F466CDF APPROVED Score 2
  • MOCK_SOURCES=truequeryArpTable/queryMacTable geben []
  • Kein SNMP_COMMUNITY → alle SNMP-Funktionen geben []
  • shouldFetchLive gibt false wenn LIVE_QUERY_SCRIPT_ID nicht gesetzt
  • 15min-Cooldown: zweiter shouldFetchLive-Aufruf gibt false
  • fetchLiveState gibt null bei FAILED/TIMED_OUT NinjaOne-Job
## Summary - `src/snmp-probe.js`: `queryArpTable` / `queryMacTable` / `queryInterfaceStatus` / `getNetworkSegmentSnapshot` — RFC1213/1493 OIDs, `net-snmp`, MAC-Normalisierung, Timeout-Race-Pattern, MOCK_SOURCES+SNMP_COMMUNITY Guards - `src/live-query.js`: `shouldFetchLive` (DRIFT_CRITICAL|MEDIUM-Confidence → trigger, 15min-Cooldown gesetzt in `shouldFetchLive`) + `fetchLiveState` (NinjaOne script-run → poll bis COMPLETED/FAILED) - `src/ninjaone-client.js`: `getNinjaToken` als öffentlichen Export - `src/db.js`: `storeLiveSnapshot` — ninja_live-Snapshots aus PS-Script-Output in snapshots-Tabelle - `src/sentinel.js`: Draft-Verdict → `shouldFetchLive` → `fetchLiveState` → `storeLiveSnapshot` → `buildDriftSummary` Recompute → `emitVerdict` ## Test plan - [ ] 244 Tests grün (`npm test`) - [ ] CRA: RFC-8F466CDF APPROVED Score 2 - [ ] `MOCK_SOURCES=true` → `queryArpTable/queryMacTable` geben `[]` - [ ] Kein `SNMP_COMMUNITY` → alle SNMP-Funktionen geben `[]` - [ ] `shouldFetchLive` gibt `false` wenn `LIVE_QUERY_SCRIPT_ID` nicht gesetzt - [ ] 15min-Cooldown: zweiter `shouldFetchLive`-Aufruf gibt `false` - [ ] `fetchLiveState` gibt `null` bei FAILED/TIMED_OUT NinjaOne-Job
feat(v3): SNMP Probe + NinjaOne Live Query (Sprint 1 PR 3)
Some checks failed
CI / test (pull_request) Failing after 599h44m23s
CI / test (push) Failing after 599h44m51s
4b9501d0de
- src/snmp-probe.js: queryArpTable/queryMacTable/queryInterfaceStatus/
  getNetworkSegmentSnapshot — RFC1213/1493 OIDs, net-snmp, MAC-Normalisierung,
  Timeout-Race, MOCK_SOURCES+SNMP_COMMUNITY Guards
- src/live-query.js: shouldFetchLive (DRIFT_CRITICAL|MEDIUM-confidence trigger,
  15min-Cooldown) + fetchLiveState (NinjaOne script-run + poll)
- src/ninjaone-client.js: getNinjaToken Export
- src/db.js: storeLiveSnapshot (ninja_live snapshots aus PS-Script-Output)
- src/sentinel.js: Draft-Verdict → shouldFetchLive → fetchLiveState →
  storeLiveSnapshot → driftSummary-Recompute vor emitVerdict
- test/snmp-probe.test.js + test/live-query.test.js: 25 neue Tests
- 244 Tests gesamt grün (23 Suites)
- CRA: RFC-8F466CDF APPROVED Score 2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
andre merged commit 60df9795f0 into main 2026-06-12 20:00:37 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
andre/ticketflow-sentinel!3
No description provided.