Skip to content

Commit 272f748

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

3 files changed

Lines changed: 144 additions & 12 deletions

File tree

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

Lines changed: 8 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": [
@@ -66,6 +66,10 @@
6666
{
6767
"path": "evidence/local/2026-08-09-v0.1.51/artifacts/agentnet-0.1.51-py3-none-any.whl",
6868
"sha256": "8030d8cbd62ef05f6b3134994ccbd884f343356d16203d02484bbefde59af10e"
69+
},
70+
{
71+
"path": "evidence/local/2026-08-09-v0.1.51/two-vm-communication.json",
72+
"sha256": "5d4d5f55679ae19b1b0c59eb01090f8072f93f9663a173e932b12dfbe042e630"
6973
}
7074
],
7175
"source_revision": "working-tree candidate; authoritative binding is release_source_tree_sha256"
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: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,72 @@ plan_setup() {
244244
server-agent setup --request "$INPUTS/server-setup.json"
245245
}
246246

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

260315
psql_agentnet() {
@@ -615,14 +670,18 @@ run_as_core_service "$AGENTNET_0144" server-agent activate \
615670
jq -e --arg harness "$HARNESS_ID" --arg credential "$CREDENTIAL_ID" \
616671
'.activated == true and .harness_id == $harness and .credential_id == $credential and .authority_granted == false' \
617672
"$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.
622-
sudo install -d -o root -g root -m 0755 /var/lib/systemd/timers
623-
sudo touch /var/lib/systemd/timers/stamp-agentnet-credential-renew.timer
673+
# Public 0.1.45 uses Persistent=true. Mask its renewal target while realizing
674+
# the released baseline so a fresh runner cannot renew the synthetic credential
675+
# before the upgrade snapshot and invalidate the concurrently starting C0
676+
# responder. The candidate timer is tested after this bounded baseline freeze.
677+
sudo systemctl mask --runtime agentnet-credential-renew.service
678+
[[ "$(sudo readlink /run/systemd/system/agentnet-credential-renew.service)" == "/dev/null" ]]
624679
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
680+
if [[ "$RELEASED_SETUP_START_RECONCILED" == "true" ]]; then
681+
jq -e '.status == "blocked" and .blocker == "systemd_start"' "$APPLY_BOUND_0144" >/dev/null
682+
else
683+
jq -e '.status == "operational" and .identity_enrolled == true and .authority_granted == false' "$APPLY_BOUND_0144" >/dev/null
684+
fi
626685
sudo grep -Fxq 'OnUnitActiveSec=1h' /etc/systemd/system/agentnet-credential-renew.timer
627686
sudo grep -Fxq 'Persistent=true' /etc/systemd/system/agentnet-credential-renew.timer
628687
! sudo grep -Fq 'OnUnitInactiveSec=' /etc/systemd/system/agentnet-credential-renew.timer
@@ -641,6 +700,10 @@ OLD_CORE_PID="$(sudo systemctl show agentnet-core.service --property=MainPID --v
641700
OLD_APPROVAL_PID="$(sudo systemctl show agentnet-approval.service --property=MainPID --value)"
642701
[[ "$OLD_CORE_PID" =~ ^[1-9][0-9]*$ ]]
643702
[[ "$OLD_APPROVAL_PID" =~ ^[1-9][0-9]*$ ]]
703+
sudo systemctl stop agentnet-credential-renew.timer
704+
sudo systemctl unmask --runtime agentnet-credential-renew.service
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)