think
16px
820px

Environment Topology — Staging-Only (2026-07-03)

Decision record from the post-Plan-D "production cutover" brainstorm. The cutover
ask dissolved on inspection: chatbot-neo.val.id has no DNS record, the legacy
ahu-chatbot-dev container is dead, and the staging vhost was already repointed
to the monorepo stack during Plan B. What remained was to fix the topology
decision in writing and clear the debris.

Decisions

  1. One deployed environment: staging. The Server 2 stack
    (efran@192.168.83.20, deploy dir /home/efran/ahu-ai-staging/chatbot, compose
    projects ahu-shared / ahu-public / ahu-internal / ahu-workers) is
    staging, fronted by the edge box at 103.30.246.154:
Surface Domain Backend
Public (Tanya) x056.ahu-demo.chatbot-neo.val.id Server 2 :3500
Staff (console) x056.ahu-demo.chatbot-neo-staff.val.id Server 2 :3510
  1. No deployed dev environment, no dev domains. Earlier drafts considered
    dev.-prefixed domains backed by a local stack; rejected to keep the edge
    box lean. If work is worth deploying, it ships to staging directly.

  2. No standing dev servers on the edge box. The development loop is:
    edit → pnpm typecheck + suites → ./infra/deploy/build-and-ship.sh +
    ./infra/deploy/deploy-staging.sh → verify against the staging URLs.
    The local dev-server recipe (Plan D completion notes, port 3501) is
    break-glass debugging only, not part of the workflow.

  3. Production is deferred until the project officially starts. The future
    mapping is 1:1 — chatbot-neo.val.id and chatbot-neo-staff.val.id via
    Hermes-driven DNS (not user-flippable) — and gets its own spec then,
    including where the prod stack lives.

Housekeeping scope

  1. Remove the dead legacy container ahu-chatbot-dev and its
    ahu-chat-interface image from the edge box.
  2. Rewrite the stale CLAUDE.md Deployment and Backend topology
    sections (they still describe compose.dev.yaml, port :8120, an external
    orchestrator, and pre-split paths).
  3. Delete pre-split debris from the repo: root compose.yaml (superseded by
    infra/compose.*.yaml; infra/legacy-compose.dev.yaml preserves the old
    dev compose), the 12 orphaned root scripts/test-*.ts (they import the
    deleted root src/; suites migrated to packages/streams and the app
    test dirs), and internal-web's broken smoke package script. The
    still-functional HTTP tools in scripts/ (smoke.ts, test-anon-*.sh,
    *-data-dash.py) stay. Touch up the README passage that links
    compose.yaml.

Success criteria

  1. docker ps -a on the edge box shows no ahu-chatbot-dev; the
    ahu-chat-interface image is gone.
  2. CLAUDE.md describes only the real deploy loop and post-split topology.
  3. The deleted files are gone from main; remaining suites still pass
    (pnpm --dir apps/internal-web test, pnpm --dir apps/public-web test,
    pnpm --dir packages/streams test).
  4. This spec is committed as the standing answer to "what's our prod story?".

Out of scope

  • Production launch (own spec when the project starts).
  • SSO Kemenkumham (login-route swap, per Plan D design).
  • Public DB replica flip (blocked: no replica exists).