LogisticsRnD: 5 logged issues — root causes and fixes
Chief log-fix session c0e8be4273 · 2026-10-26 · branch chief/c0e8be4273 · not merged, not deployed (Chief's test gate and the owner decide)
In one line: the five log lines came from three real problems. Every sync downloaded old mail attachments again, so a Composio outage failed the sync. A folder dropped on an analysis was sent as a "file". Deleting an analysis made the page re-read what it had just deleted. All three were reproduced and fixed, each with a test that fails before the fix and passes after.
Per issue
fixed1 · sync.run_failed (5×) & 2 · health.mail_sync (1×)
- What happened
- Between 11:24 and 12:15 UTC, Composio's attachment download (
GMAIL_GET_ATTACHMENT) answered "HTTP 401: Admin token missing or invalid" from its own file store. Five syncs failed, and the health check reported the latest sync as broken. It stopped on its own after 12:15. - Root cause
- The six attachments in those failures had been saved and indexed hours earlier. Each sync re-reads the last two days of mail and downloaded them again: the "already saved" key used Gmail's attachment id, and Gmail issues a new one on every fetch. One workspace had 1,070 such keys for 13 attachments; one file had been fetched 289 times.
- Fix
-
- The key is now Gmail's fixed MIME part id. Outlook ids were already stable.
- When a new attachment really fails, the run error names the provider's reason.
- Each failure is reported where it happened, as
sync.attachment_failed: warn when the provider refuses, error when our code is at fault. - The run-level event then counts as the same issue, not a second bug.
- Verified
-
- New test
sync-attachments: before the fix it failed with "downloaded again: 2 ≠ 1"; it passes after. - After the fix, a sync during a simulated outage finishes "done", and the health check reads "ok".
- New test
fixed3 · api.logistics.analyses.uploads (2×) "CMR+T1: accepted files are …"
- What happened
- Someone dropped a folder named "CMR+T1" on an analysis, twice, and both times it was refused. One minute later the T1 and CMR PDFs, apparently the folder's contents, were uploaded one by one.
- Root cause
- The browser hands a dropped folder over as a single pseudo-file named after the folder (no extension, 4096 bytes), and the drop zone posted it as a file.
- Fix
-
- Dropped folders are read and the files inside them are uploaded, subfolders included.
- Files in the folder that are not an accepted type, such as Thumbs.db, are listed as "not uploaded" instead of being sent.
- Verified
-
- In real Chrome, with the original code, the same error as in production. With the fix, the files inside are uploaded (status 201).
- New unit test
dropped-files(3 cases).


fixedcause inferred4 · api.logistics.analyses.desk & 5 · api.logistics.analyses "Analysis not found."
- What happened
- One workspace got two 404s, 6 ms apart, for an open, finished analysis. Seven seconds later, the same workspace started a new analysis.
- Root cause
- Reproduced in Chrome. Delete opens a confirm dialog, and closing it refocuses the window. The page re-reads the analysis and its checklist on focus, so both reads went out right behind the DELETE and got 404. The person also saw "Analysis not found." flash.
- Fix
-
- Once a deletion is confirmed, the page stops reading the analysis and shows "Deleting the analysis…".
- Deletions are now recorded as an info event (
logistics.analysis_deleted).
- Verified
-
- A real-browser check (
scripts/browser-use/checks/delete-analysis.py) failed before the fix with exactly the two 404s, and passed 3 out of 3 runs after it. - A unit test covers the deletion record.
- A real-browser check (
- Caveat
- Deletions were not logged before this change, so it is not proven which analysis was deleted in production, or that it was deleted from this same tab rather than another one.
Before → After
| Aspect | Before | After |
|---|---|---|
| Attachment downloads per sync | every attachment in the 2-day window, every 10 min | only attachments not yet saved |
| Composio file-store outage | every sync fails; health warns | syncs finish unless a new attachment fails, and then the provider's reason is named |
| Dropping a folder | refused as a file "CMR+T1" | its files are uploaded |
| Deleting an analysis | DELETE + two 404 reads + error flash | DELETE only, then the list |
Not achieved / unknowns
- Not deployed: production still runs release 24d7510. Chief's gate and the owner decide.
- The Composio outage itself is upstream, so there was nothing to fix on our side.
- Issues 4/5: the scenario is reproduced, but the production deletion is not proven (see caveat).
- Folder drops: folder names inside the dropped folder are not kept; a ZIP still keeps them. Tested in headless Chrome only, not in Safari or Firefox.
Verification
- Full suite (
npm test): 378 tests, 378 pass, 0 fail (59 s, on commit16a5592). tsc --noEmitis clean, and eslint is clean on every changed file.- Production evidence was read only, from run logs, analysis metadata and the container log on loresis-prod. Nothing was changed there.
Commits
ddcb918Stop re-downloading preserved mail attachments on every sync30213c5Upload the files inside a folder dropped on a Logistics analysis16a5592Stop reading a Logistics analysis once its deletion is confirmed