|
| 1 | +# Redeploy x402.sentinel.co |
| 2 | + |
| 3 | +The latest image is built and pushed. The host needs to pull and restart. |
| 4 | + |
| 5 | +## What changed (commits since the running build) |
| 6 | + |
| 7 | +| SHA | Title | |
| 8 | +|---|---| |
| 9 | +| `7099f15` | server: fix manifest URLs (x402.blue → x402.sentinel.co, repo links) | |
| 10 | +| `3d14045` | docs: fix dead x402.blue URL, add USDC bootstrap section *(docs-only, no code)* | |
| 11 | +| `1b1fdb9` | treewide: rename `blue-agent-connect` → `blue-js-sdk/ai-path` | |
| 12 | +| `4f04835` | server: add `GET /manifest` + `/nodes` for AI-agent discovery | |
| 13 | +| `a10db35` | dashboard: restructure on EventEmitter-based SSE pattern *(dashboard-only)* | |
| 14 | + |
| 15 | +The running build is **46+ hours old** and predates all of these. |
| 16 | + |
| 17 | +## Why this matters |
| 18 | + |
| 19 | +Currently the server's 200 response from `POST /vpn/connect/<tier>` ships: |
| 20 | +```json |
| 21 | +"instructions": "import { connect } from 'blue-agent-connect'; ..." |
| 22 | +``` |
| 23 | + |
| 24 | +That package name is dead — it was renamed to `blue-js-sdk/ai-path`. The corrected source is in `7099f15`. The full flow works because the docs (HTML + llms.txt) teach the correct import, but agents that read the response's `instructions` field get bad copy-paste. |
| 25 | + |
| 26 | +Also the manifest at `GET /manifest` currently 404s (route added in `4f04835`) — the discovery surface AI agents are supposed to hit first. |
| 27 | + |
| 28 | +## Image |
| 29 | + |
| 30 | +GHCR built and pushed by `.github/workflows/build.yml` on push to master. |
| 31 | + |
| 32 | +- **Latest tag:** `ghcr.io/sentinel-bluebuilder/x402:latest` |
| 33 | +- **Pinned by SHA:** `ghcr.io/sentinel-bluebuilder/x402:7099f1532faaaf0e0c40c81f63b842c9d3787c69` |
| 34 | +- CI run: https://github.com/Sentinel-Bluebuilder/x402/actions/runs/26253289974 (✅ success, 55s) |
| 35 | + |
| 36 | +If `ghcr.io/sentinel-bluebuilder/x402` is private, the host may need a `docker login ghcr.io` with a token that has `read:packages`. |
| 37 | + |
| 38 | +## Redeploy |
| 39 | + |
| 40 | +Whatever orchestrator is running it (compose / systemd / k8s / bare docker), the recipe is: |
| 41 | + |
| 42 | +```bash |
| 43 | +docker pull ghcr.io/sentinel-bluebuilder/x402:latest |
| 44 | +docker stop x402 && docker rm x402 # adjust container name |
| 45 | +docker run -d \ |
| 46 | + --name x402 \ |
| 47 | + --restart unless-stopped \ |
| 48 | + -p 4020:4020 \ |
| 49 | + -p 4021:4021 \ |
| 50 | + --env-file /path/to/server/.env \ |
| 51 | + ghcr.io/sentinel-bluebuilder/x402:latest |
| 52 | +``` |
| 53 | + |
| 54 | +If they use `docker compose`: |
| 55 | + |
| 56 | +```bash |
| 57 | +docker compose pull |
| 58 | +docker compose up -d |
| 59 | +``` |
| 60 | + |
| 61 | +## Verify after restart |
| 62 | + |
| 63 | +```bash |
| 64 | +# Uptime should reset to seconds, not hours |
| 65 | +curl -s https://x402.sentinel.co/health |
| 66 | +# {"status":"ok","uptime":12.345} |
| 67 | + |
| 68 | +# Manifest must respond (currently 404 on the old build) |
| 69 | +curl -s https://x402.sentinel.co/manifest | head -c 200 |
| 70 | + |
| 71 | +# Nodes route must respond (currently 404 on the old build) |
| 72 | +curl -s https://x402.sentinel.co/nodes |
| 73 | + |
| 74 | +# A real provisioning call's instructions string must reference blue-js-sdk/ai-path |
| 75 | +# (no easy curl — running the end-to-end test from fresh-test/connect-docs-driven.mjs |
| 76 | +# is the cleanest check; verifies instructions field has the correct package name) |
| 77 | +``` |
| 78 | + |
| 79 | +## Env vars (no changes from current `.env`) |
| 80 | + |
| 81 | +Nothing new is required. The image reads the same variables it always has: |
| 82 | + |
| 83 | +| Required | | |
| 84 | +|---|---| |
| 85 | +| `OPERATOR_ADDRESS` | EVM wallet receiving USDC on Base | |
| 86 | +| `FACILITATOR_PRIVATE_KEY` | EVM key with ETH on Base for facilitator gas | |
| 87 | +| `SENTINEL_OPERATOR_MNEMONIC` | 12-word Sentinel mnemonic with P2P | |
| 88 | +| `SENTINEL_PLAN_ID` | Sentinel plan ID with leased nodes (currently 243) | |
| 89 | + |
| 90 | +| Optional (defaults shown) | | |
| 91 | +|---|---| |
| 92 | +| `PORT=4020` | Server port | |
| 93 | +| `FACILITATOR_PORT=4021` | Self-hosted facilitator port | |
| 94 | +| `BASE_NETWORK=eip155:8453` | Base mainnet | |
| 95 | +| `SENTINEL_RPC_URL=https://rpc.sentinel.co:443` | | |
| 96 | +| `SENTINEL_LCD_URL=https://lcd.sentinel.co` | LCD fallback | |
| 97 | + |
| 98 | +## Rollback |
| 99 | + |
| 100 | +If anything misbehaves, pin to the previous good SHA: |
| 101 | + |
| 102 | +```bash |
| 103 | +docker pull ghcr.io/sentinel-bluebuilder/x402:1b1fdb9... # last known-good SHA |
| 104 | +# or any earlier tag from https://github.com/Sentinel-Bluebuilder/x402/pkgs/container/x402 |
| 105 | +``` |
| 106 | + |
| 107 | +The currently running build corresponds to a SHA from ~2026-05-19 — we don't know exactly which, but `:1b1fdb9...` is a safe rollback (it's behind by only 2 commits, both narrow scope). |
| 108 | + |
| 109 | +## Risk |
| 110 | + |
| 111 | +- **Low.** The server's TS build is clean. Routes added (`/manifest`, `/nodes`) are additive. The `instructions` string change is a pure string. No schema changes, no DB migrations, no env-var changes. |
| 112 | +- **Tested:** end-to-end test against the *current* server passes today (Romania node, 24.9s, zero friction). The new image only differs in: (1) `instructions` field content, (2) two new GET endpoints, (3) manifest URLs in the manifest body. |
| 113 | + |
| 114 | +## Contact for questions |
| 115 | + |
| 116 | +The end-to-end test that validates everything is: |
| 117 | + |
| 118 | +```bash |
| 119 | +cd fresh-test |
| 120 | +node connect-docs-driven.mjs |
| 121 | +``` |
| 122 | + |
| 123 | +It costs ~$0.033 USDC (1-day tier) on Base, connects through a real Sentinel node, and disconnects cleanly. Run it before and after the redeploy to compare. |
0 commit comments