changelog

quietlight
May 18, 2026, 11:41 PM
XVJ2RNWUSHVSQKNHU54XBIY5E7VDE6QUPTVIV52GRBAQAO7WOQOAC

Dependencies

  • [2] 2MZO5RDB fifth phase of utils refactor, astro/
  • [*] KZKLAINJ run out of space on nest, cleaned out

Change contents

  • edit in CHANGELOG.md at line 4
    [4.1198010]
    [2.8684]
    ## [2026-05-19] utils/ refactoring complete — all 5 phases done
    Refactored `utils/` from a 4,000-line, 26-file dumping ground into a focused 1,287-line, 11-file leaf package by extracting 5 cohesive packages:
  • edit in CHANGELOG.md at line 9
    [2.8685]
    [2.8685]
    | Package | Files | Key Exports |
    |---|---|---|
    | `mapping/` | 1 | `File`, `Load`, `Classify`, `Kind`, sentinel constants |
    | `audio/` | 5 | `Float64ToPCM16`, `AudioPlayer`, `BandpassShiftFilter`, `PowerSpectrumFFT`, `Resample`, `ResampleRate` |
    | `wav/` | 4 | `WAVMetadata`, `ParseWAVHeader`, `WriteWAVFile`, `AudioMothData`, `GainLevel`, `ResolveTimestamp`, `ProcessSingleFile` |
    | `spectrogram/` | 3 | `GenerateSpectrogram`, `SpectrogramImageFromSamples`, `WriteImage`, `ApplyL4Colormap`, `ImageProtocol` |
    | `astro/` | 1 | `AstronomicalData`, `CalculateAstronomicalData`, `CalculateMidpointTime` |
    **Key outcomes:**
    - `utils/` is now a true leaf package — zero `database/sql` imports, zero DB interfaces, zero `*Input/*Output` structs, no `skraak/*` imports
    - No circular imports; all extracted packages are leaf-level with clear dependency direction
    - DB-facing interfaces moved to their consumers (`tools/import/`, `db/tx_logger.go`), each defining its own minimal interface
    - All interfaces standardized on `*Context` method variants, compatible with `*sql.DB`/`*sql.Tx`
    - `ResolveTimestamp`/`ProcessSingleFile` landed in `wav/` after Phase 4 broke the import cycle
    See per-phase entries below for detailed change records.