snapmaker-studio icon indicating copy to clipboard operation
snapmaker-studio copied to clipboard

First controlled workstation harness run (clean VM) and a product-side update_check.json state-root override

Open DVOpenLabs opened this issue 2 months ago • 2 comments

Split out of #55 / #57; the only genuinely separate work left from them.

1. First controlled harness run against a real payload, on a clean Windows VM or sandbox

tools/acceptance/run.ps1 (rewrapped acceptance-identity installer + attestation) has only been proven by its tests and by the disposable-CI lanes. Behaviour with a real payload on a workstation is still unproven: the isolated WebView2 profile layout, CDP port ownership, the uninstall hand-off and the 30 s wait. Run it ONCE on a clean target (no production Snapmaker Studio install or profile, no acceptance registration or remembered-location key or Run value, no leftover harness install dirs, no acceptance processes, PowerShell 7.5+, node and playwright-core, WebView2 present, ports free) and review the evidence: profile isolation, CDP ownership, acceptance-only registration, uninstall hand-off outcome, tripwire result, acceptance.json plus a human look at the node-written files and screenshots. The plan is in docs/internal/HARNESS_ISOLATION.md. Only after a clean-target pass: prepare, review and (with the maintainer's go) perform a second run on a real account with a verified backup of the three production data folders.

2. Product-side state-root override for update_check.json

The acceptance app shares the production Roaming identity folder (update_check.json), so the harness preflight can only require auto_check=false or an absent file. A product-side override of the state root would let the harness isolate it fully.

This also gates the workstation release gates in docs/RELEASE_CHECKLIST.md §5 (acceptance and hardware verification).

DVOpenLabs avatar Oct 02 '26 21:10 DVOpenLabs

v1.3.0 is published. The first controlled run (item 1) was done on a fresh local Windows account against the v1.3.0 release candidate and passed 45/45 acceptance checks; it also surfaced and fixed three real defects in the harness (#63, #64, #65). The real-U1 read-only verification passed 58/58 on the same account. What remains here is item 2 only: a product-side state-root override for update_check.json. It is not a release blocker.

DVOpenLabs avatar Oct 03 '26 18:10 DVOpenLabs

Both parts of this issue are now satisfied, so I'm closing it.

1. First controlled run against a real payload - done earlier (see the v1.3.0 comment above: 45/45 on a fresh local Windows account, three harness defects found and fixed in #63, #64 and #65).

2. Product-side state-root override for update_check.json - merged in #88 (b01f7d0). When SNAPSTUDIO_DATA_DIR is set, the preference file is read and written inside that directory; an empty, invalid or relative value fails closed (preference off, saving fails, no automatic check). 49 Rust tests pass, including temp-directory tests for real reads and writes.

Verified on the installed v1.5.1 release candidate (acceptance-identity copy of the exact RC installer, SHA256 8955097365b12e9eb1405a098c1f6ab345d56d397681a67f0cb08257d1471be3, built from abf20bf, run 37947895421), on a freshly created local Windows account:

  • Before: no update_check.json in the lane's data directory and none in the production paths (Roaming, Local, acceptance).
  • Turning "Automatically check for updates" on in the installed Help screen wrote update_check.json inside the lane's data directory with auto_check: true; turning it off persisted auto_check: false.
  • The production paths stayed absent before and after, and the lane's production-state tripwire reported 0 violations.
  • The full 50/50 installed-application acceptance run (including an upgrade from the published v1.5.0 installer) on the same account passed with the same tripwire result.

What this does not claim: the real production-identity installer is still exercised only on disposable GitHub-hosted runners (that is documented in docs/internal/HARNESS_ISOLATION.md), and the preflight and tripwire protections stay in place because the upgrade lane first installs the older v1.5.0 build, which does not have the override. v1.5.1 is the first release that contains the override; the evidence above is for its release candidate and is not yet a published release.

DVOpenLabs avatar Oct 09 '26 20:10 DVOpenLabs