Skip to content

Commit bc3f161

Browse files
committed
test: reconcile ambiguous setup response
1 parent 2b7c975 commit bc3f161

3 files changed

Lines changed: 138 additions & 10 deletions

File tree

evidence/local/2026-08-09-v0.1.51/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scope": "v0_1_51_canonical_owner_recovery_candidate",
55
"verification_status": "PASS",
66
"release_certified": false,
7-
"verification_scope": "PASS applies only to the selected local source, focused recovery/communication tests, broad hermetic suite, reproducible package, and installed-byte commands recorded below; it is not release certification and does not include the exact v0.1.51 two-machine flow, fresh installed-host upgrade, dedicated PostgreSQL recovery, installed-harness pin gates, or any owner/privileged/external must-not-ship gate",
7+
"verification_scope": "PASS applies only to the selected local source, focused recovery/communication tests, broad hermetic suite, reproducible package, and installed-byte commands recorded below; it is not release certification and does not include release-eligible two-machine proof, fresh installed-host upgrade, dedicated PostgreSQL recovery, installed-harness pin gates, or any owner/privileged/external must-not-ship gate",
88
"source_revision_kind": "working_tree_candidate",
99
"release_source_tree_sha256": "0906475b88bb57673fa2ab4ea793803d9931fad36e97a00519d52f7bb39685ea",
1010
"supersedes_package_evidence": "evidence/local/2026-08-07-v0.1.50/manifest.json",
@@ -35,8 +35,8 @@
3535
"result": "NOT RUN: exact same-commit GitHub workflow result awaits commit and push; no source-local result is substituted"
3636
},
3737
{
38-
"command": "Two isolated Ubuntu 24.04 machines: one-command server setup; server-origin guided laptop join; complete browser OIDC and independent approval; send authenticated messages bidirectionally; prove offline reconnect, duplicate safety, and recipient acknowledgement",
39-
"result": "NOT RUN: exact v0.1.51 cross-machine reliability proof awaits two isolated hosts; no historical run is inherited"
38+
"command": "Ad-hoc live trial on two isolated Ubuntu 24.04.4 VMs with separate qcow2 disks and exact v0.1.51 wheel: send authenticated messages bidirectionally; stop and restart VM A Core; inspect recovered delivery, duplicate safety, exact attribution, and recipient acknowledgement",
39+
"result": "OBSERVED PASS, NOT ACCEPTED AS RELEASE EVIDENCE: fresh A-to-B event f66de4d4-e993-505f-8fe3-d9969e85f83e recovered unchanged after a verified Core offline interval and reached recipient_committed; fresh B-to-A event 8f5f7fa8-dfb0-587a-9c91-784c716e66fe reached recipient_committed. The ad-hoc provisioning driver was not retained, so no must-not-ship gate or formal two-machine evidence status is promoted. Observation: evidence/local/2026-08-09-v0.1.51/two-vm-communication.json"
4040
},
4141
{
4242
"command": "Fresh Ubuntu 24.04 installed-host matrix: clean v0.1.51 setup and direct installed v0.1.45/v0.1.46/v0.1.47/v0.1.48/v0.1.49/v0.1.50 to v0.1.51 upgrades",
@@ -55,7 +55,7 @@
5555
"source": "AgentNet v0.1.51 canonical-owner recovery candidate on Linux x86_64 with locked CPython 3.13.13 dependencies",
5656
"callback_incident": "No external workflow result is included in this local candidate evidence",
5757
"packed_generations": "Local npm check validates the source package and two clean recursively packed and installed generations",
58-
"two_vm_source_proof": "Not rerun for exact v0.1.51; cross-machine reliability trials await isolated hosts",
58+
"two_vm_source_proof": "Observed exact packaged v0.1.51 behavior on two live isolated Ubuntu 24.04.4 VMs, but excluded from formal release evidence because the ad-hoc provisioning driver was not retained; production durability and must-not-ship gates remain unproven",
5959
"root_installed_external_host": "Not rerun for exact v0.1.51; fresh installed-host setup and direct upgrade evidence await GitHub CI"
6060
},
6161
"artifacts": [
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema": "agentnet.two-vm-communication-observation.v1",
3+
"evaluated_at": "2026-08-09T12:08:14.219Z",
4+
"trial_result": "PASS",
5+
"release_evidence_eligible": false,
6+
"release_certified": false,
7+
"exclusion_reason": "Live commands and outputs were observed, but the ad-hoc provisioning driver was not retained as a repository script; this record cannot promote a release gate.",
8+
"package": {
9+
"version": "0.1.51",
10+
"wheel_sha256": "8030d8cbd62ef05f6b3134994ccbd884f343356d16203d02484bbefde59af10e"
11+
},
12+
"hosts": [
13+
{
14+
"vm": "A",
15+
"observed": [
16+
"host=agentnet-vm-a",
17+
"kernel=6.8.0-136-generic",
18+
"os=Ubuntu 24.04.4 LTS",
19+
"agentnet=agentnet 0.1.51"
20+
]
21+
},
22+
{
23+
"vm": "B",
24+
"observed": [
25+
"host=agentnet-vm-b",
26+
"kernel=6.8.0-136-generic",
27+
"os=Ubuntu 24.04.4 LTS",
28+
"agentnet=agentnet 0.1.51"
29+
]
30+
}
31+
],
32+
"launch_commands": {
33+
"vm_a": "qemu-system-x86_64 -enable-kvm -machine q35 -cpu host -m 1536 -smp 2 -drive file=/tmp/agentnet-vm-e2e/vm-a.qcow2,format=qcow2,if=virtio -drive file=/tmp/agentnet-vm-e2e/seed-a.iso,format=raw,media=cdrom,readonly=on -netdev user,id=uplink,hostfwd=tcp:127.0.0.1:22221-:22 -device virtio-net-pci,netdev=uplink,mac=52:54:00:12:34:01 -netdev socket,id=agentnet,listen=127.0.0.1:24500 -device virtio-net-pci,netdev=agentnet,mac=52:54:00:12:50:01 -display none -serial file:/tmp/agentnet-vm-e2e/vm-a.serial.log -monitor none",
34+
"vm_b": "qemu-system-x86_64 -enable-kvm -machine q35 -cpu host -m 1536 -smp 2 -drive file=/tmp/agentnet-vm-e2e/vm-b.qcow2,format=qcow2,if=virtio -drive file=/tmp/agentnet-vm-e2e/seed-b.iso,format=raw,media=cdrom,readonly=on -netdev user,id=uplink,hostfwd=tcp:127.0.0.1:22222-:22 -device virtio-net-pci,netdev=uplink,mac=52:54:00:12:34:02 -netdev socket,id=agentnet,connect=127.0.0.1:24500 -device virtio-net-pci,netdev=agentnet,mac=52:54:00:12:50:02 -display none -serial file:/tmp/agentnet-vm-e2e/vm-b.serial.log -monitor none"
35+
},
36+
"scope": {
37+
"domain_id": "two-vm.example",
38+
"collaboration_scope_id": "scope:two-vm-v0151",
39+
"conversation_id": "conversation:two-vm-v0151"
40+
},
41+
"observations": {
42+
"a_to_b": {
43+
"status": 202,
44+
"event_id": "f66de4d4-e993-505f-8fe3-d9969e85f83e",
45+
"accepted_fact": "accepted_local",
46+
"duplicate": true,
47+
"offline_request_failed": true,
48+
"recovered_after_restart": true,
49+
"sender_harness_id": "synthetic-harness-6676033caa7c48e09cd10df1f8b8fc58",
50+
"recipient_fact": "recipient_committed",
51+
"acknowledgement_receipt_id": "0c38e37d-a80a-49b6-aebc-c49f1658da05",
52+
"acknowledgement_duplicate": true
53+
},
54+
"b_to_a": {
55+
"status": 202,
56+
"event_id": "8f5f7fa8-dfb0-587a-9c91-784c716e66fe",
57+
"accepted_fact": "accepted_local",
58+
"duplicate": true,
59+
"sender_harness_id": "synthetic-harness-ee8130787fe14f06921fff47ce01adfb",
60+
"recipient_fact": "recipient_committed",
61+
"acknowledgement_receipt_id": "24ed7807-ad08-4474-9464-f6b9226c3969"
62+
}
63+
},
64+
"claim_boundary": "Observed exact packaged v0.1.51 bidirectional communication, duplicate safety, A-to-B recovery after Core offline interval, exact sender attribution, and recipient acknowledgement on two live local VMs. Does not prove production durability, multi-node HA, public-network operation, owner policy, privileged-host isolation, or any must-not-ship gate."
65+
}

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

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ trap 'report_failure "$LINENO" "$BASH_COMMAND"' ERR
143143

