Index: test/activitypub-as2.test.js
===================================================================
--- test/activitypub-as2.test.js	(revision c1df3e9e512d5945947d452659529f8866f65d9b)
+++ test/activitypub-as2.test.js	(revision da84110b6ca109b72d7666682dc52070dbb6b891)
@@ -32,7 +32,4 @@
   // ActivityPub §5.6: the private blocked collection (owner-only GET).
   'blocked',
-  // ActivityPub §4.1: supplementary collections on the actor — Klonkt wijst
-  // ermee naar de playlist-lijst (shaer-ayc).
-  'streams',
   // FEP-633c (Guardians): the owner-only dashboard queues on the actor; the
   // sub-keys are the daemon-contract collection names the Shaer clients read.
Index: test/ap-playlist-discovery.test.js
===================================================================
--- test/ap-playlist-discovery.test.js	(revision c1df3e9e512d5945947d452659529f8866f65d9b)
+++ 	(revision )
@@ -1,111 +1,0 @@
-// Vindbaarheid van playlist-collecties (shaer-ayc, stap 2).
-//
-// Drie wegen ernaartoe, elk getest: de actor wijst via AS2 `streams` naar de
-// lijst; de lijst geeft kaal URI's en verrijkt stubs (FEP-9876), waarbij ook
-// een stub alleen het open deel telt; en een post die een playlist insluit
-// draagt een Link-tag naar de collectie -- maar nooit naar die van een andere
-// site, want playlist-ids zijn een globale primary key.
-import { test } from 'node:test';
-import assert from 'node:assert/strict';
-
-process.env.DATABASE_PATH = ':memory:';
-process.env.PUBLIC_BASE_URL = 'https://test.example';
-
-const dbMod = await import('../src/config/database.js');
-const db = dbMod.default;
-dbMod.initializeDatabase();
-const AP = (await import('../src/services/ActivityPubService.js')).default;
-const express = (await import('express')).default;
-const routes = (await import('../src/routes/activitypub.js')).default;
-
-db.prepare('INSERT INTO users (id, username, email, password_hash, role) VALUES (?,?,?,?,?)')
-  .run('u1', 'u1', 'u1@t', 'x', 'god');
-db.prepare('INSERT INTO sites (id, slug, title, owner_id, is_public) VALUES (?,?,?,?,1)')
-  .run('s1', 'band', 'De Band', 'u1');
-db.prepare('INSERT INTO sites (id, slug, title, owner_id, is_public) VALUES (?,?,?,?,1)')
-  .run('s2', 'ander', 'Andere Site', 'u1');
-
-const insMedia = db.prepare('INSERT INTO media (id, site_id, filename, storage_path, mime_type, size) VALUES (?,?,?,?,?,1000)');
-const insTrack = db.prepare('INSERT INTO audio_tracks (id, site_id, title, artist, duration, media_id, fedi_open) VALUES (?,?,?,?,?,?,?)');
-insMedia.run('m1', 's1', 'een.mp3', 'audio/een.mp3', 'audio/mpeg');
-insMedia.run('m2', 's1', 'twee.mp3', 'audio/twee.mp3', 'audio/mpeg');
-insTrack.run('t1', 's1', 'Open nummer', 'De Band', 200, 'm1', 1);
-insTrack.run('t2', 's1', 'Dicht nummer', 'De Band', 180, 'm2', 0);
-
-// Twee playlists op band, een op ander. Expliciete created_at: de lijst
-// sorteert erop, en twee inserts in dezelfde seconde maken die volgorde
-// anders een muntworp.
-db.prepare("INSERT INTO playlists (id, site_id, title, kind, created_at) VALUES ('eerste','s1','Eerste Plaat','album','2026-01-01 00:00:00')").run();
-db.prepare("INSERT INTO playlists (id, site_id, title, kind, created_at) VALUES ('tweede','s1','Tweede Plaat','album','2026-02-01 00:00:00')").run();
-db.prepare("INSERT INTO playlists (id, site_id, title, kind, created_at) VALUES ('vreemd','s2','Van De Ander','album','2026-03-01 00:00:00')").run();
-const insPT = db.prepare('INSERT INTO playlist_tracks (playlist_id, track_id, position) VALUES (?,?,?)');
-insPT.run('eerste', 't1', 1);
-insPT.run('eerste', 't2', 2);
-
-const app = express();
-app.use(routes);
-const server = app.listen(0);
-await new Promise((r) => server.once('listening', r));
-const base = `http://127.0.0.1:${server.address().port}`;
-const getJson = async (path, headers = {}) => {
-  const r = await fetch(base + path, { headers: { Accept: 'application/activity+json', ...headers } });
-  return { status: r.status, body: r.status === 200 ? await r.json() : null, headers: r.headers };
-};
-
-test('de actor wijst via streams naar de playlist-lijst', async () => {
-  const { body } = await getJson('/ap/users/band');
-  assert.deepEqual(body.streams, ['https://test.example/ap/users/band/playlists']);
-});
-
-test('de lijst is kaal standaard: URI-per-playlist, alleen van deze site, in vaste volgorde', async () => {
-  const { body } = await getJson('/ap/users/band/playlists');
-  assert.equal(body.type, 'OrderedCollection');
-  assert.equal(body.totalItems, 2);
-  assert.deepEqual(body.orderedItems, [
-    'https://test.example/ap/users/band/playlists/eerste',
-    'https://test.example/ap/users/band/playlists/tweede',
-  ]);
-});
-
-test('verrijkt (FEP-9876) geeft stubs zonder tracks, en ook de stub telt alleen het open deel', async () => {
-  const { body, headers } = await getJson('/ap/users/band/playlists', { Prefer: 'return=representation' });
-  assert.equal(headers.get('preference-applied'), 'return=representation');
-  assert.match(headers.get('vary') || '', /Prefer/);
-  const stub = body.orderedItems[0];
-  assert.equal(stub.name, 'Eerste Plaat');
-  assert.equal(stub.totalItems, 1, 'een open en een gated track: de stub telt er een');
-  assert.equal(stub.orderedItems, undefined, 'een stub draagt geen tracks');
-  assert.equal(stub['@context'], undefined, 'genest object draagt de context van zijn omhulsel');
-  assert.ok(!JSON.stringify(body).includes('Dicht nummer'), 'de gated titel lekt ook hier niet');
-});
-
-test('een lege site heeft een lege lijst, geen 404 -- de lijst zelf is niet geheim', async () => {
-  const { status, body } = await getJson('/ap/users/ander/playlists');
-  assert.equal(status, 200);
-  assert.equal(body.totalItems, 1); // de eigen playlist van s2 staat er wel in
-});
-
-test('een post met [[playlist:id]] draagt een Link-tag naar de collectie', () => {
-  const site = db.prepare("SELECT * FROM sites WHERE id = 's1'").get();
-  const post = { id: 'p1', slug: 'p1', title: 'Luister', content: 'Nieuw album! [[playlist:eerste]] en nogmaals [[playlist:eerste]]', status: 'published' };
-  const note = AP.buildNote('https://test.example', site, post);
-  const links = (note.tag || []).filter((t) => t.type === 'Link');
-  assert.equal(links.length, 1, 'dubbel insluiten geeft een tag');
-  assert.equal(links[0].href, 'https://test.example/ap/users/band/playlists/eerste');
-  assert.equal(links[0].name, 'Eerste Plaat');
-});
-
-test('een playlist van een ANDERE site levert geen tag -- de site-check is de tenancy-grens', () => {
-  const site = db.prepare("SELECT * FROM sites WHERE id = 's1'").get();
-  const post = { id: 'p2', slug: 'p2', title: 'Fout', content: 'Kijk: [[playlist:vreemd]]', status: 'published' };
-  const note = AP.buildNote('https://test.example', site, post);
-  assert.equal((note.tag || []).filter((t) => t.type === 'Link').length, 0);
-});
-
-test('een post zonder playlist heeft geen Link-tags', () => {
-  const site = db.prepare("SELECT * FROM sites WHERE id = 's1'").get();
-  const note = AP.buildNote('https://test.example', site, { id: 'p3', slug: 'p3', title: 'Los', content: 'Gewoon tekst met [[track:t1]]', status: 'published' });
-  assert.equal((note.tag || []).filter((t) => t.type === 'Link').length, 0);
-});
-
-test.after(() => server.close());
Index: test/ap-playlist.test.js
===================================================================
--- test/ap-playlist.test.js	(revision c1df3e9e512d5945947d452659529f8866f65d9b)
+++ 	(revision )
@@ -1,101 +1,0 @@
-// Een playlist als AP-collectie (shaer-ayc, stap 1 van het Funkwhale-spoor).
-//
-// Vier beloftes: de collectie bestaat op een stabiele URI; alleen fedi_open-
-// tracks staan erin, met echte bestands-URL, en totalItems telt alleen die --
-// wie leest kan niet aftellen wat er achter de poort staat; de volgorde is de
-// playlist-volgorde, niet de invoegvolgorde; en een playlist van site A is op
-// de actor van site B een 404, want tenancy loopt door alles heen.
-import { test } from 'node:test';
-import assert from 'node:assert/strict';
-
-process.env.DATABASE_PATH = ':memory:';
-process.env.PUBLIC_BASE_URL = 'https://test.example';
-
-const dbMod = await import('../src/config/database.js');
-const db = dbMod.default;
-dbMod.initializeDatabase();
-const express = (await import('express')).default;
-const routes = (await import('../src/routes/activitypub.js')).default;
-
-db.prepare('INSERT INTO users (id, username, email, password_hash, role) VALUES (?,?,?,?,?)')
-  .run('u1', 'u1', 'u1@t', 'x', 'god');
-db.prepare('INSERT INTO sites (id, slug, title, owner_id, is_public) VALUES (?,?,?,?,1)')
-  .run('s1', 'band', 'De Band', 'u1');
-db.prepare('INSERT INTO sites (id, slug, title, owner_id, is_public) VALUES (?,?,?,?,1)')
-  .run('s2', 'ander', 'Andere Site', 'u1');
-
-// Drie tracks: twee open, een gated. De gated staat MIDDEN in de volgorde,
-// zodat een fout die hem als lege rij meetelt ook de volgorde zou breken.
-const insMedia = db.prepare('INSERT INTO media (id, site_id, filename, storage_path, mime_type, size) VALUES (?,?,?,?,?,1000)');
-const insTrack = db.prepare('INSERT INTO audio_tracks (id, site_id, title, artist, duration, media_id, fedi_open, cover_url) VALUES (?,?,?,?,?,?,?,?)');
-insMedia.run('m1', 's1', 'een.mp3', 'audio/een.mp3', 'audio/mpeg');
-insMedia.run('m2', 's1', 'twee.mp3', 'audio/twee.mp3', 'audio/mpeg');
-insMedia.run('m3', 's1', 'drie.mp3', 'audio/drie.mp3', 'audio/mpeg');
-insTrack.run('t1', 's1', 'Opening', 'De Band', 215, 'm1', 1, '/media/hoes1.jpg');
-insTrack.run('t2', 's1', 'Achter de poort', 'De Band', 180, 'm2', 0, null);
-insTrack.run('t3', 's1', 'Finale', 'De Band', 240, 'm3', 1, null);
-
-db.prepare("INSERT INTO playlists (id, site_id, title, artist, year, cover_url, kind) VALUES ('nachtlicht','s1','Nachtlicht','De Band',2026,'/media/album.jpg','album')").run();
-const insPT = db.prepare('INSERT INTO playlist_tracks (playlist_id, track_id, position) VALUES (?,?,?)');
-// Invoegvolgorde is met opzet NIET de positievolgorde.
-insPT.run('nachtlicht', 't3', 3);
-insPT.run('nachtlicht', 't1', 1);
-insPT.run('nachtlicht', 't2', 2);
-
-const app = express();
-app.use(routes);
-const server = app.listen(0);
-await new Promise((r) => server.once('listening', r));
-const base = `http://127.0.0.1:${server.address().port}`;
-const getJson = async (path) => {
-  const r = await fetch(base + path, { headers: { Accept: 'application/activity+json' } });
-  return { status: r.status, body: r.status === 200 ? await r.json() : null, type: r.headers.get('content-type') || '' };
-};
-
-test('de collectie bestaat, als AS2, met stabiele id en attributedTo de actor', async () => {
-  const { status, body, type } = await getJson('/ap/users/band/playlists/nachtlicht');
-  assert.equal(status, 200);
-  assert.match(type, /application\/activity\+json/);
-  assert.equal(body.type, 'OrderedCollection');
-  assert.equal(body.id, 'https://test.example/ap/users/band/playlists/nachtlicht');
-  assert.equal(body.attributedTo, 'https://test.example/ap/users/band');
-  assert.equal(body.name, 'Nachtlicht');
-  assert.equal(body.summary, 'De Band · 2026');
-  assert.equal(body.icon.url, 'https://test.example/media/album.jpg');
-});
-
-test('alleen fedi_open-tracks, totalItems telt alleen die, en de poort lekt geen bestandsnaam', async () => {
-  const { body } = await getJson('/ap/users/band/playlists/nachtlicht');
-  assert.equal(body.totalItems, 2, 'de gated track telt niet mee');
-  assert.equal(body.orderedItems.length, 2);
-  const alles = JSON.stringify(body);
-  assert.ok(!alles.includes('twee.mp3'), 'de gated bestandsnaam staat nergens in de collectie');
-  assert.ok(!alles.includes('Achter de poort'), 'ook de titel van de gated track niet');
-});
-
-test('de volgorde is de playlist-volgorde, en elke rij is een speelbare Audio', async () => {
-  const { body } = await getJson('/ap/users/band/playlists/nachtlicht');
-  assert.deepEqual(body.orderedItems.map((a) => a.name), ['Opening', 'Finale']);
-  for (const a of body.orderedItems) {
-    assert.equal(a.type, 'Audio');
-    assert.match(a.url, /^https:\/\/test\.example\/audio\/stream\//);
-    assert.equal(a.mediaType, 'audio/mpeg');
-  }
-  assert.equal(body.orderedItems[0].duration, 'PT215S');
-  assert.equal(body.orderedItems[0].summary, 'De Band');
-  // Track zonder eigen hoes erft de albumhoes -- zelfde regel als post-audio,
-  // waar de postcover invalt.
-  assert.equal(body.orderedItems[1].icon.url, 'https://test.example/media/album.jpg');
-});
-
-test('tenancy: dezelfde playlist op de verkeerde actor is een 404', async () => {
-  const { status } = await getJson('/ap/users/ander/playlists/nachtlicht');
-  assert.equal(status, 404);
-});
-
-test('onbekende playlist en onbekende site zijn allebei een 404', async () => {
-  assert.equal((await getJson('/ap/users/band/playlists/bestaat-niet')).status, 404);
-  assert.equal((await getJson('/ap/users/niemand/playlists/nachtlicht')).status, 404);
-});
-
-test.after(() => server.close());
