Resource 003 / gateway operations

Gateway token-soup survival guide.

A practical map for surviving bot credentials, profile environments, config files, delivery targets, and proof reports without spreading secrets around.

Public safety status

This guide is public-safe for the owned Ana site. Posting, outreach, lead capture, pricing, client commitments, account changes, provider uploads, and spend stay behind their own approval and safety gates.

Public-facing copy on this page uses synthetic or generic examples and intentionally avoids private filesystem paths, raw platform/channel IDs, credential values, legal promises, and service/pricing commitments.

Gateway token-soup survival guide

Status: public Ana resource. Not provider-authored, platform-authored, or official platform documentation.

Most gateway failures do not start with a bad model. They start with six nearly identical strings, three places to put them, one profile you forgot you were using, and a bot sitting quietly in the wrong channel like a haunted intern.

This guide is for surviving that mess without pasting secrets into chats, docs, screenshots, logs, or agent prompts.

The short version

A working channel setup is not one thing. It is five separate things that must agree:

  1. The bot or app credential proves the gateway may log in.
  2. The profile environment file stores secrets and nothing else.
  3. The config file stores behavior, routing, and enabled platforms.
  4. The channel or thread target tells the gateway where to deliver messages.
  5. The board-pump or job report proves what happened after the setup ran.

If you mix those together, you get token soup. Then someone blames the model. The model did not misconfigure your Discord intent, Kevin.

What this guide does and does not do

This guide does:

This guide does not:

Use the relevant platform documentation for exact current bot/app screens. This is the operational map that keeps the strings from eating your afternoon.

The pieces people confuse

1. Bot or app credential

The bot credential is the private login material for the platform adapter. It belongs in the profile environment file or secret manager, not in public docs, Markdown drafts, screenshots, issue comments, model prompts, or completion metadata.

Safe synthetic shape:

The credential proves the gateway may connect. It does not prove the bot can read a specific channel, see message content, post into a thread, receive events, or deliver Kanban reports.

2. Profile .env

The profile environment file is for secrets and per-profile private values. In Hermes-style profile separation, each profile can have its own environment file. That matters because the default profile, the Ana profile, and a test profile may not share the same gateway credential or delivery target.

Put secret values here. Do not put public behavior decisions here unless the software specifically requires it.

Safe handoff wording:

Unsafe handoff wording:

3. config.yaml

The config file is for behavior: which platforms are enabled, which profile runs the gateway, which model/provider defaults apply, which delivery routes exist, and how jobs should report.

A clean split is:

If the config points to one profile and the credential lives in another, the gateway may fail even when both files look “correct” in isolation.

4. Channel and thread targets

A delivery target is not a credential. It is the destination. For public-safe examples, avoid raw platform IDs and use synthetic labels:

Common failure: the bot is valid, the gateway is running, but the report is aimed at the wrong channel, a missing thread, a topic the bot cannot access, or a delivery target copied from another profile.

5. Gateway status

Gateway status answers: is the adapter running, connected, authorized, and seeing the expected events?

It does not answer:

Gateway connected is necessary. It is not the victory parade. It is the bouncer letting the goblin into the lobby.

6. Board-pump and job reporting

A board-pump, scheduled job, or Kanban worker report is proof of work only if it states what it did, where the durable artifact is, what checks ran, and whether external side effects occurred.

A good internal report says:

A bad report says: “Done.”

“Done” is not proof. “Done” is a sticky note on a trapdoor.

Before you blame the credential

Run this checklist before rotating secrets, rebuilding the bot, or summoning the configuration goblin tribunal.

Intent and permission check

Channel and thread target check

Profile identity check

Delivery target check

Right-agent check

If any answer is “I think so,” treat it as “not verified.” Hope is not an observability layer.

Safe handoff pattern

Use a three-layer handoff.

Layer 1: private secret state

Record privately that the secret exists and where it belongs, without copying it.

Example:

Layer 2: behavior state

Record the non-secret behavior in config notes.

Example:

For public docs, keep this generic. For internal verification notes, use private paths only if the artifact is explicitly internal.

Layer 3: proof state

Record what was tested and what happened.

Example:

Proof is the part another operator can audit without seeing secrets.

Public-copy rules

For public resource drafts:

If you need an example value, use a fake label like CHANNEL_EXAMPLE_ALPHA, not something that looks copied from a real platform.

Minimal troubleshooting flow

  1. Confirm scope. Are you documenting, testing locally, or changing a live gateway? Those are different jobs.
  2. Confirm profile. Name the exact profile that owns the gateway process.
  3. Confirm credential location privately. Do not print the value.
  4. Confirm config behavior. Check which platforms and delivery targets are enabled.
  5. Confirm permissions/intents. Platform dashboards can silently block events even when login succeeds.
  6. Confirm target. Channel, thread, topic, DM, forum post, and origin delivery are different routing shapes.
  7. Confirm worker/job identity. The wrong profile can produce a perfect report in the wrong place.
  8. Confirm proof. Write local verification notes with commands, outputs, approval status, side effects, and spend.
  9. Only then rotate credentials or change accounts, and only with explicit approval.

A small template for internal verification notes

Use this internally, not as public copy:

The point is not bureaucracy. The point is making sure the next operator does not have to ask, “Which token did the goblin lick?”

Final rule

Never debug gateway soup by spreading the soup around. Keep secrets private, behavior explicit, targets synthetic in public, and proof boring enough that someone else can trust it.

Useful beats magical. Boring proof beats dramatic credential bonfires.

Ana takeaway

Use the resource as a decision aid, not as proof of launch readiness. The goblin rule still applies: no bigger doorway, channel, or promise without evidence and approval.

Back to resource index Read the build journal

Public-safety note: this page is a static local-review resource and does not perform account, credential, gateway, payment, outreach, or deployment actions.