From 06e09220aedb7bc161912066b5e0b4407bbdba2b Mon Sep 17 00:00:00 2001 From: Vladimir Zagainov Date: Sun, 19 Jul 2026 18:23:13 +0300 Subject: [PATCH] feat: document Scanner Engine implementation status and normalize convention --- CLAUDE.md | 2 ++ README.md | 10 ++++++++++ docs/plans/2026-07-19-scanner-engine-fuzzy-diff.md | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a530383..15fa667 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -109,6 +109,8 @@ Based on the specification (docs/Specification.md), the application follows a mo - Handles removal of special characters, years, and bracketed keywords - Compares local albums vs. external discographies + Shared normalization lives in `internal/normalize` (`NormalizeString`, `NormalizeArtistName`) — this is the single source of truth for string normalization, reused by both `internal/musicbrainz` and `internal/scanner`. Do NOT add local copies of normalization logic elsewhere. + 4. **Database Layer** (`internal/database/` or similar) - SQLite 3 integration via github.com/mattn/go-sqlite3 - Subsonic API client via github.com/delucks/go-subsonic diff --git a/README.md b/README.md index 4fa2e5c..52c562a 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,11 @@ See [docs/Specification.md](docs/Specification.md) for the full configuration re | **Notifier** | Scheduled Telegram notifications | | **Web UI** | Dashboard for browsing and managing missing releases | +### Implementation Status + +- **Scanner Engine** — implemented (compute-only). The missing-release detection core is complete: string normalization lives in `internal/normalize`, similarity scoring and the diff engine (`FindMissingReleases`, `ScanArtist`, `ScanAll`) in `internal/scanner`. It uses the configurable `scanner.fuzzy_threshold` (default 0.85), normalizes titles (ignoring `(Remastered)`/year/special-char variants), and skips releases marked ignored. +- **Notifier and Web UI** — not yet implemented (out of scope for the scanner plan). `main.run()` currently performs a compute-only scan and logs missing-release counts; it does not persist results or send notifications. + ### License [WTFPL](License.md) — Do What The Fuck You Want To Public License @@ -212,6 +217,11 @@ scanner: | **Notifier** | Планировщик уведомлений в Telegram | | **Web UI** | Панель управления отсутствющими релизами | +### Статус реализации + +- **Scanner Engine** — реализован (только вычисления). Ядро поиска отсутствующих релизов готово: нормализация строк в `internal/normalize`, оценка схожести и движок сравнения (`FindMissingReleases`, `ScanArtist`, `ScanAll`) в `internal/scanner`. Используется настраиваемый `scanner.fuzzy_threshold` (по умолчанию 0.85), игнорируются варианты `(Remastered)`/год/спецсимволы, пропускаются отмеченные как игнорируемые. +- **Notifier и Web UI** — пока не реализованы (вне рамок плана сканера). `main.run()` выполняет только вычислительное сканирование и логирует количество отсутствующих релизов; результаты не сохраняются и уведомления не отправляются. + ### Лицензия [WTFPL](License.md) — Do What The Fuck You Want To Public License diff --git a/docs/plans/2026-07-19-scanner-engine-fuzzy-diff.md b/docs/plans/2026-07-19-scanner-engine-fuzzy-diff.md index ba161fc..875eb6d 100644 --- a/docs/plans/2026-07-19-scanner-engine-fuzzy-diff.md +++ b/docs/plans/2026-07-19-scanner-engine-fuzzy-diff.md @@ -91,8 +91,8 @@ - [x] verify test coverage of `internal/scanner` and `internal/normalize` (target 80%+) — scanner 90.3%, normalize 100.0% ### Task 7: Update documentation -- [ ] update `README.md` to note the Scanner Engine is implemented (compute-only; notifier/web pending) -- [ ] add a short note in `CLAUDE.md` or a plan-completion comment if new package conventions (e.g. `internal/normalize` is the shared normalization home) were established +- [x] update `README.md` to note the Scanner Engine is implemented (compute-only; notifier/web pending) +- [x] add a short note in `CLAUDE.md` or a plan-completion comment if new package conventions (e.g. `internal/normalize` is the shared normalization home) were established ## Technical Details - **Normalization** (`internal/normalize`): port regexes from `musicbrainz/api.go`: