Classify and present remote upload name conflicts #8

Merged
ClaudiuSchuster merged 1 commit from oss-oo/upload-conflict-state-rt20261008 into main 2026-10-09 00:20:22 +00:00
Owner

What

Detects and presents remote upload name conflicts as a first-class state instead of an endlessly "retrying" queue item. Comes from a real incident class (2026-10-08): a torn block-POST left a server-side draft, and every VFS retry failed with 422 "name already exists" for hours while the UI only showed generic retrying.

Changes

  • bin/pdrive-state (schema 1 → 2, backwards compatible): queue items gained conflict, conflict_since, conflict_kind — flagged after ≥3 distinct failed tries matching the real conflict signatures (Proton 422 … A file or folder with that name already exists, including the pre-v2 wording, or the bridge's can't create a new file upload request and can't find an active/draft revision). 400 "Upload file empty" and 502s do not classify. New upload-conflict issue category; incident grouping now keys backend-context subjects by category so a conflict incident no longer inherits an older 502's http-5xx category and first_seen.
  • libexec/pdrive-draft-recovery-auto: the automation trigger accepts the real signatures (plus the legacy phrase, never narrowed), file-bound, with backend-context lines only under the existing single-item-queue guard. All existing guards (queue fingerprint, activity probe, confirmations, cooldowns, generation/namespace handling) and the recovery action are unchanged.
  • bin/pdrive-ui: conflict queue rows (warning pill, per-row detail, hover/pressed/keyboard-focus + click/Enter/Space navigation to the History review), overview card line, translated History incident rendering with self-heal expectation and both recovery routes. Exactly one desktop notification per unresolved incident (persistent dedup marker, atomic 0600 write, removed on resolution, policy + language gated, sent off the main loop). All new strings in English and German.
  • Docs: docs/TROUBLESHOOTING.md symptom entry ("Upload retries forever: name already exists"); docs/OPERATIONS.md reference for the new state and notification behavior.
  • Tests: schema/defaults leg on the default fixture, a full incident-shaped fixture leg, the draft-recovery predicate battery (positives + negatives + legacy phrase), UI widget checks in both languages incl. min-width and the notification dedup battery.

Validation

  • make check fully green (re-run independently during review); git diff --check clean.
  • Independent review dossier: ACCEPT-WITH-FINDINGS, all eight claim sections PASS (predicate replayed against the incident's real sanitized log-line shapes; guard diff against the base commit). Findings: four low-severity, non-blocking notes (distinct-vs-consecutive nuance, log-tail rotation edge in the dedup key, multi-file notification naming, one optional standalone pre-v2 wording test) — recorded as follow-ups.
## What Detects and presents remote upload name conflicts as a first-class state instead of an endlessly "retrying" queue item. Comes from a real incident class (2026-10-08): a torn block-POST left a server-side draft, and every VFS retry failed with 422 "name already exists" for hours while the UI only showed generic retrying. ## Changes - `bin/pdrive-state` (schema 1 → 2, backwards compatible): queue items gained `conflict`, `conflict_since`, `conflict_kind` — flagged after ≥3 distinct failed tries matching the real conflict signatures (Proton `422 … A file or folder with that name already exists`, including the pre-v2 wording, or the bridge's `can't create a new file upload request and can't find an active/draft revision`). `400 "Upload file empty"` and 502s do not classify. New `upload-conflict` issue category; incident grouping now keys backend-context subjects by category so a conflict incident no longer inherits an older 502's `http-5xx` category and `first_seen`. - `libexec/pdrive-draft-recovery-auto`: the automation trigger accepts the real signatures (plus the legacy phrase, never narrowed), file-bound, with backend-context lines only under the existing single-item-queue guard. All existing guards (queue fingerprint, activity probe, confirmations, cooldowns, generation/namespace handling) and the recovery action are unchanged. - `bin/pdrive-ui`: conflict queue rows (warning pill, per-row detail, hover/pressed/keyboard-focus + click/Enter/Space navigation to the History review), overview card line, translated History incident rendering with self-heal expectation and both recovery routes. Exactly one desktop notification per unresolved incident (persistent dedup marker, atomic 0600 write, removed on resolution, policy + language gated, sent off the main loop). All new strings in English and German. - Docs: `docs/TROUBLESHOOTING.md` symptom entry ("Upload retries forever: name already exists"); `docs/OPERATIONS.md` reference for the new state and notification behavior. - Tests: schema/defaults leg on the default fixture, a full incident-shaped fixture leg, the draft-recovery predicate battery (positives + negatives + legacy phrase), UI widget checks in both languages incl. min-width and the notification dedup battery. ## Validation - `make check` fully green (re-run independently during review); `git diff --check` clean. - Independent review dossier: ACCEPT-WITH-FINDINGS, all eight claim sections PASS (predicate replayed against the incident's real sanitized log-line shapes; guard diff against the base commit). Findings: four low-severity, non-blocking notes (distinct-vs-consecutive nuance, log-tail rotation edge in the dedup key, multi-file notification naming, one optional standalone pre-v2 wording test) — recorded as follow-ups.
Classify and present remote upload name conflicts
All checks were successful
Checks / Functional checks (pull_request) Successful in 1m22s
fbf2652b92
A leftover server-side draft blocks one queued file under its own name
while rclone retries forever; the product showed only a generic retrying
queue item and the automation trigger waited for a phrase the pinned
build never emits.

- pdrive-state schema 2: queue items gain conflict, conflict_since and
  conflict_kind once three consecutive failed tries carry the 422
  name-exists response or the bridge draft-revision message; 400
  "Upload file empty" and 502 sequences stay transient evidence. The
  new upload-conflict issue category keeps its own incident identity and
  first_seen instead of inheriting an older 502's http-5xx bucket.
- pdrive-draft-recovery-auto: widen the entry predicate to the real
  signatures (legacy wording stays accepted; backend-context lines count
  only for a single-item queue) with all existing guards unchanged.
- pdrive-ui: conflict queue rows, overview summary, History evidence and
  one deduplicated EN/DE desktop notification per unresolved incident
  following the saved notification policy.
- Document the state, self-heal expectation and both recovery routes;
  cover signatures, negatives, absent-field defaults and notification
  dedup in the repository suite.
ClaudiuSchuster deleted branch oss-oo/upload-conflict-state-rt20261008 2026-10-09 00:20:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-Singularity/proton-drive-linux!8
No description provided.