practice: preserve attempt history when questions change

未關閉
#72 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
csharp, next.js, postgresql, react, typescript

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
TypeScript
星號
1
分支
1
平均合併
8 小時 58 分鐘
30 天內合併 PR
37

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

procoderji-com/procoderji 的其他 Issue

查看 procoderji-com/procoderji 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。