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(sniper): document the exit reasons, the deploy path, and the subsystem env vars

nirholas698098856624
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d69364428..68ee56b18 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
## 2026-08-11
+- **A Launch Copilot market-maker now tells you when its engine is not running**: The Launch Copilot dashboard showed an armed market-maker the same way whether or not a worker was actually sweeping it, so a saved floor and budget could sit there looking like a maker at work while nothing executed. The policy view now reads the engine's own heartbeat and, when no engine has checked in, the dashboard says so plainly: your policy, floor and budgets are saved and untouched, but no action will execute until it is back. (`/launch`) `[improvement]`
- **A selfie with no visible face now tells you so, instead of "generation failed"**: Photo-to-avatar could not tell you the one thing that would fix your upload. When the engine found no face in a photo (a hooded figure, a back view, a landscape), it reported that rejection as an anonymous internal error, so the site fell back to a generic "Generation failed. Try a different prompt." You now get the real reason and can act on it: reword the prompt, or use a clear front-facing shot. Rejected uploads also stopped filing themselves as service outages in our error logs, so a genuine failure is visible now instead of buried among them. (`/create`) `[fix, improvement]`
- **A watched agent card no longer promises a live browser that is never coming**: Every agent on the live wall always has its zero-cost activity feed, and watching one can also start a real browser that casts what the agent is doing. When no caster was running, the card still said "warming up" and sat there forever, because the wall assumed a browser was on its way the moment you watched. The wall now checks whether a caster pool is actually running: if one is, you get the same warming and queue-position handoff as before; if none is, the card stays on the honest activity view instead of spinning. The caster itself also got its deploy fixed: its container pinned a browser build its own library no longer matched, so the image would have failed on its first cast, and it now ships as a normal always-on service with a health endpoint that reports exactly which agents it is casting. (`/agents-live`) `[fix, infra]`
- **Background removal in the Forge is faster, keeps phone photos the right way up, and says when the link is the problem**: Cutting the background out of an image is the step that runs before most 3D generations, and it was doing avoidable work: every image was re-encoded to PNG on the way in, which on a 12 megapixel photo cost more time than the cutout itself. That round trip is gone, so the step now takes about a third of the time, and because the original file goes straight to the model, a photo taken on a phone comes back the way up you took it instead of on its side. Failures explain themselves now too: a link that answers "not found" or "forbidden", a file that is not an image, or a truncated paste all used to come back as an unexplained server error, and now say which of those happened so you can fix the input. (`/forge`) `[improvement, fix]`
@@ -15,6 +16,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Motion Swap's guide now describes the hand and finger capture it has been doing all along**: The Motion Swap guide described body tracking only, so a reader had no way to know the capture also follows both hands, takes wrist rotation from the palm itself, and solves every finger joint, or that it holds your last handshape when your hands leave the frame. The guide and the capture worker's README now cover all of that, plus the exact files a capture produces, every setting the worker reads, and how to run a real capture on your own machine to check a change before it ships. The worker also gained a second test suite covering the parts around the motion solver: the authentication and input rules on its API, the video normalization step, the person-mask video, and the guard that refuses to fetch a video address pointing at our own internal infrastructure. (`/motion-swap`) `[docs, improvement]`
- **Photo to 3D no longer fails when the image host has one slow moment**: Turning a photo into a 3D model starts by downloading the image you pointed at. If that download stalled for even a moment, the whole generation failed and you had to start over. The image is now fetched up to three times with a growing pause between tries, so a single slow moment costs a couple of seconds instead of the job. When an image genuinely cannot be used, the failure now names the reason and the host (unreachable, HTTP 404, not a decodable image) instead of an opaque error code, so you can tell a broken link from a hiccup. (`/create`) `[fix, improvement]`
- **Sending your agent a task on its live screen actually works again**: The agent screen lets you queue a task for your own agent and watch it browse the web to carry it out. None of that path worked. Queuing a task failed on the server because it looked your agent up in a table that does not exist, so the browser worker polled forever and never saw a task. The worker was broken twice over on its own side too: it read the agent's id from the wrong place, so every frame it published was rejected before it reached the stream, and it drove the browser through a method that moved in version 3 of the automation library, so typing, clicking, reading a page, and even taking a screenshot all failed. All three are fixed and the worker now runs end to end: it picks up your task, navigates, narrates each step, and streams real screenshots. The same bad lookup also blocked grinding a vanity wallet address for an agent, which is fixed as well. (`/agent-screen`) `[fix]`
+- **Sniper positions that exit on a dead market now close properly**: When a sniped coin's market went quiet, the worker sold the bag on-chain but could not record the close, because the database did not recognise the reason it gave. The sale had already happened, so the position was reset and retried forever: it never booked its profit or loss and it kept holding one of the agent's position slots. Those exits now record correctly, the freed slots go back to the agent, and the trade card names the exit in plain language instead of leaving it blank. `[fix]`
- **Stylizing a model no longer throws away the finished result over a momentary network hiccup, and plain models keep their intended color**: The stylize filters (voxel, brick, voronoi shell, low-poly) rebuild your model and then upload the result to storage. A brief interruption on that last upload step was not retried, so roughly once a week a job that had already done all its work was reported to you as failed. That upload now retries by itself. Two more repairs ride along: a model that carries no colors of its own now comes back in the soft neutral tone the filters were designed around, instead of the flat gray the geometry library hands out by default, and a model with no size at all is refused with a clear reason rather than returning a file with nothing visible in it. (`/forge`) `[fix, improvement]`
- **The 3D forge now tells a broken GPU worker apart from a healthy one, and stops routing your generation at it**: Our own Hunyuan3D image-to-3D workers answer web requests within seconds of starting, then spend several minutes loading multi-gigabyte model weights in the background. The platform checked only whether a worker answered at all, so a worker that had answered but then failed to load its model looked exactly as healthy as a working one: the forge status page showed it green and generations kept being sent to it. Both the status page and the routing that picks a backend now read the worker's real readiness, so a worker that cannot generate is reported as down and skipped, and one that is still warming up is marked as such instead of promising a fast turnaround it cannot deliver. (`/forge`) `[fix, infra]`
- **The market anchor keeps real headlines on air when its intel feed goes down**: The newsroom anchor on the agent screen builds every bulletin from a paid narrative-intel feed, and when that subscription started being refused the anchor was left reading a price-only bulletin with nothing to say. It now falls back to the platform's own aggregated news feed, narrowed to major publishers, so the anchor still leads with real, attributed headlines. The fallback only fires when the primary feed comes back empty, and the anchor still refuses to name any ticker other than $THREE. (`/agent-screen`) `[fix, improvement]`
diff --git a/data/changelog.json b/data/changelog.json
index fd6089dcf..0e00d0e13 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,14 @@
{
"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-08-11",
+ "title": "Sniper positions that exit on a dead market now close properly",
+ "summary": "When a sniped coin's market went quiet, the worker sold the bag on-chain but could not record the close, because the database did not recognise the reason it gave. The sale had already happened, so the position was reset and retried forever: it never booked its profit or loss and it kept holding one of the agent's position slots. Those exits now record correctly, the freed slots go back to the agent, and the trade card names the exit in plain language instead of leaving it blank.",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-08-11",
"title": "A Launch Copilot market-maker now tells you when its engine is not running",
diff --git a/public/changelog.json b/public/changelog.json
index d69f9e541..341d5a63e 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,11 +1,21 @@
{
- "generated_at": "2026-08-11T01:58:57.266Z",
+ "generated_at": "2026-08-11T02:02:28.997Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
"entries": [
+ {
+ "date": "2026-08-11",
+ "type": "update",
+ "title": "A Launch Copilot market-maker now tells you when its engine is not running",
+ "summary": "The Launch Copilot dashboard showed an armed market-maker the same way whether or not a worker was actually sweeping it, so a saved floor and budget could sit there looking like a maker at work while nothing executed. The policy view now reads the engine's own heartbeat and, when no engine has checked in, the dashboard says so plainly: your policy, floor and budgets are saved and untouched, but no action will execute until it is back.",
+ "link": "/launch",
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-08-11",
"type": "update",
@@ -103,6 +113,16 @@
"fix"
]
},
+ {
+ "date": "2026-08-11",
+ "type": "update",
+ "title": "Sniper positions that exit on a dead market now close properly",
+ "summary": "When a sniped coin's market went quiet, the worker sold the bag on-chain but could not record the close, because the database did not recognise the reason it gave. The sale had already happened, so the position was reset and retried forever: it never booked its profit or loss and it kept holding one of the agent's position slots. Those exits now record correctly, the freed slots go back to the agent, and the trade card names the exit in plain language instead of leaving it blank.",
+ "link": null,
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-08-11",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 3f20ea129..a57de17ab 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -6,6 +6,14 @@
<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/>
<description>What's new on three.ws: features, improvements, and releases, newest first.</description>
<language>en</language>
+ <item>
+ <title>A Launch Copilot market-maker now tells you when its engine is not running</title>
+ <link>https://three.ws/launch</link>
+ <guid isPermaLink="false">2026-08-11:A Launch Copilot market-maker now tells you when its engine is not running</guid>
+ <pubDate>Tue, 11 Aug 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>The Launch Copilot dashboard showed an armed market-maker the same way whether or not a worker was actually sweeping it, so a saved floor and budget could sit there looking like a maker at work while nothing executed. The policy view now reads the engine's own heartbeat and, when no engine has checked in, the dashboard says so plainly: your policy, floor and budgets are saved and untouched, but no action will execute until it is back.</description>
+ </item>
<item>
<title>A selfie with no visible face now tells you so, instead of &quot;generation failed&quot;</title>
<link>https://three.ws/create</link>
@@ -78,6 +86,14 @@
<category>fix</category>
<description>The agent screen lets you queue a task for your own agent and watch it browse the web to carry it out. None of that path worked. Queuing a task failed on the server because it looked your agent up in a table that does not exist, so the browser worker polled forever and never saw a task. The worker was broken twice over on its own side too: it read the agent's id from the wrong place, so every frame it published was rejected before it reached the stream, and it drove the browser through a method that moved in version 3 of the automation library, so typing, clicking, reading a page, and even taking a screenshot all failed. All three are fixed and the worker now runs end to end: it picks up your task, navigates, narrates each step, and streams real screenshots. The same bad lookup also blocked grinding a vanity wallet address for an agent, which is fixed as well.</description>
</item>
+ <item>
+ <title>Sniper positions that exit on a dead market now close properly</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-08-11:Sniper positions that exit on a dead market now close properly</guid>
+ <pubDate>Tue, 11 Aug 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>When a sniped coin's market went quiet, the worker sold the bag on-chain but could not record the close, because the database did not recognise the reason it gave. The sale had already happened, so the position was reset and retried forever: it never booked its profit or loss and it kept holding one of the agent's position slots. Those exits now record correctly, the freed slots go back to the agent, and the trade card names the exit in plain language instead of leaving it blank.</description>
+ </item>
<item>
<title>Stylizing a model no longer throws away the finished result over a momentary network hiccup, and plain models keep their intended color</title>
<link>https://three.ws/forge</link>
diff --git a/public/features.json b/public/features.json
index e5a0037eb..3b7c6fba2 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-11T01:58:57.245Z",
+ "generated_at": "2026-08-11T02:02:28.989Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/workers/agent-sniper/README.md b/workers/agent-sniper/README.md
index b70333249..5fca56c9a 100644
--- a/workers/agent-sniper/README.md
+++ b/workers/agent-sniper/README.md
@@ -35,6 +35,21 @@ It is deliberately **not** a scheduled cron: periodic ticks can't snipe a launch
| `positions.js` | `runPositionSweep` — re-quotes open positions (curve OR AMM) and triggers exits. |
| `graduation-ride.js` | `graduationRideGate` (pure, tested) + `executeBoostRideBuy` — the BOOST-window entry: gate the migration event, wait for the new AMM pool, buy via `executeBuy` with `venue:'amm'`. |
| `amm-exit.js` | `quoteAmmSell` / `buildAmmSellInstructions` / `isGraduated` — post-graduation AMM pricing + sell build (shared with the user-driven path's pool resolution). |
+| `exit-logic.js` | `decideExit` / `decideLadderedExit`: the pure exit brain. No I/O and no clock of its own, so it is fully unit-tested and replayable. |
+| `reconcile.js` | `reconcileVanishedBag` / `getWalletBaseBalance` makes the CHAIN the source of truth when a sell's confirmation was lost. |
+| `mayhem-gate.js` | The Mayhem exclusion gate (guardrail 8), reading `isMayhemMode` off the bonding curve through the rotating RPC chain. |
+| `oracle-gate.js` / `oracle-crossing.js` | Oracle conviction gate, and the `oracle_crossing` trigger that fires when a coin's conviction crosses upward. |
+| `llm-judge.js` / `judge-knowledge.js` | The `decision_mode='llm'` verdict path, and the tiered budget of what each arm's judge is allowed to see. |
+| `prelaunch-radar.js` + `radar-detect.js` / `radar-scorer.js` / `radar-watchlist.js` | Pre-launch creator-wallet radar: on-chain precursor detection, pure scoring, and the watchlist it works from. |
+| `alpha-hunt.js` | Pure scorer for the `alpha_hunt` strategy. |
+| `swarm.js` | Trading-swarm consensus + settlement loops. |
+| `market-maker.js` | Range-based market maker on pump.fun coins, executed through Jito. |
+| `launcher.js` / `auto-claimer.js` | Autonomous coin launcher, and the creator-fee auto-claimer for agent-launched coins. |
+| `auto-funder.js` | Buy-side auto-funding loop that refills armed agents from the launcher master wallet. |
+| `journal.js` | Trade journal, the "learn what works" surface behind the reasoning ledger. |
+| `heartbeat.js` / `error-tracker.js` / `alerts.js` | Liveness heartbeat, sliding-window error tracker, and ops alerting. |
+| `log.js` / `screen-push.js` | Structured logging, and the fire-and-forget push to the agent screen stream. |
+| `recompute-wallet-graph.js` | The Smart-Money Wallet Graph recompute job. |
State lives in two tables (migrations `…20260615020000_agent_sniper.sql` +
`…20260615030000_sniper_first_claim.sql`): `agent_sniper_strategies` (owner-armed
@@ -125,6 +140,36 @@ Enforced in `executeBuy`, short-circuiting before any transaction:
> `node scripts/sniper-reconcile-wedged.mjs` (re-reads every real on-chain balance
> and skips anything still holding tokens).
+## Exit reasons
+
+`exit-logic.js` decides *whether* to exit and *what fraction* to sell;
+`executeSell` writes the outcome to `agent_sniper_positions.exit_reason`. The
+full set the worker can produce:
+
+| Reason | Fired by | Meaning |
+|--------|----------|---------|
+| `stop_loss` | `decideExit` | Hard stop. Always a FULL exit, and it outranks every other reason. |
+| `trailing_stop` | `decideExit` | Gave back `trailing_stop_pct` from the position's peak. |
+| `take_profit` | `decideExit` | Reached `take_profit_pct`. |
+| `timeout` | `decideExit` | Held past `max_hold_seconds`. |
+| `signal_flip` | `decideExit` | Paid x402 sentiment turned confidently bearish on an UNDERWATER position. Opt-in via `SNIPER_EXIT_ON_BEARISH`. |
+| `take_initials` | `decideLadderedExit` | The ladder sold enough to recover the initial cost basis. Normally a PARTIAL sell that leaves a moon bag riding; it only books the position closed when the fraction rounds down to a full exit. |
+| `liquidity_decay` | `positions.js` | The market went dead: quoted value stopped moving for `SNIPER_LIQUIDITY_DECAY_S`. Exits and frees the concurrency slot. A position already on house money keeps its moon bag. |
+| `kill_switch` | `positions.js` | The agent's `kill_switch` column was set; open positions exit at market. |
+| `manual` | `/api/sniper/close` | Closed by the owner. |
+| `graduated` | exit path | Booked against the post-graduation AMM rather than the dead curve. |
+| `error` | `executeSell` | The bag is provably gone but its proceeds are unknowable (`error='reconcile_unresolved'`), so P&L is left NULL rather than invented. |
+
+> **These values are constrained in the database.** `agent_sniper_positions` has a
+> CHECK on `exit_reason`, so adding a reason in JavaScript without widening that
+> constraint produces a close that the database rejects *after* the sell has
+> already landed on-chain. `executeSell` treats any failure of that write as a
+> retryable sell and resets the row to `open`, so the position re-sells nothing,
+> re-fails, and wedges forever while holding a concurrency slot. This is not
+> hypothetical: `liquidity_decay` shipped that way and never once booked an exit.
+> `tests/sniper-exit-reason-constraint.test.js` now pins the two lists together;
+> a new reason must land in a migration in the same change.
+
## Decision modes and the experiment fleet
Every strategy row carries a `decision_mode`:
@@ -199,6 +244,32 @@ scoreboard renders it as the "Judgment ledger" section on /sniper/experiments.
| `SNIPER_CLAIM_POLL_MS` | | `30000` | First-claim trigger: fee-claim poll cadence. |
| `SNIPER_CLAIM_LOOKBACK_S` | | `600` | First-claim trigger: window scanned each poll (must exceed the poll interval). |
| `SNIPER_CLAIM_MAX_AGE_S` | | `300` | First-claim trigger: default freshness gate (per-strategy override available). |
+| `SNIPER_LIQUIDITY_DECAY_S` | | `300` | Exit a position whose quoted value has not moved for this long (the `liquidity_decay` exit). `0` disables. |
+| `SNIPER_EXIT_ON_BEARISH` | | `0` | Arm the `signal_flip` exit: read paid sentiment on an underwater position and cut it early. |
+| `SNIPER_EXIT_BEARISH_MIN_CONFIDENCE` | | `0.7` | Confidence floor a bearish verdict must clear before `signal_flip` fires. |
+| `SNIPER_MIN_TRADE_LAMPORTS` | | `10000` | Floor on any single trade; smaller sizes are skipped rather than broadcast as dust. |
+| `SNIPER_STRATEGY_REFRESH_MS` | | `15000` | How often the active-strategy cache is refreshed (floor 5000). |
+| `SNIPER_FEED_WATCHDOG_MS` | | `180000` | Reconnect the mint feed if it goes silent this long (floor 30000). |
+| `SNIPER_HEARTBEAT_MS` | | `30000` | Liveness heartbeat cadence (floor 10000). |
+| `SNIPER_HEARTBEAT_SELF_HEAL_MS` | | see `config.js` | How long a stalled subsystem may run before the heartbeat restarts it. |
+| `SNIPER_ERROR_ALERT_THRESHOLD` / `SNIPER_ERROR_ALERT_WINDOW_MS` | | see `config.js` | Sliding-window error count and window that trip an ops alert. |
+| `SNIPER_ANNOUNCE` | | `1` | Announce worker start/stop. `0` quiets a noisy dev run. |
+
+Subsystem toggles. Each turns a whole side-loop on or off; all default ON except
+where noted, so an unset variable runs the full worker:
+
+| Var | Default | Notes |
+|-----|---------|-------|
+| `SNIPER_INTEL` | `1` | Coin-intel enrichment. `0` for a trade-only worker. Tuned by `SNIPER_INTEL_LLM`, `SNIPER_INTEL_MAX_CONCURRENT`, `SNIPER_INTEL_WINDOW_MS`. |
+| `SNIPER_RADAR` | `1` | Pre-launch creator-wallet radar. `0` degrades to feed-only entries. Tuned by the `SNIPER_RADAR_*` family (`_POLL_MS`, `_MAX_AGE_MS`, `_MAX_WATCH`, `_MIN_FUNDING_LAMPORTS`, `_MIN_GRADUATED`, `_SM_MIN_SCORE`, `_WALLETS_PER_TICK`, `_WATCHLIST_REFRESH_MS`, `_DEPLOY_WATCH_TTL_MS`). |
+| `SNIPER_MARKET_MAKER` | `1` | Range-based market maker. Cadence via `SNIPER_MM_INTERVAL_MS`. |
+| `SNIPER_LAUNCHER` | on iff `AGENT_JWT` | Autonomous coin launcher. Poll cadence via `SNIPER_LAUNCHER_POLL_MS`. |
+| `SNIPER_AUTO_CLAIM` | on iff `AGENT_JWT` | Creator-fee auto-claimer. Poll cadence via `SNIPER_AUTO_CLAIM_POLL_MS`. |
+| `SNIPER_CROSSING_POLL_MS` / `_MAX_AGE_MIN` / `_SCORE_AGE_MIN` | see `config.js` | Oracle conviction-crossing trigger cadence and freshness bounds. |
+| `SNIPER_SENTIMENT_FRESH_MIN` / `SNIPER_RUGPULL_FRESH_MIN` | see `config.js` | How long a cached sentiment or rug-pull read stays usable. |
+
+`config.js` is the authoritative list: every value above is read there through
+`num()` / `bool()` with the default shown.
## Run locally
@@ -212,6 +283,55 @@ Arm a test agent (owned by you, wallet funded with a little SOL) by inserting a
strategy row, then watch it score → open → exit. Flip to `SNIPER_MODE=live`
with tiny caps to land one real trade. `Ctrl-C` drains in-flight buys and exits.
+## Deployment
+
+The worker runs in production as **its own Cloud Run service, `agent-sniper`**
+(project `aerial-vehicle-466722-p5`, region `us-central1`), separate from
+`three-ws-api`. It has no HTTP port: it is a long-lived background process, so
+it runs with `--no-cpu-throttling` and `minScale=maxScale=1` (see the
+single-worker assumption above; a second instance would race the budget and
+concurrency caps).
+
+**It does not ride along with an API deploy.** A fix merged to `main` keeps
+running the old image until this service is explicitly rolled, which has more
+than once made a fixed bug look unfixed. Check what is actually running before
+concluding anything from behaviour:
+
+```bash
+gcloud run services describe agent-sniper --region us-central1 \
+ --project aerial-vehicle-466722-p5 \
+ --format="value(status.latestReadyRevisionName)"
+```
+
+Build (from the REPO ROOT, because the Dockerfile copies `api/`, `src/`, `packages/`,
+and `agent-payments-sdk/`), then roll the service onto the new image:
+
+```bash
+gcloud builds submit --config workers/agent-sniper/cloudbuild.yaml \
+ --region us-central1 --project aerial-vehicle-466722-p5
+
+gcloud run services update agent-sniper --region us-central1 \
+ --project aerial-vehicle-466722-p5 \
+ --image us-central1-docker.pkg.dev/aerial-vehicle-466722-p5/workers/agent-sniper:latest
+```
+
+Both service accounts are pinned deliberately: builds run as `three-ws-build@`
+(the project's default compute SA was deleted, so an unpinned build fails before
+its first step) and the service runs as `agent-sniper-sa@`. That runtime account
+is **not** the API's `three-ws@`, so a permission the API already has is not
+automatically available here. It needs `roles/aiplatform.user` of its own for
+the Vertex rung of the `llmComplete` chain, without which the LLM judge falls
+through to rate-limited free tiers and stops issuing verdicts.
+
+Secrets come from Secret Manager (`sniper-database-url`, `sniper-jwt-secret`,
+`wallet-sniper-master-b64`, `OPENROUTER_API_KEY`); the rest are plain env on the
+service. Update single keys with `--update-env-vars`, never `--set-env-vars`,
+which replaces the entire set.
+
+Some state changes need no deploy at all. The exit-reason CHECK above lives in
+the database, so widening it with `npm run db:migrate` takes effect on the
+already-running worker immediately.
+
## Graduated-position exit
A position whose coin **graduates** off the bonding curve mid-hold is exited