Skip to content

Wallet Admin Review Live Smoke

This smoke is the opt-in gateway proof for the wallet-owned admin review read queue. It validates the non-default route table that sends GET /api/admin/wallet/reviews to wallet-service /v1/admin/wallet/reviews.

It does not promote deploy/gateway/routes.json. Broad /api/wallet, /api/admin/wallet, payment, subscription, and quota routes remain legacy-proxied until their own parity, browser/runtime proof, and rollback evidence exist.

Static Check

Run the cheap route-table and response-envelope self-test in regular coverage:

bash
make test-monetization-routes

That target runs:

bash
WALLET_ADMIN_REVIEW_SELF_TEST=1 bash scripts/test/wallet-admin-review-live-smoke.sh

Local Live Check

Start wallet-service first. The local Compose service exposes it on http://localhost:8097.

Start api-gateway with the non-default localhost route table:

bash
AUTH_JWT_SECRET=local-hoctapaz-development-secret-change-before-deploy \
GATEWAY_ROUTE_TABLE=deploy/gateway/routes.wallet-admin-review-native-localhost-example.json \
HTTP_ADDR=:18091 \
LEGACY_API_BASE_URL=http://localhost:4001 \
go run ./services/api-gateway/cmd/server

Then run the live smoke:

bash
GATEWAY_BASE_URL=http://localhost:18091 \
WALLET_ADMIN_REVIEW_LIVE_CONFIRM=wallet-admin-review-native \
AUTH_JWT_SECRET=local-hoctapaz-development-secret-change-before-deploy \
make test-wallet-admin-review-live

The script mints an HS256 admin access token when no WALLET_ADMIN_REVIEW_AUTHORIZATION or AUTHORIZATION bearer token is provided.

What It Proves

  • /v1/routes exposes the non-default wallet-admin-reviews route with prefix=/api/admin/wallet/reviews, methods=["GET"], exact=true, state=native_read, target_prefix=/v1/admin/wallet/reviews, require_auth=true, and required_roles=["ADMIN"].
  • GET /api/admin/wallet/reviews?limit=5 returns success=true with data.items, data.total, data.limit, data.offset, and data.hasMore.
  • The gateway response headers prove X-Hoctapaz-Gateway-Route: wallet-admin-reviews and X-Hoctapaz-Gateway-Route-State: native_read.
  • GET /api/admin/wallet still routes through admin with legacy_proxy.
  • GET /api/wallet still routes through wallet with legacy_proxy.

Artifacts

Live runs write route-table, response, header, and summary files under:

text
output/qa/wallet-admin-review-live-<timestamp>/

The summary records the gateway base URL, route table, native route, native status, fallback statuses, and the explicit note that the default route table still keeps broad wallet/admin routes legacy-proxied.

Latest Local Evidence

Captured on 2026-07-09 against local wallet-service on 8097 and a temporary api-gateway on 18091:

text
output/qa/wallet-admin-review-live-20260709-092623/

Summary:

CheckEvidence
Route tabledeploy/gateway/routes.wallet-admin-review-native-localhost-example.json
Admin review queueGET /api/admin/wallet/reviews?limit=5 returned 200
Native route headersX-Hoctapaz-Gateway-Route: wallet-admin-reviews, state native_read
Response envelopesuccess=true, empty data.items, total=0, limit=5, offset=0, hasMore=false
Broad admin fallbackGET /api/admin/wallet returned legacy 404 with route admin, state legacy_proxy
Broad wallet fallbackGET /api/wallet returned legacy 404 with route wallet, state legacy_proxy

Current-Run Evidence

On 2026-07-13, the smoke was rerun with a fresh Compose project containing only wallet-service dependencies and a temporary Gateway on 127.0.0.1:18091. The current worktree returned 200 for the exact admin review route with the native route/state headers and the expected empty review envelope. Broad /api/admin/wallet and /api/wallet still matched their legacy routes; the deliberately unreachable legacy upstream made their responses 502, which is expected for this isolated routing proof and does not make them native.

Artifacts are in output/qa/wallet-admin-review-live-20260713/. The temporary Gateway, Compose containers, network, and volumes were removed after the run.

Rollback

Rollback is switching api-gateway back to the default route table:

bash
GATEWAY_ROUTE_TABLE=deploy/gateway/routes.json

Record the artifact directory, gateway route table, token role, and rollback confirmation before requesting default route promotion.

Go-platform documentation is generated from repository Markdown.