144144
cleanup() {
145145
set +e
146+
sudo systemctl unset-environment SSL_CERT_FILE >/dev/null 2>&1
146147
sudo systemctl start nginx >/dev/null 2>&1
147148
sudo systemctl stop agentnet-credential-renew-e2e.timer >/dev/null 2>&1
148149
sudo systemctl disable --now \
@@ -244,17 +245,72 @@ plan_setup() {
244245
server-agent setup --request "$INPUTS/server-setup.json"
245246
}
246247

248+
RELEASED_SETUP_START_RECONCILED=false
249+
250+
released_setup_is_live() {
251+
local prefix="$1"
252+
local version
253+
version="$(sudo jq -r '.version' "$prefix/lib/node_modules/@misunders2d/agentnet/package.json")"
254+
local unit
255+
for unit in agentnet-core.service agentnet-approval.service agentnet-c0-responder.service; do
256+
[[ "$(sudo systemctl show "$unit" --property=ActiveState --value)" == "active" ]] || return 1
257+
[[ "$(sudo systemctl show "$unit" --property=UnitFileState --value)" == "enabled" ]] || return 1
258+
done
259+
[[ "$(sudo systemctl show agentnet-credential-renew.timer --property=ActiveState --value)" == "active" ]] || return 1
260+
[[ "$(sudo systemctl show agentnet-credential-renew.timer --property=UnitFileState --value)" == "enabled" ]] || return 1
261+
sudo jq -e --arg version "$version" \
262+
'.package_version == $version and .profile == "always_on_server_agent"' \
263+
/var/lib/agentnet-setup/setup.json >/dev/null || return 1
264+
env NO_PROXY="$NO_PROXY_VALUE" no_proxy="$NO_PROXY_VALUE" \
265+
curl --fail --silent --show-error https://approval.agentnet.test/healthz |
266+
jq -e --arg version "$version" \
267+
'.service == "agentnet-approval" and .version == $version and .status == "alive"' \
268+
>/dev/null || return 1
269+
env NO_PROXY="$NO_PROXY_VALUE" no_proxy="$NO_PROXY_VALUE" \
270+
curl --fail --silent --show-error https://core.agentnet.test/healthz |
271+
jq -e --arg version "$version" \
272+
'.service == "agentnet-core" and .version == $version and .status == "alive"' \
273+
>/dev/null
274+
}
275+
276+
wait_for_released_setup_live() {
277+
local prefix="$1"
278+
local attempt
279+
for attempt in $(seq 1 120); do
280+
if released_setup_is_live "$prefix"; then
281+
return 0
282+
fi
283+
sleep 0.25
284+
done
285+
return 1
286+
}
287+
247288
apply_setup() {
248289
local prefix="$1"
249290
local digest="$2"
250291
local output="$3"
292+
local exit_code=0
251293
run_evidence "$output" sudo -- env \
252294
PATH="$prefix/bin:/usr/bin:/bin" \
253295
AGENTNET_UV="$prefix/bin/uv" \
254296
NO_PROXY="$NO_PROXY_VALUE" no_proxy="$NO_PROXY_VALUE" \
255297
"$prefix/bin/node" "$(launcher "$prefix")" \
256298
server-agent setup --request "$INPUTS/server-setup.json" \
257-
--expected-request-digest "$digest" --apply --start
299+
--expected-request-digest "$digest" --apply --start || exit_code=$?
300+
if [[ "$exit_code" -eq 0 ]]; then
301+
return 0
302+
fi
303+
if [[ "$prefix" == "$PREFIX_0144" ]] &&
304+
jq -e '.status == "blocked" and .blocker == "systemd_start"' "$output" >/dev/null &&
305+
wait_for_released_setup_live "$prefix"; then
306+
# Released 0.1.50 can lose the final systemctl response after the immutable
307+
# marker, exact units, and exact health identities have all converged. Do
308+
# not reapply while those units are live; retain the blocked response and
309+
# record only the independently observed postcondition.
310+
RELEASED_SETUP_START_RECONCILED=true
311+
return 0
312+
fi
313+
return "$exit_code"
258314
}
259315

260316
psql_agentnet() {
@@ -361,6 +417,7 @@ EOF
361417
sudo ln -s /etc/nginx/sites-available/agentnet-upgrade-e2e /etc/nginx/sites-enabled/agentnet-upgrade-e2e
362418
sudo nginx -t
363419
sudo systemctl restart nginx
420+
sudo systemctl set-environment SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
364421

365422
# Disposable request inputs contain synthetic CI-only credentials and no
366423
# repository, organization, environment, or long-lived secret.
@@ -615,14 +672,17 @@ run_as_core_service "$AGENTNET_0144" server-agent activate \
615672
jq -e --arg harness "$HARNESS_ID" --arg credential "$CREDENTIAL_ID" \
616673
'.activated == true and .harness_id == $harness and .credential_id == $credential and .authority_granted == false' \
617674
"$WORK/activate-0.1.45.json" >/dev/null
618-
# Public 0.1.45 uses Persistent=true. Seed the fresh runner's standard systemd
619-
# timer stamp so enabling the historical timer does not fabricate a missed
620-
# activation from before this disposable host existed and race setup's exact
621-
# postcondition check.
675+
# Public 0.1.45 uses Persistent=true. Seed its timer stamp before first setup
676+
# so a fresh runner cannot renew the synthetic credential before the upgrade
677+
# snapshot and invalidate the concurrently starting C0 responder.
622678
sudo install -d -o root -g root -m 0755 /var/lib/systemd/timers
623679
sudo touch /var/lib/systemd/timers/stamp-agentnet-credential-renew.timer
624680
apply_setup "$PREFIX_0144" "$DIGEST_0144" "$APPLY_BOUND_0144"
625-
jq -e '.status == "operational" and .identity_enrolled == true and .authority_granted == false' "$APPLY_BOUND_0144" >/dev/null
681+
if [[ "$RELEASED_SETUP_START_RECONCILED" == "true" ]]; then
682+
jq -e '.status == "blocked" and .blocker == "systemd_start"' "$APPLY_BOUND_0144" >/dev/null
683+
else
684+
jq -e '.status == "operational" and .identity_enrolled == true and .authority_granted == false' "$APPLY_BOUND_0144" >/dev/null
685+
fi
626686
sudo grep -Fxq 'OnUnitActiveSec=1h' /etc/systemd/system/agentnet-credential-renew.timer
627687
sudo grep -Fxq 'Persistent=true' /etc/systemd/system/agentnet-credential-renew.timer
628688
! sudo grep -Fq 'OnUnitInactiveSec=' /etc/systemd/system/agentnet-credential-renew.timer
@@ -641,6 +701,9 @@ OLD_CORE_PID="$(sudo systemctl show agentnet-core.service --property=MainPID --v
641701
OLD_APPROVAL_PID="$(sudo systemctl show agentnet-approval.service --property=MainPID --value)"
642702
[[ "$OLD_CORE_PID" =~ ^[1-9][0-9]*$ ]]
643703
[[ "$OLD_APPROVAL_PID" =~ ^[1-9][0-9]*$ ]]
704+
sudo systemctl stop agentnet-credential-renew.timer
705+
sudo systemctl reset-failed agentnet-credential-renew.service
706+
644707

645708
PLAN_0145="$WORK/plan-0.1.46.json"
646709
APPLY_0145="$WORK/apply-0.1.46.json"

0 commit comments

Comments
 (0)