Rename testClient/main.go into testClient/rest/test-rest-endpoints.go and add
testClient/mcp/test-mcp-endpoints.go which tests the /mcp Streamable HTTP
endpoint via an x402-aware MCP client. Update the test-endpoints workflow to
run the MCP tests first, and decode/print the 402 challenge when a paid REST
retry is rejected.
- PayAI facilitator supports both exact and upto schemes on Base Sepolia
- Workflow and start-test-server.sh: X402_FACILITATOR_URL -> https://facilitator.payai.network
- check-facilitator: handles payai.network as no-auth facilitator like Mogami
- Workflow: X402_FACILITATOR_URL -> https://v2.facilitator.mogami.tech/
- start-test-server.sh: same facilitator URL
- check-facilitator: auto-detects facilitator type, skips auth for Mogami
- This unblocks CI testing while CDP facilitator auth is investigated
- New cmd/check-facilitator/main.go uses internal/server auth package (same logic as server)
- CI workflow builds and runs binary instead of inline script
- Ensures auth logic matches server exactly, eliminates drift
- Prints supported networks/kinds from facilitator /supported endpoint
- New step 'Check Facilitator Supported Networks' queries CDP facilitator /supported endpoint with proper auth
- Uses same CDP auth logic as server (JWT with keyName/privateKey)
- Prints supported networks/kinds to verify Base Sepolia (eip155:84532) support
- Runs before starting test server to catch facilitator config issues early
- x402: wrap payment middleware to log verify failures (decoded PAYMENT-REQUIRED with scheme/network/asset/amount/payTo per accept) and settlement errors
- x402: add verifyErrorCapture and decodePaymentRequiredHeader for structured error logging
- start-test-server.sh: build binary first (go build -o /tmp/mcpserver), run with output redirected to log file, wait 2s on shutdown for log flush
- workflow: Cleanup uses kill -TERM + sleep 2 to let server flush logs
- main.go: defer log.Close() to flush slog handlers on shutdown
- All tests pass, gofmt/go vet clean
- x402: add detailed settlement success/error logging per tool (network, tx, payer, amount) and ErrorHandler for settlement failures that currently return a new 402
- server_init: log persisting HTTP and MCP settlements with transaction details
- workflow: dump /tmp/mcpserver-test.log on failure and tail 500 lines on always for debugging Base Sepolia exact/upto flows
- ollama image takes >60s and healthcheck curl fails inside container
(marking service not healthy and aborting job before steps run).
Remove ollama healthcheck from services, let Wait steps poll.
- Wait for PostgreSQL/Ollama try both localhost and service hostnames
(postgres / ollama) for 60-90 retries, as Act network is
WORKFLOW-* where localhost != service.
- Pull models via HTTP POST /api/pull to whichever host responds
(no docker exec needed for services).
- start-test-server.sh: respect GOOSE_DBSTRING/OLLAMA_HOST from env,
auto-detect postgres/ollama service hostnames if localhost not reachable.
setup-docker-action requires --privileged + iptables + bridge NAT
(failed: Permission denied, nft netlink Operation not permitted,
iptables v1.8.9 nf_tables even as root). Runner job container is
unprivileged, and host dind socket not mounted (/var/run/docker.sock
no such file). Switch to services: postgres pgvector/pg16 and
ollama/ollama:latest as job services on node20 (has node for checkout),
so no docker CLI/daemon needed inside job. Wait via pg_isready
(apt install postgresql-client if missing) and curl /api/tags, pull
models via Ollama HTTP API POST /api/pull (no docker exec). Keeps
manual wallet funding, self-contained via services.
setup-docker-action starts dockerd inside job requiring bridge
NAT chain (iptables) and --privileged. node:20-bookworm has no
sudo/iptables, causing iptables not found / bridge driver failure.
Add apt install sudo+iptables before setup and run job container
privileged so self-contained dockerd can start; keeps host dind
fallback not needed. Host dind socket not mounted (no such file),
so nested daemon is required.
setup-docker-action@v5 starts dockerd via sudo; node:20-bookworm
image runs as root without sudo binary, causing
/bin/sh: 1: sudo: not found / exit 1. Install sudo via apt-get when
missing so self-contained dockerd can start. Keeps runs-on: node20
(has node for checkout) + dind host, no custom image needed.
- runs-on node20 has node for checkout, use docker/setup-docker-action@v5
for self-contained dockerd (no host dind dependency) instead of
setup-compose only
- install: drop foundry/cast and bc (manual funding) -> go mod download only
- remove Fund Test/Server Wallet steps, FUNDING_FAUCET_URL env
- docker-compose -> docker compose via setup-docker, add logs on wait failures
- Pull Ollama Models step now uses ${EMBEDDING_MODEL} and ${STYLE_MODEL}
- Values sourced from config/models.env in Load model config step
---
- Use $FORGEJO instead of $GITHUB variables
- config/models.env: EMBEDDING_MODEL and STYLE_MODEL defaults
- config.go: loads models.env by finding project root (go.mod), removes hardcoded defaults
- test-endpoints.yaml: sources config/models.env to set env vars for CI
- Works from any working directory (server, tests, CI)
- Instruction-tuned variant for reliable prompt following
- Q4_K_M quantization for CPU latency optimization
- Updated test workflow to pull correct model
- testClient: add ensureFundedWallet() with USDC/ETH balance checks and faucet requests
- fund-wallet.sh: update faucet format for Coinbase CDP API
- start-test-server.sh: use Coinbase facilitator URL, add payment endpoint verification
- test-endpoints.yaml: fund test wallet before server, pass RPC/Faucet URLs to test client