Add: Auditoría sistema 2026-01-01 pre-mejoras
This commit is contained in:
242
07_OPERACION/AUDITORIA_SISTEMA_2026-01-01.md
Normal file
242
07_OPERACION/AUDITORIA_SISTEMA_2026-01-01.md
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
# Auditoría Sistema TZZR - 2026-01-01
|
||||||
|
|
||||||
|
## Resumen Ejecutivo
|
||||||
|
|
||||||
|
Auditoría completa del sistema TZZR realizada antes de implementar mejoras de la Fase 1-7.
|
||||||
|
|
||||||
|
### Estado General
|
||||||
|
| Servidor | Microservicios | Web Apps | PostgreSQL | Estado |
|
||||||
|
|----------|---------------|----------|------------|--------|
|
||||||
|
| DECK | 4/4 OK | 2/2 OK | 93 tablas | ✅ Operativo |
|
||||||
|
| CORP | 4/4 OK | 2/2 OK | 32 tablas | ✅ Operativo |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. DECK (72.62.1.113)
|
||||||
|
|
||||||
|
### 1.1 Microservicios Docker
|
||||||
|
|
||||||
|
| Servicio | Puerto | Estado | Health Check |
|
||||||
|
|----------|--------|--------|--------------|
|
||||||
|
| clara-service | 5051 | Up 6 days (healthy) | `{"status":"ok"}` |
|
||||||
|
| alfred-service | 5052 | Up 6 days (healthy) | `{"status":"healthy"}` |
|
||||||
|
| mason-service | 5053 | Up 6 days | `{"status":"healthy"}` |
|
||||||
|
| feldman-service | 5054 | Up 6 days | `{"status":"healthy"}` |
|
||||||
|
|
||||||
|
### 1.2 Aplicaciones Web (systemd)
|
||||||
|
|
||||||
|
| App | Puerto | Estado | Health Endpoint |
|
||||||
|
|-----|--------|--------|-----------------|
|
||||||
|
| MindLink | 5090 | active (running) | `/api/health` → OK |
|
||||||
|
| Flow-UI | 5080 | active (running) | `/api/health` → OK |
|
||||||
|
|
||||||
|
**Nota**: Los endpoints de health son `/api/health`, no `/health`
|
||||||
|
|
||||||
|
### 1.3 Base de Datos PostgreSQL
|
||||||
|
|
||||||
|
- **Ubicación**: Docker container `postgres`
|
||||||
|
- **DB Principal**: `tzzr`
|
||||||
|
- **Usuario**: `tzzr`
|
||||||
|
- **Total tablas**: 93
|
||||||
|
|
||||||
|
#### Tablas principales:
|
||||||
|
- `immutable_log` - Log inmutable
|
||||||
|
- `clara_log` - Log de Clara
|
||||||
|
- `feldman_cola`, `feldman_validaciones` - Cola Feldman
|
||||||
|
- `merkle_batches` - Batches Merkle
|
||||||
|
- `deck_*` - Tablas específicas DECK (emails, files, projects, etc.)
|
||||||
|
- `hst_*` - Hash Semantic Tagging
|
||||||
|
- `task_*` - Gestión de tareas
|
||||||
|
- `ia_*` - Contexto IA
|
||||||
|
- `circle_*` - Sistema de mensajería
|
||||||
|
|
||||||
|
### 1.4 Otros Contenedores Docker
|
||||||
|
|
||||||
|
| Contenedor | Estado | Puerto |
|
||||||
|
|------------|--------|--------|
|
||||||
|
| windmill-server | Up 37h | 8100 |
|
||||||
|
| nextcloud | Up 6 days | 8084 |
|
||||||
|
| directus | Up 6 days | 8055 |
|
||||||
|
| mailcow (múltiples) | Up 6 days | 25,465,587,993,995 |
|
||||||
|
| vaultwarden | Up 6 days (healthy) | 8085 |
|
||||||
|
| shlink | Up 6 days | 8083 |
|
||||||
|
| ntfy | Up 6 days | 8080 |
|
||||||
|
| deck-odoo | Up 6 days | 8069 |
|
||||||
|
| filebrowser | Up 6 days (healthy) | 8082 |
|
||||||
|
| redis | Up 6 days | 6379 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. CORP (92.112.181.188)
|
||||||
|
|
||||||
|
### 2.1 Microservicios Docker
|
||||||
|
|
||||||
|
| Servicio | Puerto | Estado | Health Check |
|
||||||
|
|----------|--------|--------|--------------|
|
||||||
|
| margaret-service | 5051 | Up 6 days (healthy) | `{"status":"ok"}` |
|
||||||
|
| jared-service | 5052 | Up 20h (healthy) | `{"status":"healthy"}` |
|
||||||
|
| mason-service | 5053 | Up 20h | `{"status":"healthy"}` |
|
||||||
|
| feldman-service | 5054 | Up 20h | `{"status":"healthy"}` |
|
||||||
|
|
||||||
|
### 2.2 Aplicaciones Web (systemd)
|
||||||
|
|
||||||
|
| App | Puerto | Estado | Health Endpoint |
|
||||||
|
|-----|--------|--------|-----------------|
|
||||||
|
| MindLink | 5090 | active (running) | `/api/health` → OK |
|
||||||
|
| Flow-UI | 5080 | active (running) | `/api/health` → OK |
|
||||||
|
|
||||||
|
### 2.3 Base de Datos PostgreSQL
|
||||||
|
|
||||||
|
- **Ubicación**: Host (no Docker)
|
||||||
|
- **DB Principal**: `tzzr`
|
||||||
|
- **Total tablas**: 32
|
||||||
|
|
||||||
|
#### Tablas principales:
|
||||||
|
- `immutable_log` - Log inmutable
|
||||||
|
- `ai_*` - Contexto IA (contexts, conversations, memory, etc.)
|
||||||
|
- `context_*` - Algoritmos de contexto
|
||||||
|
- `sesiones_ia`, `tareas_ia`, `mensajes_ia`
|
||||||
|
- `knowledge_base`, `memory`
|
||||||
|
|
||||||
|
### 2.4 Otros Contenedores Docker
|
||||||
|
|
||||||
|
| Contenedor | Estado | Puerto |
|
||||||
|
|------------|--------|--------|
|
||||||
|
| windmill-server | Up 2 days | 8000 (local) |
|
||||||
|
| nextcloud | Up 6 days | 8080 |
|
||||||
|
| directus | Up 43h | 8055 |
|
||||||
|
| odoo | Up 6 days | 8069 |
|
||||||
|
| shlink | Up 43h | 8082 |
|
||||||
|
| vaultwarden | Up 6 days (healthy) | 8081 |
|
||||||
|
| ntfy | Up 6 days | 8880 |
|
||||||
|
| addy | Up 8 min | 8083 |
|
||||||
|
| redis | Up 6 days | 6379 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Código Fuente
|
||||||
|
|
||||||
|
### 3.1 MindLink
|
||||||
|
|
||||||
|
**Ubicación**: `/opt/mindlink/`
|
||||||
|
|
||||||
|
**Endpoints disponibles**:
|
||||||
|
- `GET /` - Portal principal
|
||||||
|
- `GET /api/health` - Health check
|
||||||
|
- `GET /api/services` - Lista servicios
|
||||||
|
- `GET /api/services/status` - Estado de servicios
|
||||||
|
- `GET /api/service/<id>/status` - Estado de un servicio
|
||||||
|
- `POST /api/shorten` - Acortar URL
|
||||||
|
- `GET /api/urls` - Listar URLs
|
||||||
|
- `GET /s/<code>` - Redirección corta
|
||||||
|
- `GET /api/url/<code>/stats` - Estadísticas URL
|
||||||
|
|
||||||
|
**Archivos**:
|
||||||
|
- `app.py` (15.3 KB)
|
||||||
|
- `requirements.txt`
|
||||||
|
- `templates/`
|
||||||
|
- `.env` (INSTANCE_TYPE)
|
||||||
|
|
||||||
|
### 3.2 Flow-UI
|
||||||
|
|
||||||
|
**Ubicación**: `/opt/flow-ui/`
|
||||||
|
|
||||||
|
**Endpoints disponibles**:
|
||||||
|
- `GET /` - Portal principal
|
||||||
|
- `GET /api/health` - Health check
|
||||||
|
- `POST /api/ingest` - Ingestar entrada
|
||||||
|
- `GET /api/entradas` - Listar entradas
|
||||||
|
- `GET /api/log` - Ver log
|
||||||
|
- `GET /api/mason/pending` - Items pendientes Mason
|
||||||
|
- `GET/PUT /api/mason/item/<id>` - Gestión items
|
||||||
|
- `POST /api/mason/item/<id>/resolve` - Resolver item
|
||||||
|
- `POST /api/mason/item/<id>/descartar` - Descartar item
|
||||||
|
- `GET /api/feldman/milestones` - Milestones
|
||||||
|
- `GET /api/feldman/blocks` - Bloques
|
||||||
|
- `GET /api/feldman/verify/<hash>` - Verificar hash
|
||||||
|
- `GET/POST /api/flujos` - Gestión flujos
|
||||||
|
- `POST /api/flujos/<id>/ejecutar` - Ejecutar flujo
|
||||||
|
- `GET /api/ejecuciones` - Listar ejecuciones
|
||||||
|
- `GET /api/hsu/*` - Biblioteca, tags, grupos
|
||||||
|
- `GET /api/status` - Estado general
|
||||||
|
|
||||||
|
**Archivos**:
|
||||||
|
- `app.py` (22.7 KB)
|
||||||
|
- `requirements.txt`
|
||||||
|
- `templates/`
|
||||||
|
- `.env` (SERVER, DB config)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Documentación R2
|
||||||
|
|
||||||
|
### 4.1 Estructura skynet v8 en R2
|
||||||
|
|
||||||
|
```
|
||||||
|
s3://architect/system/skynet v8/
|
||||||
|
├── 00_VISION/
|
||||||
|
│ ├── filosofia.md
|
||||||
|
│ └── glosario.md
|
||||||
|
├── 01_ARQUITECTURA/
|
||||||
|
│ ├── almacenamiento.md
|
||||||
|
│ ├── overview.md
|
||||||
|
│ ├── aplicaciones/ (mind-link, packet, vision-builder)
|
||||||
|
│ └── entidades/ (architect, corp, deck, flg, hst, itm, loc, ply)
|
||||||
|
├── 02_COMPONENTES/
|
||||||
|
│ ├── internos/ (administracion, auditoria, contable, context-system, etc.)
|
||||||
|
│ └── servicios externos/ (asistente, circle, cloudville, etc.)
|
||||||
|
├── 02_INFRAESTRUCTURA/ (duplicado, revisar)
|
||||||
|
├── 03_MODELO_DATOS/
|
||||||
|
│ └── schemas/
|
||||||
|
├── 04_INFRAESTRUCTURA/
|
||||||
|
├── 05_INTEGRACIONES/
|
||||||
|
└── 06_SEGURIDAD/
|
||||||
|
```
|
||||||
|
|
||||||
|
**Total documentos**: 68 archivos .md
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Repositorios Gitea
|
||||||
|
|
||||||
|
| Repositorio | Última actualización |
|
||||||
|
|-------------|---------------------|
|
||||||
|
| system-docs | 2026-01-01 |
|
||||||
|
| captain-claude | 2025-12-29 |
|
||||||
|
| system-plan | 2025-12-30 |
|
||||||
|
| packet | 2025-12-24 |
|
||||||
|
| mason | 2025-12-24 |
|
||||||
|
| feldman | 2025-12-24 |
|
||||||
|
| margaret | 2025-12-24 |
|
||||||
|
| jared | 2025-12-24 |
|
||||||
|
| sentinel | 2025-12-24 |
|
||||||
|
| orchestrator | 2025-12-24 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Problemas Detectados
|
||||||
|
|
||||||
|
### 6.1 Críticos
|
||||||
|
- Ninguno
|
||||||
|
|
||||||
|
### 6.2 Moderados
|
||||||
|
1. **Estructura duplicada en R2**: `02_COMPONENTES/` y `02_INFRAESTRUCTURA/` en mismo nivel - posible error de organización
|
||||||
|
2. **Diferencia de tablas DECK vs CORP**: DECK tiene 93 tablas, CORP solo 32 - puede ser intencional pero verificar sincronización
|
||||||
|
|
||||||
|
### 6.3 Menores
|
||||||
|
1. **Health endpoint inconsistente**: MindLink/Flow-UI usan `/api/health` mientras que microservicios usan `/health`
|
||||||
|
2. **Repos desactualizados**: Varios repos sin commits desde 2025-12-24 (1 semana)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Recomendaciones
|
||||||
|
|
||||||
|
1. **Estandarizar health endpoints**: Agregar `/health` como alias a `/api/health` en MindLink y Flow-UI
|
||||||
|
2. **Revisar estructura R2**: Corregir duplicación de carpetas 02_*
|
||||||
|
3. **Sincronizar esquemas**: Verificar si CORP necesita las mismas tablas que DECK
|
||||||
|
4. **Actualizar repos Gitea**: Sincronizar código de servidores con repositorios
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Generado: 2026-01-01 12:45 UTC*
|
||||||
|
*Sistema: CAPTAIN CLAUDE*
|
||||||
Reference in New Issue
Block a user