Preserve test run history
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 62/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
Start in web/interview.js, where the Run tests handler and the Markdown export call reportMarkdown(), then read web/runners.js to see how each test result object is built, including where input is set only for custom or failed cases. Next, check web/render.js to see how the report is assembled. Done means each run is appended to a testHistory array, passing cases keep their input, and a Test Run History section appears in the exported Markdown, with regression tests under tests/browser/ covering it.
由索引模型根据 Issue 内容生成。
描述
Description
Currently, the interview report only preserves the candidate's final version of the code. Intermediate code changes, failed test runs, and error messages during the interview are not fully recorded.
This makes it difficult for candidates to review their mistakes after the interview, understand why their solutions failed, and reflect on how they could improve their problem-solving approach.
Expected Behavior
- Record each test run when the candidate clicks Run tests.
- Preserve the timestamp, test results, expected values, actual values, and available error messages for each run.
- Include a code snapshot only when the code differs from the previous test run, avoiding unnecessary duplication.
- Keep only the 10 most recent test runs to limit the size of the exported Markdown report.
- Include the test run history in the final Markdown interview report, alongside the existing final code and interview transcript.
- Preserve previous records within the retained history instead of overwriting them with the latest test results. Display the additional records only in the Markdown report without adding them to Past Attempts Reports.
Proposed Solution
1. Record test run history
Update web/interview.js to add a testHistory array to the interview state.
Before executing tests, capture the current code, programming language, and timestamp. After execution, append a record containing:
- Run number and timestamp
- Programming language
- Code snapshot, if the code has changed since the previous run
- Number of passed and total tests
- Setup errors and individual test case results
- Available input values, expected outputs, actual outputs, and error messages
After recording each run, retain only the 10 most recent entries.
2. Avoid duplicate code snapshots
Compare the current code with the code from the previous test run.
- If the code has changed, save a new code snapshot.
- If the code has not changed, record the test results without duplicating the code snapshot.
This reduces the size of the exported report while preserving meaningful code changes.
3. Include test history in the Markdown report
Update web/render.js to accept a testHistory parameter and generate a Test Run History section.
Each run should include its timestamp, test summary, available test case details, and a code snapshot when applicable.
Update the Markdown export function in web/interview.js to pass state.testHistory to reportMarkdown().
The existing final code section and interview transcript should remain unchanged.
4. Add regression tests
Update the relevant tests under tests/browser/.
Example Result
- 主要语言
- Rust
- 星标
- 160
- 派生
- 64
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 112
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sysprog21/codetrial 的其他 Issue
-
Four problem loader browser tests fail on Windows可能已有人在做 @Patriciaath999 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
sysprog21/codetrial#318 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
sysprog21/codetrial#317 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Highlight the active line in the code editor可能已有人在做 @ArthurArthurArthur0817 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
sysprog21/codetrial#247 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 1 天内回复
查看 sysprog21/codetrial 的全部 Issue
相似的 Issue
-
documentation good first issue
难度 2/5 半天 新手友好度 72/100
sujithputta02/Esapay#13 ·
-
needs triage
难度 2/5 1-3 小时 新手友好度 72/100
topgrade-rs/topgrade#2419 ·
维护者通常 1 天内回复
-
review-bot
难度 2/5 1-3 小时 新手友好度 72/100
midagedev/bloomery#318 · 1 条评论 ·
维护者通常 1 天内回复
-
area/infra good first issue type/bug
难度 2/5 1-3 小时 新手友好度 60/100
cristim/AztecCraft#92 ·
维护者通常 1 天内回复
-
Standalone Unix updater reports success when curl fails (`curl | sh` masks the exit status); Windows path is unaffected可能已有人在做 @akhil9tiet 今天认领。 未关闭bug CLI windows-os
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复