2 Commits

Author SHA1 Message Date
teernisse
71d07c28d8 fix(migrations): add schema_version inserts to migrations 022-027
Defense-in-depth: The migration framework already handles missing
inserts via INSERT OR REPLACE (db.rs:174), but adding explicit
inserts to .sql files ensures consistency and makes migrations
self-documenting.

Migrations affected:
- 022_notes_query_index
- 024_note_documents  
- 025_note_dirty_backfill
- 026_scoring_indexes
- 027_surgical_sync_runs
2026-02-21 09:20:18 -05:00
teernisse
83cd16c918 feat: implement per-note search and document pipeline
- Add SourceType::Note with extract_note_document() and ParentMetadataCache
- Migration 022: composite indexes for notes queries + author_id column
- Migration 024: table rebuild adding 'note' to CHECK constraints, defense triggers
- Migration 025: backfill existing non-system notes into dirty queue
- Add lore notes CLI command with 17 filter options (author, path, resolution, etc.)
- Support table/json/jsonl/csv output formats with field selection
- Wire note dirty tracking through discussion and MR discussion ingestion
- Fix test_migration_024_preserves_existing_data off-by-one (tested wrong migration)
- Fix upsert_document_inner returning false for label/path-only changes
2026-02-12 13:31:24 -05:00