Tier 0: render what the services already decided, honestly
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -306,6 +306,8 @@ process_identity_matches "$harness_pid" "$harness_start_time" \
|
||||
state="$(run ipc call health-test status)"
|
||||
jq -e '.status == "warning" and .acceptedGeneration == 0 and .checks == ["integration.calendar", "panama.caffeine"] and .diagnosticUnavailable == false' \
|
||||
>/dev/null <<<"$state" || fail "valid warning snapshot was not accepted intact: $state"
|
||||
jq -e '.headlineState == "warning" and .headline == "Needs attention" and .tone == "warn"' \
|
||||
>/dev/null <<<"$state" || fail "a warning snapshot did not produce the shared warning verdict: $state"
|
||||
|
||||
[[ "$(run ipc call health-test accept "$updates_snapshot" 0)" == "true" ]] \
|
||||
|| fail 'a check pointing at Software Update was rejected, so the whole report would go blank rather than one button being dead'
|
||||
@@ -373,6 +375,18 @@ state="$(run ipc call health-test status)"
|
||||
jq -e '.diagnosticUnavailable == true and .checks == ["integration.calendar", "panama.caffeine"]' \
|
||||
>/dev/null <<<"$state" || fail "malformed snapshot discarded the last valid checks: $state"
|
||||
|
||||
# The split-brain state, named. A rejected snapshot on top of a good one leaves
|
||||
# BOTH conditions true: the checks are still there, and the diagnostic is
|
||||
# unavailable. The Health hero asked "unavailable?" first and the sidebar footer
|
||||
# asked "any checks?" first, so the same desktop was a red "Health check
|
||||
# unavailable" and a green "Desktop is healthy" at the same time, six inches
|
||||
# apart. There is one verdict now, and unavailable wins it -- it is the only
|
||||
# state that says the other four are not known to be true.
|
||||
jq -e '.headlineState == "unavailable" and .headline == "Health check unavailable"
|
||||
and .tone == "danger"' \
|
||||
>/dev/null <<<"$state" \
|
||||
|| fail "a rejected snapshot over a good one did not produce one unavailable verdict: $state"
|
||||
|
||||
before_generation="$(jq -r .generation <<<"$state")"
|
||||
run ipc call health-test queue >/dev/null
|
||||
state="$(run ipc call health-test status)"
|
||||
|
||||
Reference in New Issue
Block a user