practice: preserve attempt history when questions change

Abierto
#72 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp, next.js, postgresql, react, typescript

Línea de trabajo

Start with the question data and progress/session files listed in the issue, then read ADR 0001 and the question-versioning step in docs/product-roadmap.md. Trace how attempts are validated, persisted, and imported or exported in both TypeScript and backend code. Done means shared fixtures and both runtimes preserve historical reviews and results through corrections, retirement, reload, sync, and reset, with the listed compatibility tests passing.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement help wanted

Related to #22 and the question-versioning step in docs/product-roadmap.md.

Problem

Saved attempts contain question IDs and selected option IDs. The frontend grades them against the current question bank. Changing an answer key can change a historical result; removing an ID can cause an attempt to be discarded during validation.

Scope

  • Record the question-revision and compatibility strategy in an ADR, following ADR 0001.
  • Keep reviewed definitions in the canonical shared question data. Identify the exact revision used by an attempt; do not accept browser-supplied answer keys or scores.
  • Keep retired revisions available for historical review while excluding them from new sessions.
  • Define a compatible interpretation or migration for existing unversioned browser and backend records.
  • Update TypeScript validation, backend validation, persistence and import/export contracts together. Document rollout and rollback.
  • Preserve the 100-attempt limit, payload bounds, account isolation and generation-based reset behavior.
  • Keep this separate from the planned game-history contract in #69.

Starting files

shared/practice/questions.json, src/features/progress/, src/features/practice/domain/session.ts, backend/src/ProCoderJi.Api/Features/Practice/PracticeQuestionBank.cs, and backend/src/ProCoderJi.Api/Features/Progress/.

Done when

Shared fixtures and both runtimes demonstrate that correcting or retiring a question preserves the original attempt's review and result. Tests cover existing unversioned records, revision mismatches, retirement, reload/export/import, cloud synchronization and reset compatibility across supported storage providers.

Lenguaje dominante
TypeScript
Estrellas
1
Forks
1
Merge medio
8 h 58 min
PR fusionados (30 d)
37

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de procoderji-com/procoderji

Todos los issues de procoderji-com/procoderji

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.