AletheiaFact / AletheiaFact/aletheia
INST-2 · Materialize stateHistory[] + stageDurations on the reviewTask
- Lenguaje dominante
- TypeScript
- Estrellas
- 55
- Forks
- 20
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 2
Descripción
> Item derived from the fact-checking cycle analysis (**2026-07-03**). Production numbers (namespace `main`), unless noted.
### Finding (evidence)
Measuring time-per-stage today requires parsing **163 MB** of `histories` and rebuilding each task's timeline from `details.after.value` (a generic field, easy to get wrong — that's where the first pass went wrong).
### Action
A single `transitionState()` helper that, on transition, writes to `histories` (as today) **and** pushes to a typed `stateHistory[]` (`from` / `to` / `at` / `byUserId` / `byRole`) + recomputes `stageDurations` / `cycleMetrics`. Retroactive backfill already available (it's the reconstruction run during the analysis).
### Impact
Time-per-stage becomes a flat field; no future analysis needs to rebuild the timeline.
---
- **Priority:** 🔴 High · **Effort:** M (medium)
- **Dependencies:** requires migration/backfill (`needs-migration`). Wave 2, alongside INST-4.
- **Epic:** #2489
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start at the reviewTask transitionState() entry point and inspect how histories is currently written. Trace the existing reconstruction/backfill run for the fields, then verify that transitions produce stateHistory[], stageDurations, and cycleMetrics so future analysis no longer needs to rebuild the timeline.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- backend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100