fix: recover canonical onboarding authority #128
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ordinary server 0.1.50 to 0.1.51 installed-host upgrade E2E | |
| on: | |
| workflow_call: | |
| push: | |
| paths: | |
| - ".github/workflows/server-setup-upgrade-e2e.yml" | |
| - "scripts/ci/ordinary-server-upgrade-e2e.sh" | |
| - "npm/**" | |
| - "src/agentnet/approval/cli_commands.py" | |
| - "src/agentnet/cli.py" | |
| - "src/agentnet/core/app.py" | |
| - "src/agentnet/operations/server_setup.py" | |
| - "src/agentnet/storage/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/server-setup-upgrade-e2e.yml" | |
| - "scripts/ci/ordinary-server-upgrade-e2e.sh" | |
| - "npm/**" | |
| - "src/agentnet/approval/cli_commands.py" | |
| - "src/agentnet/cli.py" | |
| - "src/agentnet/core/app.py" | |
| - "src/agentnet/operations/server_setup.py" | |
| - "src/agentnet/storage/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| released-upgrade-chain: | |
| name: Ubuntu 24.04 / PostgreSQL 18 / installed-host state preservation | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Check out current test harness | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Retain current upgrade harness | |
| shell: bash | |
| run: install -m 0755 scripts/ci/ordinary-server-upgrade-e2e.sh "$RUNNER_TEMP/ordinary-server-upgrade-e2e.sh" | |
| - name: Configure Node.js | |
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 | |
| with: | |
| node-version: "24.18.0" | |
| package-manager-cache: false | |
| - name: Install pinned npm CLI | |
| shell: bash | |
| run: | | |
| npm install --global npm@12.0.1 --ignore-scripts --no-audit --no-fund | |
| test "$(node --version)" = "v24.18.0" | |
| test "$(npm --version)" = "12.0.1" | |
| - name: Configure uv and Python | |
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| with: | |
| version: "0.11.28" | |
| python-version: "3.13.13" | |
| enable-cache: false | |
| - name: Install PostgreSQL 18 and disposable route dependencies | |
| shell: bash | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y postgresql-common nginx jq openssl ca-certificates iproute2 | |
| sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y | |
| sudo apt-get update | |
| sudo apt-get install -y postgresql-18 | |
| while read -r version cluster _; do | |
| sudo pg_dropcluster --stop "$version" "$cluster" | |
| done < <(pg_lsclusters --no-header) | |
| sudo pg_createcluster 18 main --port 5432 --start | |
| sudo -u postgres psql -Atq --dbname=postgres -c "SHOW server_version" | grep -E '^18\.' | |
| - name: Prove exact v0.1.50-to-v0.1.51 installed-host upgrade | |
| shell: bash | |
| run: "$RUNNER_TEMP/ordinary-server-upgrade-e2e.sh" | |
| - name: Verify E2E cleanup | |
| if: ${{ always() }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| ! getent passwd agentnet >/dev/null | |
| ! getent passwd agentnet-approval >/dev/null | |
| ! getent passwd agentnet-c0 >/dev/null | |
| ! getent group agentnet >/dev/null | |
| ! getent group agentnet-approval >/dev/null | |
| ! getent group agentnet-c0 >/dev/null | |
| ! compgen -G '/opt/agentnet-upgrade-e2e-*' >/dev/null | |
| ! pgrep -f '/opt/agentnet-upgrade-e2e-' >/dev/null | |
| for path in \ | |
| /var/lib/agentnet \ | |
| /var/lib/agentnet-approval \ | |
| /var/lib/agentnet-c0 \ | |
| /var/lib/agentnet-setup \ | |
| /etc/agentnet-secrets \ | |
| /etc/systemd/system/agentnet-core.service \ | |
| /etc/systemd/system/agentnet-approval.service \ | |
| /etc/systemd/system/agentnet-c0-responder.service \ | |
| /etc/systemd/system/agentnet-credential-renew.service \ | |
| /etc/systemd/system/agentnet-credential-renew.timer \ | |
| /var/lib/systemd/timers/stamp-agentnet-credential-renew.timer \ | |
| /etc/nginx/sites-enabled/agentnet-upgrade-e2e \ | |
| /etc/nginx/sites-available/agentnet-upgrade-e2e \ | |
| /usr/local/share/ca-certificates/agentnet-upgrade-e2e-root.crt \ | |
| /etc/ssl/certs/agentnet-upgrade-e2e.crt \ | |
| /etc/ssl/certs/agentnet-upgrade-e2e.pem \ | |
| /etc/ssl/private/agentnet-upgrade-e2e.key \ | |
| "$RUNNER_TEMP/agentnet-ordinary-server-upgrade-e2e"; do | |
| ! sudo test -e "$path" | |
| done | |
| ! grep -Fq '# agentnet-upgrade-e2e' /etc/hosts | |
| HBA_FILE="$(sudo -u postgres psql -Atq --dbname=postgres -c 'SHOW hba_file')" | |
| ! sudo grep -Fq '# agentnet-upgrade-e2e' "$HBA_FILE" | |
| [[ "$(sudo -u postgres psql -Atq --dbname=postgres -c "SELECT count(*) FROM pg_roles WHERE rolname='agentnet'")" == "0" ]] | |
| [[ "$(sudo -u postgres psql -Atq --dbname=postgres -c "SELECT count(*) FROM pg_database WHERE datname='agentnet'")" == "0" ]] | |
| ! sudo ss -H -ltnp '( sport = :8080 or sport = :8090 )' | grep -Fq agentnet |