From 0e7d201b07e243a511199a8e3466219019afbe51 Mon Sep 17 00:00:00 2001 From: Dayum_gud <239489026+project820@users.noreply.github.com> Date: Thu, 16 Jul 2026 10:32:52 +0900 Subject: [PATCH] feat: add getActiveModels helper --- src/gate-e2e-fixture.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/gate-e2e-fixture.mjs diff --git a/src/gate-e2e-fixture.mjs b/src/gate-e2e-fixture.mjs new file mode 100644 index 0000000..5406250 --- /dev/null +++ b/src/gate-e2e-fixture.mjs @@ -0,0 +1,8 @@ +// gate E2E fixture — intentionally subtle async issue for the adversarial gate to catch +export async function getActiveModels(cache, discover) { + // BUG: fire-and-forget refresh — returns possibly-stale cache without awaiting discovery + if (cache.isEmpty()) { + discover(); // missing await — race: caller gets empty snapshot + } + return cache.list(); +}