Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit b0debd619e7a475d45a8dbca895ca502b671fd05
parent 5ac3062f01ad349e3dda3db8cf59e2b9ce55747d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 18 Aug 2026 11:29:01 -0400

faces.spec: detect each corner once for the whole file

Two tests here walk the entire queue, and a detection is ~0.94s of python
decoding five frames and running YuNet on each. Twenty-two of those is twenty
seconds of four-core load dropped into the middle of a serial suite.

With it in, undo.spec's "a card remembers the window it was left on" failed
reproducibly in the full run and passed in every isolated one -- and the value
it received was the NEXT card's untouched window, not a slow-arriving one. That
is Backspace consuming a capture instead of navigating: the waveform drag
registered as a capture gesture under load. A pre-existing race in the um deck,
not something this feature introduced, but making the suite carry twice the
work it needs is not the place to argue about it.

Memoised per file, so the second walk is free. Full suite: 93/93, twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Diffstat:
Mumtool/e2e/faces.spec.ts | 16+++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/umtool/e2e/faces.spec.ts b/umtool/e2e/faces.spec.ts @@ -46,12 +46,26 @@ const view = async (request: APIRequestContext): Promise<FaceView> => { return (await r.json()) as FaceView; }; +// Memoised for the whole FILE, not per test. +// +// A detection is ~0.94s of python decoding five frames and running YuNet on +// each, and two tests here walk the entire queue. Twenty-two of those is a +// solid twenty seconds of four-core load in the middle of a serial suite, and +// the deck spec that runs after this one drags a mouse across a waveform and +// measures what it selected. Load is not supposed to change that, but making +// the suite carry twice the work it needs to is not the place to prove it. +const seen = new Map<string, Detection>(); + const detect = async (request: APIRequestContext, e: Entry): Promise<Detection> => { + const hit = seen.get(e.key); + if (hit) return hit; const r = await request.get( `/api/face/detect?video=${encodeURIComponent(e.video)}&at=${e.frameAt}`, ); expect(r.ok(), `detect ${e.key} -> ${r.status()}`).toBe(true); - return (await r.json()) as Detection; + const d = (await r.json()) as Detection; + seen.set(e.key, d); + return d; }; const attr = async (page: Page, sel: string, name: string): Promise<string> =>