D68 · The photo copy reads v1's files by public link, or through a read-only v1 login
Accepted · 2026-10-20 · zuki · Closes #218
Decision: The photo copy never holds a credential that can write to or delete v1's files: not v1's secret key, and not Storage's S3 keys. It reads each bucket in one of two ways:
- A public bucket: each file is downloaded by its public URL, with no v1 credential at all.
- A private bucket: through a v1 login made only for the copy, which a Storage policy on v1 lets read (select) the objects of the buckets the copy needs, and nothing else. The copy signs in as that login and downloads with its token.
v2 stays private either way (D60). The cutover run reads the same way.
Why: zuki accepted the proposed answer on #218 (2026-10-20), as long as every file can be moved to v2. D36 lets the rehearsal hold read-only v1 credentials only. v2_reader is a Postgres login (TL-DP-01): it can list files, but Postgres can't hand over their bytes. Supabase's ready-made Storage credentials can also delete.
Consequences:
- Which way each bucket goes is read from v1 by TL-DP-02's Check, which lists each bucket with public true or false. That answers D60's public-link question before the copy exists.
- If any bucket is private, a TL step makes the login and its policy. Both are writes to v1 production, so it is L0 for good, run by zuki once, like TL-DP-01. The login's password lives in the password manager and then the staging environment, beside v2_reader's (D28).
- The photo copy (data phase row 6, a Backend Engineer pack) lists v1's files through v2_reader, downloads each one as above, and writes it to its D14 path. A file it can't read is an unmatched row in the reconcile (D18), never a silent skip (D60).
- If a bucket can't be read either way, the copy stops and zuki decides. A credential that can write doesn't come back in through a workaround.