[DERCBOT-1783] Admin: add evaluation sample management API#2001
Conversation
antoine-billiet-arkea-partnre
commented
Feb 10, 2026
- Add EvaluationSample and Evaluation models with all required fields
- Add ActionRef, EvaluationReason, EvaluationsResult, Evaluator models
- Implement EvaluationSampleDAO and EvaluationDAO interfaces
- Implement MongoDB DAOs with proper indexing
- Add EvaluationService with sample creation, evaluation, and status management
- Add EvaluationVerticle with REST endpoints for CRUD operations
- Add unit tests for service and integration tests for DAOs
- Support pagination for action-refs with status filtering
- Add evaluationsResult computation (total, evaluated, remaining, positiveCount, negativeCount)
b085a81 to
5c295f2
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds an evaluation sample management API for bot administrators. It introduces a comprehensive evaluation system allowing users to create evaluation samples from bot dialog actions, evaluate them (UP/DOWN with reasons), and manage their lifecycle (IN_PROGRESS/VALIDATED/CANCELLED).
Changes:
- Adds data models for evaluations (EvaluationSample, Evaluation, ActionRef, Evaluator, EvaluationReason, etc.)
- Implements MongoDB DAOs with proper indexing for persistence
- Adds REST API endpoints via EvaluationVerticle for CRUD operations
- Removes auto-generated Kotlin serializer/deserializer files (build artifacts)
Reviewed changes
Copilot reviewed 20 out of 159 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| bot/storage-mongo/target/generated-sources/kapt/compile/*.kt | Deleted auto-generated serialization files (build artifacts) |
| bot/engine/src/main/kotlin/admin/evaluation/*.kt | New evaluation domain models and DAO interfaces |
| bot/storage-mongo/src/main/kotlin/EvaluationMongoDAO.kt | MongoDB implementation for Evaluation DAO |
| bot/storage-mongo/src/main/kotlin/EvaluationSampleMongoDAO.kt | MongoDB implementation for EvaluationSample DAO |
| bot/storage-mongo/src/main/kotlin/Ioc.kt | IoC bindings for new DAOs |
| bot/admin/server/src/main/kotlin/verticle/EvaluationVerticle.kt | REST API endpoints for evaluation management |
| bot/admin/server/src/main/kotlin/BotAdminVerticle.kt | Integration of EvaluationVerticle |
| .idea/runConfigurations/BotAdmin.xml | IDE configuration update |
Files not reviewed (1)
- .idea/runConfigurations/BotAdmin.xml: Language not supported
There was a problem hiding this comment.
The generated files are intentionally committed in order to track changes made by the generators
There was a problem hiding this comment.
not blocking but if tou have 2s to commit them again ;)
assouktim
left a comment
There was a problem hiding this comment.
Thanks! There are still a few improvements to be made. I'll let you see my comments.
- Add EvaluationSample and Evaluation models with all required fields - Add ActionRef, EvaluationReason, EvaluationsResult, Evaluator models - Implement EvaluationSampleDAO and EvaluationDAO interfaces - Implement MongoDB DAOs with proper indexing - Add EvaluationService with sample creation, evaluation, and status management - Add EvaluationVerticle with REST endpoints for CRUD operations - Add unit tests for service and integration tests for DAOs - Support pagination for action-refs with status filtering - Add evaluationsResult computation (total, evaluated, remaining, positiveCount, negativeCount)
…able filter, 422, cascade delete - DialogReportQuery: add random and evaluableActionsOnly params - UserTimelineMongoDAO: $sample, buildEvaluableActionsFilter - EvaluationService: flatMap, debug filter, 422 on no dialogs, evaluableActionsOnly - UnprocessableEntityException: HTTP 422 with code 4221, NO_DIALOG_FOUND - EvaluationSampleDAO: deleteByNamespaceAndBotId for cascade - BotAdminService: call cascade delete in deleteApplication - AbstractNamespaceRetriever: extract currentContextApp - ktlint: fix UnprocessableEntityException (no-empty-first-line-in-class-body) Co-authored-by: Cursor <cursoragent@cursor.com>
Generated files from KMongo/kapt for BotApplicationConfiguration and BotConfiguration. Intentionally committed to track changes made by the generators. Co-authored-by: Cursor <cursoragent@cursor.com>
5c295f2 to
7674e42
Compare
- Remove duplicate import in UserTimelineMongoDAO.kt - Reorder imports per standard:import-ordering - Format deleteByNamespaceAndBotId signature in EvaluationSampleMongoDAO.kt Co-authored-by: Cursor <cursoragent@cursor.com>
- Replace wildcard imports with explicit imports in EvaluationService - Fix import ordering in BotAdminService - Fix spacing, indentation and blank lines in GenAIVerticle, AbstractNamespaceRetriever, EvaluationVerticle - Fix multiline expression in EvaluationServiceTest Co-authored-by: Cursor <cursoragent@cursor.com>
EvaluationSampleDTO is in model.evaluation, not evaluation package Co-authored-by: Cursor <cursoragent@cursor.com>
assouktim
left a comment
There was a problem hiding this comment.
All that's missing is the commit of the regenerated files.
Ok for changes, thanks!
Restore 132 KAPT-generated files accidentally removed in fdab228. Aligns with master (138 tracked files in bot/storage-mongo/target/). Co-authored-by: Cursor <cursoragent@cursor.com>
…, add TU - POST create sample: return 201 Created instead of 200 - DELETE sample: return 204 No Content without body - Rename ActionRefsQuery -> EvaluationDialogsQuery, ActionRefsResponse -> EvaluationDialogsResponse - Rename getActionRefs -> getEvaluationDialogs with KDoc comments - Add EvaluationModelTest for EvaluationDialogsQuery serialization - Add TU: findSampleById, getEvaluationDialogs throws, evaluate/changeStatus edge cases - Add TU: getEvaluationDialogs with missing dialogs (missingRefs) - ktlint fixes Made-with: Cursor
Made-with: Cursor