Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

docs(ops): flag the agent-sniper worker running a month-old image while trading live

nirholas4ee3c6f7899f
diff --git a/prompts/finish/_context/production-100-OWNER-ACTIONS.md b/prompts/finish/_context/production-100-OWNER-ACTIONS.md
index dea4f44b0..4fff3f68d 100644
--- a/prompts/finish/_context/production-100-OWNER-ACTIONS.md
+++ b/prompts/finish/_context/production-100-OWNER-ACTIONS.md
@@ -9,11 +9,11 @@ it and, if that unblocks a work order, say which one in the owning pack's `produ
Rows carry the date they were added so staleness is visible. Re-verify a row before acting
on it; some resolve themselves as other work lands.
-## Open rows (rows 1, 2, 3, 9, 13, 15 and 16 re-measured 2026-09-04; row 18 cleared that day; the 2026-09-02 and 2026-08-09 passes are folded in below)
+## Open rows (2026-09-09: row 19 added, and row 1 corrected because its outage premise no longer holds; rows 1, 2, 3, 9, 13, 15 and 16 re-measured 2026-09-04; the former row 18 was cleared that day and its number is not reused; the 2026-09-02 and 2026-08-09 passes are folded in below)
| # | Action | Size | Unblocks | Detail lives in |
|---|---|---|---|---|
-| 1 | Approve the production deploy (or say "get production working", which is itself the approval). Re-measured 2026-09-04 08:20 UTC from the Cloud Run origin, not the CDN: production is `c2148462e` on revision `three-ws-api-00413-gbp`, **96 commits** behind `main`. This is no longer only a staleness cost: `/api/healthz` and every `/api/home/*` route answer **HTTP 500** in production with `ERR_MODULE_NOT_FOUND` on `/app/services/home-relay/src/token.js`, because the deployed image was built before `d668ceece` re-included `services/` in the upload allowlist. The fix is committed and unshipped, so only a deploy clears it. | one yes | Nearly everything user-visible in the map, plus the platform health read the campaign scores itself on | [01-ship-readiness.md](../901-production-100-01-ship-readiness.md) |
+| 1 | Approve the production deploy (or say "get production working", which is itself the approval). **The outage this row was written for is CLEARED.** Re-measured 2026-09-09 from the live origin: production serves `880bdcef8` on revision `three-ws-api-00420-ljh`, built 2026-09-08 19:05 UTC, and the `ERR_MODULE_NOT_FOUND` on `/app/services/home-relay/src/token.js` is gone: `/api/healthz` answers **HTTP 200** and `/api/home/status` and `/api/home/connections` answer 401 (auth required) rather than 500. What remains is ordinary staleness, 182 commits behind `main`, which is a routine cadence question and no longer a platform-health emergency. The 2026-09-04 text of this row, which described 96 commits and a 500ing healthz, is superseded. | one yes | Shipping whatever has landed on `main` since 2026-09-08 | [01-ship-readiness.md](../901-production-100-01-ship-readiness.md) |
| 2 | Fund the settle sponsor wallet `WwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW`. Healthz reports `x402_settle` down with `cause: sponsor_floor` (settle 5.9%, 3 of 51 paid attempts over 3 hours, 329 `no_solana_accept`) and the sniper worker out of capital (0.2307 SOL to refill its wallets, funding master holds 0.0250 SOL); no config change moves either. Re-read 2026-09-04 08:21 UTC against mainnet: the sponsor holds **0.001507661 SOL** (1,507,661 lamports), still below the settle floor, so the Solana accept stays withdrawn from every 402 challenge. Two months of re-measurement have only ever moved this number down; nothing on this machine can move it up. | ~1 SOL | x402 settle recovery, backlog 01 retirement, sniper | [../backlog/PROGRESS.md](backlog-PROGRESS.md), 2026-08-02 and 2026-09-01 entries |
| 3 | Decide the stranded customer funds: customers hold about 0.35 SOL behind the retired encryption key and cannot withdraw. Credit (recommended), contact first, or write off. The brief now exists with the measurement, the impossibility argument, the cost of each option and the exact commands: **[docs/ops/stranded-wallets.md](../../docs/ops/stranded-wallets.md)**. Measured 2026-09-02 from production's own records: the platform side is exactly two bot wallets holding 0.142875505 SOL (the reclaim cron has failed on them ~35,700 times each, most recently today), and one customer agent is confirmed by a `wallet_key_retired` withdraw failure (`GemVS5fT958FKRe5fpgizohUYUKE8cUDueEdmB1bmXnm`, 0.250001 SOL). **Both customer wallets are now named** (2026-09-04): the keyed audit was run against production, so this row no longer waits on anything. `GemVS5fT958FKRe5fpgizohUYUKE8cUDueEdmB1bmXnm` holds 0.250001 SOL and `HPL1LfuTdYDwtzJDzsnrmR2ngrrQwLTQyxJszCC4DHsN` holds 0.100001 SOL, 0.350002 SOL across exactly two wallet-auth accounts. Nine of 735 custodial wallets are sealed; the other five customer ones hold nothing. The brief carries the full table. Every input the decision needs is measured. | decision | Closing the support obligation | [docs/ops/stranded-wallets.md](../../docs/ops/stranded-wallets.md), [../backlog/PROGRESS.md](backlog-PROGRESS.md) |
| 4 | Rotate or explicitly accept three credentials, now that the storage half is done. **The config work shipped 2026-09-02**: the economy master key and 58 other plaintext credentials are Secret Manager references on `three-ws-api-00407-m7c`, zero plaintext credentials remain, healthz verified no worse and the master's signing path verified live. What is left is a judgment only the owner can make. (a) The master key was readable in the service config for some window, so decide whether to rotate it or accept that exposure, knowing who held project viewer access in that period; the exact owner-gated commands are in the runbook. (b) `WALLET_ENCRYPTION_KEY` and `JWT_SECRET` hold the SAME value on production, which passes the dedicated-key guard in `secret-box.js` while defeating what it guards; changing it is a re-key with real stranding risk, so it is not an agent's call. (c) `X402_SEED_SOLANA_SECRET_BASE58` holds the same value as `LAUNCHER_MASTER_SECRET_KEY_B64` though `scripts/wire-master-wallet.mjs` assigns those slots to different wallets; decide which is correct. | decision (+ one fund move if rotating) | 03 is otherwise closed | [docs/ops/wallet-key-migration.md](../../docs/ops/wallet-key-migration.md), 2026-09-02 section |
@@ -30,6 +30,7 @@ on it; some resolve themselves as other work lands.
| 15 | Re-authenticate `gcloud` in this workspace (`gcloud auth login`) **only if it stops answering**. This row is a standing warning, not a standing blocker, and 2026-09-04 is the clearest proof yet: `gcloud` answered every call this session with no intervention, and the backlog it had been holding was drained in one sitting. Cleared by that session: row 18 (`MULTIPLAYER_INTERNAL_URL` set, `/api/play/population` now `ok:true`), row 3's keyed audit (both stranded customer wallets named), and the event closeout's log read (`textPayload:"souvenir laurel-meetup"` over 30d returned **zero** lines against a control proving the stream is intact, corroborating the zero-grant finding before the window ages out). **Retry a real call before treating this row as a blocker, and never park work on it.** One dependent genuinely remains and is NOT a gcloud problem: the durable Upstash `player:*` scan needs to execute inside the VPC (the store is at a private `10.128.15.228` SRH proxy, unreachable from this Codespace), and creating the Cloud Run job to do that was refused by the tool policy here. That scan is confirmation only; the log read plus the code argument already settle it. Still gated on a live token when it lapses: the Cloud Scheduler comparison (fix-queue 03) and the fleet checks in quality-bar 03. | minutes, when it lapses | fix-queue 03, quality-bar 03 | CLAUDE.md self-unblock playbook, [PROGRESS.md](event-PROGRESS.md) |
| 16 | Create the `three-ws` GitHub organization and `three-ws/examples` (public), then run the push command `npm run export:satellites` prints. The export now stages 72 files and passes all four smoke stages online (registry, install, links); re-probed 2026-09-03, both the organization and the repository still answer 404. | minutes | roadmap developer-resources retirement | [docs/ops/examples-repo-export.md](../../docs/ops/examples-repo-export.md) |
| 17 | Apple Developer account. The WidgetKit extension, the Mac menu bar app and the iOS target are written and guarded (`npm run check:apple-widget`); the account is what signs them, for a Developer ID Mac build and an App Store iOS build alike. Separately, publish the Android 1.1.0 build (versionCode 2) to Play. | account + minutes | roadmap native-widgets task 4 and its release | [../roadmap/native-widgets.md](../916-roadmap-native-widgets.md) |
+| 19 | Deploy the `agent-sniper` worker, then decide separately whether to arm the Risk Officer. Measured 2026-09-09 against Cloud Run and mainnet: the service runs revision `agent-sniper-00033-rg6`, whose image was built **2026-08-11**, while it trades `SNIPER_MODE=live` right now (heartbeat 6s old, 11 strategies, 3,482 positions, one opened 05:10 UTC that morning). **48 files and about 11,000 lines under `workers/agent-sniper/` are committed and not in that image**, including `amm-exit.js`, which is the roadmap's own named blocker: `executor.js`, `positions.js` and `graduation-ride.js` import it at HEAD, so the running image has no code path that exits a position after its coin graduates. The Risk Officer (`risk-officer.js`, migration already applied in production) has therefore never run in production either: `sniper_risk_reviews` holds 7 rows, all from the 2026-09-04 local verification, and the shadow-evidence query in `workers/agent-sniper/README.md` runs green against the live schema and returns zero rows. The deploy is one command, `npm run deploy:sniper`, dry-run clean on 2026-09-09 (gcloud authed, runtime SA and Artifact Registry repo present, both required secrets present); on an existing service it rolls `gcloud run services update --image`, which preserves the running env, so it does **not** demote the fleet to simulate. Only the optional `telegram-alerts-chat-id` secret is missing, which disables Telegram ops alerting. Arming enforcement is a **separate, later** yes: `SNIPER_RISK_OFFICER=enforce` fleet-wide (via `--update-env-vars`, never `--set-env-vars`) or per strategy via `risk_officer_level`, and it should wait until shadow rows exist to justify it. | one yes now, one decision later | The trading Arena copy-trade loop (graduated-position exits), and all shadow evidence for the Risk Officer | [../918-roadmap-pumpfun-trading-arena.md](../918-roadmap-pumpfun-trading-arena.md), [workers/agent-sniper/README.md](../../workers/agent-sniper/README.md) |
Deleted 2026-09-01: the former row 5 (`WALLET_ENCRYPTION_KEY_PREVIOUS` policy), which
declared itself "delete on reading" and had outlived that by three weeks.
diff --git a/prompts/finish/_context/production-100-PROGRESS.md b/prompts/finish/_context/production-100-PROGRESS.md
index 30d1cfa97..fd61ae2bf 100644
--- a/prompts/finish/_context/production-100-PROGRESS.md
+++ b/prompts/finish/_context/production-100-PROGRESS.md
@@ -555,6 +555,50 @@ Left:
remaining paths were checked back out and verified byte-identical to theirs. No reset, no
amend. The helper now pins `$PARENT` before `read-tree`.
+## 2026-09-09: map (trading Arena retirement pass)
+
+Measured, all against production rather than the tree:
+- `gcloud run services describe agent-sniper` serves revision `agent-sniper-00033-rg6`,
+ whose image was built **2026-08-11T02:04:58Z**, from spec image tag `:latest`.
+- `curl https://three.ws/api/sniper/status` at 05:45 UTC: `mode: live`, heartbeat 6s old,
+ `feedLive: true`, 11 strategies, 1 open position, `globalKill: false`. The fleet is
+ trading real SOL on that August image right now. State reads `degraded` only because 4
+ of 11 agent wallets are starved, which is OWNER-ACTIONS row 2, not a crash.
+- `git log --since=2026-08-11 -- workers/agent-sniper/` is a single sweep commit
+ (`2849cafb6`, subject unrelated to its contents) carrying **48 files and 10,976
+ insertions** under that directory. All of it is committed and none of it is deployed.
+- `amm-exit.js` is inside that undeployed delta and is imported at HEAD by `executor.js`,
+ `positions.js` and `graduation-ride.js`. The arena plan names graduated-position AMM
+ exits as its blocker for copy-trading; the code exists and the running image has none
+ of it.
+- `sniper_risk_reviews` holds 7 rows, every one from 2026-09-04 and two of them
+ `enforced: true`, which is the local verification run, not production. The
+ shadow-evidence query printed in `workers/agent-sniper/README.md` runs green against
+ the live schema and returns zero rows, so the Risk Officer has never reviewed a
+ production trade.
+- `npm run db:status`: all migrations applied, `20260904020000_sniper_risk_officer.sql`
+ included. `npx vitest run tests/sniper-risk-officer.test.js tests/copy-eligibility.test.js`:
+ 42 passed.
+- `npm run deploy:sniper -- --dry-run`: clean. gcloud authed, runtime SA and the `workers`
+ Artifact Registry repo present, both required secrets present, only the optional
+ `telegram-alerts-chat-id` missing. On an existing service it rolls
+ `gcloud run services update --image`, which preserves the running env, so it cannot
+ demote the live fleet to simulate the way applying `cloudrun.yaml` would.
+- `curl https://three.ws/api/version`: `880bdcef8` on `three-ws-api-00420-ljh`, built
+ 2026-09-08 19:05 UTC. `/api/healthz` answers 200 and `/api/home/*` answer 401.
+
+Did: verified every claim the arena plan makes about itself and found them all true, so
+nothing in it needed building. Added OWNER-ACTIONS row 19 for the worker deploy and the
+separate, later decision to arm the Risk Officer. Corrected row 1, whose premise had
+rotted: it still described a 500ing healthz and 96 commits of lag, and that outage is
+cleared. Recorded the finding in the roadmap pack README next to the arena plan's entry.
+
+Left: two owner-gated steps, both on row 19. (1) `npm run deploy:sniper`, which is the
+whole of the first one and is dry-run proven. (2) Arming enforcement afterwards with
+`SNIPER_RISK_OFFICER=enforce` or a per-strategy `risk_officer_level`, which changes what
+real SOL buys and should wait for production shadow rows to justify it. Order 918 stays on
+disk because of (1); nothing in it is unbuilt.
+
## Retire this file when the campaign is done (required)
This file is shared context rather than a single order, so it outlives the
diff --git a/prompts/finish/_context/roadmap-00-README.md b/prompts/finish/_context/roadmap-00-README.md
index a2876c235..dda2b6f50 100644
--- a/prompts/finish/_context/roadmap-00-README.md
+++ b/prompts/finish/_context/roadmap-00-README.md
@@ -96,7 +96,7 @@ retired; they remain readable in git history
|---|---|
| [the Fable playbook](../../docs/internal/fable-playbook.md) | The operating strategy above these work orders: what to run next, the revenue ladder, standing routines. Promoted out of this directory into `docs/internal/` on 2026-09-03, since it is durable strategy rather than a one-shot order. |
| [REUSE-MAP.md](roadmap-REUSE-MAP.md) | License-vetted OSS to integrate instead of reinventing. Check it before building anything here. |
-| [pumpfun-trading.md](../917-roadmap-pumpfun-trading.md), [pumpfun-trading-arena.md](../918-roadmap-pumpfun-trading-arena.md) | Two overlapping strategy documents for the trading product. They are plans, not work orders. The wedge delta was retired on 2026-09-03 (readable in git history) once its inventory was checked against the repo: the wedge itself (`/claim-wallet`), the Trader Passport, the meta-allocator, fade-the-influencer (`/ghost-copy`), the Clip Director and the 3D trading floor had all shipped, and the last unshipped, non-owner-gated mechanic (alpha-drip, tiered release of a leader's signal) shipped with it. What the wedge left open is owner-gated, not unbuilt: a per-copy execution fee is a pricing decision, and a house-bankrolled first trade spends real money per new user. Its §6 consolidation (fold the arena draft into the master plan) stays open on purpose: both drafts predate the em-dash ban, so folding them verbatim would add hundreds of lines that `npm run check:rules` rejects, and rewriting a whole plan's prose to move it is the catastrophic diff that rule exists to avoid. Fold it when one of the two is being rewritten anyway. |
+| [pumpfun-trading.md](../917-roadmap-pumpfun-trading.md), [pumpfun-trading-arena.md](../918-roadmap-pumpfun-trading-arena.md) | Two overlapping strategy documents for the trading product. They are plans, not work orders. The wedge delta was retired on 2026-09-03 (readable in git history) once its inventory was checked against the repo: the wedge itself (`/claim-wallet`), the Trader Passport, the meta-allocator, fade-the-influencer (`/ghost-copy`), the Clip Director and the 3D trading floor had all shipped, and the last unshipped, non-owner-gated mechanic (alpha-drip, tiered release of a leader's signal) shipped with it. What the wedge left open is owner-gated, not unbuilt: a per-copy execution fee is a pricing decision, and a house-bankrolled first trade spends real money per new user. Its §6 consolidation (fold the arena draft into the master plan) stays open on purpose: both drafts predate the em-dash ban, so folding them verbatim would add hundreds of lines that `npm run check:rules` rejects, and rewriting a whole plan's prose to move it is the catastrophic diff that rule exists to avoid. Fold it when one of the two is being rewritten anyway. Re-verified 2026-09-09: everything the arena plan describes is built and its migrations are applied in production, so the arena file stays on disk for one reason only, the owner-gated deploy of the `agent-sniper` worker, whose running image predates a month of committed worker code (including the graduated-position AMM exits the plan names as its blocker) and therefore also predates the Risk Officer that needs production shadow rows before anyone arms it. Tracked as row 19 in [production-100-OWNER-ACTIONS.md](production-100-OWNER-ACTIONS.md). |
## Key surfaces (from STRUCTURE.md)
- Forge: `packages/forge/`, `api/forge*.js`, `api/mcp-3d.js` (free TRELLIS lane + paid tiers + auto-rig, IBM Granite prompt director).