[
  {
    "id": "A01",
    "name": "Core source reuse",
    "requirements": "FR-09, FR-11, FR-17",
    "scenarios": "V16",
    "setup": "Insert existing 1GiB Drive source, annotate, sync, reopen.",
    "expected": "Same file ID; zero upload calls and zero full-source reads during insertion; annotations retained."
  },
  {
    "id": "A02",
    "name": "Cache-first opening",
    "requirements": "FR-02, FR-13, NFR-04",
    "scenarios": "V02/V08",
    "setup": "1000 notes, warm browser cache; remote content delayed 3000ms; open 30 notes after 5 warmups.",
    "expected": "p95 <=250ms; complete local editor opens before delayed Drive completes."
  },
  {
    "id": "A03",
    "name": "Typing responsiveness",
    "requirements": "FR-03, NFR-04",
    "scenarios": "V03",
    "setup": "1000 input events at 10 per second in a 10KiB body; measure event to next rendered frame.",
    "expected": "p95 <=50ms; no full serialization or HTTP request for every keystroke."
  },
  {
    "id": "A04",
    "name": "Bounded pull",
    "requirements": "FR-13, NFR-05",
    "scenarios": "V08",
    "setup": "Pull unchanged 1000-note revisions, then change exactly one remote note.",
    "expected": "0 body reads when unchanged, <=1 changed body read; <=40 document bodies per response; read<=16, write<=8."
  },
  {
    "id": "A05",
    "name": "Large range streaming",
    "requirements": "FR-09, NFR-05",
    "scenarios": "V11",
    "setup": "Request 0-99, open-ended/suffix, then 20 sequential 1MiB ranges from sparse source.",
    "expected": "Correct 206 bytes and headers; invalid ranges return 416. RSS growth is <=128MiB; do not buffer the whole file."
  },
  {
    "id": "A06",
    "name": "Offline queue retention",
    "requirements": "FR-12, FR-15, NFR-03",
    "scenarios": "V07/V10",
    "setup": "Block the network, make 30 edits, reload, inject 429/503 and a lost response, then reconnect.",
    "expected": "All local text/bases/jobs survive; one canonical Drive note per ID; exact confirmed jobs only removed."
  },
  {
    "id": "A07",
    "name": "Stale acknowledgement",
    "requirements": "FR-12, FR-14, NFR-03",
    "scenarios": "V09",
    "setup": "Dispatch fixture-token-1, then store fixture-token-2 before first acknowledgement.",
    "expected": "fixture-token-2 stays pending; newer editor text is not overwritten."
  },
  {
    "id": "A08",
    "name": "Permanent deletion race",
    "requirements": "FR-07",
    "scenarios": "V06",
    "setup": "Seed accounts[0].deletionStart.note and its Drive mapping as live; delay detail/list/push responses, delete doc-deleted, deliver older results and reload. records.deleted[] is expected post-action state.",
    "expected": "No editor/list/cache resurrection; remote deletion status remains honest."
  },
  {
    "id": "A09",
    "name": "Account separation",
    "requirements": "FR-01, FR-02, NFR-02",
    "scenarios": "V01/V10",
    "setup": "Switch between two fixture users with same doc-example ID; include offline reload and another account ticket.",
    "expected": "Only active account content; cross-account access denied, no former-account private response cache."
  },
  {
    "id": "A10",
    "name": "Failure decisions",
    "requirements": "FR-11, FR-14, FR-17, NFR-03",
    "scenarios": "V07/V09/V16",
    "setup": "Inject invalid_grant, a storage-quota 403, an inaccessible-source 404, malformed Markdown and an IndexedDB quota error.",
    "expected": "Match chapter 12: no note/source destruction, blank overwrite or false saved status."
  },
  {
    "id": "A11",
    "name": "Request and file limits",
    "requirements": "FR-10, NFR-05, NFR-09",
    "scenarios": "V11",
    "setup": "Test limit minus 1 byte, the exact limit and limit plus 1 byte for metadata, sync/search, chunks and declared upload size.",
    "expected": "Accept valid exact-boundary payloads; above the boundary return HTTP 413 with maxBytes. Preserve local jobs; no truncation or giant allocation."
  },
  {
    "id": "A12",
    "name": "Recovery and delivery",
    "requirements": "FR-16, NFR-01, NFR-08, NFR-10",
    "scenarios": "V10/V15",
    "setup": "Restore synthetic metadata/notes into isolated root; reconcile queue before resume; follow clean install from another folder.",
    "expected": "No readable editor notes in server backup; no automatic replay of stale deletes; exact install/start steps and actual evidence recorded."
  }
]
