feat: keep embeddings current while Discord capture continues - #217
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 11, 2026, 4:36 PM ET / 20:36 UTC (Revision 2). ClawSweeper reviewWhat this changesAdds opt-in continuous embedding during Discord capture, with durable worker claims, background status, schema migration, and supporting tests and documentation. Merge readiness⛔ Blocked before merge - 1 item remains Both earlier findings are resolved, and no remaining blocking code defect was found. Continuous draining remains absent from main and v0.14.1, so this PR still provides distinct value. Priority: P2 Review scores
Verification
How this fits togetherDiscrawl stores captured Discord messages in a local SQLite archive. Background workers turn queued message text into provider-generated vectors used by semantic search while capture continues. flowchart LR
A[Discord events and repair] --> B[Archive and embedding queue]
B --> C[Fresh or catch-up claims]
C --> D[Embedding provider]
D --> E[Check revision and lease]
E --> F[Vectors for semantic search]
C --> G[Local worker status]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain opt-in continuous draining and queue-only defaults, shipping the documented schema-compatible rollback path with the reported archive-upgrade evidence. Do we have a high-confidence way to reproduce the issue? Not applicable as a new opt-in mode; source inspection confirms the existing queue/drain limitation and repairs to both earlier findings. Tests were inspected but not executed during this read-only review. Is this the best way to solve the issue? Yes: sharing the existing writer owner and using crawlkit's bounded runtime addresses the lock conflict while preserving established queue-only behavior. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 34bb67ea0969. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Additional instructions
Keep Allow edits from maintainers enabled.
Related: openclaw/crawlkit#115
What Problem This Solves
Fixes an issue where users running continuous Discord capture could not also keep embeddings current without an external stop/embed/restart cycle. The standalone commands both need the archive's exclusive writer ownership, while queued content can remain unembedded until the next scheduled drain.
Why This Change Was Made
Add opt-in
tail --embed-live, backed by the general worker runtime in published crawlkit v0.16.0. Capture and embedding share one process owner, with provider calls outside transactions, separate read-only preparation, and short result commits. Revision/lease fencing discards stale work after edits, deletes, or claim recovery. Fresh Gateway work takes priority over historical sync catch-up.User Impact
tail --embed-livequeues and continuously processes content. Existing--with-embeddingsremains queue-only and the one-shotembedcommand remains available.Evidence
init.defaultBranch=masterto match the existing publishing fixture's Linux CI behavior. Focused migration, concurrency, lease recovery, edit/delete, credential failure and fairness tests pass.