Skip to content

Throttle baseline runs, record interrupted runs, and put the hour in the MSI version - #56

Merged
rodchristiansen merged 1 commit into
mainfrom
feature/baseline-throttle-msi-version
Oct 5, 2026
Merged

rodchristiansen merged 1 commit into
mainfrom
feature/baseline-throttle-msi-version

Conversation

@rodchristiansen

Copy link
Copy Markdown
Contributor

Baseline throttle (matches the Mac's #39/#40)

  • Applied only after the preflight returns baseline; provisioning is never limited.
  • `C:\ProgramData\ManagedBootstrap\baseline.json` holds `end_time`, `status`, `consecutive_failures`.
  • Completed baseline under `BaselineMinIntervalHours` (default 144; ADMX, policy, settings registry): skip.
  • Failed / partial_failure / interrupted: one retry after 24 h, then the full interval.
  • `.bootstrap_force` exempts the run (the preflight consumes it). A provisioning run clears the record.
  • A throttled run ends as `skip` with the reason logged and downloads no item.
  • Baseline items whose manifest `hash` is in the install ledger are skipped before download.

Interrupted runs

  • A run that finds last-run.json still at `running` holds the single-instance lock, so that run is dead. Its session.json is relabelled `interrupted`; an interrupted baseline counts as a failure for the throttle.

MSI version

  • ProductVersion is `YY.M.DDHH.MM` (2026.10.05.0951 → 26.10.509.51), derived in the wixproj from `-p:FullVersion`. File versions, `--version`, `HKLM\SOFTWARE\BootstrapMate\Version`, logs and tags keep `YYYY.MM.DD.HHMM`.

Tested on a test PC (signed)

  • 2026.10.05.1100 (26.10.511.0) → 2026.10.05.1200 (26.10.512.0): one product entry, registry Version 2026.10.05.1200.
  • The upgrade ran while a baseline was in progress: Restart Manager shut it down (`RESTART MANAGER: Successfully shut down all applications` in the verbose log). The next run logged it, relabelled the session `interrupted`, and skipped with "next baseline allowed after 2026-10-06 10:03".
  • `dotnet test`: 86 pass.

…the MSI version

Baseline throttle, applied only after the preflight chooses baseline so
provisioning is never limited. baseline.json keeps the last baseline's end
time, status and consecutive failures (last-run.json cannot hold the clock:
every run rewrites it). A completed baseline younger than
BaselineMinIntervalHours (default 144, policy and settings registry) skips;
a failed, partial or interrupted one gets one retry after 24 hours, then the
full interval. The .bootstrap_force file is exempt; the preflight consumes
it. A provisioning run clears the record. A baseline also skips an item
before downloading it when the manifest hash is in the install ledger.

A run that finds last-run.json still at "running" holds the single-instance
lock, so that run is dead: it is recorded as "interrupted" in its
session.json, and an interrupted baseline counts as a failure for the
throttle. Reproduced on a test PC: a MajorUpgrade's Restart Manager shuts
down a running bootstrap; the next run recorded it interrupted and waited.

The MSI ProductVersion is YY.M.DDHH.MM, derived in the wixproj from
-p:FullVersion=YYYY.MM.DD.HHMM, so two builds on the same day upgrade each
other. Everything else, HKLM\SOFTWARE\BootstrapMate\Version included, keeps
the full stamp.
@rodchristiansen
rodchristiansen merged commit c247c5a into main Oct 5, 2026
2 checks passed
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