Infinetus Windows desktop package — KSN-05C.1
============================================

This phase adds automatic desktop integration and managed local upgrades around
exactly the accepted client 0.5.0 / KSN-05A and official Kokum ABI 1.12 VM. The
client, server, database schemas, account routes and VM implementation are unchanged.

DELIVERY STATUS

The supplied Infinetus-Setup-unsigned.exe is a native Windows x64 test candidate.
It cross-compiles with strict compiler warnings and passes independent PE/resource/
component checks. The publisher admission parser has portable tests. No Windows
host is available in this environment: actual shortcut creation, installation,
upgrade, rollback, HTTPS, GUI/image behavior and Authenticode signing remain
unverified until the included native acceptance script is run on Windows.
Do not describe this candidate as a signed or Windows-tested public release.

NORMAL FIRST RUN AND SHORTCUTS

Run Setup from an ordinary Windows 10/11 x64 account. It installs per user at:

  %LOCALAPPDATA%\Programs\Infinetus\Infinetus.exe
  %LOCALAPPDATA%\Programs\Infinetus\versions\<package-id>\...

The exact location comes from the Windows LocalAppData known-folder API. Setup
then starts the stable launcher, which runs the bundled official VM and client.
Users do not install Kokum, Python, Node or a compiler or supply a server address.
The accepted client continues to use https://infinetus.com.

Setup attempts to create Infinetus.lnk in the current user's Desktop and Start
Menu Programs known folders. Native IShellLinkW/IPersistFile APIs are used, with
an absolute stable launcher target, empty arguments, and the Infinetus icon.
The native launcher and Setup also contain the icon as a PE resource.

The shortcut creation intent is recorded privately before publication. Repeated
setup/launch/upgrade does not recreate a removed shortcut or rewrite an existing
one. An unavailable location or unrelated Infinetus.lnk does not block the app.
The launcher remains directly usable from its installed folder. Explicit repair:

  Infinetus.exe --repair-shortcuts

Repair retries missing destinations. An existing matching shortcut is accepted;
an existing foreign or modified shortcut is preserved. If either location cannot
be repaired safely, the command reports failure, but ordinary app launch remains
available. A first attempt that could not write its destination also requires
this explicit repair to retry. OS settings govern whether Desktop items are shown.
Network/reparse-based installation locations and unsafe redirected shortcut
folders are not supported; no filesystem or Windows security setting is disabled.

The icon in a shortcut references the retained version's immutable icon file.
Its target always points to the stable Infinetus.exe. Versions are retained, so
the icon remains available after rollback to the earlier unbranded 05B launcher.

MANAGED UPGRADE

Updates are user initiated: close the client and run the new trusted Setup.
There is no network update service, background download or automatic unsigned
code replacement. Website delivery remains the separate KSN-05D phase.

The KSN-05C.1 setup explicitly admits the exact KSN-05B.1 Windows predecessor:

  0.5.0-ksn05b1-d1ff58d81bc152ae
  launcher SHA256:
  fea7f15d6a23d8dd18669395fe179f90b17ae5896287fef52a6b7f8a655ecade

All 19 predecessor components, including original runtime/license files and the
portable app, are pinned in the new setup. Merely naming a directory Infinetus
is insufficient. A changed/foreign installation or unexpected extra version
file is refused. A previous setup cannot silently overwrite a newer launcher.

The operation stages and verifies the new immutable version before changing the
stable entry. A bounded private transaction journal records the intended source,
target and previous version. The stable entry and state record are published by
same-volume Windows file replacement with write-through. A recognized unfinished
transaction is completed by rerunning the same matching setup, after both known
versions have passed verification. A changed journal or component is refused.

The new launcher refuses an unfinished journal until matching Setup completes it.
The old 05B launcher has no journal support; before activation it can continue to
run its unchanged complete old version. Close it before the first upgrade. New
05C launchers hold a per-user run lock throughout the VM's lifetime, and Setup
refuses to update while that lock is held. No running application is terminated.

This provides staged activation and recovery from a process interruption. It is
not a claim of validated sudden-power-loss durability on every filesystem. The
native acceptance script includes recognized before/after-activation journal
fixtures; actual Windows execution is still pending.

ROLLBACK

The immediately previous admitted version is retained and recorded. Close the
client, then run the same KSN-05C Setup that performed the update with:

  Infinetus-Setup-unsigned.exe --rollback

Rollback verifies the complete active and previous versions, switches the stable
entry back to the recorded previous launcher, and consumes that rollback slot.
Repeating the same completed rollback is a no-op success, not a toggle. It does
not launch a client automatically. Shortcuts keep the same stable target.
A fresh install without a previous version has no rollback target. A corrupted
payload is refused; rollback is not a command to discard evidence or force-copy
untrusted bytes. The matching Setup is required; keep it or download that exact
release again. An older or unrelated Setup cannot recover a newer transaction.

An interrupted rollback is finished as that rollback by the matching setup;
recovery does not immediately start a different upgrade. A later intentional
normal run of the new Setup upgrades again. Older version directories are not
automatically deleted, and no app-data purge or uninstaller is added in this phase.
Only one prior version is eligible for the current one-step rollback.

STATE, TRUST AND PERMISSIONS

The normal Kokum app-data rules and KOKUM_APP_DATA_HOME remain inherited. Existing
infinetus.client SQLite state, storage locator, images, IDs and sticky flags are
not moved, purged, migrated or reset by setup/shortcuts/upgrade/rollback.

