Repository navigation
Modernize postparse: schema v2, pydantic-ai, video transcripts, shared services (0.2.0) - #2
Merged
Merged
Conversation
- classify router: /classifiers uses LLMConfig.default_provider, survives invalid LLM config (warning, empty provider list), drop unused imports - tests: root conftest isolates cwd into a tmp dir with a minimal test config, blocks repo .env/config.toml loading, guards sqlite3.connect against <repo>/data, strips credential env vars, blocks real Redis - pytest-socket (loopback only); `live` marker + --run-live option for tests that talk to real LLM servers - mock model discovery, ChatLiteLLM patch targets, LLM-unavailable API tests, parser login/rate-limit sleeps, backoff sleeps, rate-limit refill - CLI: rich traceback show_locals=False; new main() entry point reconfigures non-UTF-8 stdout/stderr (fixes piped output on Windows) - deps: pin litellm==1.80.0; data-science libs moved to `notebooks` extra; remove langchain-community and email-validator; add pytest-socket, ruff - ruff config (not enforced yet); cleanup of empty cookiecutter folders, test_unit_results.txt; .gitignore tool caches and MagicMock/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move backend/postparse to src/postparse (import name `postparse`) and rewrite all backend.postparse references in source, tests, docs and pyproject (hatch packages, console script). Flatten tests/unit/backend and tests/integration/backend one level up. No behaviour changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e (WP3a) Add a new SQLite layer next to the legacy core/data/database.py: - postparse.config.Settings (pydantic-settings): data/db/sessions/downloads/tmp paths from [paths]/[database].db_path, overridable via POSTPARSE_* env vars. - core/timeutil (canonical UTC timestamps) and core/urls (extract/normalize). - core/db: per-unit-of-work connections with fixed PRAGMAs, a checksummed migration runner and 0001_initial.sql (STRICT tables, CHECKed timestamps, FTS5 external-content index over search_docs). - Repositories for items, tags, media, transcripts, summaries, links, classification (taxonomy versioning, pending scopes) and search docs. - services/query.QueryService with keyset pagination, filters, FTS snippets, item detail, tag counts and JSON/CSV export. - CLI: postparse db migrate | check | reindex. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add core/db/legacy_v1.migrate_v1 and `postparse db migrate-v1`: reads the v1 file read-only, builds <target>.tmp, verifies counts/labels/FTS/ integrity/FK and 20 sampled items against the source, then atomically replaces the target. Covers items and detail rows, tags (Telegram re-derived via new core/text extractors), media incl. orphan-file recovery and pending Instagram video rows, links, content_expanded (ftfy repair via optional `migrate` extra), and legacy classification runs. Also break the filters <-> repos import cycle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the new LLM/classification/service layer next to the old stack: - llm/client.py: build_model() turns a ProviderConfig into a pydantic-ai OpenAIChatModel (OpenAI and OpenAI-compatible servers such as llama.cpp) or AnthropicModel; the served model is discovered once per provider config and cached. output_mode_for() picks NativeOutput (json_schema) for OpenAI-compatible endpoints and ToolOutput for cloud APIs; max_concurrency_for() defaults to 1 for self-hosted servers. run_sync() runs coroutines on the thread's persistent loop. - llm/config.py: ProviderConfig gains api_type, output_mode, max_concurrency and discover_model. - llm/model_discovery.py: private-network/LAN endpoints count as self-hosted, so e.g. a llama.cpp server on 192.168.x.x is discovered. - llm/health.py: provider health checks on the openai/anthropic SDKs (list models, one-token chat ping, optional embeddings ping). - classification/: TaxonomySpec/LabelSpec (config [[classification. taxonomies]], fallback to [[classification.classes]] as "topics"), runtime output models with Literal labels, prompts + prompt_sha256, and TaxonomyClassifier (sync/async, bounded-concurrency batches, 2 output retries, empty input never calls the model). - services/classification.py: ClassificationService.classify_pending() selects pending items per scope (default/backfill/reprocess), composes caption + transcripts + summary + link texts + legacy expanded text within a char budget, skips empty items and items waiting for transcripts, stores ok/no_labels/error results per item and finishes the run with counts; classify_text() for ad-hoc use. - repos: ItemsRepo.legacy_expanded_texts(), ClassificationRepo. taxonomy_stats(). - deps: pydantic-ai-slim[openai,anthropic], openai; requires-python is now >=3.11 (pydantic-ai needs it; the code already used datetime.UTC). - tests: pydantic-ai TestModel/FunctionModel based tests; ALLOW_MODEL_REQUESTS is disabled for the whole suite. The old LangChain/LiteLLM classifiers are still in place; adapters move in the follow-up commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move every caller onto the generic taxonomy classifier and delete the old LangChain + LiteLLM classifiers. CLI (cli/classify.py rewritten as thin adapters over ClassificationService): - classify run --taxonomy NAME [--source] [--scope|--backfill|--reprocess] [--with-transcript] [--since] [--limit] [--provider] [--db] [--no-wait-transcripts] with rich progress and a summary table - classify text TEXT [--taxonomy | --labels a,b --mode single|multi] (hidden deprecated --classifier/--classes still map to ad-hoc specs) - classify taxonomies (configured + stored, version, result counts) - classify db: deprecated alias for `run --taxonomy topics` (--force -> reprocess, --filter-hashtag -> tag filter, --classifier/--classes/ --replace ignored with a warning) - read-only commands never create the database - check llm uses llm/health.py (openai SDK) instead of LiteLLMProvider API: - all /api/v1/classify/* paths and response schemas kept; recipe = ad-hoc single taxonomy recipe/not_recipe, multi = ad-hoc single from request classes (default: configured topics labels), multilabel = ad-hoc multi - classifiers cached per (spec hash, provider, config) behind the get_classifier_factory dependency; endpoints are async - /classifiers also lists configured taxonomies and provider output mode/concurrency - lifespan warm-up runs in a thread with a timeout and never fails startup Removed: services/analysis/classifiers, llm/provider.py, litellm, langchain-core, langchain-litellm (and their transitive deps). tenacity is now an explicit dependency (used by the Instagram parser, previously pulled in by langchain-core). Tests were rewritten on pydantic-ai FunctionModel fakes (tests/fake_llm.py); model discovery is disabled in the suite unless a test is live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… v2 (WP5) New collectors write straight into the schema v2 database in small transactions instead of loading whole feeds into memory: - postparse.collectors.base: typed errors (CollectorError, AuthRequired, Telegram/InstagramAuthRequired, RateLimited, Telegram/InstagramRateLimited, CredentialsMissing), progress events, CollectStats, BatchWriter, safe_filename; collectors.credentials reads the env vars (secrets hidden from repr, never logged). - TelegramCollector (Telethon 1.45, async context manager): session <sessions_dir>/telegram.session with fallback to the legacy data/cache/telegram_session.session; incremental via min_id (oldest first, resumable) or --full; photos/documents downloaded to downloads/telegram/YYYY/MM/DD/<id>_<name> with sha256/size/mime and a max size; video/voice/audio recorded as media rows without download; links from URL entities + text; FloodWait above flood_sleep_threshold -> TelegramRateLimited. No nest_asyncio, asyncio.run only at the edge. - InstagramCollector (instaloader 4.15.5): session <sessions_dir>/instagram_<user> with fallback to ./instagram_session, test_login, password login, interactive 2FA prompt; checkpoint/bad credentials -> InstagramAuthRequired, 429 -> InstagramRateLimited. collect_saved() maps posts from the feed node only (no extra requests, no image CDN URLs; videos get pending media rows), stops after N consecutive known posts, sleeps only between new posts and commits in batches. refresh_dates() re-fetches date_utc of v1-migrated posts. - Migration 0002 adds instagram_posts.date_status (NULL = unverified v1 date, 'verified', 'unavailable'); ItemsRepo gains instagram_unverified_dates() and set_instagram_date(). - ExtractionService(db, settings) returns ExtractionReport for every outcome, including partial runs ended by rate limits or logins. - CLI extract telegram/instagram/all on the service and the v2 DB (--db, --session, --limit, --force, --full, --stop-after-known, --batch-size, --refresh-dates, --refresh-limit, --interactive/--no-interactive); exit code 2 for login required, 3 for rate limits. The old parsers stay for the API and `check` until WP8 (nest-asyncio is kept because the old Telegram parser still imports it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s (WP6) Instagram Reels carry their content in the audio track. This adds a throttled transcription queue plus short LLM summaries; no media files are kept (everything lives in a per-media scratch dir below tmp_dir/transcribe and is deleted after each media, also on errors and Ctrl-C). - media/fetch.py: InstagramVideoFetcher downloads fresh remote URLs (streamed, size cap, timeout) or re-fetches the post via a logged-in InstagramCollector (one login per run, 20-60 s jitter between re-fetches), stores the fresh URL; deleted/private posts -> MediaUnavailable (skipped), rate limits / auth errors stop the run. - media/audio.py: PyAV probe, extract_audio (m4a / wav16k) and decode_pcm16k; no system ffmpeg needed. - media/transcription: backend protocol, faster-whisper backend (large-v3-turbo, CUDA int8_float16 / CPU int8, VAD, lazy process-wide model, Windows CUDA DLL registration, CPU fallback) and an OpenAI-compatible /v1/audio/transcriptions backend. - services/transcription.py: TranscriptionService.run/status with per-media commits, exponential backoff, max attempts, no_audio/skipped. - summarization + services/summarization.py: pydantic-ai summarizer (summary + up to 5 key points, content language), stored as summary + bullet list in summaries.text (searchable, no migration). - CLI: transcribe run/status, summarize run, extract instagram --transcribe. - Optional extra `asr` (faster-whisper + nvidia cuBLAS/cuDNN wheels); base dependency `av`. Repos: mark_transcribed(reason), set_duration, transcribable_for_items, items_with_fresh_urls, queue_stats, items_needing_summary; InstagramCollector.fetch_post. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
instaloader's BadResponseException("... metadata failed") is also what
Instagram returns when it soft-blocks a session, so treating it as a
deleted post marked valid reels permanently 'skipped'. Only
QueryReturnedNotFoundException / ProfileNotExistsException and a post
without a video at the media position now mean MediaUnavailable; every
other re-fetch failure raises the new RefetchError (a FetchError, retried
with backoff).
TranscriptionService gets a circuit breaker: after
transcription.max_consecutive_refetch_failures (default 3, 0 disables)
re-fetch failures in a row the run stops with
stopped_reason="suspected_block". `postparse transcribe run` exits with
code 3 and tells the user to wait a few hours (committed work is kept).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-dlp, fxtwitter (WP7) New package postparse.enrichment replaces services/enrichment/*: - fetchers.generic: httpx (redirects, 15 s timeout, 5 MB body cap, honest "postparse/<version>" User-Agent); HTML -> trafilatura (markdown-ish text, title/author/date/sitename), readability-lxml fallback for short/empty output; text/plain stored as-is; other content types skipped without downloading the body. - fetchers.documents: PDF/Office/EPUB -> markitdown (by content type or URL extension, 20 MB cap, worker thread, raw-file fallback detected). - fetchers.youtube: oEmbed + yt-dlp metadata (skip_download; description, upload date, duration, tags, chapters) + best-effort transcript via youtube-transcript-api (de, en, then any). yt-dlp is the optional extra `youtube`, pinned to 2026.8.19 after checking PyPI provenance. - fetchers.x: fxtwitter JSON API (text, author, media, quote) with publish.twitter.com oEmbed fallback. - fetchers.instagram: Instagram links are always skipped (no request). - fetchers.router: first-match routing, per-domain throttle (1 s), global concurrency (4), per-link timeout, exceptions -> error results, and RetryPolicy (exponential backoff from the last attempt, give up after max_attempts). services.enrichment.EnrichmentService selects links without a non-legacy fetch (so legacy_v1 texts are re-enriched; the legacy fetch stays as fallback, newest ok fetch wins) plus due retries, stores each result in its own transaction (text capped at 20k chars), refreshes search documents and deletes an item's legacy_expanded_text once all its links have a fresh result. LinksRepo gains enrichment_states/items_for_link/ legacy_text_settled. Config: [enrichment]. CLI: `postparse enrich run` (--source/--limit/--force/--no-legacy/--domain/ --db) and `enrich status`; `enrich scrape` is a deprecated alias of run and `enrich urls` a deprecated no-op. lxml upper bound raised to <7 (trafilatura 2.3 needs lxml 6); respx added for tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… v2 (WP8a) - search: `search items [QUERY]` (FTS with snippets, --source/--tag/--author/ --kind/--label/--from/--to/--has-transcript, --limit/--cursor/--json); `search posts` / `search messages` kept as source-restricted aliases (old --hashtag/--username/--type/--output still accepted). - stats / db stats: new services/stats.py (counts per source/kind, top tags, transcription queue, link fetch status, classification coverage with pending default/backfill counts, summaries, size, schema version); --json. - db export: QueryService.export (json/csv, search filters, --limit, `-` for stdout); QueryService.export gained an optional limit. - check: shrunk to new stack. `check llm` via llm/health (discovered model, latency), `check telegram|instagram` offline by default (session path, credential names only) with explicit --login, `check transcription` (faster-whisper/CUDA or API reachability, --load-model), `check db`, `check all`. Exit 0 ok / 1 problems. - config: show/validate/env cover Settings paths and the transcription, summarization, enrichment and classification sections; secrets masked, env values never printed. The v1 key [database] default_db_path is ignored and reported by `config validate` / `db check`. - utils: old-layer helpers removed; resolve_db_path / open_database (read-only, no create/migrate) / legacy_db_key_warning added. info shows paths and the v2 database. POSTPARSE_NO_DOTENV=1 skips .env loading. - CLI tests rewritten against seeded tmp v2 databases and fakes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API now uses exactly the services the CLI uses (QueryService,
ClassificationService, ExtractionService, TranscriptionService,
SummarizationService, EnrichmentService, collect_stats) on the schema v2
database. Services are built once in the lifespan (api/deps.py) and kept on
app.state; create_app() replaces the import-time ConfigManager.
- api/jobs: generic JobRunner (progress -> job state + ordered WebSocket
events, error codes for AuthRequired/RateLimited/suspected_block/
backend_unavailable, cache invalidation after jobs) and job kinds
telegram_extract, instagram_extract, transcribe, summarize, enrich, classify
- new endpoints: /api/v1/items (+ detail, transcript, summary), /stats,
/taxonomies, /transcription/run|status, /summaries/run, /enrichment/run|
status, /classify/run, /classify/{taxonomy}[/batch] with persist, /jobs list
and /jobs/{id}/ws; all old paths kept (platform job/WS routes are aliases)
- fixes: Instagram jobs always failing, Telegram failure None-deref, list
endpoints ignoring offset/owner/channel and returning no hashtags, search
filters sent as GET bodies, blocking work in async handlers, cache never
invalidated, batch classify dropping per-item errors, classify never
persisting, `serve --config` not reaching the app, uppercase log level
- cache: namespaced postparse:v2:{resource}:{hash} keys with prefix
invalidation (Redis or in-memory fallback)
- tests: OpenAPI path snapshot of the pre-port API plus new integration tests
on a seeded v2 database with fake services; e2e workflows ported to v2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(WP8c) - delete core/data (SocialMediaDatabase), services/parsers, the old API extraction service and the empty core/models, helpers and visualization packages together with their tests - the v1 fixture of the legacy migration tests is built from tests/fixtures/v1_schema.sql (the exact v1 DDL incl. ALTER-added columns); core/db/legacy_v1.py never depended on the old module - old content_expanded tests and the mock_db / real_database fixtures removed - python-jose -> PyJWT (same HS256 validation; tests for valid, expired and invalid tokens), toml -> stdlib tomllib (nothing writes TOML), drop nest-asyncio and tenacity (no longer imported); uv.lock updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- pytest_configure sets POSTPARSE_NO_DOTENV=1 for the whole session (also inherited by subprocesses); load_env_files tests remove it via monkeypatch. - The dotenv guard now patches DotEnv._get_stream and find_dotenv as well, so direct dotenv.main imports, dotenv_values and implicit discovery cannot read a repository .env; blocked attempts are recorded as violations. - isolation_guard fixture exposes the violation lists and credential variable names only; env assertions are boolean so failures never print os.environ. - Regression tests for cli/api imports, `postparse --help` and the guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- requires-python >=3.12, version 0.2.0, real description, GitHub URLs. - Drop upper caps that blocked majors (websockets, redis, rich, python-json-logger, fastapi, uvicorn, pydantic, openai, pydantic-ai, ...); keep telethon <2 (API rewrite) and markitdown <0.2 (pre-1.0). - uv lock --upgrade with a 7-day cooldown (--exclude-newer 2026-10-19, not persisted); packages already locked from earlier work packages that are newer than the cutoff keep their locked versions. yt-dlp stays 2026.8.19. - Dev tools only in [dependency-groups].dev (ruff, mypy, pytest stack, fakeredis, respx; black/isort/pylint dropped); docs group; extras left: asr, youtube, migrate, notebooks. - Fixes for the upgrades: rich-click 1.9 config names (TEXT_MARKUP, OPTIONS_TABLE_*), pythonjsonlogger.json.JsonFormatter, redis set(ex=) instead of setex, HTTP_422_UNPROCESSABLE_CONTENT, FastAPI nested router route iteration in the OpenAPI snapshot test, pytest-asyncio loop scopes (no event_loop_policy override), 32-byte JWT test secrets. - Version single-sourced from package metadata. - DeprecationWarnings attributed to postparse are errors in the test suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mechanical only: `ruff check --fix` (safe fixes: import sorting, unused imports, PEP 585/604 annotations, whitespace) and `ruff format` on src and tests; ruff may now apply fixes (`fixable = []` removed). No behaviour change; the suite passes unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruff: RUF added to the rule set (E, F, W, I, B, UP, SIM, RUF); remaining findings fixed by hand (nested `with` merged, raise ... from, ClassVar on mutable class attributes in test fakes, raw regex in pytest.raises, dict lookups instead of if-chains, long lines). Only exception: the INFORMATION SOURCE emoji is an allowed confusable. README snippets formatted too. mypy: strict flags for core, services, collectors, media, classification, llm, enrichment, summarization and config; api and cli checked with check_untyped_defs. The strict flags are spelled out because a per-module `strict = true` applies to the whole run. Real fixes include typed PyAV audio streams, separate provider variables in build_model, a typed output spec for the summarizer agent, a QueueStats TypedDict, Literal narrowing of validated config values, a non-None ApiServices in the lifespan and no reused variables of different types. The strict packages no longer contain any `type: ignore`; the remaining ones in api/cli narrow click.Choice / validated query strings to Literal types and carry a reason. Untyped third-party modules (telethon, ctranslate2, faster_whisper, readability, yt_dlp, lxml) are ignored via one override. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ubuntu-latest and windows-latest x Python 3.12 / 3.13, fail-fast off. - actions/checkout v7.0.1 and astral-sh/setup-uv v10.3.0 pinned to commit SHAs (setup-uv 10.3.1/10.3.2 are inside the 7-day cooldown). - uv sync --locked with the migrate and youtube extras plus the dev group (no asr: large CUDA wheels, tests use fake backends), then ruff check, ruff format --check, mypy src and pytest. - permissions: contents read; superseded runs of a ref are cancelled. - .python-version (3.13) is now committed; UV_PYTHON keeps the matrix interpreter in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README: features, requirements, install + extras, refresh pipeline with default-scope semantics, v1 upgrade, configuration, CLI/API overview, development, exit codes. - docs/: new architecture (module map, Mermaid data flow), database (ERD, tables, view, timestamps, FTS, pending scopes, migrations, v1 -> v2 mapping incl. Europe/Berlin and date_status), configuration, taxonomies, transcription, enrichment, CLI reference generated from the click definitions, API reference, operations runbook and testing pages. The old pages describing the v1 layer, LangChain and the recipe classifier are removed. - mkdocs.yml (material, Mermaid fences, strict link/anchor validation); `uv run --group docs mkdocs build --strict` passes. /site/ ignored. - config/config.example.toml with every section/key the code reads and its default (llama.cpp provider, topics taxonomy, transcription, summarization, enrichment, telegram, instagram, api.*); config/.env.example with variable names only. - CHANGELOG.md with the 0.2.0 entry. - CLI: escape rich markup in help texts and warnings that swallowed [[llm.providers]], [[classification.taxonomies]] and [database]. - Mark playground/test.ipynb as obsolete (v1 API), update instructions/guidelines.md (pydantic-ai instead of LangChain). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
config/config.toml is listed in .gitignore but was still tracked, so local edits (LLM endpoints, paths) would end up in the public repository. It is removed from the index only; the local file stays. config/config.example.toml documents all keys. History was checked: no credentials were ever committed in this file (credentials live in the untracked config/.env). The enrichment User-Agent pointed at an old repository URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rich wraps and truncates output to the terminal width, which made two CLI tests fail on Linux CI (longer tmp paths). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A full modernization of postparse in 20 reviewable commits (one per work package). Highlights:
src/postparse(importpostparse), Python ≥ 3.12, ruff + mypy enforced, GitHub Actions CI (Linux/Windows × 3.12/3.13, actions pinned by SHA), test suite isolated from real data/credentials/network (8m40s → ~75 s, 0 warnings).sqlite3, SQL migrations with checksums, STRICT tables, FKs on, WAL, canonical UTC timestamps, FTS5 full-text search, keyset pagination). Oneitemstable with per-source detail tables,tags,media,transcripts,summaries,links/link_fetches, taxonomies with runs/results/labels.postparse db migrate-v1migrates a v1 database into a new file (source opened read-only, 25 verification checks; dry run on a copy of the real DB: 6,763 items, 141 lost media paths recovered, 0 mismatches).classify run|text|taxonomies); the recipe classifier is legacy. Existing results count regardless of model; the default scope only processes new and never-classified items (--backfill/--reprocessfor old posts).min_id) and Instagram (early stop after known posts, batched upserts, typed auth/rate-limit errors,date_utc, permalinks instead of expiring CDN URLs)./api/v1/items,/stats,/taxonomies, transcription/summary/enrichment/classify jobs,/classify/{taxonomy}with optional persistence, unified jobs + WebSocket.config/config.example.toml,.env.example,CHANGELOG.md.Bugs fixed (selection)
Instagram API extraction always failed;
force_updatenever updated (lost 135 Telegram media paths and all Telegram hashtags); cursor pagination looped on NULL dates; zero-label multilabel results were re-classified forever; extractors only saved at the end;show_locals=Truecould print credentials; tests wrote rows into the production DB;--helpcrashed on Windows when piped; list endpoints ignored filters; search cache never invalidated; batch classify lost per-item errors.Breaking changes / upgrade steps
data/social_media.db.uv sync(optional extras:asr,youtube,migrate).uv run --extra migrate postparse db migrate-v1 --source data/social_media.db --target data/postparse.db --report migrate-v1.json[database] db_path, LLM provider, taxonomies (seeconfig/config.example.toml).config/config.tomlis no longer tracked (it was listed in.gitignore; history checked, no credentials were ever committed in it).Known follow-ups (not in this PR)
serve --workers > 1breaks in-memory jobs (docs say: one worker).[llm] enable_fallback/cache_responsesare read but not implemented.Test plan
uv run pytest— 964 passed, 4 skipped, 0 warnings (no real network, no access todata/or real.env)uv run ruff check,ruff format --check,mypy srcclean;uv lock --checkuv run --group docs mkdocs build --strictdb migrate-v1dry run on a copy of the real v1 DB,db checkpassesclassify text/classify runagainst the homelab llama.cpp server, local faster-whisper transcription on CUDA, summary via LLM,enrich run --limit 15,serve+/health,/api/v1/items?q=…docs/operations.md)🤖 Generated with Claude Code