Skip to content

feat(browser): recover interrupted downloads across restarts #21

Closed

Description

@trmosala

Problem

Interrupted transfers are cancelled and cannot resume after restart.

Implementation order

Browser backlog item 17 of 29. Phase: Compatibility and recovery. This is ordered planning, not a claim that Codex implements every item. Items 24–29 are optional additions.

Acceptance criteria

  • Persist the metadata required for supported resumable transfers.
  • Validate partial files and server resume support; offer an honest retry path when unavailable.
  • Preserve original consent/destination boundaries and avoid overwriting existing files.

Dependencies

No prerequisite backlog issue.

Engineering and validation

Reuse existing Chromium/Electron/OS facilities where available. Preserve main-process ownership and permission enforcement, add no placeholder controls, use existing i18n patterns, and test behavior with synthetic fixtures. Document platform limitations. Baseline: browser-tabs at 47fef3e; see packages/cm-browser/README.md and password-security.md.

Activity

  1. trmosala commented on Sep 17, 2026

    @trmosala
    OwnerAuthor

    Download-persistence safeguards committed, fast-forward merged into browser-tabs and pushed as a3b77ee. Local HEAD and remote branch SHA were verified equal. Exactly seven implementation/test/documentation paths; preview changes excluded.

    Scope: persist admission before destination setup; protect current-process live admissions within the 200-record cap; validate completed-file size and available metadata; project renderer-safe history; contain terminal persistence/publication failures. Application cancellation no longer unlinks reservation paths. Chromium may separately remove its own transfer files.

    Integrated Windows verification: desktop typecheck PASS; 161 browser tests / 2,360 assertions PASS; one serial default native smoke PASS through link destinations using a disposable profile (Electron 42.3.3 / Chromium 148.0.7778.218). Scoped lint: 62 warnings, zero errors. Seven-path formatting and staged whitespace checks passed before commit. Normal push hook: 31/31 typecheck tasks passed, 29 cached. Expected /fail ERR_EMPTY_RESPONSE and a Mojo diagnostic did not fail the native run.

    This is NOT restart-resume: no persisted resume metadata, native reconstruction, range-response validation or authenticated restart recovery. Numeric filesystem metadata is not cryptographic identity or a race-free filesystem guarantee. No physical/power-loss, concurrent-writer, packaged/macOS/Linux or external assurance claim. #21 remains open. #24 remains isolated pending its unexplained login-offer timeout; this passing download run does not resolve that failure. No deployment or installed-process restart.

    Behavior, fixture correction and evidence limits: packages/cm-browser/README.md and packages/cm-browser/password-security.md at the commit above.

  2. trmosala commented on Sep 22, 2026

    @trmosala
    OwnerAuthor

    Completed and validated for macOS, the sole supported target. Existing restart recovery from da47039 satisfies the bounded acceptance criteria: persisted private checkpoint/validator/destination metadata; exact partial-byte and actual HTTP range-response validation with explicit retry-from-page guidance; fresh native consent and current policy checks; exclusive destination creation without overwrite. No automatic restart request or saved authentication-header replay.

    Committed and pushed cd649a3 on sqlite-lock-probe. Fixed the native fixture's macOS /var symlink path and matching cleanup boundary without relaxing production checks. Recorded evidence and limits in packages/cm-browser/password-security.md and README.md.

    Validation on macOS arm64, Electron 44.3.0 / Chromium 152.0.7977.78:

    • Native download crash/relaunch PASS: authenticated range recovery, zero requests before consent, exact bytes, original/sibling preservation, six rejection paths, normal completion, chooser cancellation and private-file cleanup.
    • Full default native browser smoke PASS (expected local ERR_EMPTY_RESPONSE and Chromium ObserverList diagnostic retained).
    • Focused download tests: 13 pass / 164 expectations. Browser suite: 257 pass / 3,087. Complete desktop suite: 569 pass, 4 skip, 0 fail / 4,003.
    • Desktop typecheck, formatting and whitespace checks PASS. Scoped lint: three warnings, zero errors. Two-axis source review cleared after cleanup fix. Push hook: 31 typechecks successful, 29 cached.

    These are isolated source-build fixtures with synthetic HTTP and stubbed dialogs, not packaged-app, physical chooser, power-loss or hostile same-user filesystem assurance. Existing privacy/race limitations remain documented. No installed application restart or release deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions