docs: actualizar estado del proyecto en README y STATUS

Co-authored-by: aider (openrouter/x-ai/grok-code-fast-1) <aider@aider.chat>
pull/1/head
borja 2 months ago
parent 837a9f5cc5
commit 20499e7425

@ -56,10 +56,11 @@ graph TD
- Environment variable validation (`src/server.ts`, `src/services/webhook-manager.ts`). - Environment variable validation (`src/server.ts`, `src/services/webhook-manager.ts`).
- Health check endpoint (`/health`). - Health check endpoint (`/health`).
- **User validation integration**: Normalization and `ensureUserExists` are now fully integrated in the main message handling flow (`src/server.ts`). - **User validation integration**: Normalization and `ensureUserExists` are now fully integrated in the main message handling flow (`src/server.ts`).
- **Comprehensive test suite**: All tests pass (86 pass, 0 fail), including integration tests for user validation. - **Comprehensive test suite**: All tests pass (97 pass, 0 fail), including integration tests for user validation.
- **Database isolation in unit tests**: Implemented using in-memory instances to avoid conflicts between tests.
### Incomplete / Missing Core Functionality ### Incomplete / Missing Core Functionality
- **User/Group Validation Integration:** Although normalization (`normalizeWhatsAppId`) and user creation (`ensureUserExists`) functions exist, they are **not yet integrated** into the main request handling flow in `src/server.ts` to validate senders or automatically add users on first message. Similarly, the active group cache from `group-sync.ts` is **not yet used** in `server.ts` to filter messages from inactive/unknown groups. - **User/Group Validation Integration:** Although normalization (`normalizeWhatsAppId`) and user creation (`ensureUserExists`) functions exist, they are **not yet integrated** into the main request handling flow in `src/server.ts` to validate senders or automatically add users on first message. Similarly, the active group cache from `group-sync.ts` is **not yet used** in `src/server.ts` to filter messages from inactive/unknown groups.
- **Core Command Logic:** Actual processing of `/tarea nueva` (parsing args, calling `TaskService`) is missing in `CommandService`. Other commands (`mostrar`, `completar`) not implemented. - **Core Command Logic:** Actual processing of `/tarea nueva` (parsing args, calling `TaskService`) is missing in `CommandService`. Other commands (`mostrar`, `completar`) not implemented.
- **Task Service Implementation:** `TaskService` needs updating to handle `created_by`, assignments, and potentially methods for listing/completing tasks. - **Task Service Implementation:** `TaskService` needs updating to handle `created_by`, assignments, and potentially methods for listing/completing tasks.
- **Response Sending:** `ResponseQueue` does not yet send messages back via the Evolution API. - **Response Sending:** `ResponseQueue` does not yet send messages back via the Evolution API.
@ -110,8 +111,9 @@ bun test
### Phase 1: User & Group Foundation (Highest Priority - In Progress) ### Phase 1: User & Group Foundation (Highest Priority - In Progress)
- [x] **Create WhatsApp ID Normalization Utility:** (`src/utils/whatsapp.ts`) Handle different ID formats. - [x] **Create WhatsApp ID Normalization Utility:** (`src/utils/whatsapp.ts`) Handle different ID formats.
- [x] **Implement `ensureUserExists`:** (`src/db.ts`) Add users to DB on first interaction. - [x] **Implement `ensureUserExists`:** (`src/db.ts`) Add users to DB on first interaction.
- [x] **Implement `isGroupActive` Check:** (`src/services/group-sync.ts`, `src/server.ts`) Cache exists in `group-sync.ts`. **Needs integration** into `server.ts`. - [x] **Implement `isGroupActive` Check:** (`src/services/group-sync.ts`, `src/server.ts`) Cache exists in `group-sync.ts`. **Needs integration** into `src/server.ts`.
- [x] **Integrate Validation in Server:** (`src/server.ts`) Use normalization, `ensureUserExists`, and active group check before processing commands. - [x] **Integrate Validation in Server:** (`src/server.ts`) Use normalization, `ensureUserExists`, and active group check before processing commands.
- [x] **Implement DB isolation in tests:** (`tests/unit/services/group-sync.test.ts`) Use in-memory instances to avoid conflicts.
### Phase 2: Implement `/tarea nueva` Command (High Priority) ### Phase 2: Implement `/tarea nueva` Command (High Priority)
- [ ] **Update `TaskService.createTask`:** (`src/tasks/service.ts`) Handle `created_by` and assignments (including adding assigned users via `ensureUserExists`). - [ ] **Update `TaskService.createTask`:** (`src/tasks/service.ts`) Handle `created_by` and assignments (including adding assigned users via `ensureUserExists`).
@ -159,6 +161,7 @@ bun test
- WhatsApp ID normalization (`whatsapp.test.ts`). - WhatsApp ID normalization (`whatsapp.test.ts`).
- Group sync operations (`group-sync.test.ts`). - Group sync operations (`group-sync.test.ts`).
- **Needed:** Tests for `ensureUserExists` integration, `isGroupActive` integration, `CommandService` logic, `ResponseQueue` processing (mocking API), `TaskService` operations. - **Needed:** Tests for `ensureUserExists` integration, `isGroupActive` integration, `CommandService` logic, `ResponseQueue` processing (mocking API), `TaskService` operations.
- All tests now pass (97 pass, 0 fail), including isolated DB instances for group-sync tests.
### Test Coverage ### Test Coverage
- Database initialization and basic operations (`db.test.ts`). - Database initialization and basic operations (`db.test.ts`).

@ -20,10 +20,12 @@
- Parser básico de acciones/fechas - Parser básico de acciones/fechas
- **Testing** - **Testing**
- Suite completa de tests unitarios - Suite completa de tests unitarios
- Todos los tests pasan (86 pass, 0 fail) - Todos los tests pasan (97 pass, 0 fail)
- **Validaciones de Usuario** - **Validaciones de Usuario**
- Integración completa de normalización y `ensureUserExists` en el flujo principal de mensajes - Integración completa de normalización y `ensureUserExists` en el flujo principal de mensajes
- Tests de integración para validaciones de usuarios - Tests de integración para validaciones de usuarios
- **Aislamiento de Base de Datos en Pruebas**
- Uso de instancias en memoria para evitar conflictos entre tests
## ⚠️ Funcionalidades Pendientes ## ⚠️ Funcionalidades Pendientes
- **Gestión de Tareas** - **Gestión de Tareas**
@ -36,8 +38,6 @@
- **Validaciones** - **Validaciones**
- Permisos de usuario no implementados - Permisos de usuario no implementados
- Sin verificación de pertenencia a grupos - Sin verificación de pertenencia a grupos
- **Eventos**
- GROUPS_UPSERT/MESSAGES_UPDATE sin manejar
- **Comandos** - **Comandos**
- Acciones de tareas no implementadas (crear/listar) - Acciones de tareas no implementadas (crear/listar)

Loading…
Cancel
Save