A snapshot of what was built, what passes, and what's still open on the Anthropic
batch-image-processor practice problem. Files are color-coded by role; the
review table flags every bug surfaced during the Phase 2 mock interview.
practicesolutiontesttooling
01Files created
practice
image_processor_practice_impl.py
Practice template. No library named, no API cheat sheet — interview-realistic.
Pillow imports + full API cheat sheet baked in. You flagged: "this gives me all the solution."
v2
Rewrote to "blank editor + Google open in another tab" framing. No library named, no imports, TODOs reframed as design decisions.
v3
You added Pillow imports and implemented apply_transforms, _process_image_worker, and process_images_parallel.
Test file
v1
24 tests, but unit tests were Pillow-specific — assumed your impl took/returned PIL Images.
v2
Refactored to library-agnostic: only checks files on disk. Pillow only used in the harness to create fixtures + read outputs back.
v3
Added 11 edge case tests → 30 total, all passing against the solution.
04Code review findings
From the Phase 2 mock interview review of your process_images_parallel.
#
Issue
Severity
Status
1
with ProcessPoolExecutor as executor: missing ()
Crash
Fixed
2
rotate(angle) without expand=True — fails dimension test
Test-fail
Open
3
sorted(jobs, key=...) returns new list; result discarded. Want jobs.sort(..., reverse=True) for largest-first
Perf nit
Open
4
Case-sensitive .endswith(...) misses .JPEG
Test-fail
Open
5
process_images (sequential) is still raise NotImplementedError
Test-fail
Deferred
6
type = transform["type"] shadows Python's built-in type
Style
Open
7
print(...) per output in the parallel map loop
Style
Open
8
Bare filenames passed to get_output_path — works with this harness, fragile in general
Subtle
Open
05Current test result on your code
3 / 4
Stage 2 parallel tests passing
The 4th errors only because the speed sanity check calls process_images first.
06Tooling installed this session
python
Pillow
pip install Pillow — used by both your implementation and the test harness (for fixtures + reading outputs).
claude code
html-docs skill
Installed to ~/.claude/skills/html-docs/SKILL.md. Powers this very document.
07Where to pick up next session
Fix the 4 open code issues (rotate expand, .lower().endswith(), sort-in-place, full paths to get_output_path).
Implement process_images sequentially — reuse _process_image_worker in a for-loop.
Run the full suite (python3 ant/test/image_processor_practice_test.py -v) for a complete scorecard.
Work through the Stage 3 discussion follow-ups: threads vs processes (with the GIL-release nuance for image libs), memory under parallel load, failure handling, scaling beyond one machine.