Make the setup-state push report whether it worked

It was documented 'Always returns 0', so the offboard's new 'Phase flags pushed' check was testing a constant and ticking regardless.
This commit is contained in:
Gmer4Lfe
2026-08-17 10:57:56 -04:00
parent 42711ff9ac
commit ff94ccb343
3 changed files with 36 additions and 10 deletions
+6 -1
View File
@@ -264,7 +264,12 @@ write_onboard_phase() {
local state_file="$(platform_setup_db_path)"
[[ "$DRY_RUN" == true ]] && { warn "DRY RUN — would write ${key}=true"; return 0; }
set_state_var "$state_file" "$key" "true"
platform_push_setup_state
# The push now reports failure, so it is warned about rather than returned. This function's
# contract is "the phase is recorded here" — the flag is on local disk either way, and an
# unreachable partner must not make a completed phase look like it did not happen.
platform_push_setup_state \
|| warn "Phase flag ${key} written locally but not delivered to the partner"
return 0
}