4df7796061
Preserve modality and symbol metadata in embed-stale merge ( #2969 )
...
embedStaleForSource rebuilds each page's chunks as a merged ChunkInput[]
carrying only five fields (chunk_index, chunk_text, chunk_source,
embedding, token_count), while upsertChunks writes the metadata columns
as EXCLUDED.<col>. Any page containing at least one stale chunk
therefore has ALL its chunks' metadata reset on the next embed-stale
pass:
- image chunks flip modality 'image' -> 'text' and disappear from the
cross-modal image search arm permanently (it filters
modality='image'), while keeping their embedding_image vector — the
data looks intact but is unreachable;
- code chunks lose language, symbol_name, symbol_type,
symbol_name_qualified.
The read side compounds this: rowToChunk never returned modality, so a
correct merge was impossible without also extending the Chunk shape.
Fix: expose modality on Chunk/rowToChunk and carry modality, language,
and the symbol fields through the merge. embedding_image is deliberately
not carried — upsertChunks already COALESCEs it server-side.
Repair for affected brains: UPDATE content_chunks SET modality='image'
WHERE chunk_source='image_asset' AND embedding_image IS NOT NULL.
The new test seeds a mixed page (settled image chunk + stale text chunk
with symbol metadata) and asserts both survive an embedStaleForSource
pass; it fails on master.
Co-authored-by: Forge (Ron) <forge@zsimovan.dev >
2026-07-20 22:14:46 -07:00
..
2026-07-02 10:48:54 -07:00
2026-07-20 16:47:12 -07:00
2026-05-22 13:38:07 -07:00
2026-06-03 07:27:34 -07:00
2026-05-24 21:50:08 -07:00
2026-06-10 22:00:36 -07:00
2026-06-01 22:13:19 -07:00
2026-07-16 21:20:12 -07:00
2026-07-17 15:01:27 -07:00
2026-06-24 06:05:16 -07:00
2026-04-29 23:46:36 -07:00
2026-06-24 06:05:16 -07:00
2026-07-02 10:48:54 -07:00
2026-07-20 16:57:53 -07:00
2026-06-03 23:00:11 -07:00
2026-07-20 13:56:00 -07:00
2026-05-22 11:53:11 -07:00
2026-05-22 13:38:07 -07:00
2026-06-01 22:13:19 -07:00
2026-06-07 19:22:33 -07:00
2026-07-13 00:09:04 -07:00
2026-06-03 07:09:20 -07:00
2026-06-24 06:05:16 -07:00
2026-05-10 06:34:40 -07:00
2026-05-27 08:27:05 -07:00
2026-07-17 14:25:48 -07:00
2026-05-24 22:56:21 -07:00
2026-07-20 16:38:03 -07:00
2026-06-24 06:05:16 -07:00
2026-05-11 19:25:48 -07:00
2026-05-26 17:31:48 -07:00
2026-05-26 18:59:17 -07:00
2026-05-17 08:00:29 -07:00
2026-07-02 10:48:54 -07:00
2026-07-20 11:57:31 -07:00
2026-05-20 13:55:12 -07:00
2026-06-03 23:00:11 -07:00
2026-06-16 22:45:22 -07:00
2026-04-22 01:34:22 -07:00
2026-07-16 19:52:52 -07:00
2026-07-16 16:31:53 -07:00
2026-06-07 08:12:50 -07:00
2026-06-03 23:00:11 -07:00
2026-05-02 08:41:11 -07:00
2026-05-22 22:16:25 -07:00
2026-05-20 13:55:12 -07:00
2026-05-23 10:01:08 -07:00
2026-05-23 08:49:28 -07:00
2026-05-22 11:53:11 -07:00
2026-05-26 23:15:44 -07:00
2026-05-09 20:46:34 -07:00
2026-05-19 17:14:53 -07:00
2026-06-12 07:28:13 -07:00
2026-04-14 19:41:34 -10:00
2026-06-10 22:00:36 -07:00
2026-06-03 06:20:03 -07:00
2026-05-23 08:49:28 -07:00
2026-07-20 15:39:04 -07:00
2026-07-02 08:00:58 -07:00
2026-06-03 23:00:11 -07:00
2026-07-20 11:08:41 -07:00
2026-05-25 14:56:38 -07:00
2026-05-25 20:00:03 -07:00
2026-05-11 22:54:35 -07:00
2026-07-20 13:00:16 -07:00
2026-05-23 10:01:08 -07:00
2026-05-10 18:59:11 -07:00
2026-06-03 06:43:11 -07:00
2026-07-17 15:01:27 -07:00
2026-06-01 19:09:15 -07:00
2026-05-08 13:25:48 -07:00
2026-06-09 22:28:44 -07:00
2026-05-23 10:57:32 -07:00
2026-05-24 10:49:56 -07:00
2026-06-08 21:19:25 -07:00
2026-06-14 09:32:58 -07:00
2026-05-23 08:49:28 -07:00
2026-05-23 08:49:28 -07:00
2026-07-20 13:56:00 -07:00
2026-04-14 19:41:34 -10:00
2026-06-21 06:36:43 -07:00
2026-06-17 06:58:07 -07:00
2026-06-09 22:28:44 -07:00
2026-05-03 20:41:39 -07:00
2026-04-29 22:21:07 -07:00
2026-07-02 10:48:54 -07:00
2026-06-03 07:27:34 -07:00
2026-05-25 14:56:38 -07:00
2026-05-20 13:55:12 -07:00
2026-05-07 21:52:58 -07:00
2026-06-17 06:58:07 -07:00
2026-06-16 15:08:47 -07:00
2026-07-10 10:05:23 +09:00
2026-05-24 10:49:56 -07:00
2026-07-20 22:14:46 -07:00
2026-05-23 08:49:28 -07:00
2026-07-10 10:05:23 +09:00
2026-07-20 13:42:41 -07:00
2026-06-16 15:08:47 -07:00
2026-05-27 08:50:53 -07:00
2026-04-11 00:01:09 -10:00
2026-07-20 11:57:31 -07:00
2026-05-11 19:25:48 -07:00
2026-04-25 12:25:34 -07:00
2026-05-14 19:13:14 -07:00
2026-05-01 09:02:43 -07:00
2026-06-03 08:42:25 -07:00
2026-05-26 18:59:17 -07:00
2026-07-20 15:05:32 -07:00
2026-06-12 06:05:34 -07:00
2026-05-30 11:21:56 -07:00
2026-04-29 23:46:36 -07:00
2026-05-23 10:21:59 -07:00
2026-07-13 00:09:16 -07:00
2026-04-22 01:34:22 -07:00
2026-05-20 13:55:12 -07:00
2026-04-29 23:46:36 -07:00
2026-05-21 09:26:37 -07:00
2026-07-17 15:23:47 -07:00
2026-05-30 10:56:46 -07:00
2026-07-20 16:28:53 -07:00
2026-07-17 11:32:48 -07:00
2026-05-30 12:34:43 -07:00
2026-07-17 14:17:37 -07:00
2026-07-16 16:31:50 -07:00
2026-04-05 12:48:10 -07:00
2026-07-10 10:05:23 +09:00
2026-06-03 08:42:25 -07:00
2026-06-12 06:05:34 -07:00
2026-05-21 18:57:05 -07:00
2026-07-16 19:53:40 -07:00
2026-07-17 11:39:15 -07:00
2026-05-09 19:47:56 -07:00
2026-07-20 16:19:40 -07:00
2026-05-26 18:59:17 -07:00
2026-05-27 07:16:30 -07:00
2026-06-01 21:54:13 -07:00
2026-07-16 19:52:52 -07:00
2026-05-25 20:00:03 -07:00
2026-05-10 13:33:05 -07:00
2026-07-17 11:32:06 -07:00
2026-06-24 06:05:16 -07:00
2026-05-30 13:11:25 -07:00
2026-07-17 14:25:48 -07:00
2026-06-17 06:58:07 -07:00
2026-05-06 21:14:34 -07:00
2026-05-23 08:49:28 -07:00
2026-05-23 10:21:59 -07:00
2026-07-02 08:00:58 -07:00
2026-07-20 11:57:31 -07:00
2026-07-06 02:38:37 -07:00
2026-07-20 15:51:16 -07:00
2026-05-26 17:31:48 -07:00
2026-07-20 14:51:47 -07:00
2026-05-09 20:46:34 -07:00
2026-05-25 14:43:12 -07:00
2026-06-03 08:00:57 -07:00
2026-05-23 10:57:32 -07:00
2026-06-01 23:03:09 -07:00
2026-05-11 23:20:17 -07:00
2026-05-22 11:53:11 -07:00
2026-05-23 08:49:28 -07:00
2026-05-07 22:56:22 -07:00
2026-07-02 08:00:58 -07:00
2026-05-23 10:01:08 -07:00
2026-05-10 13:20:07 -07:00
2026-05-25 19:43:20 -07:00
2026-05-25 15:10:23 -07:00
2026-06-08 06:16:34 -07:00
2026-06-07 08:05:34 -07:00
2026-05-25 12:48:55 -07:00
2026-07-20 15:51:16 -07:00
2026-05-22 13:38:07 -07:00
2026-04-27 22:59:08 -07:00
2026-05-22 21:18:09 -07:00
2026-06-03 06:20:03 -07:00
2026-06-03 06:20:03 -07:00
2026-05-20 13:55:12 -07:00
2026-06-08 21:19:25 -07:00
2026-05-20 13:55:12 -07:00
2026-05-20 13:55:12 -07:00
2026-04-23 19:34:27 -07:00
2026-05-25 20:00:03 -07:00
2026-05-14 20:51:11 -07:00
2026-05-23 10:21:59 -07:00
2026-06-03 07:47:21 -07:00
2026-05-22 21:04:30 -07:00
2026-07-02 08:00:58 -07:00
2026-05-30 10:56:46 -07:00
2026-07-20 16:28:53 -07:00
2026-05-19 17:14:53 -07:00
2026-06-16 15:08:47 -07:00
2026-06-24 06:05:16 -07:00
2026-05-19 17:14:53 -07:00
2026-04-29 22:21:07 -07:00
2026-04-09 10:17:13 -07:00
2026-05-08 13:25:48 -07:00
2026-06-03 07:47:21 -07:00
2026-06-16 15:08:47 -07:00
2026-06-07 19:22:33 -07:00
2026-07-17 15:43:09 -07:00
2026-05-30 11:21:56 -07:00
2026-05-20 09:19:18 -07:00
2026-06-10 22:00:36 -07:00
2026-05-10 18:59:11 -07:00
2026-06-12 06:05:34 -07:00
2026-05-25 14:43:12 -07:00
2026-05-23 10:21:59 -07:00
2026-05-22 22:37:15 -07:00
2026-05-17 18:52:38 -07:00
2026-07-02 08:00:58 -07:00
2026-05-07 21:52:58 -07:00
2026-07-20 22:14:46 -07:00
2026-05-08 13:25:48 -07:00
2026-05-08 13:25:48 -07:00
2026-05-06 21:14:34 -07:00
2026-07-20 22:14:46 -07:00
2026-05-08 13:25:48 -07:00
2026-05-26 18:29:03 -07:00
2026-07-17 14:41:25 -07:00
2026-04-09 10:17:13 -07:00
2026-05-06 11:54:06 -07:00