Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

Fixed DNS widget configuration to correctly route through Approximated proxy using an A record instead of CNAME.

Problem

The DNS widget was instructing clients to:

  • ❌ Create CNAME pointing directly to sales-agent.scope3.com
  • This bypassed the Approximated proxy architecture
  • DNS verification showed "Unknown sync status: undefined" errors

Solution

Updated DNS widget to:

  • ✅ Create A record pointing to 37.16.24.200 (Approximated proxy cluster IP)
  • ✅ Route traffic correctly: Client → Approximated Proxy → Backend
  • ✅ Added error event handling for better UX

Architecture Flow

Before: Client Domain (CNAME) → sales-agent.scope3.com ❌ (bypassing proxy)
After:  Client Domain (A record → 37.16.24.200) → Approximated Proxy → adcp-sales-agent.fly.dev ✅

Changes

  • Backend (src/admin/blueprints/settings.py): Return proxy_ip instead of dns_target
  • Frontend (templates/tenant_settings.html): Use A record type with proxy IP
  • Config (docker-compose.yml): Add APPROXIMATED_PROXY_IP env var (default: 37.16.24.200)
  • Docs (CLAUDE.md): Update configuration documentation

Testing

  • ✅ Unit tests pass (829 passed, 40 skipped)
  • ⚠️ Integration tests require PostgreSQL (will run in CI)
  • 📝 Changes are configuration-only, no database schema changes

Screenshots

See attached images showing:

  1. DNS widget incorrectly pointing to sales-agent.scope3.com
  2. "Unknown sync status: undefined" error

🤖 Generated with Claude Code

@bokelley bokelley force-pushed the fix-dns-routing-logic branch from 1a7cc47 to e25381f Compare October 27, 2025 11:18
Fixed two issues with the DNS configuration widget:

1. DNS routing architecture - Changed from CNAME to A record
   - Widget now instructs clients to create A record pointing to 37.16.24.200
   - This is the correct Approximated proxy cluster IP address
   - Previously incorrectly showed CNAME to sales-agent.scope3.com (bypassing proxy)

2. DNS verification error handling
   - Added error event listener for Approximated DNS widget
   - Prevents "Unknown sync status: undefined" errors from breaking UI

Architecture flow:
  Client Domain (A → 37.16.24.200) → Approximated Proxy → adcp-sales-agent.fly.dev

Changes:
- src/admin/blueprints/settings.py: Return proxy_ip instead of dns_target
- templates/tenant_settings.html: Use A record type with proxy IP
- docker-compose.yml: Add APPROXIMATED_PROXY_IP env var (default: 37.16.24.200)
- CLAUDE.md: Update configuration documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley force-pushed the fix-dns-routing-logic branch from e25381f to d37ac20 Compare October 27, 2025 11:18
@bokelley bokelley merged commit 3291ae6 into main Oct 27, 2025
9 checks passed
danf-newton pushed a commit to Newton-Research-Inc/salesagent that referenced this pull request Nov 24, 2025
… IP (adcontextprotocol#636)

Fixed two issues with the DNS configuration widget:

1. DNS routing architecture - Changed from CNAME to A record
   - Widget now instructs clients to create A record pointing to 37.16.24.200
   - This is the correct Approximated proxy cluster IP address
   - Previously incorrectly showed CNAME to sales-agent.scope3.com (bypassing proxy)

2. DNS verification error handling
   - Added error event listener for Approximated DNS widget
   - Prevents "Unknown sync status: undefined" errors from breaking UI

Architecture flow:
  Client Domain (A → 37.16.24.200) → Approximated Proxy → adcp-sales-agent.fly.dev

Changes:
- src/admin/blueprints/settings.py: Return proxy_ip instead of dns_target
- templates/tenant_settings.html: Use A record type with proxy IP
- docker-compose.yml: Add APPROXIMATED_PROXY_IP env var (default: 37.16.24.200)
- CLAUDE.md: Update configuration documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants