Repository navigation
fix(overlay,sync): enforce zero-retained FighterEngine lifecycle and <45ms esp32dev wheel sync for v4.3.9 - #88
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backs the
v4.3.9-beta1pre-release (prerelease: true,make_latest: false— keepingv4.3.8as the stableLatestrelease during hardware validation).Root Causes Addressed
FighterEngineHeap Retention Across Rotation &FrontendSync(ESP32&ESP32-S3):OverlayManagerpreviously keptFighterEngine(FgtLoaderworker stack +m_roster+ animation headers~22 KBidle, up to~38 KBduring active scanline streaming) alive across rotation switches, between fights, and duringFrontendSync(DisplayRuntime::render()also forcedFighterOverride::EnabledonMQTT/MARQUEE).Clock + Fighters -> GIFsrotation switches onesp32dev,RotationManager::switchToModule()ran beforeDisplayRuntime::render()deactivated the overlay, andGifEngine::activate()spawnedgif_preload(8 KBstack) before allocatingAnimatedGIF(22,608 Bcontiguous).AnimatedGIFallocation failed ->isFinished() == true-> rotation immediately bounced back toClock + Fighters(16 ms).FrontendSync, pinning8-bitHUB75 DMA (4 KBthreshold inGifEngine::refineDynamicRequirements()) whileFighterEngineretained~22 KBstarvedLitePngDecoder(causing text-only marquees) and LwIP TCP RXpbufpools (causing lag/retransmissions).100 ms/stepWheel Navigation Skipping Intermediate Logos on Local-SDesp32dev:FrontendSyncEngine::scheduleOrDispatchArtJob()applied a35 msTier-2 network settle delay on top of a40 msTier-1 debounce and10 msworker wake slices on!hasPsram(~85–95 mspre-open latency), causing100 ms/stepwheel navigation (simulate_recalbox_sync.py) to overwrite intermediate games before opening their marquee.Key Changes
OverlayManager&FighterEngine(ADR-0004):esp32devandESP32-S3:FighterEngineis destroyed viaCore0LifecycleDispatcherimmediately after each fight (0 Bheld during the inter-fight cooldown), across every rotation slot switch, on deactivation, and onFrontendSyncpreemption.OverlayManager::evictForMemory()(retireFighterOverlay(true)) and called it inRotationManager::switchToModule(),evictAllActiveEnginesForMemory(), andDisplayRuntime::transitionSession()before HUB75 DMA depth evaluation or decoder allocation.OverlayManagerstrictly toDisplaySourceId::ROTATIONwhenactiveEngine->allowsOverlay() == true(never active onMQTT,MARQUEE, orGifEngineplaylists).loadRoster()and post-fightfreeFighter()off Core 1 onto Core 0, added SMP-safesignalLoaderStopOnce(), mades_lastInstanceatomic, preservedidle_fighter_intervalin a rollover-safe4 B.bsstimestamp, and gated instantiation on live internal SRAM / PSRAM headroom.GifEngine:ensureGifDecoder()(22.6 KBcontiguous) andensureCanvasBuffer()beforestartPreloadTask()(4 KBstack on!m_hasPsram), and raised static-PNGrefineDynamicRequirements()to18,432 B/10,240 B(~30 KBtotal SRAM floor).FrontendSyncEngine:!hasPsramdispatch (0 msTier-2 wait on local SD), tightened non-PSRAM Tier-1 burst coalescing to15 ms(35 msmax), reducedSyncShowcaseWkrwake slices to2 ms, and added strippedtitlestems tobinarySearchCatalogForGameJob().Verification
python3 ~/.gemini/skills/arcadematrix-dev-guard/scripts/check_compliance.py --with-tests(0errors,79/79native tests passing)python3 scripts/package_tools.py --verify-only && python3 scripts/test_tools_e2e.pyrelease.ymlpre-release build (v4.3.9-beta1,ADR-0006binary ceiling check)