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. |
|
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). |
|
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. |
|
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. |
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.
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.
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.
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.
651220c to
c6afd45
Compare
The fixture layout and declarative scenario requirements derive from EdgeTX EdgeTX#7337. The implementation is rewritten for the consolidated v1 protocol.
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.05672defb9adds the bounded SDL-independent protocol and state model.91638a4b1eadds opt-in cross-platform non-blocking stdio transport and SDL-loop integration.035df2770fadds the dependency-free Python session/CLI lifecycle, strict status/describe discovery, and real first-frame readiness.f957a23c76adds target-filtered key/rotary/touch primitives,release-all, real-LCD frame barriers, timed host composites, and cleanup fallback.1992a3d805adds render-complete RGB565 capture, static-screen LVGL invalidation, exclusive PPM publication, verified host-side PNG conversion, deterministic SHA-256 metadata, and focused coverage.5bc741d203adds switch/analog/telemetry state injection, generation-observed Lua reload, deterministic warm restart, and isolated cold process restart.c6afd45793adds the strict flow runner, minimal TX16S fixture, representative smoke scenario, verified run manifest, protocol/stderr logs, artifact hashes, and one-command developer workflow.34fbdb1ee7hardens stdout backpressure and shutdown, adds exact protocol boundary coverage, isolates Emscripten sources, adds the reproducible hardening runner, and introduces Ubuntu/Windows host CI. Commite3fb2b7f22records the completed local evidence and the still-open external gate.The plan records the Phase 6 owner/thread and restart invariants, the Phase 7 strict-schema and fixture contract, and the Phase 8 backpressure deviation, hardening matrix, scope-isolation evidence, and R01–R04 runner coverage.
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.Phase 7 design
Phase 8 hardening
EAGAIN; Windows teardown cancels a blocked synchronous write before joining. Stop flushes cooperatively without blocking an SDL iteration.edgetx-ui hardencommand creates isolated fixture/run directories and emits one machine-readable report covering process reaping, 10,000 requests, Lua generations, restart epochs, captures, hashes, fixture integrity, and temporary-artifact cleanup.Provenance
The implementation provenance from source PRs is recorded in the technical plan and commit history. Progress updates will not tag individual accounts.
Current validation
queue_fullevent and stopped cleanly.This PR intentionally remains draft. Technical Phase 8 hardening and CI are complete; explicit contract review G0 is the remaining gate before it can leave draft.