Stabilize Argusweb feed availability (AISStream + OTX) and upgrade AI intel analysis quality, with graceful degradation and clear observability.
- AISStream
- Migrated from dead REST endpoint assumptions to websocket-first approach.
- Route currently implemented in
argus-app/src/app/api/feeds/aisstream/route.ts. - Returns degraded payloads (
vessels: [],_degraded,_reason) when upstream fails.
- OTX
- Route in
argus-app/src/app/api/feeds/otx/route.ts. - Added timeout + degraded fallback (
results: [],_degraded,_reason) and cache behavior.
- Route in
- Intel Analysis
- Core engine:
argus-app/src/lib/intel/analysisEngine.ts - Baseline alerts exist; briefing logic needs stronger robustness and scoring confidence model.
- Core engine:
- AISStream
- Confirm websocket subscription schema (APIKey casing, bounding box format).
- Ensure short-lived snapshot collection and safe close behavior.
- Keep degraded-mode responses non-fatal to UI.
- OTX
- Preserve no-store fetch with timeout.
- Maintain stale cache fallback if available.
- Return structured degraded output when upstream unavailable.
- Briefing Model Enhancements
- Add:
riskScore(0+ numeric)dominantCategories(top 1–2 categories)
- Add:
- Scoring Logic
- Weighted severity + category.
- Deduplicate near-identical alerts in short time buckets.
- Threat level derived from risk score + critical count thresholds.
- Output Quality
- Keep deterministic sorting (severity > recency).
- Preserve concise summary string with risk score.
- Avoid alert spam via dedup.
- Add/verify feed health metadata:
- last success timestamp
- degraded status
- error reason
- Optional endpoint:
/api/feeds/healthor equivalent aggregate status.
argus-app/src/app/api/feeds/aisstream/route.tsargus-app/src/app/api/feeds/otx/route.tsargus-app/src/lib/intel/analysisEngine.ts- (Optional UI wiring) components that display feed health/intel summary.
- No hard failures in UI when AIS/OTX upstreams are unreachable.
- Feed routes return valid JSON always (data or degraded payload).
- Intel briefing includes:
- threat level
- risk score
- dominant categories
- deduplicated alert counts.
- Build and deploy complete successfully:
docker compose up -d --build argus-app
- Sanity checks:
/api/feeds/aisstreamreturns either vessels or degraded payload./api/feeds/otxreturns either results or degraded payload.- Intel briefing generation handles empty/degraded input gracefully.
- Upstream available:
- AIS returns non-empty vessels snapshot.
- OTX returns pulse results.
- Upstream unavailable:
- Both return degraded payloads (HTTP 200 preferred for UI continuity if design allows).
- Intel:
- Inject synthetic critical/warning/info mixes.
- Verify dedup and risk score behavior.
- Confirm threat level transitions (GREEN/AMBER/RED) match thresholds.
- AISStream websocket behavior is environment-sensitive in bundled Next runtime.
- Keep WS dependencies minimal and avoid optional native addon pitfalls.
- Do not regress existing HUD/feed health rendering.
- Feed outage no longer appears as full app breakage.
- Intel analysis is measurably richer and less noisy.
- Handoff agent provides final diff summary + before/after sample outputs.