T01.i: remove dead ensureReposOpen (batch open-repo helper)

Its only callers were its own definition and its dedicated test block;
no production code used it since the read-union removal (T01.f). The
one test that exercised readDocumentSubjects' real integration path
(not ensureReposOpen itself) is kept, moved under the ensureRepoOpen
describe block it actually belongs to.
This commit is contained in:
Sylvain Duchesne
2026-09-21 14:35:32 +02:00
parent d62d23c686
commit 51b6278bf6
2 changed files with 2 additions and 51 deletions
@@ -285,14 +285,3 @@ export async function openRepoUnguarded(nuri: Nuri): Promise<void> {
inFlight.set(nuri, p);
return p;
}
/**
* Open a SET of repos before an anchored batch read, in parallel, each tolerant
* ({@link ensureRepoOpen} never throws). Empty / falsy entries are ignored.
*/
// @provenance ensureReposOpen kind=aligned level=2 ref=sdk/js/lib-wasm/src/lib.rs:doc_subscribe — the batch form, with per-doc isolation
export async function ensureReposOpen(nuris: Nuri[]): Promise<void> {
const unique = [...new Set(nuris.filter(Boolean))];
if (unique.length === 0) return;
await Promise.all(unique.map((n) => ensureRepoOpen(n)));
}