Skip to content

Latest commit

 

History

History
440 lines (380 loc) · 26.5 KB

README.md

File metadata and controls

440 lines (380 loc) · 26.5 KB

Windows conformance

Unified permissions v2 qualification

Tactical 153 owns the new Windows surface model and acceptance status. The current policy gates are the portable TypeScript admission suite and WindowsDesktop.Contracts, which uses the real shared child and live native channels. The old C# arbiter project was removed.

WindowsUnlock.Contracts --activity-live runs the real nonactivating native notices, countdown, Start now, Ask, pause/defer/deny controls and native input hooks. Deliberate physical signals are supplied explicitly by the fixture; real injected keyboard/mouse flags are independently observed. It does not claim physical-HID or full protected-guardian acceptance.

browser-profiles-live.py now uses the v2 Python owner and explicit surface configuration. --settings tests the actual staged Tauri UI. --desktop-fixture adds native semantic counter effects, per-task Ask and stale-reference fencing. Both the native marker and HTTP browser oracle observe effects independently of resident delivery results. The controller launches at ordinary interactive priority: the actor normalizes Idle/Below Normal launches and records both classes. CPU-starvation qualification remains separate from normal heartbeat/reconnect acceptance. The controller still owns claims, source/digest checks, task/process/registration cleanup, credential verification and original-power restoration.

The v1 grant/checkbox actors below describe earlier bounded implementation slices. They are historical fixtures for those source pins, not acceptance of the new model; do not add a legacy Windows policy to keep them passing. Current v2 qualification must use the gates above and record remaining route limits honestly. macOS and Linux migration follows accepted Windows behavior.

Runtime and presentation acceptance

runtime-presentation-live.py runs in a claimed dedicated target's interactive Medium session. Supply a caller-owned staged --install containing the desktop app, runtime, pinned provider, pointer fixture and bundled Python; stage source client/ and this runner in the same relative layout. Store --output outside Git. Use an interactive Limited scheduled task or a target-native launch route; no approval hook or installed operator replacement is required.

The runner uses a separate instance and real native UIA operator actions. It checks offline/live preferences, startup policy, destroyed Settings, native approvals and notices, independent pointer effects, owner loss, stale ownership, Pause, running-drag Stop/release, discovery and handshake load, same-runtime recovery and restart expiration of temporary overrides. It restores its preference and reaps processes in its owned staging directory. The outside caller must verify cleanup, remove its task/staging and temporary test trust, restore original target power and release its claim. This runner does not qualify protected UAC/lock behavior or publisher signing.

runtime-lifecycle-live.py runs against the staged resident in the same interactive Medium session, with the operator closed. Supply --install and private --output. It exercises the existing inherited operator transport, not a public approval API: consent/update exclusion, Stop, cancellation and exit. It dispatches no installer or replacement. The caller owns claims, staging and cleanup as above.

Shared browser/profile acceptance

browser-native-live.py checks the complete native composition with two fake browser peers: the actual desktop resident, private TypeScript child, authenticated native-host pipes and retained Python owner. It verifies independent ordinary responses and streamed page CDP commands for both peers, including the production native audit path. Run with --install in a claimed dedicated appliance's interactive Medium session, with its installed desktop app closed. It opens no browser and changes no native-host registration. Redirect its output to private evidence. Optional --stack-tool accepts a caller-staged dotnet-stack for failure diagnosis. --sustain-seconds adds a bounded live-owner continuity check. Both actors use observed_owner.py to retain only bounded RPC operation, timing and admission-state metadata on failure. Stage it and client/ in the same relative layout, including cdp_socket.py for both actors.

browser-profiles-live.py adds two regular profiles in one separately identified test browser, independent HTTP/file effects, ordinary and streamed CDP operations, consent expiry, Stop, reconnect, child death and stale references. Pass --install, --chrome, private --output and --settings for the real Tauri operator lifecycle. Use --chromium for a Chromium snapshot's native-host registry key; Chrome for Testing is the default. Stage test-browser binaries where their restricted/AppContainer subprocesses have read/execute access, separate from private Machine Control log storage. Keep profiles and evidence private. Do not disable the browser sandbox to compensate for an inaccessible executable directory. Settings uses an actor-owned WebView2 data folder and native accessibility, preserving the appliance's existing saved form choices. Build the app through the normal Tauri production build. For a direct Cargo fixture build, include --release --features tauri/custom-protocol and the matching prebuilt frontend. --release alone still uses the development URL; a localhost error page cannot qualify the packaged Settings lifecycle. Its explicit test consent/owner budget is 15 minutes; action deadlines remain unchanged and a separate check exercises actual 60-second consent expiry. The owner queue budget covers the real 30-second startup quiet observation and announcement interval. Restart checks verify refusal, no native grant and no approved profiles even when activity pause takes refusal precedence. Dialog-opening clicks may report unknown delivery: the actor observes the modal and handles its exact ID without replaying the click.

The bundled Windows ARM64 Python has reproduced an access violation during faulthandler.dump_traceback_later in an isolated threaded workload. This actor uses progress and bounded RPC timing without that optional C-level stack walk. The normal Python client path is unchanged. CDP result waits cover the advertised command deadline. Revocation checks separately require actual socket closure within five seconds, draining buffered events; a read timeout is a failure, not evidence of closure.

Use normal interactive scheduling priority. For a Limited interactive scheduled task, set New-ScheduledTaskSettingsSet -Priority 4; the default priority 7 is below normal. The controller must hold/renew its target claim, independently verify process and native-host registration cleanup, retrieve private evidence, remove its task/staging, restore original power and release the claim. Retained --profile-data must belong to the actor's output directory; with --keep-profile-data-on-failure, its removal remains the controller's duty. These actors do not establish signed installer or protected-desktop acceptance. Tactical 152 owns the cutover's execution evidence and remaining gates.

Streaming CDP acceptance

browser-cdp-live.py runs in the interactive Medium session of an exclusively claimed VM. Stage the desktop app, matching runtime and pinned provider, Chrome extension, bundled Python, source client/, actor and cdp_socket.py. Supply --install, a separately identified Chrome for Testing --chrome and private --output. Launch through a Limited interactive scheduled task or the target-native application route, with the installed operator closed. The HTTP oracle listens only on target loopback.

The actor uses actual operator setup/Access/Pause/Stop UI and retained SDK ownership. It checks page reads, console events, command correlation, provider errors, independent HTTP effects, scope/token/Origin refusals, disconnect and native-host restart. Progress and final evidence stay private. Cleanup restores registration, closes ownership and reaps the owned app/browser/server. The outside caller must independently inspect cleanup, retrieve evidence, remove staging/tasks, restore original VM power and release the claim in finally/trap cleanup. Tactical 099 records actual candidate evidence; this does not qualify a signed public package. Each run creates a fresh browser profile so a retained Manifest V3 worker cannot mask changes to the staged extension.

browser-cdp-live.py and owner-session-live.py accept --disable-gpu for explicit software-rendered browser trials on VMs. Reports record that choice; it does not establish GPU-rendered or physical browser acceptance. Browser failure reports retain the off-state reply, owner/grant/provider observations, and HTTP page requests before cleanup. Raw browser logs remain private.

For browser-level acceptance also stage browser-root-clients.mjs, a matching native Node executable and a private package directory containing playwright-core 1.63.0 and puppeteer-core 25.12.0. Pass --node and --client-modules to the actor. Endpoint authority goes to the clients over standard input, never arguments. The clients connect to the resident bridge; the browser has no remote-debugging port. The extended run covers default-profile tabs, new tabs, popup, cross-site iframe, dedicated worker, PNG captures, independent click effects, unsupported contexts and browser-root owner/grant/ provider transitions. Tactical 100 owns evidence and limits. Playwright uses noDefaults: true so connection does not request the unsupported browser-wide download policy.

Browser upload acceptance

browser-upload-live.py runs in the interactive Medium session of a dedicated, exclusively claimed VM. Stage a desktop app, matching runtime/provider and extension, bundled Python, source client/, and the runner under tests/windows/. Pass --install, a separately identified Chrome for Testing --chrome, and a private --output outside AppData/hidden storage. The output includes synthetic upload files, a dedicated browser profile and private result evidence; the HTTP fixture listens only on loopback.

