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
fix(core): self-heal a stale drive_file_id when an update hits a definitive 404 (#168)
An UPDATE against a drive_file_id whose Drive object is permanently gone
returned a 404 that classified as DriveErrorClassification::Other -> the
generic drive.unreachable: the op failed, the Activity view said "Drive
unavailable", the dead id was KEPT, and every later cycle re-planned the
same doomed update forever.
Verified against a real incident today: 4 files looping
drive.unreachable every cycle while neighboring uploads succeeded; their
recorded ids return hard 404 from the Drive API.
Changes:
- driven-drive: export error_is_not_found (walks the error chain for the
drive HTTP 404 marker) instead of duplicating string matching
downstream.
- executor: an update op whose failure is a definitive not-found now
clears the stale drive_file_id (mirroring reconcile's R3-P1-2 path),
drops the op, and surfaces a WARN drive.remote_file_missing outcome
instead of an error - the next scan re-plans a fresh CREATE and the file
self-heals. Create-path 404s (dest-folder) and the trash 404-is-ok rule
are untouched; transient 5xx behavior unchanged (regression-tested).
- types: new stable ErrorCode DriveRemoteFileMissing <->
drive.remote_file_missing (+ round-trip test).
- orchestrator: records the warn-level activity row for the new outcome;
does not fail the cycle (handled skip).
- ui: en-US.json errors entry ("Remote copy missing") + activity label
test.
- fake store: update-not-found fault injection + executor tests proving
id cleared, op dropped, warn row written, next cycle re-creates.
Gates: cargo fmt/clippy -D warnings clean; cargo test -p driven-core -p
driven-drive all green; vitest 489 passed; prettier clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01JLB3E2Jm7knNJd37fVpH8X
|`drive.checksum_mismatch`| Verification failed after upload |
1775
1775
|`drive.unreachable`| Drive API down / unreachable / 5xx-circuit-open |
1776
+
|`drive.remote_file_missing`| The backed-up copy a recorded `drive_file_id` points at is gone (definitive 404 on an update); the stale id is cleared and the file re-uploads on the next scan (warn, self-healing) |
1776
1777
|`drive.resumable_session_invalid`| 4xx during resumable upload — caller must restart session |
1777
1778
|`local.file_locked`| Couldn't open even with `FILE_SHARE_DELETE` (V1: locked file; VSS path failed too — see `local.vss_unavailable`) |
1778
1779
|`local.vss_unavailable`| Driven needs elevation to use VSS but isn't elevated |
0 commit comments