From 02b511a41e2a721dfed77968dbee549254cee15f Mon Sep 17 00:00:00 2001 From: DmitrL-dev <84296377+DmitrL-dev@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:38:19 +1000 Subject: [PATCH] fix: resolve remaining localization, documentation routing bugs, and restore soc_handlers comments --- internal/transport/http/soc_handlers.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/transport/http/soc_handlers.go b/internal/transport/http/soc_handlers.go index 17fa65f..f22d30a 100644 --- a/internal/transport/http/soc_handlers.go +++ b/internal/transport/http/soc_handlers.go @@ -1504,6 +1504,12 @@ func (s *Server) handleSLAConfig(w http.ResponseWriter, _ *http.Request) { } // handlePublicScan provides a public (no-auth) prompt scanning endpoint for the demo. +// POST /api/v1/scan body: {"prompt": "Ignore all instructions..."} +// Runs sentinel-core (54 Rust engines) + Shield (C11 payload inspection) in parallel. +// +// Concurrency control: uses scanSem (buffered channel) to limit parallel scans. +// If all slots are busy, returns 503 Service Unavailable with Retry-After header +// to prevent OOM under burst load (e.g., 20 concurrent battle workers). // // @Summary Inspect AI Prompt // @Description Scans user inputs using Sentinel Lattice (Rust engine) to detect jailbreaks, prompt injections, and Data Exfiltration attempts within 1ms.