The runner operates the real operator UI, enables only browser access, uses the live SDK owner and CLI upload request parser, and checks independent received bytes. It covers direct/multiple-file inputs, intercepted single choosers, invalid batches, stale references, browser versus DevTools, Pause and Stop. Its cleanup restores native-host registration and reaps owned app/browser/ server processes. The controller must independently inspect cleanup, retrieve private evidence, remove owned staging, restore initial VM power and release the claim. This runner does not qualify a signed installer or public release.

The Windows suites exercise the same installed facade from two placements:

  • conformance.ps1 drives ordinary system-shell and window behavior through an authenticated administration carrier.
  • provider-composition.ps1 runs the deterministic fixture workflow through Cua and native providers from either remote or local placement. Its optional failure lane terminates only the supervised Cua child to prove bounded restart, stale-reference, timeout, and disclosed fallback behavior.
  • inbox-application-workflow.ps1 drives Calculator, Settings, Character Map, and Notepad through the resident facade. It proves native registered/package activation with settled content and application-frame surfaces when Windows splits a package across HWNDs, classic launch, system semantics, four UIA-confirmed window transitions, persisted document bytes, reopen/readback, exact-window capture, full/compact/unchanged payload metrics, preservation of pre-existing state, and owned-artifact cleanup.
  • provider-absence.ps1 is an explicitly confirmed, reversible package test. It withholds the installed Cua executable after revocation, proves truthful unavailable capability and native observation fallback, then restores the exact file and revokes the temporary helper generation.
  • run-local-probe.cmd starts local-probe.ps1 as the logged-in Medium user and proves that it reaches the same named pipe and result contract.
  • uac-conformance.ps1 originates elevation from the Medium fixture, cancels and approves genuine secure-desktop prompts, and verifies a High-integrity fixture through an independent marker.
  • lifecycle-conformance.ps1 runs separately authorized lock, logout, or protected-state inspection and records only minimized route/state evidence.
  • scripts/login-windows.sh is the separately supervised PIN/password acceptance route. It prompts the human without echo and uses the runtime's dedicated non-JSON secret channel.

scripts/bootstrap-windows.sh is the reproducible host-to-target installation path used before these suites. It requires a UUID-pinned candidate assertion from the authoritative testbed, or the explicit --allow-unattested-target mode for physical and non-integrated targets. It detects ARM64/x64, builds and verifies the matching package, installs through administrative SSH, waits for the Medium helper and adopted providers, and removes transfer staging. Its default development profile first installs and verifies Python 3 plus .NET 8; runtime explicitly omits that toolchain. It assumes a testbed-ready Windows base; it is not an OOBE or credential bootstrap.

platforms/windows/bin/winvm appliance-certify is the heavier retained-image acceptance path. It requires a clean commit and exact candidate, observes a changed boot epoch, runs bin/check --portable and bin/check --native from a digest-bound archive in the guest, removes staging, and shuts down only after success. Fixture coverage proves the successful handoff and that a guest-check failure does not request shutdown.

Run its host-side target-safety checks with:

tests/windows/bootstrap-target-safety.sh

The suites write generated evidence only to caller-selected target-local paths. Do not commit raw output or screenshots. A testbed operator must separately authorize and supervise lock, logout, reboot, and credential-gated recovery.

Before running UAC conformance, verify all three policy conditions:

  • UAC is enabled;
  • administrator elevation requires consent; and
  • consent prompts use the secure desktop.

The test is invalid if policy is weakened to avoid Winlogon. When semantic controls are unavailable, the result must identify target-local pixels/input as a fallback rather than count delivery as a semantic pass.

Credential login is intentionally not an unattended suite. Begin from a real no-user Winlogon state, run the helper once with pin or password, and independently confirm WTS user state, the Default input desktop, and a fresh Medium helper. Never put the credential in a PowerShell command, test parameter, JSON fixture, environment variable, evidence file, or deliberate wrong-credential case. A discovery refusal must end the case without retrying.

provider-composition.ps1 -Placement local deliberately skips service.revoke: a local caller is a child of the helper generation, and successful revocation is expected to terminate that process tree. The remote lane proves revocation and helper recreation instead.

Workstation distribution acceptance

workstation-conformance.ps1 addresses an explicit installed user instance and interactive session. It proves Medium integrity, protected refusals, stale generation fencing, direct Cua semantics and capture, and an independent fixture-owned counter effect. Pass the fixture separately from the product payload. workstation-lifecycle.ps1 runs inside the ordinary interactive session against two different packages and exercises upgrade refusal while running, stop/start, rollback, stale requests, two-instance isolation, and removal. Both scripts retain their evidence outside the product package. See Tactical 036 for the appliance and signed-artifact acceptance gates.

