feat(simu): unify UI automation harness - #7668
Conversation
|
Correction to the delivery rule above: this effort now stays deliberately simple. Implementation proceeds in this same draft PR and branch; there is no second implementation branch and no branch per phase. G0 remains an explicit review requirement before the PR leaves draft or is merged, but it does not block small implementation commits. Phase 1 is now concrete at @onliner10 and @pfeerick are invited to review this concrete slice and shape the next one. Credit and provenance from #7337 and #7646 remain explicit, and neither source PR needs to close until parity is demonstrated. |
|
Phase 2 is now published at This slice adds the opt-in cross-platform stdio transport and SDL-loop activation while keeping the scope narrow: Validation completed:
The implementation intentionally does not add a permanent Python client yet; a disposable probe was enough to validate this transport slice. @onliner10 and @pfeerick remain invited to review the contract and retained behavior before the draft is marked ready. |
Add a dependency-free binary-pipe session for the implemented start, ping, and stop lifecycle, with strict response correlation and bounded cleanup tests.\n\nThe reusable host-session and CLI direction builds on EdgeTX#7337 by Mateusz Urban. This implementation is substantially rewritten for protocol v1, Windows-compatible reader threads, and deterministic process cleanup; no coherent source block is imported.
|
Phase 3 slice 3A is now published at This keeps the scope intentionally narrow: a dependency-free, binary-pipe Python session and minimal Validation:
Credit: the reusable host-session and CLI direction comes from #7337 by @onliner10. I reviewed that implementation, but this protocol-v1/Windows-safe lifecycle is a substantial rewrite with no coherent source block copied; the provenance ledger records that distinction. A co-author trailer remains intentionally absent unless approved. Phase 3 remains open for a real Windows-simulator run, explicit kill-fallback injection, and CI update: the complete GitHub test, firmware-build, documentation, and packaging matrix passed for this head (45/45). |
Add bounded status and describe responses backed by the simulator session state, then validate discovery and poll first-frame readiness from the cross-platform host session. This consolidates the host lifecycle and discovery direction from EdgeTX#7337 with the guarded epoch and first-frame state model from EdgeTX#7646. Credit to @onliner10 and @pfeerick for the two approaches brought together here.
|
Phase 3 is now complete at f6c104e on this same branch and draft PR. This final slice adds only the readiness boundary needed before inputs: bounded status/describe responses, target/LCD/command/capability validation, and startup completion after the simulator owns a real first LCD frame. It intentionally does not advertise or implement input, capture, telemetry, Lua, or restart yet. Validation completed:
Thank you again, @onliner10 and @pfeerick. This slice combines the reusable host-session direction from #7337 with the guarded epoch/first-frame model from #7646. Please review the resulting boundary and help shape Phase 4 inputs; G0 remains open before this draft can be marked ready. CI update: the complete current-head GitHub Actions and CodeRabbit matrix passed 45/45 for f6c104e. |
Implement Phase 4 of the consolidated simulator automation plan: target-filtered key, rotary, and touch primitives; an asynchronous real-LCD frame barrier; host-side timed composites; release cleanup; and focused native/Python coverage. This combines the portable host-side composition direction from EdgeTX#7337 with the direct simulator helpers and explicit touch transitions explored in EdgeTX#7646. Thanks to Mateusz Urban (@onliner10) for the original harness direction; review remains explicitly invited in EdgeTX#7668.
|
Hi @onliner10 — Phase 4 of the consolidated simulator UI automation work is now available in this PR. Thank you again for the work and direction you established in #7337, especially the reusable host-side harness and action model. Those ideas have materially shaped this consolidation, and I have tried to keep that provenance clear in both the plan and the PR history. I would genuinely value your review of the protocol, host API, and retained behavior before this draft is marked ready. Please feel free to challenge the design or suggest a simpler direction where appropriate. If you are comfortable with commit-level attribution for the parts substantially derived from your work, I would also be happy to add a No pressure either way — your review and feedback would already be greatly appreciated. |
Capture a strictly newer RGB565 framebuffer after an LVGL invalidation, publish deterministic PPM artifacts without replacement, and convert them to verified PNG metadata in the host client. This combines the portable PPM and client direction from EdgeTX#7337 with the static-screen invalidation approach from EdgeTX#7646. Thanks to @onliner10 for the original harness and capture direction.
|
Phase 5 is now published at This slice adds one focused capability: render-complete framebuffer capture. It combines the portable PPM and host-conversion direction from #7337 with the static-screen invalidation requirement explored in #7646. Native capture waits for a strictly newer RGB565 framebuffer, publishes without replacing an existing artifact, and keeps file I/O out of the LCD notification. The Python client validates the PPM, converts and independently decodes PNG, and writes deterministic SHA-256 metadata. Validation is complete:
Thank you, @onliner10, for the original harness and capture direction in #7337. I would especially value your review of the freshness boundary, artifact contract, and host API. @pfeerick, your review of the simulator/LVGL integration would also be very welcome. G0 remains open, so the PR stays draft. |
|
Phase 6 is now published at |
|
Just a friendly FYI ... tell your AI assistant to be less eager to tag and mention people... it's the quickest way to get yourself ignored if you are pinging people every couple of hours. Commits generally also speak for themselves if well written and described, so iteratively updating the initial PR body post would have been more than sufficient here, and better than individual progress comments with each commit, as the posts here also flow into things like discord channels, meaning there are will be several effectively "noise" posts there about this PR. |
Fixes: N/A
Summary
This draft is the single collaborative replacement direction for the overlapping simulator UI automation work in #7337 and #7646.
It keeps the strongest parts of both:
It deliberately leaves out duplicate or product-specific surfaces: the
WIDGET_STUDIObuild option, simulator-only LuasimuAPI, append-only command-file transport, native PNG encoding, and MCP integration.Delivery
This branch and this draft PR contain both the plan and implementation. There is no second implementation branch and no branch per phase.
0c07a3d648a929732190ab9b7378a7f6c272ab55.5139415071adds the bounded SDL-independent protocol and state model.c1be4bd5fbadds opt-in cross-platform non-blocking stdio transport and SDL-loop integration.f6c104ea4cadds the dependency-free Python session/CLI lifecycle, strict status/describe discovery, and real first-frame readiness.164ff21dfeadds target-filtered key/rotary/touch primitives,release-all, real-LCD frame barriers, timed host composites, and cleanup fallback.bfd59db236adds render-complete RGB565 capture, static-screen LVGL invalidation, exclusive PPM publication, verified host-side PNG conversion, deterministic SHA-256 metadata, and focused coverage.ada9972144adds switch/analog/telemetry state injection, generation-observed Lua reload, deterministic warm restart, and isolated cold process restart.The Phase 6 plan records 13 primary-source checks, rejected alternatives, explicit owner/thread boundaries, restart invariants, implementation subphases, and the V01–V12/L01–L16 verification matrix.
Contract review G0 remains open. It is required before this PR leaves draft or is merged; it does not block small reviewable implementation commits.
Phase 5 design
simuLcdBufat a strictly newersimuLcdNotify, not SDL texture readback.Phase 6 design
running; interpreter panic is a correlated failure.Collaboration and credit
Thank you, @onliner10, for the generic harness and capture direction in #7337. This consolidation builds on that work and preserves its provenance in the plan, commit messages, and PR narrative. Phases 5 and 6 retain the portable artifact and reusable host-session direction while combining it with the synchronized state/lifecycle requirements explored in #7646.
@onliner10 and @pfeerick are explicitly invited to review the resulting behavior and protocol contract before this PR is marked ready. Neither source PR needs to be closed until the consolidated implementation demonstrates the retained behavior and maintainers agree on the direction.
No
Co-authored-bytrailer is added without contributor approval; coherent imported commits should retain their original authorship.Current validation
SimuAutomation*tests pass under AddressSanitizer, covering protocol, capture/state, mailbox, analog, telemetry, Lua result serialization, and restart behavior.simu.execompiles and links with Clang 22.running.1 → 2and display sequence2 → 4; cold restart launched a new PID after the old process and reader threads were fully reaped.compileall, strict formatting for the new native files, andgit diff --checkpass.This PR intentionally remains draft while G0 and the later scoped phases remain open.