feat: Add comprehensive testing plan for IPSExtractor, including unit, integration, E2E, stress, and resilience tests. Introduce LaTeX documentation structure with sections for architecture, test strategy, and execution guidelines. Enhance README with setup instructions and k6 stress testing scripts.

This commit is contained in:
erik
2026-07-13 17:45:39 -05:00
parent 103bcea15b
commit 6bf413c4ce
25 changed files with 1662 additions and 0 deletions
@@ -0,0 +1,33 @@
\chapter{Resiliencia y chaos}
\label{ch:resiliencia}
\section{Objetivo}
Verificar degradaci\'on controlada y recuperaci\'on sin corrupci\'on de datos cuando fallan dependencias.
\section{Casos}
\begin{longtable}{@{}p{1.8cm}p{3.5cm}p{4.0cm}p{3.2cm}@{}}
\caption{Casos de resiliencia.}\\
\toprule
\textbf{ID} & \textbf{Fallo inyectado} & \textbf{Expectativa} & \textbf{Recuperaci\'on} \\
\midrule
\endhead
CH-01 & Redis down mid-run & Extracci\'on async falla o fallback sync & Stack healthy al reiniciar Redis \\
CH-02 & MinIO down mid-job & Create job 502 / PutObject warning & Job failed expl\'icito; BD consistente \\
CH-03 & Agent crash mid-download & Job no queda zombie indefinido & Cancel o failed; sin doble claim \\
CH-04 & Extraction container kill & Gateway health \texttt{degraded} & Tras restart, health ok \\
CH-05 & Token inv\'alido masivo & 401 sin saturar workers & Logs claros \\
CH-06 & Imaging DNS & Agent \texttt{fatal\_error} & Evento visible en Desktop \\
\bottomrule
\end{longtable}
\section{Modos de fallo conocidos (bot)}
\begin{itemize}
\item Worker offline al crear job $\rightarrow$ 409.
\item Excel vac\'io $\rightarrow$ 400.
\item Heartbeat $>$45\,s $\rightarrow$ worker \texttt{offline}.
\item Cancel pending vs running (flag \texttt{cancel\_requested}).
\item PDF corrupto $\rightarrow$ reintento o fallo por radicado.
\end{itemize}
\section{Criterio global}
Tras chaos, \texttt{GET /health/live} debe volver a OK sin intervenci\'on manual (salvo dependencias externas como Imaging/LLM).