add session-gated /sync endpoint and prune stale vectors after reindex

SyncController/SyncService/SyncProvider mirror the existing search
dispatch pattern: a session-gated controller routes a SyncRequest to
the provider registered for its ServiceType. HomeboxSyncProvider pages
through the full Homebox catalog, embedding each page via
EmbeddingService, and now collects every item ID it sees across all
pages before pruning anything no longer present upstream in one
deleteStaleVectorEntries call at the end - deleting per page would
treat items on other pages as stale and wipe them out.
This commit is contained in:
2026-07-04 01:08:42 +02:00
parent 48d120fbff
commit 65ff109800
6 changed files with 183 additions and 24 deletions
@@ -0,0 +1,10 @@
package com.vaessl.app.sync;
import com.vaessl.app.connection.ConnectionIdentifiable;
import com.vaessl.app.shared.ServiceType;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
public record SyncRequest(@NotBlank String appUrl, @NotBlank String username,
@NotNull ServiceType serviceType) implements ConnectionIdentifiable {
}