Add participant-safe Easy Flash recovery - #65
Closed
theysayheygreg wants to merge 9 commits into
Closed
Conversation
This was referenced Aug 15, 2026
added 8 commits
August 14, 2026 20:54
Author
|
Closing because Easy Flash is now maintained and handed off as its own standalone static application: https://github.com/theysayheygreg/WLEDTubes-Easy-Flash. The standalone repository pins canonical WLEDTubes source, builds the approved Dig2Go firmware in GitHub Actions, verifies immutable release provenance, and carries the current participant-facing UI and Vercel handoff. Keeping this older in-tree implementation open would create two apparent Easy Flash authorities. |
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
Adds a participant-facing, laptop-local Easy Flash installation and recovery surface for the canonical QuinLED Dig2Go Tubes v14 hardware target.
The contribution includes a single-target artifact manifest, integrity-checked USB and OTA downloads, a single Connect → target-bound confirmation → Install flow, Web Serial recovery support, focused tests, and vendored esptool-js licensing/source attribution.
Safety and scope
Validation
npm ci && npm run buildnpm test— 33 tests passednpm run test:easy-flash— 17 tests passedgit diff --checkNo physical device was contacted or flashed. No generated
wled00/html_*.horwled00/js_*.hfiles are included.Working-set coordination — 2026-08-14
This draft is one of three independent contribution rails based on Steve's
main:Shared rules:
Current thinking
Easy Flash is the wired installation/recovery authority. It selects a hardware-compatible artifact, backs up effective state, installs the exact image, proves the destination boot, then applies only a compatible runtime profile. It does not own peer transport or S3 interaction design.
TODO
Desktop application progress — 2026-08-14
Commits
02858748and9810e50eadds an Electron wrapper around the existing participant-safe browser flow. It launches directly into the bundled Easy Flash UI through a secure local protocol, keeps Web Serial and esptool-js local, requires explicit serial-port selection plus physical Dig2Go confirmation, and does not select or flash a device on launch. Production windows are sandboxed, have no renderer Node access or DevTools, deny external navigation/windows, and block HTTP/HTTPS/file requests.Packaging now produces unsigned macOS arm64
.app, DMG, and ZIP artifacts locally, and configures unsigned Windows x64 NSIS/ZIP artifacts onwindows-2022CI. Firmware bytes and manifest SHA-256 values are unchanged. The packaged no-device smoke proves a securewledtubes:renderer, Web Serial availability, and bundled manifest loading. No hardware was contacted or flashed.The participant docs now describe Download → Open → Connect → Confirm → Backup/Review → Install, with an explicit caveat that this draft saves planning/firmware receipts but does not yet perform a complete on-device configuration backup. Gatekeeper/SmartScreen behavior and future signing/notarization requirements are documented. Third-party runtime and esptool-js notices are included.
Desktop TODO
Buy. Build. Rave. onboarding — 2026-08-14
The Easy Flash portal and top-level DIY README now open with Buy. Build. Rave.
The README retains Steve's detailed project and developer reference below the concise opener. A focused UI contract test protects the headline. The server test suite now uses one awaited lifecycle and exits cleanly instead of leaving a listener alive.
Onboarding TODO
Central update-contract integration checkpoint — 2026-08-14
This source PR remains independently based on Steve
main. A disposable integration worktree proved Easy Flash consumption of PR #67's generated contract without changing this branch. Reviewed adapter commits:1133cf28and41b0a03e.AwaitingHealth; backup, read-back, mesh rejoin, and health remain unproven.Integrity hardening — 2026-08-15
Commit
9fc89667fixes confirmed artifact-resolution integrity bugs without changing browser/Electron routes, filenames, firmware bytes, or manifest SHA-256 values.realpathand checked with separator-safe containment, covering direct../, sibling-prefix, cross-drive, and symlink escapes.fstat, read, size, and SHA-256 validation on that handle, then returns the verified byte snapshot. The HTTP server and Electron protocol consume those bytes directly instead of reopening a verified path.artifacts-evil, symlink escape, missing/symlinked roots, andpath.win32separator/drive behavior. HTTP response bytes are hashed against the unchanged manifest hash.Validation:
npm run test:easy-flash26/26;npm test42/42; unsigned macOS arm64 app/DMG/ZIP package succeeded; ASAR allowlist inspection found the resolver, desktop handler, manifest, and both firmware binaries; packaged no-device smoke passed;git diff --checkpassed.Equivalent focused reconstruction was proven locally atop canonical adapter
41b0a03eas local-only commit532d519a(not pushed): canonical validation/generation clean, Easy Flash 37/37, repository 63/63, package/ASAR smoke passed. No device, signing, reviewer, merge, or draft-state change.Forge artifact-root race correction (2026-08-15)
Removed the residual root
lstat→realpathpolicy race. The resolver now compares the root canonical identity with its lexical location using native platform normalization, opens and retains the candidate once, then revalidates root identity while that handle is open. Deterministic hooks prove initial symlink/canonical mismatch and replacement on repeated canonicalization; POSIX/macOS and Windows path rules remain covered.Residual boundary: Node/Electron ASAR and Windows do not share a portable no-follow directory-handle contract, so replace-and-restore wholly between checks or replacement after the final check remains possible. It cannot alter the immutable bytes returned from the single open handle after exact size and pinned SHA-256 verification.
Receipt: source commit
9700cfa0;npm run test:easy-flash28/28;npm test44/44;git diff --checkclean. Mirrored canonical integration commit7a55bdf7is local-only and was not pushed. Integration passed 39/39 focused, 65/65 full, 10/10 contract checks, deterministic generation, unsigned mac arm64 DMG/ZIP packaging, ASAR allowlist inspection, and packaged smoke. No device, signing, reviewer, or merge action.Easy Flash one-action simplification — 2026-08-15
Commit
43565ffereplaces the planner/test-bench split with the participant flow Greg requested: Plug in controller → Connect → Install. Connect opens the browser-required serial chooser once, inspects the ESP ROM, and retains that exact session. The sole Dig2Go USB recovery artifact is selected internally; Install remains a separate explicit action and never starts on connect. Firmware cards, downloads, test buttons, technical acceptance fields, manual variants, and scroll-dependent controls are absent from the primary screen. Advanced evidence remains collapsed.The evidence audit found no stable Dig2Go-specific VID/PID, USB serial marker, ROM signature, or trusted MAC inventory in the repository. VID/PID and ROM chip family therefore remain chip/transport observations, not board proof. After a matching ESP32 is detected, the UI asks for one concise printed-label confirmation: Yes, this is a QuinLED Dig2Go. A fixture-tested running-device adapter can positively match exact Tubes/Dig2Go release plus hardware family/variant identity and rejects generic WLED, MAC, ESP32, or pin resemblance.
The write path checks the exact image, preserves settings with
eraseAll: false, resets, and waits. It truthfully reports backup unavailable, writer-return/readback evidence, and health unverified; it never claims Complete without boot proof. No device was contacted.Validation: Easy Flash 25/25; full repository 41/41; unsigned macOS arm64 DMG/ZIP package and packaged smoke passed; ASAR allowlist clean;
git diff --checkclean. Windows x64 packaging remains covered by the existingwindows-2022workflow contract. A canonical-contract reconstruction preserving base7a55bdf7is local-only atdaa248eb; canonical validation/generation, Easy Flash 33/33, full repository 59/59, package, ASAR, and smoke passed. No signing, merge, reviewer request, or ready-for-review transition.Independent-review safety correction — 2026-08-15
Commit
aff451d9corrects the simplified Easy Flash blockers without restoring planner, firmware-picker, or test-bench UI.physicalConfirmation(asserted,targetId,printedModel). Unchecked confirmation blocks; matching confirmation reaches a mocked pre-write boundary; wrong target/model blocks.safety-contract.mjsandoperation-receipts.mjsare isolated adapters intended for direct replacement by PR Add peer updater foundations #67 canonical modules.SerialPort, freeze chip/USB observations, and immediately recheck port observations plus ESP chip family before write. Stale, replayed, swapped, or disconnected sessions fail closed.Source proof: Easy Flash 30/30; full repository 46/46; Windows path checks 2/2;
git diff --check; unsigned macOS arm64 DMG/ZIP and ASAR allowlist smoke. Package SHA-256: DMG06bf64016679b5971a795647f860397a1f366a22006d0ad9ba4ac14ff85e887f; ZIP8e868fc9c422567782f5154cb4424d98728a3c00b799b7c761da39fb267bbc55.Canonical integration remains local-only on base
daa248eb: Easy Flash 37/37; full repository 63/63; focused contract 27/27; canonical validator clean; unsigned macOS package and ASAR allowlist smoke. Package SHA-256: DMG5740377baa5781972920cbf0f775f051a47e2c3cb566af67fe477cc846654d85; ZIP91d7deccfe9952fb7864b39e6ae4f525e582d57604fee175796edf1c025161cf.No device was contacted or flashed. No signing, merge, reviewer request, or ready-for-review action was performed.