16 KiB
TODO
Fork-only durable backlog for things noticed and deliberately not fixed.
Small, specific, independently actionable. Remove only when actually done.
(In Go source, upstream's FIXME/TODO comment convention still applies.)
Now
- protondrive: the backend rewrite (plan 001) has Tasks 1-20 of 21
done. Start from
docs/plans/001-protondrive-tier1-HANDOFF.md. Remaining: Task 21 (live verification, paid account never signed in to), then the whole-branch review. - protondrive: Task 21 golden fixtures - the capture
(
TestGoldenCapture) andTestGoldenFixturesare in; the live capture of the web app and CLI folders intotestdata/golden/is the owner's to run, inspect and commit (command in.superpowers/sdd/001-protondrive-tier1/task-21g-report.md).
Next
-
protondrive M5: volume events polled no more often than every 30 s, invalidating the node cache and dircache and feeding
ChangeNotify, somountandservesee other clients' changes (spec 6.2). Needs its own plan; also decide the cross-Fscache question below. -
protondrive M6: opt-in persistent metadata cache of encrypted node records and the event cursor through
lib/kv(metadata_cache), rclone Metadata (mtime,btime,content-type), and the SDK's single-request upload for files under 128 KiB (files/small). Needs its own plan; the docs page andprotondrive.yamlfeatures change with it. -
protondrive M7: the upstream path (spec 13), deferred by the owner; also the new crypto model once Proton publishes it in the SDK.
-
protondrive live checks not yet run (plan Task 21), each of which the user docs avoid claiming: the paid account (never signed in to); browser (session-fork) sign-in against the real service; 2FA, by code and by
otp_secret_key; CAPTCHA handling; Proton's desktop, mobile or CLI clients reading files rclone wrote (only the web app has been checked);TestIntegration(fstests) andtest_allagainst the real service; whether the real server lists drafts or trashed items as children (affectsRmdir); whether any real address differs from another of the account only by non-ASCII case (counted as foreign). -
protondrive:
docs/content/protondrive.md's generated options section still shows the old options and help texts; regenerate it withmake backenddocswhen the work goes upstream (generated doc changes are not committed in the fork, perAGENTS.md). -
protondrive: API responses have no body-size limit, and a block list's
TokenandBareURLand the first page'sThumbnailsare unbounded, so the 2^19-block cap bounds how many blocks a full read holds but not the bytes (about 250-350 MiB at the cap with realistic values, unbounded against a hostile server). Consider a limit on API response bodies and on those fields. -
protondrive: in live verification (plan Task 21), confirm on an account whose drive was made by Proton's own apps that the root-of-trust rule passes (the My Files share created, and its root signed, by one of the account's addresses), and count how many folders fail key verification.
-
protondrive: a range from offset 0 of a file whose size isn't recorded (
bytes=0-N, N at or past the end) is read as a ranged read, so its manifest isn't checked; only a known size identifies a range covering the whole file. -
protondrive:
TestGoldenCapturerefuses files with thumbnails (the fake server serves none, and the manifest covers them) and keys other than RSA, EdDSA, Ed25519 and Ed448; images and photos from Proton's apps can't become golden fixtures until the fake serves thumbnails. -
protondrive: below the root, a node signed under another user's email (a shared folder's members) is verified against public keys the server supplies (
account.publicKeys), so a hostile server can forge it; the SDK does the same. Revisit when Proton offers key transparency or address-key pinning. -
protondrive: a full read lists every block page before releasing the first byte, one request per 20 blocks in sequence, so a very large file waits (about 12 requests for 1 GiB, about 1280 for 100 GiB) before data flows. Fetching pages in parallel under the 15-request metadata limit would cut that.
-
protondrive: a ranged read (offset > 0 or a limit, as multi-thread copies and mounts make) checks each block against the hash the server lists for it, its decryption and its recorded size, but not the manifest, so a server can serve validly encrypted blocks of the same file swapped or from an older revision of the same size. The planned fix is a bounded per-revision cache of manifest-verified block hashes.
-
protondrive: a server can serve an earlier revision whole (blocks, manifest and extended attributes, all validly signed) under the current revision ID undetected, as nothing signed binds them to the revision; the SDK can't detect it either. Raise with Proton.
-
protondrive:
--dump headerslogs Proton'spm-storage-tokenandx-pm-uid(fshttp redacts onlyAuthorization), and--dump bodieslogs the access, refresh and upload tokens in JSON bodies (seen inTestNoSecretsInLogs). The docs page warns about it; a header redaction list infshttpwould be an upstream change. -
protondrive: a name whose signature fails is listed and the file read with only an
ERRORlogged (spec 6.2, the SDK's behaviour), and names aren't bound to their node, so a server can swap the encrypted names of two files in one folder undetected. Raise with Proton. -
protondrive: a hostile 10 MiB name is decrypted in full before
validateNamerejects it (about 230 MiB allocated listing it, the fake included). Consider refusing an encrypted name over a few KiB before decrypting it. -
lib/pacer:
TokenDispenser.Gettakes no context, so a cancelled protondrive block download still waits for a download token (held by other in-flight blocks, which finish or fail soon) before it notices. Consider a context-awareGet. -
protondrive: confirm on a real account that the official web, desktop and mobile clients read a file written by Task 5's
crypto.go(v4 node key advertising SEIPDv2, v6 PKESK content key, SEIPDv2 GCM blocks, block signatures encrypted with the content session key). This is what the SDK (js/v0.23.0) writes, but go-proton-api v1.0.4link_file_types.go(SetContentKeyPacketAndSignature) and Proton-API-Bridge v1.0.5crypto.go(generateLockedKey) say the official clients do not reliably read crypto-refresh files and that the server rejects a v6 content key packet for a v4 node key; the bridge never sent one with a key advertising SEIPDv2, so its claim may not apply. Released rclone itself is not the problem: Task 6'sTestNewWriterOldReader(removed with the old libraries in Task 19) showed go-proton-api v1.0.4 and the bridge's block reader read this format (v6 PKESK, SEIPDv2 blocks and block signatures) and the newtoISOStringmodification time. -
protondrive: files the old library (go-proton-api v1.0.4 and Proton-API-Bridge v1.0.5) wrote are covered only by the single-block frozen fixtures in
backend/protondrive/testdata/oldlib/(TestFrozenFixtures,TestFrozenFileFixture); the multi-block and empty-file cases left with the differential tests in Task 19. A multi-block fixture would need the old library back to write it. Nothing checks any more that released rclone (v1.76 and older) can read what the new backend writes; that matters to users who downgrade. Commitb667a1ab0still has the differential tests and both libraries, so such fixtures can be generated from a worktree of it. -
protondrive: a ranged read of a file which doesn't record its block sizes (written by some other clients) downloads from the first block every time, so random-offset reads of large such files through a mount are slow. Block sizes learnt on a full read could be cached.
-
protondrive:
client.apiCallretries POST and PUT mutations (create folder, move, rename, copy) after 5xx and network errors, as the SDK does. If a lost response hid a success, the retry fails witherrExists(2500) or a staleOriginalHash(2000) although the change was made. Consider re-reading the node after such a retry failure. -
protondrive:
createRevision(POST.../files/{id}/revisions) is retried byapiCallafter a lost response like any POST; a retry that succeeds leaves the first draft revision orphaned on the server (the fake allows several draft revisions). Find out whether Proton refuses a second draft revision, and delete or reuse our own if so. -
protondrive: confirm on a real account what
delete_multipledoes to an active (non-draft) link. The upload cleanup only sends it for drafts, and the fake refuses non-drafts, but the SDK's conflict handler sends it for anyConflictDraftRevisionID, which an active file with a draft revision also reports; Task 11 uploads a new revision in that case instead. A--retriespass after an upload whose outcome was unknown can reach the own-draftdelete_multipleinresolveConflict(upload.go); it is decided by Proton's conflict details, which could in theory lag. -
protondrive: confirm the HTTP status and code Proton returns for a bad verifier token, a missing block and a stale
CurrentRevisionID(the fake uses 422 / 2000, which the spec maps to "upgrade rclone"). -
protondrive: Proton's server can take a moment to show a change (seen live: a node read just after its commit was missing, or still a draft with no active revision). The fake models this only through
Server.SetReadLag, on the links route after a create, copy or commit; how long the real lag lasts and whether listings (folders/{id}/children) lag too is unmeasured. Only the reads back after a commit, a copy and, withenable_cachingoff, of a folder to write into (targetFolder) retry, for about 7 s. Not tolerant yet, and the next symptoms to expect:activeNode(Update, Move, Copy, DirMove of an object just written) fails "object not found" while the node is missing or still a draft; Move's read of the moved node may be stale. -
protondrive: drafts left after an ambiguous commit failure (5xx, network error, timeout, cancel, or a refusal after the commit was resent) are never deleted by the client, by design (see DECISIONS, "a draft is deleted only on an explicit refusal"). The next upload of the same name by this remote replaces its own draft, but a name never uploaded again keeps an orphan draft (a new file's draft node, or a draft revision) taking quota.
CleanUponly empties the trash. Find out whether Proton expires drafts by itself, and consider havingCleanUpdelete this remote's own drafts (byDraftClientUID). -
protondrive:
errUploadUnconfirmedis not retried at once, but a whole-sync--retriespass lists again; if the listing still lags it uploads the file again, adding a revision with identical content (wasted work and version history, no data loss). -
protondrive: several
Fsof one account in one process each have their own node cache; only Move/DirMove sources are invalidated across them. A name missing from oneFs's cached listing stays missing after anotherFscreates it, so--compare-dest,--copy-dest(with--immutable) andchecksum --downloaddecide on stale listings when the otherFswrites during the run, and anFsmade on a path that doesn't exist yet never finds it once it is made elsewhere. Fivetest_alltests fail for this and are in theignorelist ofTestProtonDriveFake:(fstest/test_all/config.yaml):TestCheckSumDownload,TestCopyFileCompareDest,TestCopyFileCopyDestImmutable,TestSyncCompareDest,TestSyncCopyDestImmutable; all pass withenable_caching = false. Events polled every 30 s (spec 6.2) will not close a window of seconds. Re-listing on every cache miss fixes them but breaksTestBudgetUploadandTestBudgetMkdir(a folder re-listed per new file). A cache shared by theFsof one account would fix them, but is package state, which the spec rules out: owner decision. Related and wider: with no cache expiry and no events (M5), a longrclone mountnever sees changes made by other clients (web app, another rclone) to folders it has already listed. A listing TTL would bound that but would not fix the five tests above. -
protondrive:
cmd/gitannexis inignoretestsforTestProtonDriveFake:because its remote name check (cmd/gitannex/configparse.go,config.GetRemoteNames) sees remotes set by environment variables lower cased, as for every other init.d remote; it says nothing about the backend. Run it against a remote in a config file to cover it. -
.gitea/workflows/ci.ymlcould not be run locally. The Gitea has an Actions runner (slow, so the workflow is kept light: 20 s per fuzz target, a 45 minute job timeout, notest_all); the first push must confirm the runner picks the workflow up. -
protondrive: browser sign-in in
rclone configwaits up to 10 minutes polling; a non-interactiveconfig createwithout username and password waits the same. -
Propose a CI check for this fork:
AGENTS.md,CLAUDE.md,GEMINI.mdand thedocs/agent files exist, andAGENTS.mdis at most 150 lines.
Someday
Recurring
- Maintain
AGENTS.md:- Add a rule only in response to a real failure. Do not pre-empt hypothetical mistakes.
- Update in the same commit as the convention change.
- Prune quarterly, and re-check the Fork Workflow section against
upstream's
AGENTS.mdafter each upstream merge.
Known issues
- On the development host (Go 1.27.4)
RCLONE_CONFIG=/notfound go test ./...fails onlycmd/serve/s3, unrelated to this work and undiagnosed (seen 2026-11-11 before the Proton Drive rewrite began). That is the baseline for plan Task 19's "no new failures"; the container list below is not. - On the development host on 2026-11-12,
cmd/bisyncTestRcBackupDir(backupDir1,backupDir2) fails every run with "unable to find file .../backup/file0.txt", also at06700aaf2(before the Proton Drive rewrite), so it is not caused by that work; undiagnosed.cmd/serve/s3passed in the same full run. RCLONE_CONFIG=/notfound go test ./...in the baregolang:1.26container fails 7 packages (list indocs/PERMISSIONS.md).fs/loggerneedsrsync; the mount, serve and smb failures are undiagnosed and are probably missing container tooling (FUSE, git-annex), not code. Confirm on a host with Go installed before treating a full-suite failure as a regression.- protondrive:
TestRegressionManyNewFscan't see from the fake server that key unlocks run one at a time; onlyTestLoadAccountSerialised(internal,unlockHook) checks it. - protondrive: an address key's
Token(account.gounlockAddressKey) is decrypted without a decompression limit, unlike node metadata (decryptMessage); a hostile server could send a compression bomb there too. Seen in Task 17. - protondrive: API error bodies are read whole and their
Errormessage is logged as the server sent it, of any length and with any control characters (session.goerrorHandler). Bound and sanitise it if a hostile server is in scope for logs. Seen in Task 17. - protondrive: a new revision (
createRevision), a move, rename or trash still forget the parent folder's cached listing, soPutover existing files in one folder lists it again each time (syncis not affected: it callsUpdate). New files and folders are added to the listing instead since Task 17. - protondrive: spec 9.5 asks for a fuzz target for event decoding; add it with events (fuzz_internal_test.go).