Skip to content

fix(update): fleet check no longer fails with "no rows" after stopping unmapped/dashboard-only runtimes; receipts survive the module purge (#97332, #98436, salvage #97350 #92934) - #103478

Merged
teknium1 merged 6 commits into
mainfrom
fix/update-fleet-norows-and-receipt-purge
Sep 5, 2026
Merged

teknium1 merged 6 commits into
mainfrom
fix/update-fleet-norows-and-receipt-purge

Conversation

@teknium1

@teknium1 teknium1 commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

A successful hermes update on a box whose only live gateways were unmapped (or dashboard-only) no longer exits 1 with "Fleet version check returned no rows even though gateway runtimes were expected — verification incomplete", and every completed update writes its receipt again.

Field report (Teknium's box, today): update pulled 4587 commits, stopped 24 manual gateway processes, then printed the "no rows" warning, exited 1, left fleet_restart_pending behind, and every following hermes start warned "A previous hermes update pulled new code but did not restart running gateways". No receipt had been written for any completed update since Aug 24.

Changes

Validation

Check Base (origin/main @ 1e69c12) This branch
A/B repro: real fake gateway run process with foreign HERMES_HOME, run through _restart_manual_gateways → fleet probe rows_expected=True snapshot=[] → VERDICT: BUG rows_expected=False → VERDICT: FIXED
A/B repro: begin_update_receipt() → purge → finalize_update_receipt() receipt_written=False plan_class_identity_kept=False → BUG both True → FIXED
New invariant tests (test_unmapped_stops_are_not_expected_rows, test_purge_keeps_open_receipt_and_plan_identity, test_purge_keeps_plan_record_class_identity, test_plan_expectation_keys_on_gateway_kind_only) red green
scripts/run_tests.sh tests/hermes_cli/test_update*.py (65 files) 3 pre-existing failures in test_update_yes_flag.py (live-system guard blocks os.kill of a stray pytest-spawned gateway restart PID on this host; identical on base) same 3, 786 passed

Contributor tests trimmed to the invariant bar (3 near-identical #97350 cases folded into one); TestCallSiteWiring kept as on main.

Infographic

hermes-update-fleet-check-and-receipt

bluefateludi and others added 5 commits September 4, 2026 23:44
…ale-module purge

Widen the salvaged receipt protection to every updater-owned module: the
pre-update plan's ``RuntimeRecord`` dataclass (``update_inventory``) has the same
failure — the plan is built before the purge and the post-restart reconciliation
filters with ``isinstance``, so an evicted module means a fresh class, zero matches,
and an empty runtime-outcome report. One prefix rule instead of a name list that
has to be re-fixed per symptom.
…an records

A dashboard-only runtime plan (gateway never started) made
_fleet_probe_expected_runtimes() return True from the unfiltered
'plan.runtimes is non-empty' check. collect_fleet_versions() reports
gateway identities only, so the probe waited for rows that cannot exist,
printed the incomplete-verification warning, and exited 1 after a
successful update (#97332).

Key the plan-derived expectation on kind == 'gateway' records — the same
row-capability rule already applied to the Windows resume token (#93406)
— and update the two tests that pinned the old object() placeholder so
they pin the runtime-kind distinction. Restart-phase, killed-PID, and
pre-restart-PID signals still fail closed unchanged.
…th "no rows"

A gateway with no profile mapping (or one whose relaunch could not be armed) is
SIGTERMed and listed under "Restart manually" — by design it has no successor and
publishes no fleet-matrix row. It still counted in ``killed_pids`` and the
pre-restart snapshot, so ``_fleet_probe_expected_runtimes`` demanded rows that
could not exist and a fully successful update exited 1 with "Fleet version check
returned no rows even though gateway runtimes were expected", leaving the
fleet_restart_pending marker behind and every later CLI start warning about it.

Track the unmapped stops on the restart outcome and subtract them from the
row-predicting signals (``fleet_probe_signals``); relaunched/systemd gateways
still predict rows exactly as before.
@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 4e76e97 — chore: map contributor email for salvaged #92934 (bluefatelu

⚠️ Warnings

OSV vulnerability scan · View job

28 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 4m2s vs 4m44s (-14.8%). 9 job(s) slower, 5 faster,

  • OS-specific tests / Windows-only tests: -50.0s
  • Detect affected areas: +7.0s
  • Python tests / e2e: -6.0s
  • Check no case-colliding filenames / check-case-collisions: -6.0s
  • Python tests / Run tests: +4.0s

@alt-glitch alt-glitch added type/bug Something isn't working P1 High — major feature broken, no workaround comp/cli CLI entry point, hermes_cli/, setup wizard area/install-update Installer, updater, packaging, wheels, doctor sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Sep 5, 2026
@teknium1
teknium1 merged commit f58fcc8 into main Sep 5, 2026
41 checks passed
@teknium1
teknium1 deleted the fix/update-fleet-norows-and-receipt-purge branch September 5, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install-update Installer, updater, packaging, wheels, doctor comp/cli CLI entry point, hermes_cli/, setup wizard P1 High — major feature broken, no workaround sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

4 participants