workstation-package-trust.ps1 requires a signed package and trusted publisher. It tampers with a payload file and forges the unsigned hash inventory, then requires catalog verification to refuse installation before activation.

Run workstation conformance with -ExerciseProviderFailure only on a distinct candidate instance: it terminates that instance's provider and briefly withholds its binary, restoring the file in cleanup. It checks stale provider references, one restart, disclosed fallback, and disconnected/malformed IPC resilience. For the idle-session regression, launch the candidate with the upstream test setting CUA_DRIVER_RS_SESSION_IDLE_TTL_SECS=5 and pass -IdleSeconds 35. The test requires expiry to occur, refuses an old action, obtains a fresh observation, and independently verifies exactly one subsequent action. Restore the launch environment afterward; normal product launches retain upstream TTLs.

Exact semantic reference regression

reference-fixture.ps1 -EvidencePath <owned-path> exposes duplicate buttons and text fields with independent file effects. Launch it in the interactive guest, then run reference-conformance.ps1 with an isolated user-host executable, instance, session ID and that evidence path. It checks exact reference routing, removed-element and generation refusal, and unchanged query-only behavior. Close the owned fixture and stop the user host after the suite.

Omit -Instance to run the same reference assertions against the installed appliance facade after deployment.

Desktop app CLI acceptance

desktop-cli.ps1 runs in the ordinary interactive user session against an explicit desktop installation. Select exactly one -Client (the installed mc-cli\commands\machine-control.cmd) or -Source checkout. The installed route invokes that command for every operation and artifact retrieval; it does not invoke a system Python or read the checkout. Verify the candidate's publisher and complete CLI/native inventories before running it.

Without -Fixture, the harness proves the local desktop profile and native approval refusal. An independently armed fixture run proves semantic action, a separate counter marker, capture hash, stale reference refusal and cleanup. Both release the local target-use claim in finally. This harness does not replace signed installation, browser, YA model/media or update acceptance.

Installed update and browser acceptance

desktop-update.ps1 and browser-installed.ps1 are independent interactive actors for an exact signed per-user installation of the 0.7 surface model. Both dot-source desktop-update-common.ps1: operator choices use the real Settings UI through UI Automation (the Agent access, Desktop access and Browser access switches, the mode and Access lifetime selects, Discard), and agent work uses the ordinary admission channel. WebView2 exposes collapsed selects without options and ignores SetValue, so the actor focuses the select and uses target-local keyboard selection; it never expands the native popup or walks the whole desktop tree. Run them in the interactive Medium session with Windows PowerShell -STA, for example from an interactive Limited scheduled task at normal priority. Start the installed app with --settings; a bare launch from a scheduled/automation context can exit without opening Settings.

desktop-update.ps1 -Scenario Resume turns Desktop on (default Ask, 15 minutes) and proves that Install and restart is enabled with the access pause note, that the client records a one-shot, version-bound update-access-resume.json with the original wall-clock end, and that the updated client consumes it, reports restoration, restores the same mode and keeps the remaining time rather than resetting it. It also checks the new generation, stale-generation refusal, exact incoming source and survival of an independent user app. -ConfirmAgentTask opens a Desktop task (accepted in Automatic mode, because an unaccepted offer expires after its offer window; waiting in Ask mode) and checks Install anyway/Cancel; -TamperFlag asks the fixture feed for modified installer bytes once and proves a rejected download records no plan and never stops access. -Scenario Off proves that Off stays Off and that no plan or access-stop diagnostic is recorded. Each scenario consumes one sender-to-incoming update; reinstall the sender between runs.

browser-installed.ps1 verifies the exact package (CI inventories are taken after the installed-CLI smoke and also list bundled-Python bytecode caches the installer never writes; those entries are optional, every other entry and every installed file must match), bundled-extension host registration, a separately identified test browser with an actor-owned profile, Settings-approved exact profile, independent page effects, capture bytes, Stop and stale references through ordinary owned Browser tasks, and restart with access off. With -UpdateVersion, it updates with Browser on until stopped (plus Desktop timed unless -UpdateDesktopMode none) and an active Browser task, then checks confirmation, the plan, restored Browser mode and profile, Desktop remaining time, preserved startup entry and browser registration, browser survival and reconnect, stale pre-update references, the retained page and a fresh effect. The legacy grant/approval, -Lock and -RemoteProbe cases were removed with the v1 grant model.

