Preserve test run history
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Rust
- Stelle
- 160
- Fork
- 64
- Merge medio
- 1g 9h
- PR unite (30g)
- 114
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sysprog21/codetrial
-
Highlight the active line in the code editorForse già presa @ArthurArthurArthur0817 l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sysprog21/codetrial#247 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Include local time in downloaded report filenamesForse già presa @106081011 l’ha presa 1 giorno fa. Aperta
sysprog21/codetrial#309 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Avoid automatic bracket pairing inside comments and stringsForse già presa @Jonathas2127 l’ha presa 1 giorno fa. Aperta
sysprog21/codetrial#307 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
I maintainer di solito rispondono entro 1 giorno
-
Standardize section header and toggle indicator styles for test panelForse già presa @kumi222 l’ha presa 2 giorni fa. Aperta
sysprog21/codetrial#298 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di sysprog21/codetrial
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
ActivityWatch/aw-notify-rs#47 · 1 commento ·
-
`inverse()` of a controlled `CUGate` drops the phase parameter γForse già presa @rupasri118 l’ha presa oggi. Apertabug mod: circuit
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Qiskit/qiskit#17223 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni
-
agent:triaged bug bughunt pm:bundler priority:p1
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
SocketDev/socket-patch#1573 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
rustix::termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOSAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bytecodealliance/rustix#1706 · 1 commento ·
I maintainer di solito rispondono entro 11 giorni