halkyon/apps/learn/halkyon_learn_flutter/test/feature/studyset/bloc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 e368bba2dd
feat(privacy): a private studyset's files are sealed with its key (ADR 0019, D5)
- `AssetRepository` seals a file of a private studyset with its tree's key
  for its asset row before hashing it (`AssetSealing`, which `Privacy`
  does): the row's hash and size and the file uploaded are the sealed
  file's, the upload says it is encrypted, and the row's payload, sealed
  too, carries the file name and the hash of what was sealed (asset
  schema 2). A download is checked against the row's hash, opened for its
  row and checked against what was sealed. This device keeps the sealed
  file to upload and the opened one, by its own hash, for what reads files
  by path.
- The same file is a row per key: in a private and a readable studyset, or
  two private trees, it is two.
- Every place adding a file names its studyset: the editors' pictures and
  sounds (`StudysetFiles`, which every screen of a studyset and the PDF
  reader set), PDFs and screenshots, Anki imports, copies and their updates
  (a copy's top studyset is made first, so its files take its key), and
  accepted suggestions (by their item's tree).
- Making a tree private or not, or moving a topic into another tree, moves
  its files: each under another key is added anew under the tree's, the
  content names the new row (whole `asset:` values and a PDF's file, never
  text), and the old row is blanked and deleted once nothing else names it.
- Tests: a private studyset's file never uploads readable; a sealed file
  moved to another row, or under a key not open here, doesn't open; a
  changed file is refused by its hash; one row per key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-23 14:13:10 +02:00
..
exam_cubit_test.dart feat(privacy): a private studyset's files are sealed with its key (ADR 0019, D5) 2026-10-23 14:13:10 +02:00
material_progress_cubit_test.dart feat(privacy): a private studyset's files are sealed with its key (ADR 0019, D5) 2026-10-23 14:13:10 +02:00
studyset_activity_cubit_test.dart chore: Halkyon Learn moves into apps/learn 2026-10-22 18:11:02 +02:00
studyset_list_bloc_test.dart feat(privacy): a private studyset's files are sealed with its key (ADR 0019, D5) 2026-10-23 14:13:10 +02:00