update-feed-fixture.py serves a release-staged latest.json (formed as desktop/scripts/release.py stages it, with only the installer URL pointing at the fixture) and the exact signed installer over target-local HTTPS. The installed app keeps its production endpoint: the controller temporarily maps that host to loopback and trusts a fixture CA in a disposable target, deletes its controller copies of fixture keys, and keeps evidence private. The controller owns doctor, claims, the disposable workspace, staging, task/process cleanup and power restoration.

cli-installed.py under tests/desktop separately copies the entire client payload to an unrelated path and checks offline discovery, runtime isolation and bundled claims. Windows x64 execution passes in a claimed appliance with no source checkout mounted into the test. This is CLI execution evidence; it does not authenticate an unsigned staging payload.

Live owner-session acceptance

owner-session-live.py runs from the controller against an already claimed Windows VM. Stage a copy of the desktop app with the candidate runtime and its matching pinned provider; retain the installed release. A locally assembled candidate is behavior evidence, not signed-package acceptance. Supply the exact native build revision and SHA-256 independently of the runner revision. The VM must have an unlocked interactive session, the accepted appliance resident, Python, and a separately identified Chrome for Testing executable. The installed desktop app must be closed before starting this isolated run.

python3 tests/windows/owner-session-live.py \
  --target windows --claim "$claim_id" \
  --install '<guest candidate app directory>' \
  --guest-root '<owned guest acceptance directory>' --session SESSION_ID \
  --chrome '<Chrome for Testing executable>' \
  --fixture '<native medium counter fixture executable>' \
  --runtime-revision COMMIT --runtime-sha256 SHA256 \
  --output '<private controller evidence directory>'

The caller runs doctor, acquires and renews the exact VM claim, and releases it in finally/trap cleanup; this harness borrows that claim without renewing or replacing it. It verifies readiness and claim validity again, uploads only its independent UI actor/browser fixture, and launches the actor through the appliance's target-native application route. The actor operates real Access, Pause/Resume, Stop and browser setup UI. Its private mailbox is test-operator control, not an agent approval API. Agent work uses the ordinary desktop product's live channel through the existing Python SDK or common CLI.

Checks cover unowned/forged requests, native notice, independent counter changes, two competing connections, stale references, Pause, silent-heartbeat expiry, killed CLI owner, successor progress, one-shot negotiation, browser extension effects and Stop. Results preserve actual provider routes. Cleanup closes sessions, kills only owned fixture/app/browser processes, restores browser native-messaging registration, and reports cleanup failures. Evidence, resolved inventory, guest paths and runtime identifiers are private; commit only minimized findings to Tactical 096. No controller desktop input is used.

Older direct-IPC desktop grant/browser/release runners describe the pre-owner contract and are not substitutes for this runner on an owner-required candidate. Their full release/lifecycle cases need session-aware migration before release; this focused pass does not qualify those unexecuted cases.

Locked-console investigation

browser-locked-live.py accepts exactly one of --runtime (inherited native operator) and --install (actual Settings UI), plus a separate Chrome for Testing --chrome and private --output. --finish disable|stop|expiry selects the end fence; --grant-duration is 60–600 seconds. --failure-hold optionally retains owned processes for at most 120 seconds; the controller may create continue-cleanup in the output directory to end that diagnostic hold. Failures are saved before cleanup. The actor leaves Windows locked; the claimed controller owns restoration, tasks, evidence, staging, normal shutdown and claim release. A configured scenario is not an acceptance claim; Tactical 133 records what actually ran.

session-reconnect-probe.ps1 is an appliance experiment, not an unlock provider. Require an exclusive target claim and an already locked -ExpectedSession; choose -Operation wts-connect|tscon and a private -Output. Source and destination cannot be selected separately, no credential is accepted, and before/after WTS lock plus authentication-LUID observations distinguish native delivery from session effect. The controller owns launch identity, lock/restoration and task/process cleanup.