fix: recover canonical onboarding authority #175
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 setup E2E | |
| on: | |
| push: | |
| paths: | |
| - ".github/workflows/server-setup-e2e.yml" | |
| - "scripts/ci/ordinary-server-setup-e2e.sh" | |
| - "scripts/ci/packaged_local_communication_e2e.py" | |
| - "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/postgres.py" | |
| - "skills/agentnet-operator/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/server-setup-e2e.yml" | |
| - "scripts/ci/ordinary-server-setup-e2e.sh" | |
| - "npm/**" | |
| - "src/agentnet/approval/cli_commands.py" | |
| - "scripts/ci/packaged_local_communication_e2e.py" | |
| - "src/agentnet/cli.py" | |
| - "src/agentnet/core/app.py" | |
| - "src/agentnet/operations/server_setup.py" | |
| - "src/agentnet/storage/postgres.py" | |
| - "skills/agentnet-operator/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| ubuntu-24-postgresql-18: | |
| name: Ubuntu 24.04 / PostgreSQL 18 clean install | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| persist-credentials: false | |
| - 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, ClamAV, and local route dependencies | |
| shell: bash | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y postgresql-common nginx jq openssl ca-certificates | |
| sudo apt-get install -y clamav-daemon clamav-freshclam | |
| 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: Start the maintained ClamAV daemon | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| sudo systemctl stop clamav-freshclam.service | |
| sudo freshclam --quiet | |
| sudo systemctl start clamav-freshclam.service | |
| # Use the distribution's own local socket rather than reconfiguring | |
| # the maintained daemon; the package has no clamd.conf.d directory. | |
| sudo systemctl restart clamav-daemon.service | |
| for _ in $(seq 1 180); do | |
| if sudo clamdscan --ping 1 >/dev/null 2>&1; then | |
| sudo test -S /var/run/clamav/clamd.ctl | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| echo "clamd did not answer on /var/run/clamav/clamd.ctl" >&2 | |
| sudo journalctl -u clamav-daemon.service --no-pager -n 40 >&2 || true | |
| exit 1 | |
| - name: Run clean installed-artifact setup lifecycle | |
| shell: bash | |
| run: scripts/ci/ordinary-server-setup-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 | |
| for path in \ | |
| /opt/agentnet-e2e \ | |
| /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 \ | |
| /etc/nginx/sites-enabled/agentnet-e2e \ | |
| /etc/nginx/sites-available/agentnet-e2e \ | |
| /usr/local/share/ca-certificates/agentnet-e2e.crt \ | |
| /etc/ssl/certs/agentnet-e2e.crt \ | |
| /etc/ssl/certs/agentnet-e2e.pem \ | |
| /etc/ssl/private/agentnet-e2e.key \ | |
| "$RUNNER_TEMP/agentnet-ordinary-server-e2e"; do | |
| ! sudo test -e "$path" | |
| done | |
| ! grep -Fq '# agentnet-e2e' /etc/hosts | |
| HBA_FILE="$(sudo -u postgres psql -Atq --dbname=postgres -c 'SHOW hba_file')" | |
| ! sudo grep -Fq '# agentnet-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" ]] | |
| ubuntu-24-installed-roundtrip: | |
| name: Ubuntu 24.04 / installed package communication roundtrip | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| persist-credentials: false | |
| - 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 Linux process sandbox | |
| shell: bash | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y apparmor-profiles apparmor-utils bubblewrap | |
| sudo install -m 0644 \ | |
| /usr/share/apparmor/extra-profiles/bwrap-userns-restrict \ | |
| /etc/apparmor.d/bwrap-userns-restrict | |
| sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict | |
| bwrap --unshare-user --die-with-parent --ro-bind / / /usr/bin/true | |
| - name: Install locked package tooling | |
| run: npm ci --ignore-scripts | |
| - name: Run installed package communication and obligation roundtrip | |
| run: npm run check:packed |