Per-user ACLs, reparse/hardlink rejection, exact version-directory inventories,
bounded extraction and SHA256 verification guard installation. Normal launch
verifies all expected version components, including the version's launcher copy.
A private install lock serializes setup and launcher startup; the per-user run
lock protects active 05C use. These checks do not replace publisher signing.

The previous TLS behavior is retained. A safe explicit SSL_CERT_FILE is honored;
otherwise the launcher writes a fresh private PEM from Windows ROOT stores,
excluding Disallowed certificates and roots unsuitable for TLS server auth. It
supplies the PEM only through the child environment and removes it after the VM
exits. SSL_CERT_DIR is cleared for that child; persistent environment and Windows
certificate stores are not edited. OpenSSL performs normal certificate/hostname
verification. This is not full SChannel chain-policy, revocation or automatic
root/intermediate-retrieval equivalence. Native HTTPS acceptance remains pending.

PUBLISHER BUILD

Python and MinGW-w64 are publisher tools only. From the project root:

  python3 packaging/windows/build_windows.py \
    --runtime-zip /path/KokumVM_Windows_x86_64_ABI_1_12.zip \
    --client client/dist/InfinetusClient.kapp \
    --output /new/empty/windows-output \
    --cc x86_64-w64-mingw32-gcc \
    --windres x86_64-w64-mingw32-windres

The original runtime archive, accepted client and 05B predecessor manifest are
hash pinned. The builder uses packaging/assets/infinetus.ico. It records source,
icon, admitted predecessor, payload and executable identities, and rechecks that
inputs did not change during compilation. Output includes Setup, windows-build.json,
windows-components.json and publisher-only intermediate files.

For a future packaging revision, increment --revision and explicitly admit the
trusted older publisher's windows-build.json using --previous-manifest. Only
older KSN-05C revisions or the pinned 05B revision with the same accepted app and
runtime can be admitted. Their complete hashes are compiled into Setup and copied
into the payload's upgrade/approved-previous.json. There is no runtime fetch of
upgrade metadata. Every changed release needs a new revision and new validation.

The native resource/compiler flags remove PE timestamp insertion for repeatability;
compiler/toolchain changes still require a newly versioned publisher release.
Signed builds use a valid existing CurrentUser\My publisher certificate and an
HTTPS timestamp service:

  python packaging\windows\build_windows.py ... `
    --certificate-thumbprint YOUR_EXISTING_CERTIFICATE_THUMBPRINT `
    --timestamp-url https://YOUR_APPROVED_TIMESTAMP_SERVICE

The launcher is signed and verified before being embedded. The finished Setup is
then signed and verified. Rebuild the package for signing; modifying an already
embedded executable invalidates its component hash. No private signing key or
password is included in this project, and release readiness is never set solely
because compilation or signing succeeds.

VERIFICATION COMMANDS

  python3 packaging/tests/windows/test_windows_package.py \
    --build-dir /path/windows-output \
    --runtime-zip /path/KokumVM_Windows_x86_64_ABI_1_12.zip \
    --client client/dist/InfinetusClient.kapp \
    --report /path/windows-static-checks.json

  python3 -B packaging/tests/windows/test_publisher_policy.py \
    --runtime-zip /path/KokumVM_Windows_x86_64_ABI_1_12.zip \
    --report /path/windows-publisher-tests.json

The independent PE check reads the final Setup resource, exact 21-component
inventory, all icon images, native imports and compiled predecessor identities.
Portable parser tests reject unsafe/damaged/mismatched predecessor descriptions.
Neither test suite executes Windows APIs or claims native upgrade success.

NATIVE WINDOWS ACCEPTANCE

Use a clean, ordinary Windows account and a non-elevated PowerShell. Keep both
exact old and new setup/build-manifest pairs. Use the approved script-run process;
do not disable execution policy. For deliberate unsigned-candidate testing:

  .\packaging\tests\windows\accept_windows.ps1 `
    -Setup C:\Downloads\Infinetus-Setup-unsigned.exe `
    -BuildManifest C:\Downloads\windows-build.json `
    -PreviousSetup C:\Downloads\KSN05B\Infinetus-Setup-unsigned.exe `
    -PreviousBuildManifest C:\Downloads\KSN05B\windows-build.json `
    -Report C:\Downloads\windows-native-acceptance.json `
    -AllowUnsignedTestBuild -TestShortcuts -TestUpgradeRollback `
    -TestTamperRejection -LaunchForManualChecks

The explicit shortcut test removes only the shortcuts it just created/verified,
checks that removal is respected, repairs them, and checks a controlled collision.
The upgrade test starts with the admitted 05B package, verifies 05C activation and
retained files, performs/idempotently repeats rollback, recovers recognized
transaction fixtures, refuses an implicit downgrade and rejects a damaged target.
It hashes existing app-state contents into one aggregate digest without exposing
paths or private content in the report. Tests leave the validated installation
in place. GUI/HTTPS/images require manual native observations; their flags remain
false until actually confirmed. The script has not been run in this Linux build.

MICROSOFT API REFERENCES

https://learn.microsoft.com/en-us/windows/win32/shell/links
https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-movefileexw
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
https://learn.microsoft.com/en-us/windows/win32/seccrypto/system-store-locations

Copyright 2026 TigerDB Solutions Pvt. Ltd. Existing proprietary terms apply.
