Skip to content

Commit 442fea5

Browse files
committed
fix(ci): accept bounded 0.1.38 health block
1 parent ff9d778 commit 442fea5

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

scripts/ci/ordinary-server-upgrade-e2e.sh

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,31 @@ for _ in $(seq 1 50); do
253253
sleep 0.2
254254
done
255255

256-
# Exact public 0.1.38 creates its real five-unit marker from clean state. Local
257-
# nginx accepts its historical default User-Agent, so setup must fully converge;
258-
# a health refusal would not prove the immediate predecessor marker boundary.
256+
# Exact public 0.1.38 creates its real five-unit marker from clean state. Its
257+
# historical health client can still terminate with the exact post-marker
258+
# service_health refusal. Accept only that bounded outcome (or full success),
259+
# then independently prove the committed marker, database, units, and absence
260+
# of identity/authority state before testing the fresh-only candidate.
259261
PLAN_0138="$WORK/plan-0.1.38.json"
260262
APPLY_0138="$WORK/apply-0.1.38.json"
261263
plan_setup "$PREFIX_0138" "$PLAN_0138"
262264
DIGEST_0138="$(jq -r '.request_digest' "$PLAN_0138")"
263-
apply_setup "$PREFIX_0138" "$DIGEST_0138" "$APPLY_0138"
264-
jq -e '.status == "waiting_owner_oidc_or_passkey" and .identity_enrolled == false and .authority_granted == false and .production_durability_proven == false' "$APPLY_0138" >/dev/null
265+
APPLY_0138_EXIT=0
266+
apply_setup "$PREFIX_0138" "$DIGEST_0138" "$APPLY_0138" || APPLY_0138_EXIT=$?
267+
if [[ "$APPLY_0138_EXIT" -eq 0 ]]; then
268+
jq -e '.status == "waiting_owner_oidc_or_passkey" and .identity_enrolled == false and .authority_granted == false and .production_durability_proven == false' "$APPLY_0138" >/dev/null
269+
else
270+
[[ "$APPLY_0138_EXIT" -eq 1 ]]
271+
jq -e '
272+
.schema == "agentnet.server-setup.evidence.v1"
273+
and .status == "blocked"
274+
and .blocker == "service_health"
275+
and .message == "AgentNet service did not return exact healthy identity evidence"
276+
and .identity_enrolled == false
277+
and .authority_granted == false
278+
and .production_durability_proven == false
279+
' "$APPLY_0138" >/dev/null
280+
fi
265281
sudo jq -e '.package_version == "0.1.38" and .artifact_mode == "disabled" and (.units | length) == 5' /var/lib/agentnet-setup/setup.json >/dev/null
266282
sudo test ! -e /var/lib/agentnet-setup/upgrade.json
267283
SCHEMA_0138="$(sudo -u agentnet psql -Atq --dbname=agentnet -c "SELECT value FROM metadata WHERE key='schema_version'")"

0 commit comments

Comments
 (0)