Code Review
Find bugs that affect results, reproducibility, data safety, or cluster use. Skip style nits.
Findings must be
- New in this change, unless asked for a broad audit.
- Impactful: name the input/scenario.
- Actionable: give the fix.
Severity
- P0: blocks commit/run/merge. Wrong result, lost data, secret leak, cannot rerun, serious cluster misuse.
- P1: fix before commit/merge. Realistic failure.
- P2: fix later.
- P3: nit. Do not report unless asked.
Verdict:
- LGTM: no P0/P1.
- FAIL: P0/P1 found.
Always check
- Hardcoded personal paths:
/Users/..., C:\Users\..., /home/netid/..., /gpfs/scratch60/netid/....
- Raw data, secrets, env dirs, or large outputs staged.
- Missing seeds in simulation, bootstrap, train/test split, UMAP, random forest, stochastic optimizer.
- Silent data loss:
dropna(), na.omit(), failed joins, duplicate drops, broad filters without counts.
- Lockfile drift: deps changed but
uv.lock / renv.lock not updated.
- Raw data mutation: code writes into
data/raw/ or overwrites inputs.
- HPC resource mismatch: requested 1 CPU but uses all cores; requested GPU but code does not use it.
- GPFS tiny-file storms.
- Package installs inside arrays.
- Scraping/API code without rate limit, cache, retry/backoff.
Process
- Read changed files fully.
- Check
git status --short and staged files.
- Run existing checks if practical.
- Run a small realistic smoke test if practical.
- For Slurm changes: check resources, thread env vars, paths, logs, resumability.
Output
## Findings
### [P1] Missing seed makes bootstrap estimates non-reproducible
**File**: scripts/bootstrap.py:42
**Issue**: `np.random.default_rng()` is called without a fixed seed.
**Fix**: create `rng = np.random.default_rng(42)` at the entry point and pass it in.
## Verdict
FAIL
If clean:
## Findings
None.
## Verdict
LGTM
Checklist
Further reading
Source: yale-som-hpc/claude-code-marketplace — distributed by TomeVault.
1---2name: code-review-3063description: Research code review. TRIGGER when reviewing code, diffs, PRs, or before committing. Use when this capability is needed.4---5# Code Review67Find bugs that affect results, reproducibility, data safety, or cluster use. Skip style nits.89## Findings must be1011- New in this change, unless asked for a broad audit.12- Impactful: name the input/scenario.13- Actionable: give the fix.1415## Severity1617- **P0**: blocks commit/run/merge. Wrong result, lost data, secret leak, cannot rerun, serious cluster misuse.18- **P1**: fix before commit/merge. Realistic failure.19- **P2**: fix later.20- **P3**: nit. Do not report unless asked.2122Verdict:2324- **LGTM**: no P0/P1.25- **FAIL**: P0/P1 found.2627## Always check2829- Hardcoded personal paths: `/Users/...`, `C:\Users\...`, `/home/netid/...`, `/gpfs/scratch60/netid/...`.30- Raw data, secrets, env dirs, or large outputs staged.31- Missing seeds in simulation, bootstrap, train/test split, UMAP, random forest, stochastic optimizer.32- Silent data loss: `dropna()`, `na.omit()`, failed joins, duplicate drops, broad filters without counts.33- Lockfile drift: deps changed but `uv.lock` / `renv.lock` not updated.34- Raw data mutation: code writes into `data/raw/` or overwrites inputs.35- HPC resource mismatch: requested 1 CPU but uses all cores; requested GPU but code does not use it.36- GPFS tiny-file storms.37- Package installs inside arrays.38- Scraping/API code without rate limit, cache, retry/backoff.3940## Process41421. Read changed files fully.432. Check `git status --short` and staged files.443. Run existing checks if practical.454. Run a small realistic smoke test if practical.465. For Slurm changes: check resources, thread env vars, paths, logs, resumability.4748## Output4950```text51## Findings5253### [P1] Missing seed makes bootstrap estimates non-reproducible54**File**: scripts/bootstrap.py:4255**Issue**: `np.random.default_rng()` is called without a fixed seed.56**Fix**: create `rng = np.random.default_rng(42)` at the entry point and pass it in.5758## Verdict59FAIL60```6162If clean:6364```text65## Findings66None.6768## Verdict69LGTM70```7172## Checklist7374- [ ] Changed files read75- [ ] Staged/untracked files checked76- [ ] Seeds checked77- [ ] Lockfiles checked78- [ ] Smoke test/check run if practical79- [ ] Slurm/resource behavior checked if relevant8081## Further reading8283- [Google code review guide](https://google.github.io/eng-practices/review/reviewer/)8485---86> Source: [yale-som-hpc/claude-code-marketplace](https://github.com/yale-som-hpc/claude-code-marketplace) — distributed by [TomeVault](https://tomevault.io).87<!-- tomevault:4.0:skill_md:2026-06-16 -->