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
Conversation
…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.
Contributor
૮ >ﻌ< ა ci reviewran on 4e76e97 — chore: map contributor email for salvaged #92934 (bluefatelu
|
This was referenced Sep 5, 2026
Closed
This was referenced Sep 5, 2026
Closed
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A successful
hermes updateon 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_pendingbehind, and every followinghermesstart warned "A previoushermes updatepulled new code but did not restart running gateways". No receipt had been written for any completed update since Aug 24.Changes
update_cmd_fleet.py): a gateway with no profile mapping (or whose relaunch could not be armed) is SIGTERMed and listed under "Restart manually" — by design it has no successor and publishes no fleet row. It still counted inkilled_pidsand the pre-restart snapshot, so_fleet_probe_expected_runtimesdemanded rows that could not exist. The outcome now tracksstopped_unmapped_pidsandfleet_probe_signals()subtracts them; relaunched/systemd gateways still predict rows exactly as before.kind == "gateway"only — salvage of fix(update): scope fleet-probe runtime expectation to gateway-kind plan records #97350 by @liuhao1024 (fixes [Bug]: dashboard-only runtime makes successfulhermes updateexit 1 on empty gateway fleet check #97332; duplicate fix(update): only require fleet verification for gateway runtimes #97450): serve/dashboard plan records never publish agateway_state.jsonrow, so a dashboard-only plan cannot ground a rows-expected verdict._purge_stale_hermes_modulesevictedhermes_cli.update_receipt, so the finalize call imported a fresh module with_current is Noneand silently wrote nothing. Widened here to the wholehermes_cli.update_*family by prefix:update_inventory'sRuntimeRecordhas the same failure (plan built before the purge,isinstancereconciliation after it → empty runtime-outcome report).Validation
origin/main@ 1e69c12)gateway runprocess with foreignHERMES_HOME, run through_restart_manual_gateways→ fleet proberows_expected=True snapshot=[]→ VERDICT: BUGrows_expected=False→ VERDICT: FIXEDbegin_update_receipt()→ purge →finalize_update_receipt()receipt_written=False plan_class_identity_kept=False→ BUGtest_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)scripts/run_tests.sh tests/hermes_cli/test_update*.py(65 files)test_update_yes_flag.py(live-system guard blocksos.killof a stray pytest-spawnedgateway restartPID on this host; identical on base)Contributor tests trimmed to the invariant bar (3 near-identical #97350 cases folded into one);
TestCallSiteWiringkept as on main.Infographic