fix: prevent live-embedding shutdown delays during storage failures - #218
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: needs maintainer review before merge. Reviewed September 11, 2026, 5:34 PM ET / 21:34 UTC. ClawSweeper reviewWhat this changesUpdates CrawlKit from v0.16.0 to v0.16.1 so live embedding shuts down promptly when cancellation interrupts storage operations, and adds an Unreleased note. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main still consumes the affected dependency, and the published upstream patch addresses the shutdown delay without changing APIs or storage formats. No blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherDiscrawl captures Discord messages into a local archive and optionally processes their embeddings in background workers supplied by CrawlKit. Stopping capture cancels those workers and waits for their cleanup before returning. flowchart TD
A[Discord capture] --> B[Local embedding queue]
B --> C[CrawlKit workers]
C --> D[Embedding provider]
D --> E[Store vectors]
F[Stop capture] --> G[Cancel and bound cleanup]
C --> G
G --> H[Exit with unfinished claims recoverable]
Before mergeNone. Agent review detailsSecurityNone. Review metricsNone. Technical reviewBest possible solution: Consume the published upstream cancellation fix while retaining Discrawl’s existing lease recovery and bounded status persistence. Do we have a high-confidence way to reproduce the issue? Yes, from source: v0.16.0 can start a fresh cleanup timeout for each remaining job after retry cancellation, while Discrawl waits for that runner. The upstream controlled-clock regression covers this path; no runtime reproduction was executed here. Is this the best way to solve the issue? Yes. Updating the shared worker dependency is the narrowest repair, and the complete upstream release delta preserves existing APIs, queue formats, and normal retry accounting. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 8f0e93b808ae. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Additional instructions
Keep Allow edits from maintainers enabled.
Related: #217 and openclaw/crawlkit#117.
What Problem This Solves
Fixes an issue where users stopping
tail --embed-livecould wait over five minutes when cancellation interrupted saving retries and cleanup storage was unavailable. Discrawl inherited the worker shutdown defect in crawlkit v0.16.0.Why This Change Was Made
Consume published crawlkit v0.16.1, which stops retry persistence after cancellation and shares one cleanup deadline across unfinished claims. The patch also bounds interrupted completion and rejected-batch cleanup. This dependency update requires no new database migration or configuration.
User Impact
Live embedding can shut down promptly during storage failures. Claims that cannot be released remain recoverable through their existing leases.
Evidence