Skip to content

deploy: the isolated Bot Social overlay's TRUST_PROXY default makes the service refuse to start #3498

Done

Description

@Birfy

What is wrong

The documented isolated deployment cannot start Bot Social.

deploy/isolated/bot-social.compose.yml:12 defaults TRUST_PROXY to 172.16.0.0/12,10.0.0.0/8,192.168.0.0/16,loopback. loadTrustProxy refuses that value by design (services/bot-social/src/trust-proxy.ts:52): loopback may not be mixed with address entries. The refusal is thrown at module load (services/bot-social/src/main.ts:29), before the server listens, so the container exits 1; with restart: unless-stopped it restarts forever, /healthz never answers, and the gateway's /social/ returns 502.

Reproduced on 0bdbbfbe7cc5b77c78f84adc7b9e78e86aba9fb2 by loading the real module and passing that exact string: it throws TRUST_PROXY cannot mix false or loopback with address entries (got "172.16.0.0/12,10.0.0.0/8,192.168.0.0/16,loopback"); use false, loopback, or a comma-separated list of IPs/CIDRs (true is not offered: name the proxy instead) and exits 1.

Expected: the overlay starts with no variables set beyond the documented ones. Actual: startup refusal unless the operator overrides FLYBOT_WORKSPACE_BOT_SOCIAL_TRUST_PROXY; nothing in deploy/isolated/BOT_SOCIAL_DEPLOY.md says to.

Why CI is green: tests/test_isolated_bot_social.py only parses the YAML (ports, PUBLIC_BASE_URL, volumes), and services/bot-social/test/trust_proxy.test.ts covers the parser but never the overlay default, so the two halves are never joined.

Scope

One slice:

  • deploy/isolated/bot-social.compose.yml: drop the loopback token from the default. The peers this overlay needs are the RFC1918 Docker/gateway addresses that remain, and loopback is what the parser refuses to mix with them.
  • services/bot-social/test/trust_proxy.test.ts: add the missing join — read the overlay's TRUST_PROXY default and assert loadTrustProxy accepts it as a CIDR list, so this default can never again be one the service rejects.

Not in scope: the gateway recipe, the documented deploy procedure, or the parser's mixing rule (both are correct as they are).

Acceptance

  • node --import tsx --test test/trust_proxy.test.ts in services/bot-social passes, including the new overlay-default test.
  • Restoring loopback in the overlay default makes that test fail with the mixing error.
  • python3 -m unittest test_isolated_bot_social still passes.
  • No other file in the repository carries the mixed default.

Evidence (local on this host, not CI)

Replayed on a clean 0bdbbfbe tarball (rebuilt base tree aacdf8ea); the slice tree is 6d9ddd362fcc293a58955631e91f16ab84c55027, 2 files +16/-1. With the slice: 11/11 tests pass in trust_proxy.test.ts. Negative control: loopback back in the default -> not ok 11 - the isolated Bot Social overlay's TRUST_PROXY default is one the service accepts, with the mixing error above. Restored -> 11/11. test_isolated_bot_social passes. grep -rn "192.168.0.0/16,loopback" matches nowhere else.

Activity

  1. Birfy commented on Dec 2, 2026

    @Birfy
    CollaboratorAuthor

    Claimed. Branch dev/3498-bot-social-trust-proxy-default from main 0bdbbfbe.

  2. added
    agent-ready
    agent-working
    on Dec 2, 2026
  3. Birfy commented on Dec 3, 2026

    @Birfy
    CollaboratorAuthor

    Already fixed on main; closing as completed. Checked at main e1dd1b25928f91e542f2c864bf61eea7719cd724 (tree 2224f5b358c00d4444c93282c6a5f1a4d4de81bc), rebuilt from codeload at that commit, 2,579 entries.

    • deploy/isolated/bot-social.compose.yml:12 default is 172.16.0.0/12,10.0.0.0/8,192.168.0.0/16 (no loopback).
    • services/bot-social/test/trust_proxy.test.ts:141 reads that default out of the overlay and asserts loadTrustProxy(...) yields kind=cidrs with peer entries.
    • services/bot-social/src/trust-proxy.ts:52 still refuses cannot mix false or loopback with address entries, so the old mixed default cannot pass.

    Landed in 766e978e ("deploy: keep the isolated Bot Social TRUST_PROXY default one the service accepts"). Scope note: static reading at this tree plus the guard test that shipped with it; I did not run the node suite here.

  4. removed
    agent-ready
    agent-working
    on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions