From 96697cbf75b64e3ff7d9872f964d93deb8ac60db Mon Sep 17 00:00:00 2001 From: Misha Skvortsov Date: Wed, 11 Nov 2026 23:24:17 +0300 Subject: [PATCH] test(sdcpp): watch the execution-engine OOM warning of build 1084+ leejet/stable-diffusion.cpp#2321 (build 1084) moved the warning core's classifyExit matches, 'cannot make enough memory available', from src/model_manager.cpp ('model manager ...') to src/core/execution_engine.cpp ('execution engine ...'). The substring survives, so OUT_OF_MEMORY and the offload retry keep working on master-1088-32d516c, but the new file was not a watched path, so the engine check rated 1088 yellow. - engine-contract.json: watch src/core/execution_engine.cpp next to src/model_manager.cpp (still watched for the older builds) and name both locations in the oom.model-manager note. - progress.test.ts: classifyExit maps the execution-engine wording to OUT_OF_MEMORY too; the contract test requires the new watched path. The surface diff of master-1088-32d516c against the pin master-1028-37bc88b-a5f9a63b drops from 7 to 6 warnings; the six left are the deprecated flag spellings and -M, unchanged from before. Co-Authored-By: Claude Opus 5.5 --- src/diffusion/progress.test.ts | 7 +++++++ test/contract/sdcpp-engine-contract.test.ts | 1 + test/fixtures/sdcpp/engine-contract.json | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/diffusion/progress.test.ts b/src/diffusion/progress.test.ts index 587684b3..e8c1f75a 100644 --- a/src/diffusion/progress.test.ts +++ b/src/diffusion/progress.test.ts @@ -162,6 +162,13 @@ describe('classifyExit', () => { undefined ) ).toBe('OUT_OF_MEMORY') + // From build 1084 (leejet/stable-diffusion.cpp#2321) the execution engine prints the same refusal. + expect( + classifyExit( + '[WARN ] execution_engine.cpp:939 - execution engine cannot make enough memory available on MTL0: need 27600.43 MB device / 27600.43 MB budget, available 14907.70 MB device / 14907.70 MB budget', + undefined + ) + ).toBe('OUT_OF_MEMORY') expect(classifyExit("unsupported op 'RMS_NORM'\nGGML_ABORT", -6)).toBe('ENGINE_CRASHED') expect(classifyExit('', undefined)).toBe('ENGINE_CRASHED') }) diff --git a/test/contract/sdcpp-engine-contract.test.ts b/test/contract/sdcpp-engine-contract.test.ts index cd154af3..74366835 100644 --- a/test/contract/sdcpp-engine-contract.test.ts +++ b/test/contract/sdcpp-engine-contract.test.ts @@ -174,6 +174,7 @@ describe('the sd.cpp engine contract: routes and strings', () => { 'src/runtime/tiling.cpp', 'src/pipeline/image.cpp', 'src/model_manager.cpp', + 'src/core/execution_engine.cpp', ]) expect(watched).toContain(path) }) diff --git a/test/fixtures/sdcpp/engine-contract.json b/test/fixtures/sdcpp/engine-contract.json index 2bd0aee7..b75d94e3 100644 --- a/test/fixtures/sdcpp/engine-contract.json +++ b/test/fixtures/sdcpp/engine-contract.json @@ -196,7 +196,7 @@ "source": "src/diffusion/progress.ts", "upstream_text": "cannot make enough memory available", "severity_if_lost": "warn", - "note": "classifyExit: OUT_OF_MEMORY instead of ENGINE_CRASHED, and the offload fallback." + "note": "classifyExit: OUT_OF_MEMORY instead of ENGINE_CRASHED, and the offload fallback. Up to build 1083 sd.cpp prints it from src/model_manager.cpp ('model manager cannot make enough memory available ...'); from 1084 (leejet/stable-diffusion.cpp#2321) from src/core/execution_engine.cpp ('execution engine cannot make enough memory available ...')." }, { "id": "oom.out-of-memory", @@ -391,7 +391,8 @@ { "path": "src/pipeline/image.cpp", "why": "`generating image:`" }, { "path": "src/pipeline/video.cpp", "why": "video generation and its log lines" }, { "path": "src/runtime/tiling.cpp", "why": "`processing N tiles`" }, - { "path": "src/model_manager.cpp", "why": "`cannot make enough memory available`" }, + { "path": "src/model_manager.cpp", "why": "`cannot make enough memory available` up to build 1083" }, + { "path": "src/core/execution_engine.cpp", "why": "`cannot make enough memory available`, the execution-engine OOM warning core matches, from build 1084 (#2321)" }, { "path": "CMakeLists.txt", "why": "the version and commit --version prints, build options" } ], "release_note_keywords": [