Skip to content

fix(devtest): make sntest VM run on x86 hosts and fix stale smoke checks - #211

Merged
waterflier merged 1 commit into
mainfrom
fix/sntest-vmtest-followups
Oct 21, 2026
Merged

waterflier merged 1 commit into
mainfrom
fix/sntest-vmtest-followups

Conversation

@waterflier

Copy link
Copy Markdown
Member

Follow-up from a full sntest VM run (buckyos src/dev_configs/sntest.json, Linux x86_64 host, multipass 1.17). The buckyos side (sntest.json, buckyos.json, build_for_vm_test.py, doc) and the devkit multipass transfer fix are already on main (buckyos 14c43121e, buckyos-devkit 0b58214).

Changes

  • dev_configs/web3_gateway_staging.py
    • --target used to default to aarch64 (and apps/web3-gateway.json hard-coded it), so x86 hosts built the wrong arch. It now defaults to the host CPU.
    • The staging build used to run build.py, i.e. buckyos-build + buckyos-update. The latter also updates cyfs-gateway into the host $BUCKYOS_ROOT (/opt/buckyos), overwriting a running local DV's gateway binary. It now runs buckyos-build <arch> and then buckyos-install --app=web3-gateway --target-rootfs=<staging>.
  • web3-gateway/scripts/sn-dev-smoke.sh
    • S3/S5: since seed-v2 publishes the OOD-signed documents as-is, /1.0/identifiers/did:bns:* returns a bare application/jwt, so grepping JSON keys always failed. The check now asks for application/did-resolution+json and verifies didDocument plus the expected source (bns_document / auth_db_projection).
    • S7 reset: admin.clear_state_by_active_code is loopback-only on the SN, so in --vm mode it returned 404 from the host. The reset now runs inside the SN VM via buckyos-devtest <group> run sn.
    • S7 read-back: the SN caches DNS answers for 60s and a BNS-proxy publish does not invalidate that cache, so reading back the live TXT within 20s passed only by timing. It now waits at least 90s.
  • dev_configs/readme.md: documents the staging build mechanism and the smoke flags needed for the single-node sn_test group (--devtest-group sn_test --no-keep-tunnel).

Verification

  • cd src/dev_configs && uv run python -m unittest test_web3_gateway_staging: 13 tests OK.
  • Fresh sntest (clean_vms → create_vms → install → start) plus restore installed, update, and stop/start cycles. After each, sn-dev-smoke.sh --vm passed 10/10 and the alice relay through the SN returned 200. Final run used buckyos-devkit 0.7.34 (0b58214) via uv run.
  • Not verified: the single-node sn_test group, and the --local smoke mode (S3/S5/S7 logic is shared; local mode still calls the admin reset directly over 127.0.0.1).

Not addressed (noted for follow-up)

  • The SN DNS cache is not invalidated when the SN's own BNS proxy publishes dns_txt, so answers can be up to ~60s stale.
  • The bns.devtests.org forward logs ERROR Unknown protocol: http even though the request succeeds.
  • src/devenv_config.ts has drifted from the buckyos copy: the bns_host field and the vmtest group are missing here.

🤖 Generated with Claude Code

- web3_gateway_staging.py: default --target to the host CPU instead of
  aarch64; build with buckyos-build and install only web3-gateway into
  the staging dir (build.py/buckyos-update also updated cyfs-gateway in
  the host $BUCKYOS_ROOT).
- sn-dev-smoke.sh: S3/S5 request the DID resolution envelope and check
  the source (seed-v2 publishes did:bns docs as bare JWTs); S7 runs the
  loopback-only admin reset inside the SN VM via buckyos-devtest; S7
  waits past the SN DNS answer cache (60s) before reading back the
  published TXT record.
- readme: staging build mechanism and smoke usage for sn_test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@waterflier
waterflier merged commit 45a6252 into main Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant