5 Commits

Author SHA1 Message Date
david ebce8fded8 fix: return empty arrays instead of null in listPartitions, listVolumes, handleDiskVolumes 2026-06-22 04:52:55 -07:00
david 190c79487f fix: return empty array instead of null for tagless volumes 2026-06-22 04:47:29 -07:00
david 568691542a feat: Sample Tag Viewer — read-only tag browser for AKAI disk images
Backend:
- extract.go: listTags() navigates to volume, runs akaiutil lstags
- extract.go: parseTags() parses tag name/index from lstags output
- serve.go: GET /api/disk/partitions — list partitions on an ISO
- serve.go: GET /api/disk/volumes — list volumes on a partition
- serve.go: GET /api/volume/tags — list tags on a volume

Web UI:
- Tag Viewer section with ISO path input and Browse button
- Partition selector buttons
- Volume grid with click-to-select
- Tag chips with color-coded dots (20-color palette)

Tests:
- 6 parseTags tests (basic, spaces, defaults, no tags, empty, no-type)
- 1 listTags integration test
- 4 API endpoint tests (partitions, missing-ISO, missing-params, tags)

Karpathy: read-only view first — no write operations yet (settagi, clrtagi)
2026-06-22 03:21:54 -07:00
david 120993fb02 test: add comprehensive test suite - 5 test files, 65% coverage
- cli_test.go: 10 tests for list/search/extract/download commands
- serve_test.go: 11 tests for HTTP handlers and SSE progress
- http_test.go: 5 subtests for archive.org API
- download_test.go: 10 tests for download logic
- util_test.go: 7 tests for string/util helpers

Error paths covered: server errors, empty results, download failures,
extract failures, missing identifiers, ReadDir errors.

golangci-lint: 0 issues, go vet: clean
2026-06-21 23:54:57 -07:00
david ea2bcde74b feat: reimplement WAV extraction in Go (replaces extract_wavs.sh)
extract.go replaces the bash script with idiomatic Go:
- akaiutil process communication via stdin/stdout pipes
- partition enumeration (df output parsing)
- volume enumeration (dir output parsing per partition)
- sample2wavall per volume with WAV count aggregation

runAkaiutil is a package-level var — tests stub it with canned
output to verify parsing without a real akaiutil binary or ISO.

Removed: findScript(), -tool flag on extract, os/exec from main.go
Kept: extract_wavs.sh as a standalone utility (no longer called)
2026-06-21 22:17:24 -07:00