You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(platform): re-queue pii_scan_failed documents when the scan works #5239
Follow-up of #5233 (task TALE-317), split off it by the Coder.
Today, with #5233. Under an enabled PII policy, a document the policy could not scan is refused as Failed with pii_scan_failed instead of being indexed as it is. This happens in two cases:
the policy's scrubber cannot be built (scrubberForPolicy in services/platform/backend/core/knowledge/pii_gate.ts, typically an image without the PII data tree, which backend/main.ts probes at boot);
a part of the text could not be scanned whole (a step_error).
Those documents are queued again by every save of the PII policy, an unchanged one included (requeuePiiScanFailedDocuments in services/platform/backend/domains/knowledge/service.ts), and one at a time by Retry indexing. Nothing queues them on its own.
What to add. Once the platform can build the scrubber again (an operator fixed the image or the data tree), queue the documents refused because the protection could not start (PII_SCAN_FAILED_REASONS.unavailable, in backend/core/knowledge/indexing.ts) without waiting for an admin to save the policy.
For the plan.
The scrubber cache and the set of reported failures live in one process. A redeploy, the usual fix, starts a new process that never saw the failure, so "builds again" cannot be read from that set alone. One option: when the boot probe in backend/main.ts loads the data tree, a worker queues those documents, bounded per organization and idempotent.
Only the unavailable cause heals that way. A step error (incomplete) repeats for the same text and policy, so it stays with the policy save and Retry indexing.
Files carry the code on app.file_metadata. Email bodies are found by their corpus row's fixed reason, as requeuePiiScanFailedDocuments does.
Done on the feature line: feature train #5297 landed on release/0.6 by rebase at 2026-11-02 09:37:43 UTC. This issue's change is commit 53e869da2ca77031adf81e1a8d1784679e0c1baf (feat(platform): re-queue pii_scan_failed documents when the scan works) on release/0.6, and it ships with Tale 0.6.0. GitHub closes issues itself only for commits that reach main, so the feature-train role closes this one now. Board task: TALE-322.
Activity
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
tale-code-bot commentedon Nov 2, 2026
Done on the feature line: feature train #5297 landed on
release/0.6by rebase at 2026-11-02 09:37:43 UTC. This issue's change is commit53e869da2ca77031adf81e1a8d1784679e0c1baf(feat(platform): re-queue pii_scan_failed documents when the scan works) onrelease/0.6, and it ships with Tale 0.6.0. GitHub closes issues itself only for commits that reachmain, so the feature-train role closes this one now. Board task: TALE-322.feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works
feat(platform): re-queue pii_scan_failed documents when the scan works