Add unit tests for lint scripts in hack/
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with extract_h1 and validate_experiment in hack/lint-experiment-frontmatter, then skim hack/lint-experiment-numbers and hack/lint-experiment-index. Run the frontmatter script on a sample experiment file that has a # YAML comment inside its frontmatter. Done means a pytest file such as hack/test_lint_scripts.py covers the listed cases, includes a regression test for the frontmatter-skipping fix in commit 05bd450e, and runs in CI.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened
On PR #36, the review agent caught a bug in the newly added extract_h1() function in hack/lint-experiment-frontmatter: the function did not skip YAML frontmatter when searching for H1 headings, meaning a YAML comment starting with # inside the frontmatter block could be misidentified as the document's H1 heading. The author fixed this in commit 05bd450e by adding frontmatter-skipping logic. The three lint scripts (lint-experiment-frontmatter, lint-experiment-numbers, lint-experiment-index) have zero test coverage — there are no test files in hack/ or elsewhere for these scripts.
What could go better
The frontmatter-skipping bug was only caught because the review agent reasoned about the code's behavior. A unit test with a frontmatter block containing a comment line (e.g., # this is a YAML comment) would have caught this deterministically during development, before the PR was even opened. As these lint scripts enforce core repo conventions and are modified when conventions evolve (as happened in this PR), they are high-value targets for test coverage. Without tests, future modifications to these scripts rely entirely on code review — human or agent — to catch regressions.
Proposed change
Add a test file (e.g., hack/test_lint_scripts.py) with pytest-based unit tests covering at minimum: (1) extract_h1 correctly skips YAML frontmatter and does not match comments inside it, (2) extract_h1 handles files without frontmatter, (3) H1/title mismatch detection in validate_experiment, (4) missing required frontmatter fields, (5) invalid status values, (6) topics field type validation. Wire the tests into CI via a GitHub Actions step or pre-commit hook. The lint-experiment-frontmatter script already uses standard Python with pyyaml as the only dependency, so tests should be straightforward.
Validation criteria
Tests exist for all three lint scripts covering at least the cases listed above. Tests run in CI on every PR. The specific frontmatter-skipping regression (YAML comment matching as H1) has a dedicated test case that would fail if the extract_h1 fix from commit 05bd450e were reverted.
Generated by retro agent from https://github.com/fullsend-ai/experiments/pull/36
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 9
- Merge medio
- 1g 13h
- PR unite (30g)
- 7
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 fullsend-ai/experiments
-
blocked
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
fullsend-ai/experiments#70 · 2 commenti · 1 reazione ·
-
blocked
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
fullsend-ai/experiments#68 · 2 commenti · 1 reazione ·
-
good first issue triaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
fullsend-ai/experiments#43 · 6 commenti ·
-
Fix broken qualityflow agent reference in .fullsend/config.yamlForse già presa @fullsend-ai-coder l’ha presa 77 giorni fa. Apertabug ready-for-triage ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
fullsend-ai/experiments#55 · 3 commenti ·
-
feature triaged
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 55/100
fullsend-ai/experiments#45 · 5 commenti ·
Tutte le issue di fullsend-ai/experiments
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
NVIDIA/auto-ontology#463 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
NousResearch/hermes-agent#151165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
code-health
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tinaudio/synth-setter#3750 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] vllm-sr config migrate drops providers.models[].deploymentForse già presa @Bevisy l’ha presa oggi. Apertaneeds-acceptance wg/developer-experience-ecosystem
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
vllm-project/semantic-router#5996 ·
I maintainer di solito rispondono entro 2 giorni