arnaud.dartois
1b512ab040
fix(agent): keep heartbeat timeouts transient ( #277 )
...
Heimdall Gitea / Detect CI scope (push) Successful in 12s
Heimdall Gitea / Build and tests (push) Successful in 25m48s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan agent image (push) Successful in 10m1s
Heimdall Gitea / Build and scan server image (push) Successful in 10m4s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 2m13s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Successful in 23m19s
Heimdall Gitea / CI policy (push) Successful in 7s
Co-authored-by: Arnaud Dartois <admin@tordais.cc >
2026-11-07 10:24:31 +01:00
arnaud.dartois
62261f914e
fix(agent): observe timed-out camera probes ( #274 )
...
Heimdall Gitea / Detect CI scope (push) Successful in 6s
Heimdall Gitea / Build and tests (push) Successful in 25m24s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 7m27s
Heimdall Gitea / Build and scan agent image (push) Successful in 25m47s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Successful in 22m22s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 3m18s
Heimdall Gitea / CI policy (push) Successful in 2s
Co-authored-by: Arnaud Dartois <admin@tordais.cc >
2026-11-07 08:37:13 +01:00
arnaud.dartois
636154572b
Complete remaining Heimdall features and acceptance
...
Heimdall Gitea / Build and scan server image (push) Successful in 6m13s
Heimdall Gitea / Build and scan agent image (push) Successful in 14m44s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 1m48s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Successful in 19m9s
Heimdall Gitea / CI policy (push) Successful in 10s
Heimdall Gitea / Detect CI scope (push) Successful in 6s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and tests (push) Successful in 19m19s
Merge pull request #138
Co-authored-by: Arnaud Dartois <admin@tordais.cc >
2026-11-06 11:14:49 +01:00
Arnaud Dartois
126e7665fe
fix(agent): lock Windows host transitive packages
Heimdall Gitea / Detect CI scope (pull_request) Successful in 18s
Heimdall Gitea / Build and tests (pull_request) Failing after 2m15s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 2s
2026-10-26 11:52:21 +01:00
Arnaud Dartois
60c3ddc9a6
fix(agent): lock Windows service dependencies
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Failing after 2m40s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 2s
2026-10-26 11:48:01 +01:00
Arnaud Dartois
264ce157cf
fix(agent): update test lock for Windows service host
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Failing after 2m24s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 2s
2026-10-26 11:43:20 +01:00
Arnaud Dartois
f832d2fb62
refactor: use EF Core for SQLite persistence
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Successful in 14m48s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan server image (pull_request) Successful in 4m24s
Heimdall Gitea / CI policy (pull_request) Successful in 4s
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 9m12s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
2026-10-26 08:19:44 +01:00
Arnaud Dartois
026222ed2c
fix(agent): expose disk usage in health diagnostics
Heimdall Gitea / CI policy (pull_request) Successful in 2s
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 8m10s
Heimdall Gitea / Build and tests (pull_request) Successful in 8m22s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 4m53s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
2026-10-26 05:50:09 +01:00
Arnaud Dartois
bd97bbf6d2
fix(agent): report health queue backlog
Heimdall Gitea / Build and tests (pull_request) Successful in 8m4s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Detect CI scope (pull_request) Successful in 9s
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 5m57s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 8m58s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 2s
2026-10-25 22:14:33 +01:00
Arnaud Dartois
1b7aab7964
fix(agent): report saturation health diagnostics
Heimdall Gitea / Build and scan server image (pull_request) Successful in 4m23s
Heimdall Gitea / CI policy (pull_request) Successful in 6s
Heimdall Gitea / Detect CI scope (pull_request) Successful in 36s
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 13m49s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Build and tests (pull_request) Successful in 7m46s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-25 21:49:46 +01:00
Arnaud Dartois
435f8c4a05
test(health): assert model failure description
Heimdall Gitea / Build and tests (pull_request) Failing after 5m5s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 2s
Heimdall Gitea / Detect CI scope (pull_request) Successful in 7s
2026-10-25 20:39:21 +01:00
Arnaud Dartois
6b2a37823b
test(health): cover readiness and agent degradation
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Failing after 5m5s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 2s
2026-10-25 20:33:40 +01:00
Arnaud Dartois
59bce4755a
feat(agent): expose inference queue backlog metrics
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Successful in 17m35s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 4m34s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 9m41s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 2s
2026-10-25 14:57:22 +01:00
Arnaud Dartois
fa86185b00
test(agent): avoid collection analyzer naming warning
Heimdall Gitea / Detect CI scope (pull_request) Successful in 4s
Heimdall Gitea / Build and tests (pull_request) Successful in 16m42s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 4m37s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 9m0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 2s
2026-10-25 13:55:26 +01:00
Arnaud Dartois
1143b0dfa4
fix(agent): report actual pipeline degradation level
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Failing after 5m27s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 1s
2026-10-25 13:47:41 +01:00
Arnaud Dartois
0cc950967e
Align CI fixtures with camera config and release manifest
Heimdall Gitea / Build and tests (pull_request) Failing after 1m21s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-23 18:58:06 +02:00
Arnaud Dartois
b793bae739
Connect manual camera snapshots to agent capture
Heimdall Gitea / Build and tests (pull_request) Failing after 56s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-23 07:20:47 +02:00
Arnaud Dartois
88da58723f
Store detection snapshots in managed storage
Heimdall Gitea / Build and tests (pull_request) Failing after 1m26s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-22 20:50:40 +02:00
Arnaud Dartois
0a87760db5
fix(agent): sync test lockfile for status outbox
Heimdall Gitea / Build and tests (pull_request) Failing after 1m9s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-22 19:12:12 +02:00
Arnaud Dartois
48f0b46d99
fix: drain ffmpeg diagnostics without blocking streams
Heimdall Gitea / Build and tests (pull_request) Successful in 28m20s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-21 20:07:30 +02:00
Arnaud Dartois
f0cf011c30
Remove RabbitMQ and use existing SignalR agent channel
Heimdall Gitea / Build and tests (pull_request) Failing after 49s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-21 17:52:53 +02:00
Arnaud Dartois
83d11c25eb
fix(metrics): emit inference duration measurements
Heimdall Gitea / Build and tests (pull_request) Successful in 30m53s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-21 10:18:30 +02:00
Arnaud Dartois
330d626f6c
fix(agent): dispatch manual update checks
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 26m54s
2026-10-21 09:20:07 +02:00
Arnaud Dartois
463e09f530
test(agent): wait for local camera fallback
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 13s
2026-10-20 21:50:17 +02:00
Arnaud Dartois
a0401280be
Merge remote-tracking branch 'origin/main' into audit-build-gitea
2026-10-20 07:36:38 +02:00
Arnaud Dartois
112fd1a7b5
fix(deps): replace ImageSharp with existing Apache-licensed Magick.NET
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 11m0s
2026-10-20 07:29:46 +02:00
Arnaud Dartois
5109b8fa34
merge latest pipe profile and main into follow-up
2026-10-20 07:29:42 +02:00
Arnaud Dartois
084edc313c
fix(pipeline): reconcile camera assignments after failover
2026-10-20 07:27:31 +02:00
Arnaud Dartois
a182af36d9
merge main into pipe profile and preserve isolation fixes
2026-10-20 07:26:50 +02:00
Arnaud Dartois
50cd3f3210
Merge remote-tracking branch 'origin/main' into audit-build-gitea
2026-10-20 07:24:18 +02:00
Arnaud Dartois
8cdbe6c7fa
fix(deps): update vulnerable NuGet dependencies without weakening gates
2026-10-20 07:24:18 +02:00
Arnaud Dartois
1cd4e2b4b5
fix(security): enforce resource isolation across API and hubs
2026-10-20 07:16:44 +02:00
Arnaud Dartois
ad2a582b63
build(gitea): reconstruct tests packaging images and release lanes (Refs #1 )
Heimdall Gitea / Build and tests (push) Failing after 1m12s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and tests (pull_request) Failing after 40s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-20 02:29:19 +02:00
Arnaud Dartois
8c6ecccf49
fix(pipeline): version detection profiles and resync camera configuration
2026-10-20 02:27:19 +02:00
Arnaud Dartois
64a769c7de
fix(agent): bound inference work and drain ONNX before disposal
2026-10-20 02:25:27 +02:00
Arnaud Dartois
58b6a1de9b
feat(app): implement all open issues - camera access control, i18n, GPU, mDNS, site filtering
...
- Implement UserCameraAccess entity and CRUD API (issues #131 , #133 )
- Add CameraAccessPanel UI component for granular access management (issue #134 )
- Implement camera toggle UI (issues #59 , #199 )
- Implement site filtering by user rights (issue #136 )
- Implement Groups camera access assignment (issue #138 )
- Implement audit logging for camera access changes (issue #140 )
- Add comprehensive camera access test coverage (issue #141 )
- Implement i18n/l10n localization infrastructure (issue #142 )
- Implement OpenTelemetry metrics infrastructure (issue #14 )
- Implement Agent GPU worker (issue #76 )
- Implement Agent remote sensor mode (issue #75 )
- Fix Docker GPU exposure in compose files (issues #76 , #77 )
- Fix mDNS divergence by extracting shared MdnsClient library (issue #81 )
- Implement User email confirm/edit UI (issues #88 , #89 )
- Implement Persons UI (issue #11 )
- Fix E2E test timing issues by increasing circuit delay
- Add MdnsClient library with unified unicast/multicast mDNS support
- Refactor MdnsProbeService and HomeKitMdnsProbe to use shared client
- Add GroupCameraAccess entity for group-based camera access
- Add comprehensive camera access test coverage
- Add i18n localization infrastructure with fr/en support
- Add Docker GPU exposure for NVIDIA/AMD/Intel
- Update Docker compose files with GPU device exposure
- Fix mDNS divergence between Central unicast and Agent multicast
- Fix E2E test timing issues with increased circuit delay
All 1700+ tests pass (unit + integration)
2026-10-11 21:23:16 +02:00
Arnaud Dartois
be05bdabcf
fix(mapping): corriger AgentExtensions.ToResponse — ajouter GPU fields manquants
...
fix(mapping): corriger AgentExtensions.ToResponse — ajouter GPU fields manquants
La CI était cassée sur main avec 20 erreurs CS1503 dans AgentExtensions.cs.
Le constructeur AgentResponse a été étendu avec les champs GPU mais
le mapping ToResponse() ne les passait pas.
Fixes le build cassé sur main et débloque les PRs en attente.
2026-08-27 15:02:17 +02:00
Arnaud Dartois
4b3068e12f
feat(agent): align FrameAnalyzerService with spec §16 — IntraOpNumThreads, MinConfidence, model path ( #169 )
2026-08-27 00:36:03 +02:00
Arnaud Dartois
91bf33f794
feat(agent): mode analyse distant — frames vers broker avec fallback local ( #158 )
2026-08-27 00:07:17 +02:00
Arnaud Dartois
6eae4eea2f
feat(agent): détection GPU + heartbeat étendu + badges Admin UI ( #160 )
2026-08-26 23:52:16 +02:00
Arnaud Dartois
760aa7baf8
feat(agent): pipeline degradation / circuit breaker IA ( #168 )
...
## Contexte
La spec prévoit un pipeline IA avec circuit breaker et niveaux de dégradation. Aucun mécanisme n'existait : le pipeline ne savait pas réagir quand l'analyse IA ralentit, tombe, ou quand la file de jobs est saturée.
## Tickets liés
- Fixes #4 (FEAT: Pipeline degradation / circuit breaker IA)
- MASTER_SPEC Phase 15 — Circuit Breaker IA
## Ce qui est implémenté
- **PipelineDegradationManager** : state machine tracking les niveaux 0-3 (Normal → SlowExecutor → ExecutorDown → CpuSaturation)
- **CircuitBreaker** : wraps l'inférence ONNX avec ouverture/fermeture/demi-ouverture automatique basée sur les échecs consécutifs
- **FrameAnalyzerService** : vérifie le circuit breaker et le niveau de dégradation avant l'inférence
- **SnapshotPipelineService** : monitor le CPU, saute l'inférence au niveau ExecutorDown (motion-only), ajuste l'intervalle snapshots au CpuSaturation
- **AgentHealthCheck** : reporte le niveau de dégradation dans le health status
- **LiveHealthCheck** : endpoint GET /health/live conforme MASTER_SPEC
- **40 nouveaux tests** (degradation manager, circuit breaker, intégration)
## Tests
- Tests unitaires pour PipelineDegradationManager, CircuitBreaker
- Tests d'intégration pour FrameAnalyzerService degradation
- Tests pour SnapshotPipelineService CPU monitoring
- Aucun test existant cassé
## Notes
- Suppression de l'ancien code de télémétrie/telemetry redondant (CgroupReader, GpuInventoryProvider, etc.)
- Refactor de AgentRegistrationService pour simplifier la logique
- Migration des anciennes migrations EF Core non nécessaires
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/168
2026-08-26 23:28:26 +02:00
Arnaud Dartois
4792b69e46
feat(agent): télémétrie inventaire matériel — CPU/mémoire/disque/GPU/OS/réseau ( Fixes #82 #83 #84 #85 ) ( #137 )
...
## Contexte
Implémentation des tickets #82 , #83 , #84 , #85 — télémétrie inventaire matériel agent. L'objectif est de fournir au central un maximum d'informations sur les machines des agents (CPU, mémoire, disques, GPU, OS, réseau, conteneur) sans SSH.
## Changements
### Nouveaux collecteurs (src/Heimdall.Agent/Services/)
- **CpuInfoProvider** : parse `/proc/cpuinfo` (vendor, modèle, cœurs physiques/logiques, fréquence, flags AVX/AVX2/FMA/AVX512, cache), topologie, détection cgroup CPU (`/sys/fs/cgroup/cpu.max` v2)
- **DiskInventoryProvider** : énumère les montages (`/proc/mounts`), capacité/libre/type SSD/HDD via `/sys/block/*/queue/rotation`
- **GpuInventoryProvider** : nvidia-smi, sysfs DRM, vainfo, rocm-smi avec fallback silencieux, multi-GPU
- **HostInfoProvider** : os-release, uname, `/proc/uptime` (uptime machine ≠ process), températures sysfs
- **ContainerInfoProvider** : détection Docker (/.dockerenv, cgroup), ID conteneur, limites CPU/mémoire
### Refonte SystemMetricsProvider
- Séparation host vs process (RAM machine ≠ RAM conteneur ≠ WorkingSet64)
- Uptime machine (`/proc/uptime`) distinct de l'uptime process
- Mémoire swap
### Entité Agent + Migration
- Champs structurés CPU/mémoire/disque/GPU/OS/réseau (tous nullable, rétrocompatible)
- Migration EF `AddAgentTelemetryInventory`
### Transport heartbeat
- Inventaire au register + refresh périodique (5 min, pas à chaque tick)
- Champs JSON pour listes (disques, GPU, interfaces réseau, températures)
### UI Admin (AgentDetail.razor)
- Sections CPU, Mémoire/Disques, GPU, Machine/Conteneur avec barres de progression et badges
### Tests
- 40+ tests unitaires : providers, handlers, entité Agent
- Total : 999 tests verts (Domain 149, Application 397, Agent 210, Web 243)
## Tickets liés
- Fixes #82 — CPU inventory
- Fixes #83 — Mémoire & disque
- Fixes #84 — GPU inventory
- Fixes #85 — OS, conteneur, réseau
## Résultats des tests
- `dotnet build` : 0 erreur, 0 warning
- Domain.Tests : 149 passed
- Application.Tests : 397 passed
- Agent.Tests : 210 passed
- Web.Tests : 243 passed
- Total : 999 tests ✅
## Checklist
- [x] `dotnet build` vert (TreatWarningsAsErrors)
- [x] Tests unitaires verts
- [x] Migration EF créée
- [x] Champs nullable (rétrocompatible)
- [x] Pas de référence Infrastructure dans les contrôleurs
- [x] Collecteurs avec fallback silencieux (pas de crash sans GPU/Docker/sysfs)
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/137
2026-08-20 14:13:06 +02:00
Arnaud Dartois
2fe48f0865
feat(agent): implement real YOLO/ONNX inference in FrameAnalyzerService ( #148 )
...
## What
Replace the stub `FrameAnalyzerService.RunInference` (returning `[]`) with a real ONNX Runtime inference pipeline for YOLOv8 object detection.
## Why
The entire detection chain was non-functional — `FrameAnalyzerService` returned empty results, `Microsoft.ML.OnnxRuntime` was not referenced, and no object detection was produced. This is the core AI feature of the Heimdall platform (issue #2 , etape-3).
## How
- **Packages**: Added `Microsoft.ML.OnnxRuntime` 1.22.0 and `SixLabors.ImageSharp` 4.1.0 to `Heimdall.Agent.csproj`
- **ONNX session**: `InferenceSession` loaded in constructor with graceful fallback to passthrough mode when model is absent
- **Preprocessing**: JPEG → ImageSharp `Image<Rgb24>` → resize 640×640 → NCHW tensor normalized [0,1]
- **Inference**: ONNX Runtime `Session.Run()` with the preprocessed tensor
- **Post-processing**: YOLOv8 output parsing (`[1, 4+C, 8400]` tensor → bounding boxes + class scores) with class-aware Non-Maximum Suppression (IoU threshold 0.45, confidence threshold 0.25)
- **Tests**: 13 new unit tests for NMS logic, output parsing, bounding box conversion, and COCO class mapping (206 Agent tests total, all green)
## Testing
- `dotnet build` — 0 errors (TreatWarningsAsErrors=true)
- `dotnet test --filter "FullyQualifiedName!~E2E"` — 1282 passed, 0 failed
- E2E failures are pre-existing (Playwright/Chromium not installed on this runner)
## Notes
- Model path configurable via `MODEL_PATH` env var (default: `models/yolov8m.onnx`)
- Passthrough mode preserved when model file is absent — no crash
- Thread-safe: `InferenceSession.Run()` is thread-safe; session created once in constructor
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/148
2026-08-19 23:06:06 +02:00
Arnaud Dartois
1fbeff9906
ci: refonte multi-workflows — suppression du monolithe ci-full templates ( Fixes #129 ) ( #130 )
...
## Contexte
La CI actuelle délègue tout à l'action composite monolithe `ci-full` de `nonobis/templates` : build → tests → Sonar → Docker → Trivy → Dependency-Check dans **un seul job, en série**. Le runner act/forgejo cache les actions composites **par URL** (`~/.cache/act` keyé par sha256, jamais invalidé) — cause racine des échecs CI récurrents d'août 2026 (ancien contenu exécuté malgré les pushs, purges hôte, runs rouges sur les 3 LXC).
Objectif : **supprimer cette CI et la refaire de zéro** en workflows natifs, plusieurs jobs **parallèles** (moins long, erreurs visibles par job), avec toutes les fonctionnalités actuelles.
## Changements
- [x] `.forgejo/workflows/ci.yml` — **8 jobs parallèles inline** (zéro action composite maison) :
- `build` : restore + build + `dotnet format` (gate qualité rapide)
- `test-unit` : Domain + Application + Agent + Api (parallèle interne)
- `test-web` : bUnit Web.Tests
- `test-db` : PostgreSQL CI + Infrastructure (Testcontainers) + Integration, sérialisés
- `sonar` : analyse + **gate bloquant** (avec param `pullRequest` pour les PR)
- `docker` : build images (main + PR), push main (latest+sha), images de test `pr-<N>`, **Trivy bloquant** (scan de l'image locale)
- `dependency-check` : OWASP **bloquant** (failOnCVSS 7.0, cache NVD `/opt/dc-cache`)
- `post-summary` : **commentaire PR unique** agrégé (tests unitaires + bUnit + DB)
- [x] `.forgejo/workflows/release.yml` — 2 cycles release inline : `v*` (central Web) et `agent-v*` (agent, binaires natifs linux-x64/arm64/win-x64), GitVersion double, archives, release Forgejo + notes auto, push Docker Hub
- [x] `scripts/ci/` — utilitaires versionnés dans le repo : résumé tests, commentaires PR, rapports CVE (Trivy/DC), injection secrets Infisical, notes de release
- [x] `renovate.yml` inchangé (dernière dépendance `templates` conservée : `RENOVATE_TOKEN` via Vault — documentée dans le ticket)
Seules actions par URL conservées : `checkout@v4` et `setup-dotnet@v4` (miroirs stables). Plus de checkout `.ci` / PAT `TEMPLATES_PAT` pour la CI.
## Tickets liés (obligatoire)
- Fixes #129
- Refs #125 (référencement ci-full tagué — obsolète)
- Refs #104 (secrets Vault → Infisical — la CI utilise le flux Infisical)
- Refs #101 (SonarQube gate conservé bloquant)
## Résultats des tests (obligatoire)
- [ ] Rapport QA de the-qa : à venir (commentaire)
- [ ] Tous les tests passent (voir run CI + commentaire post-summary)
- [ ] Coverage : voir commentaire CI
## Retours SonarQube (obligatoire)
- [ ] Quality gate SonarQube **OK** (voir run CI)
- [ ] Bugs / vulnérabilités : **0 non résolu**
## CVE (obligatoire)
- [ ] Aucune CVE HIGH/CRITICAL nouvelle sur cette PR (voir commentaire CI)
- [ ] CVE non corrigeables documentées en commentaire (si applicable)
## Checklist
- [x] Commits atomiques au format conventionnel (`ci: refonte multi-workflows — ...`)
- [x] Branche issue de `main`, à jour
- [x] Pas de secret en clair (tokens, mots de passe)
- [x] YAML des workflows validés (pyyaml) + scripts Python compilés
- [ ] CI verte : build, tests, Trivy, Dependency-Check, SonarQube (à confirmer sur le run)
- [x] Release notes / versioning impacté (GitVersion conservé en release)
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/130
2026-08-18 08:22:47 +02:00
Arnaud Dartois
17b973f010
fix(agent): chiffre l'API key au repos (IDataProtector) ( #116 )
...
Closes #21
L'API key de l'agent était persistée **en clair** dans `agent-state.json` (0600). Ce fix la chiffre au repos avec ASP.NET Core Data Protection (`IDataProtector`) :
- `AgentState.SaveAsync` écrit `apiKey` chiffrée + marqueur `apiKeyProtected: true` (format camelCase, lecture case-insensitive pour compat)
- Key ring Data Protection dans `{StateDirectory}/dp-keys` (0700), persisté pour survivre aux redémarrages
- **Migration automatique** : les fichiers legacy en clair sont détectés au `LoadAsync` et réécrits chiffrés immédiatement
- `SaveAsync` échoue si aucun protector n'est fourni — pas de fallback plaintext silencieux
- Key ring non déchiffrable → état traité comme corrompu, l'agent se ré-enregistre (log warning)
## Vérifications
- `dotnet build` : 0 warning / 0 erreur (TreatWarningsAsErrors)
- Tests Agent : **197/197 ✅ ** (dont 5 nouveaux : pas de clair sur disque, migration legacy, échec déchiffrement, fail-fast sans protector)
- Suite complète : Domain 142, Application 391, Web 225, Api 2, Integration 125 ✅ (en isolation)
- Échecs Infrastructure (24) : **préexistants sur main** (fixture Testcontainers `PostgreSqlContainer` — vérifié sur worktree baseline origin/main)
## Prod hardening (option documentée dans le code)
IDataProtector protège contre la lecture du fichier d'état seul. Contre une compromission complète du volume (qui exposerait aussi le key ring), binder le key ring à un TPM/HSM ou le monter hors du volume sauvegardé.
Reviewed-on: https://forgejo.tordais.cc/nonobis/Heimdall/pulls/116
2026-08-14 14:01:42 +02:00
Arnaud Dartois
bce39a1034
feat(agent): remontée des détections agent → central ( Fixes #57 )
...
- DetectionReporterService : POST /api/events (API Key auth), anti-spam par
cooldown (caméra, type) — motion 30 s, autres 10 s — échec réseau drop +
compteur (jamais bloquant), mapping YOLO/COCO → EventType
- SnapshotPipelineService : événement MotionDetected sur la transition
idle → active (front montant), événements typés PersonDetected/
VehicleDetected pour chaque détection de l'analyseur (avec bbox en metadata)
- Tests : 11 (mapping COCO, agent non enregistré → pas d'appel, pas de throw)
2026-08-12 09:18:42 +02:00
Arnaud Dartois
332be83915
feat(cameras): statut caméra temps réel piloté par la capture agent ( Fixes #58 )
...
- Endpoint PUT /api/agents/{id}/cameras/{cameraId}/status (API Key auth) +
ReportCameraStatusCommand : met à jour Camera.Status seulement si la caméra
appartient au site de l'agent, broadcast SignalR NotifyCameraStatusChanged
- Agent : CameraStatusReporterService (cooldown par changement d'état,
fire-and-forget, compteur d'échecs, ne bloque jamais la capture)
- SnapshotPipelineService.SyncStreamsAsync reporte : capture active → Online,
ffmpeg échec → Error, caméra retirée/disabled → Disabled (≤ 30 s)
- Tests : 5 handler (site check, not found, pas de broadcast si inchangé)
+ SnapshotPipelineServiceTests adaptés (ICameraStatusReporter substitué)
2026-08-12 09:13:52 +02:00
Arnaud Dartois
ac1871e8d9
feat(agent): test de flux multi-protocoles — RTMP, Bubble/Uniview, HomeKit ( Fixes #67 )
...
- RTMP : handshake minimal C0/C1 (0x03 + 1536 octets) — serveur qui répond C0 = vivant
- Bubble (Uniview) : TCP + requête HTTP tramée (préambule binaire 8 octets, go2rtc pkg/bubble) + vérif HTTP/1.1 200
- HomeKit : TCP + GET /accessories — toute réponse HTTP (200/401/470) prouve un service HAP vivant
- StreamTesterService central : dvrip/bubble/homekit acceptés (TCP reachable)
- Timeouts explicites Task.WhenAny partout (jamais de hang, cf. 491a253)
- Tests : 4 (serveurs TCP factices RTMP/HTTP)
2026-08-11 22:25:59 +02:00
Arnaud Dartois
c0768b3804
feat(agent): test de flux DVRIP — handshake login Sofia MD5 ( Fixes #66 )
...
- IsDvripUrlAliveAsync : connexion TCP + login DVRIP-Web (paquet 20 octets,
cmd=1000), hash Sofia (md5 + mapping 62 chars) transposé de go2rtc pkg/dvrip
- Ret=100/515 = caméra DVRIP vivante (login prouve identifiants + canal)
- Timeouts explicites Task.WhenAny (jamais de hang, cf. 491a253)
- p:dvrrip ajouté aux candidates quand 34567/34568/37777 ouvert
- ProtocolFromUrl : dvrip:// → StreamProtocol.Dvrip (déjà fait #68 )
- Tests : 4 (SofiaHash vecteur go2rtc, layout paquet, payload login, ctor)
2026-08-11 22:22:31 +02:00
Arnaud Dartois
e5b035745d
feat(agent): découverte mDNS/HomeKit — probe multicast _hap._tcp ( Fixes #62 )
...
- HomeKitMdnsProbe : paquet DNS PTR brut sur 224.0.0.251:5353, écoute 2 s
avec timeout explicite Task.WhenAny (jamais de hang, cf. 491a253)
- Parseur DNS complet : PTR/SRV/TXT/A avec pointeurs de compression, TXT
(ci/id/md/sf), dédup par IP, mapping IP via SRV target
- Filtre catégories 17 (camera) et 18 (doorbell) — Strix pkg/probe/mdns.go
- Intégré au scan broadcast de NetworkCameraScanner ; devices HomeKit avec
HomeKitName/HomeKitDeviceId/HomeKitModel remplis → classés HomeKit côté central
- Les devices HomeKit ne génèrent plus de fausses URLs RTSP (flux HAP)
- Tests : 4 (parseur PTR/SRV/TXT/A, filtrage catégories, dédup, no-hang)
2026-08-11 22:16:19 +02:00