The old libraries were only used by the differential crypto tests. Those go, and TestFrozenFixtures moves into crypto_internal_test.go without its -update branch, so files the old library wrote stay checked through the frozen fixtures in testdata/oldlib. go mod tidy removes the two libraries and the modules only they pulled in; relvacode/iso8601 leaves go.mod. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 KiB
Decisions
Fork-only. Append-only, newest first. Never edit or delete an entry - supersede
it with a new one that links back. One entry per decision a future maintainer
would otherwise have to reverse-engineer.
No index: grep -n '^## ' docs/DECISIONS.md lists every entry.
2026-11-12 - Proton Drive keeps frozen old-library fixtures, not the old library
Status: accepted
Context: go-proton-api v1.0.4 and Proton-API-Bridge v1.0.5 stayed
in go.mod only for differential tests checking that the new client and
the old library read each other's output (plan Task 19).
Decision: The differential tests and both libraries were removed. What
the old library wrote stays checked through the frozen fixtures in
backend/protondrive/testdata/oldlib/ (TestFrozenFixtures,
TestFrozenFileFixture), which can no longer be regenerated.
Alternatives: Keeping the libraries as test-only requirements (they
would stay in go.mod and its vulnerability surface, and upstream would
carry them).
Consequences: Multi-block and empty old-library files, and old-reader
compatibility of new writes, are no longer tested (docs/TODO.md).
2026-11-12 - Test-account usernames removed from git history by force-push
Status: accepted
Context: The first Proton Drive handoff commit contained the two
test-account usernames (no passwords or tokens); a later commit removed
them from the file but they stayed in history on the Gitea remote.
Decision: On the owner's explicit instruction, that commit was
rebuilt without the usernames, the following commits were replayed with
identical trees and metadata, and master was force-pushed once with
--force-with-lease. The rule against force-pushing still stands.
Consequences: Commit hashes from 901d7fd5b onward changed (mapping
in the handoff's "Open questions" section). The old objects may stay
reachable on the server until Gitea garbage-collects the repository.
2026-11-12 - test_all shares one protonfake session across test processes
Status: accepted
Context: fstest/testserver/init.d/TestProtonDriveFake starts one
protonfake per test_all run (reference counted by run.bash), and
every test process gets the same session through
RCLONE_CONFIG_TESTPROTONDRIVEFAKE_* variables. Refresh tokens are
single use and a process can't see another's refresh, so one process
refreshing would leave the rest with dead tokens.
Decision: Share the session; change nothing in protontest,
protonfake or the client. The client refreshes only after an HTTP 401
(session.call); the fake answers 401 only for a session expired by
Server.ExpireAccessToken or ended by logout or RevokeSession, and
protonfake calls none of them. The only logouts are Fs.Disconnect
and re-running rclone config, which no test in fs/operations,
fs/sync, vfs, cmd/bisync, cmd/gitannex or fstests calls.
Alternatives: A session per test process (protonfake would need a
sign-in route for test_all to call, and the init.d protocol has one
output per server); non-expiring or logout-tolerant tokens in
standalone mode (behaviour no test needs, and a fake that differs from
Proton).
Consequences: A future test that calls Disconnect, or a fake that
expires tokens on a timer, breaks every process sharing the run: the
symptom is "not signed in" or refresh failures across all suites at
once. Revisit then.
2026-11-11 - Proton Drive rewrite paused mid-plan and merged to master
- Decision: at the owner's request, work on plan 001 stopped after Task
17 of 21 and the branch was fast-forwarded into
masterand pushed, with the plan, a handoff document and the execution workspace committed underdocs/plans/. - Why: the owner wanted development wound down with nothing left only in an agent's conversation.
- Consequences:
mastercarries an unfinished plan, against the usual rule that plans are removed before merging; the user docs still describe the old backend; the old libraries are still ingo.mod. The push tomasterwas a one-off instruction - the rule against pushing tomasterstands. Resume fromdocs/plans/001-protondrive-tier1-HANDOFF.md.
2026-11-11 - Proton Drive logs what ignore_signature_errors lets through
Status: accepted
Context: With ignore_signature_errors set, reads, writes, moves,
copies and renames of nodes whose keys are unverified went ahead
silently, although spec 6.4 promises a logged ERROR (Task 16 re-review
2).
Decision: Each such operation logs one ERROR per node and kind of
operation for the life of the Fs, naming the node, its ID, the
operation and why its key is unverified. Completes "Proton Drive won't
vouch for a node it couldn't verify".
Alternatives: Logging every call (floods a sync); a NOTICE (too
easily missed for something permanent).
Consequences: With the option set, moving or copying a node out of
an unverified folder re-signs or re-homes it as the user's, so it is
trusted from then on; the ERROR says so.
2026-11-11 - Proton Drive matches email addresses by ASCII case only
Status: accepted
Context: The own-address check of "Proton Drive roots trust in the
user's own addresses" ignored case, but the key lookup didn't, so a
server could name the user's address in capitals and serve its own keys
for it, at the root and below (Task 16 re-review 2).
Decision: One rule everywhere: emails are compared after lowercasing
ASCII letters only. An email matching one of the account's addresses
under it is verified with the account's own keys and never looked up on
the server, and other users' keys are cached under the same key. Unicode
case folding is not used, as it maps the Kelvin sign to k and the long s
to s, letting a non-ASCII address pass for an ASCII one.
Alternatives: Exact matching (an address the server stores in other
case would be looked up remotely); strings.EqualFold (Unicode folding).
Consequences: Two addresses differing only in non-ASCII case are
different addresses to rclone.
2026-11-11 - Proton Drive roots trust in the user's own addresses
Status: accepted
Context: "Proton Drive distrusts what a forged folder key vouches
for" and "Proton Drive refuses a file whose node key signature fails"
read as if every key were checked against keys rclone can trust. But
the keys of another user's email come from the server, so a server can
forge a share, root or node "signed" by a foreign address it vouches
for (Task 16 re-review).
Decision: Corrects those entries. The My Files share's creator and
the root folder's signer must be addresses whose keys the account
holds (compared ignoring case); otherwise the share or root key is
unverified, which makes the whole drive unreadable and unwritable
without ignore_signature_errors, and the error says why. Below the
root, nodes signed under another user's email are still verified
against server-supplied keys: a protocol limit Proton's SDK shares,
documented in spec section 7 and TODO.
Alternatives: Pinning other users' keys on first use (state rclone
doesn't keep); trusting server keys at the root too.
Consequences: A folder genuinely signed by an address since deleted
from the account, or whose keys no longer unlock, is unverified: writes
into it, and reads beneath it, need ignore_signature_errors.
2026-11-11 - Proton Drive won't vouch for a node it couldn't verify
Status: accepted
Context: Refusing writes into a folder with an unverified key left
the other direction open: moving or copying an anonymous node out of it
has rclone sign its server-made passphrase as the user's, after which it
and everything beneath it verified (Task 16 re-review). And a node made
under such a folder with ignore_signature_errors set was signed by the
user, so verified later, although whoever made the folder's key can
decrypt its passphrase.
Decision: Supersedes the inheritance rule of "Proton Drive distrusts
what a forged folder key vouches for": every node beneath a folder with
an unverified key is unverified, however it is signed, and so is a
folder rclone makes there. Moving, copying, directory-moving or
renaming a node whose key is unverified fails unless
ignore_signature_errors is set.
Alternatives: Inheriting only into anonymous nodes (leaves the
user-signed children of a forged folder trusted).
Consequences: A genuine folder whose key fails to verify, as one
signed by a since-deleted address, makes its whole subtree unreadable
and unwritable without ignore_signature_errors.
2026-11-11 - Proton Drive verifies the manifest before releasing a full read
Status: accepted
Context: A full read checked the manifest signature at EOF, as the
SDK does, so blocks swapped, truncated or from an older revision, each
matching its listed hash and recorded size, reached the reader before
the error: rclone cat and streaming mounts showed wrong bytes (spec
9.6 asks for "an integrity error, not data").
Decision: A full read lists every block page first, verifies the
manifest over the listed hashes, then fetches; each block is checked
against its listed hash, and a block listed again with another hash
is an integrity error. Pages are fetched one after another. Ranged
reads keep checking blocks against their listed hashes only.
Alternatives: Keeping the SDK's EOF check; verifying ranged reads
too by listing the whole file on each ranged open (costly for mounts
and multi-thread copies without a hash cache).
Consequences: No extra requests, but a file of more than 20 blocks
waits for its whole list before the first byte. Block metadata, not
data, is held meanwhile. A whole earlier revision served under the
current ID stays undetectable (protocol limit).
2026-11-11 - Proton Drive distrusts what a forged folder key vouches for
Status: accepted
Context: An anonymous node's passphrase, name and content signatures
are checked against its parent folder's key. A server can make a folder
key of its own, seal it to the real parent and sign everything beneath
it, so a refusal based only on each node's own signature check is
bypassed (Task 16 review).
Decision: A node key is unverified if its own passphrase signature
fails, or if it was checked against an unverified parent key; this
passes down the tree. Reading a file with an unverified key, and
creating, uploading, renaming, moving or copying into a folder with
one, fail unless ignore_signature_errors is set. Listing such a folder
still works, with one ERROR for the folder itself.
Alternatives: Leaving the folder's children to their own checks
(bypassable); refusing to list the folder (a sync would delete its
destination copy).
Consequences: Builds on the 2026-11-11 entry "Proton Drive refuses a
file whose node key signature fails". Files in a public-link upload
folder whose key fails to verify need ignore_signature_errors.
2026-11-11 - Proton Drive refuses a file whose node key signature fails
Status: accepted
Context: The node passphrase signature was only logged when it
failed, as the SDK does, so a server could seal a key of its own to
the parent folder's public key and serve any content under it (spec 7
puts the server in the threat model; 9.6 asks for an error).
Decision: Opening such a file fails with an integrity error naming
ignore_signature_errors, like a content key or manifest signature
failure; with the option set it is read, the failure logged once. The
node is still listed. Sign-in errors that need a reconnect name the
remote through a hint the seam gives the session, so read errors, which
don't pass through translateError, name it too.
Alternatives: Skipping the node from listings (a sync would then
delete its copy at the destination); leaving it to the SDK's behaviour.
Consequences: Legacy files whose keys were signed by a since-removed
address need ignore_signature_errors, which the error says.
2026-11-11 - Proton Drive backend runs on its own client
Status: accepted
Context: The backend sat on rclone/Proton-API-Bridge and
rclone/go-proton-api, which share credentials through package globals,
write files the official clients can't always read, and can't be tested
without a live account (spec 001).
Decision: protondrive.go was rewritten on the native client built in
plan Tasks 2-12, keeping every option name and meaning and reading v1.76
saved sessions without signing in again. Config offers browser sign-in
(default unless a username and password are already set, so existing
scripted setups keep using them) and password sign-in. An upload whose
commit outcome can't be known is a no-low-level-retry error: an immediate
retry could add a revision that already landed, while a later sync pass
reads the destination first.
Alternatives: Patching the bridge (globals and crypto stay outside the
tree); keeping browser sign-in the default even with a password set
(non-interactive config create would wait on a browser).
Consequences: The full contract suite runs hermetically against
protontest. Several Fs of one account in one process each cache
separately until events land (spec 6.2).
2026-11-11 - Fork agent tooling is appended, not merged, into upstream files
Status: accepted
Context: Upstream rclone already ships a maintainer-written AGENTS.md
and a CLAUDE.md that imports it. This fork tracks upstream and intends to
send work back, so every edit to an upstream file is a future merge conflict
and a risk of leaking fork-only material into an upstream PR.
Decision: Upstream's AGENTS.md text is kept verbatim. Fork rules are one
"Fork Workflow" section appended at the end. CLAUDE.md and README.md are
untouched. Fork-only docs live at the top of docs/ (Hugo only builds
docs/content/, so they do not reach the website).
Alternatives: Restructuring AGENTS.md with the fork rules first (better
agent attention, permanent conflicts with upstream); a separate fork rules
file (two sources of truth).
Consequences: AGENTS.md sits at 148 of a 150 line budget - a new fork
rule must replace an old one. Upstream PR branches must be cut so they exclude
the paths listed in the Fork Workflow section.
2026-11-11 - Adopt AGENTS.md as single source of truth
Status: accepted
Context: Agents had no fork-specific workflow or permission config between
sessions.
Decision: AGENTS.md is canonical; CLAUDE.md/GEMINI.md are pointers.
Specs are permanent in docs/specs/. Plans live in docs/plans/ only while
work is in progress and are removed before merge. Both override the
superpowers default paths.
Alternatives: Per-tool rule files (drift); no rules file (agents
re-explore the repo every session).
Consequences: Rule changes happen in one file; pointer files stay thin.
The spec, not the plan, is the record.