Confluye
Operations

Files and artifacts recovery

Symptom-to-verification for Workspace Files, Command artifacts, and presentation outputs.

Use this when uploads stay pending/pending_scan, downloads return 423, Command attach fails, or a presentation create returns 409/500. Read Workspace Files, Command artifacts, and the Files API first.

There is no public HTTP to run GC or backup restore. Production GC is runDueWorkspaceFileGc (once per UTC day when a batch completes). Backup mirror is workspace-files/backup.ts.

Verify first

  1. Confirm principal: session /api/files?workspaceId= vs v1 workspace API key. Personal keys never mutate v1 Files (403).
  2. GET /api/v1/files/{id} (or session equivalent). Compare status, sizeBytes, sha256.
  3. On preview/production, a 503 on POST/PUT/complete means write readiness failed. details.availability.reasonCode is files_primary_store_unreachable, files_scanner_unreachable, or a config-time files_*_not_configured / files_restore_test_required from capability availability.
  4. Do not treat list absence as proof of GC: list has no status filter; deleted rows can still appear until you inspect status.
  5. Command: with a key that has workspace.secret.read or workspace.write, call GET /api/v1/fluxus-command/jobs/{id} for attachments / artifacts[].incomplete.

Symptom table

SymptomVerifyRecover
401 / 403 on v1Bearer or key scopeUse a workspace API key.
404 on a known fileKey/session workspace vs file workspaceIdCall from the owning workspace. Session rejects non-member workspaceId.
400 idempotency_key_invalidMutation without valid Idempotency-KeySend a key matching the platform pattern (no spaces).
409 idempotency_replay_mismatchSame key, different body or file idNew key, or replay the original body.
Create 503Preview/production readinessRestore S3/ClamAV (and production backup/restore flags). Replay new keys only after unblock; successful old creates replay from the idempotency store.
PUT 409 Only pending files accept contentstatus is not pendingDo not overwrite. Create a new file id.
Complete 409 content has not been persistedBlob stat missingRetry PUT with the same content idempotency key, then complete.
Complete 409 Expected N bytes / SHA-256Body ≠ declared sizeBytes/sha256Re-upload matching bytes or recreate metadata.
Stays pending_scanComplete should call scanFile in-requestGET the file. If another scan holds the 5-minute lease, wait; retry complete with the same key only replays the stored response. Use a new complete key after the lease expires if the first scan never finalized.
quarantinedClamAV infectedDo not download (423). Treat as unusable; request deletion if policy requires.
GET content 423status !== readyWait for clean scan. Command attach/publish will also 423.
413Over 100 MiBShrink the blob.
416 / 400 rangeRange not bytes=start-endSingle explicit range only.
DELETE still listeddeletion_requested is soft-deleteWait production GC (30 days after request) or accept the row until deleted. Live references block GC.
Command attach 423File not readyFinish upload+complete+scan first.
Attach failed after first filePartial run refs rolled backJob should have no attachments; retry POST jobs with a new idempotency key and ready ids.
Artifact incomplete: trueDefault on publishPOST .../artifacts/{fileId}/complete.
Artifact 404 on completefileId never published on that jobPublish first. Job must exist in this workspace.
Presentation 404 imagefileId missing in workspaceSame 404 for foreign ids (no ownership leak). Upload a ready PNG/JPEG/GIF ≤ 10 MiB.
Presentation 409 not ready / scanInput not ready, or output scan not cleanFix Files first. Failed create requests deletion of partial outputs; do not assume PPTX exists.
Presentation 500 then success on retryFailure is not idempotency-cachedReplay the same Idempotency-Key.
Capability presentation.create duplicate outputsExecutor omits idempotencyKey to the servicePrefer HTTP create for blob-level put keys; treat agent retries as possibly extra Files rows if the HTTP idempotency layer did not wrap the call.

After a stuck upload

  1. GET the file. If pending and blob missing, PUT content then POST complete with keys.
  2. If pending_scan, confirm scanner (ClamAV host) and lease age.
  3. If ready, download GET .../content and check etag.
  4. For Command, publish only after ready; then complete the artifact if incomplete.

What not to do

  • Do not PUT content onto a non-pending file.
  • Do not expect DELETE to drop the object immediately.
  • Do not use a personal API key on /api/v1/files.
  • Do not pass SVG Workspace Files as presentation image.fileId.
  • Do not edit docs-site/docs.json or application source to “enable” backup HTTP; it is not implemented as a route.