Skip to content

fix: link MSVC CRT statically and correct session-end diagnostics - #15

Draft
RomainROCH wants to merge 4 commits into
mainfrom
integrate/portable-main
Draft

RomainROCH wants to merge 4 commits into
mainfrom
integrate/portable-main

Conversation

@RomainROCH

@RomainROCH RomainROCH commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

What this PR does

  • Request static MSVC CRT linkage for the Windows x64 executable.
  • Separate a Layer 1 refusal from a session cancellation reported by Windows. Preserve query/end parameters and remove unproven attribution of session-end cleanup to a human.
  • Update the associated build and shutdown documentation. Protection decisions, dependencies, versions, permissions and workflows remain unchanged.

The seven-file diff is based on main f89dd59740cf175707f448cadb828cb8fe821a10. The integration head 7c409614155ef208ed15428ad29d95a855f05d37 preserves exactly the source tree of 8637fdd. PR #14's fixture correction is already in main; PR #10 and PR #6 remain separate.

Why

A single-executable distribution should not require a separately installed MSVC runtime. Returning FALSE from WM_QUERYENDSESSION alone does not establish that Windows cancelled the session, and cleanup does not identify the initiator.

This corrects linkage and diagnostics. It does not establish Windows Update reboot prevention or broader physical power acceptance.

How it was tested

  • Full checks passed in the hosted PR checkout; exact checkout and limits are recorded below.
  • Developer tooling and smoke-safety fixtures passed on the identical source tree at 8637fdd.
  • Conflict-free integration, exact-tree comparison, whitespace checks and publication privacy/secrets checks.
  • Earlier evidence is preserved with its original scope; skipped native/manual checks are explicit.

Existing evidence remains bound to source e925634, not relabeled as a newly qualified binary of this PR:

  • Offline MSVC release build, static dependency/version/manifest inspection and local package verification.
  • Exact binary SHA256 45525a99f03082ca83d87caf9c82c0b8a7ea892b42bedaefe865b264c08caf34: --help and --version passed in an isolated offline Windows VM.
  • 64 filtered unit tests passed; the real PowerRequest test was excluded locally.
  • Only the developer fixture differs between e925634 and 8637fdd; compiled source/configuration/dependencies are identical. Source equality is not a reproducible-build or new provenance claim.

Hosted Full checks, native PowerRequest acquisition, same-binary smoke and artifact upload passed in CI run 40075713813, attempt 1. The actual synthetic checkout is f0dcd7c6ceb5d51de6e25a7cd7516ebe3f0a52da, with tree 8515bbb6249eec836c3b3e491c32b8c10311014c identical to this PR head. This is PR validation, not push/main release provenance.

The 65 unit tests include the real PowerRequest acquisition test. The smoke reported 17 passes and four skips: direct non-admin PowerShell status, status without spawning a second process from a non-elevated session, active Layer 3 protection, and autostart task creation/removal. The uploaded artifact is ID 12553172168; its reported archive SHA256 is 00d8a3fd5da1f32b8b504c49ba02af34e53b889de46d7ed8fd5fd02513ab46a8. The executable (SHA256 9ff8262d596bf3cade646c63dc3d30a948a6e3684ffd46c94339ffe0ec68bb5b) was separately inspected statically and included in a verified private package on 2026-10-24. This is not VM execution evidence. The planned VM CLI check stopped before any VM or probe was launched when its memory guard could not access CIM at 09:42:21 UTC on 2026-10-24; --help and --version remain unvalidated for this binary. A PR run uses a synthetic merge checkout; any future integration/release must identify the actual final SHA and applicable push/main CI. No physical sleep/hibernate or Windows Update reboot-prevention test is claimed.

Checklist

  • Main-based integration and target main explicitly requested by the maintainer for this draft.
  • Existing branches and concurrent work preserved; no unrelated tracing, IPC draft, status ACL or release-cleanup change included.
  • No business model, signing, account-access or permission change.
  • Exact PR CI and its explicit skips reviewed; the PR remains draft and no merge is authorized at this stage.

No merge is requested at this stage. No tag, release, deployment or host installation is included.

Count a Layer 1 cancellation only after WM_ENDSESSION(FALSE) follows a
refusal on the same window. Preserve query/end parameters and remove
unproven human attribution from cleanup diagnostics.

Validation: 13 filtered synthetic Layer 1 tests, formatting and docs checks.
No native session-end, PowerRequest, system smoke or physical test run.
Reuse the reviewed MSVC static CRT configuration on the current main-based
session diagnostic source. Preserve Cargo/manifest 0.2.1 and reconcile the
existing release notes with separately scoped synthetic and VM evidence.

Validation: docs checker (27 files), config parsing and byte identity with
180cdfa, unchanged Rust/dependency/workflow inputs, and whitespace checks.
No build, runtime, VM, native power test or publication performed.
Apply the reviewed PR #14 fixture assertions to the portable candidate.
Normalize whitespace in the complete expected exit-7 diagnostic and
require exactly one Cargo trace line for the initial formatting step.

Validation: developer_checks.ps1 and smoke_safety.ps1 both exit 0.
Only fake Cargo, task/process probes and owned temporary fixtures ran.
No product build, protection, PowerRequest, VM or publication performed.
The existing e925634 binary and its evidence remain bound to e925634.
Merge the preserved portable candidate into current main without
changing its reviewed source tree. Retain the PR14 fixture fix, static
MSVC CRT configuration and truthful session-end diagnostic correction.

Validation: conflict-free integration with tree identical to 8637fdd;
whitespace and identity/private-content/secrets gates pass. Existing
filtered units and exact-byte startup evidence remain bound to e925634.
Developer and smoke-safety fixtures passed on the identical 8637fdd tree.

No new build, runtime, VM or publication. Exact-SHA CI and matching
artifact qualification remain outstanding; no reboot-prevention claim.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant