Tier 0 (Ingestion): - NOTE-0A: Upsert/sweep for issue discussion notes (stable IDs) - NOTE-0B: Immediate deletion propagation for swept notes - NOTE-0C: Sweep safety guard for partial fetch protection - NOTE-0D: Capture immutable author_id in note upserts Tier 1 (Query/CLI): - NOTE-1A: Note query layer data types and filters (28+ filter combinations) - NOTE-1B: CLI arguments and command wiring for lore notes - NOTE-1C: Human and robot output formatting (table/json/jsonl/csv) - NOTE-1D: robot-docs integration for notes command - NOTE-1E: Migration 022 — composite query indexes + author_id column Tier 2 (Document/Search): - NOTE-2A: Migration 024 — schema rebuild for note documents - NOTE-2B: SourceType::Note enum extension - NOTE-2C: Note document extractor function - NOTE-2D: Regenerator and dirty tracking for note documents - NOTE-2E: Generate-docs full rebuild support for notes - NOTE-2F: Search CLI --type note support - NOTE-2G: Parent metadata change propagation to note documents - NOTE-2H: Migration 025 — backfill existing notes after upgrade - NOTE-2I: Batch parent metadata cache for note regeneration 21 files changed, 5364 insertions, 713 tests passing.
9 lines
461 B
SQL
9 lines
461 B
SQL
-- Backfill existing non-system notes into dirty queue for document generation.
|
|
-- Only seeds notes that don't already have documents and aren't already queued.
|
|
INSERT INTO dirty_sources (source_type, source_id, queued_at)
|
|
SELECT 'note', n.id, CAST(strftime('%s', 'now') AS INTEGER) * 1000
|
|
FROM notes n
|
|
LEFT JOIN documents d ON d.source_type = 'note' AND d.source_id = n.id
|
|
WHERE n.is_system = 0 AND d.id IS NULL
|
|
ON CONFLICT(source_type, source_id) DO NOTHING;
|