-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Remove Scope3 dependencies - make codebase vendor-neutral #668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove all hardcoded Scope3 domain references and replace with configurable environment variables, making the codebase deployable with any domain. Changes: - Created centralized domain_config module with 15+ utility functions - Updated 25+ files across core, admin, and frontend - Replaced 60+ hardcoded domain references - Added 4 new environment variables for domain configuration: - BASE_DOMAIN - SALES_AGENT_DOMAIN - ADMIN_DOMAIN - SUPER_ADMIN_DOMAIN - Updated OAuth redirect URIs to use configured domains - Updated session cookie domain configuration - Updated A2A and MCP server URL generation - Updated admin domain access logic (super admin checks) - Updated JavaScript and HTML templates to use configurable domains - Applied black and ruff formatting fixes Benefits: - Vendor neutral - no Scope3 branding in code - Fully configurable - deploy with any domain - Backwards compatible - existing deployments can set scope3.com in env vars - Centralized domain logic - all in one reusable module - Testable - can use test domains in CI/CD Testing: - All Python syntax checks pass - All imports work correctly - Default values tested and working - Pre-commit hooks passed (black, ruff) - Ready for full test suite 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Add commitizen>=3.29.0 to dev dependency group - Add [tool.commitizen] configuration section - Fixes failing commitizen-check workflow in CI - Enables uv run cz check to validate commit message format
- Changed 'uv sync' to 'uv sync --group dev' - Ensures commitizen package from dev dependencies is installed - Fixes 'Failed to spawn: cz' error in CI workflow
- Added 'uv pip install commitizen' step - Fixes compatibility issue with uv 0.4.18 which doesn't support --group flag - Ensures commitizen is available for commit message validation
- Changed BASE_DOMAIN default from 'example.com' to 'scope3.com' - Updated .env.example to reflect scope3.com defaults - Ensures existing Fly.io deployment works without environment variable changes - Added documentation about backwards compatibility - New deployments can override with environment variables
- Documents backwards compatibility approach - Explains why scope3.com defaults were chosen - Details current Fly.io configuration - Outlines future migration path - Provides rollback plan and risk assessment - Recommends deployment strategy
- Remove DEPLOYMENT_IMPACT.md (temporary analysis doc) - Remove SCOPE3_REMOVAL_COMPLETE.md (temporary completion doc) - Remove SCOPE3_REMOVAL_PROGRESS.md (temporary progress tracking) - Keep codebase cleaner without extra docs
EmmaLouise2018
approved these changes
Oct 29, 2025
- Add docs/HOSTING.md with complete deployment instructions - Cover all required environment variables with examples - Document Fly.io, Docker, and Kubernetes deployment options - Include Google OAuth setup, database setup, troubleshooting - Remove unnecessary SKIP_NGINX and A2A_MOCK_MODE from fly.toml - Move GCP_PROJECT_ID from fly.toml to secrets (more secure) - Remove scripts/remove_scope3_deps.py (temporary script) - Add clear comments about domain configuration in fly.toml
- Merge mypy type annotation improvements across 80+ files - Update pyproject.toml with latest dependencies - Sync pre-commit hooks configuration - Update GitHub Actions test workflow - Regenerate uv.lock to resolve conflicts
da254db to
4e8847e
Compare
danf-newton
pushed a commit
to Newton-Research-Inc/salesagent
that referenced
this pull request
Nov 24, 2025
…ntextprotocol#668) * feat: Remove Scope3 dependencies - make codebase vendor-neutral Remove all hardcoded Scope3 domain references and replace with configurable environment variables, making the codebase deployable with any domain. Changes: - Created centralized domain_config module with 15+ utility functions - Updated 25+ files across core, admin, and frontend - Replaced 60+ hardcoded domain references - Added 4 new environment variables for domain configuration: - BASE_DOMAIN - SALES_AGENT_DOMAIN - ADMIN_DOMAIN - SUPER_ADMIN_DOMAIN - Updated OAuth redirect URIs to use configured domains - Updated session cookie domain configuration - Updated A2A and MCP server URL generation - Updated admin domain access logic (super admin checks) - Updated JavaScript and HTML templates to use configurable domains - Applied black and ruff formatting fixes Benefits: - Vendor neutral - no Scope3 branding in code - Fully configurable - deploy with any domain - Backwards compatible - existing deployments can set scope3.com in env vars - Centralized domain logic - all in one reusable module - Testable - can use test domains in CI/CD Testing: - All Python syntax checks pass - All imports work correctly - Default values tested and working - Pre-commit hooks passed (black, ruff) - Ready for full test suite 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> * fix(ci): add commitizen dependency for conventional commits check - Add commitizen>=3.29.0 to dev dependency group - Add [tool.commitizen] configuration section - Fixes failing commitizen-check workflow in CI - Enables uv run cz check to validate commit message format * fix(ci): sync dev dependency group in commitizen workflow - Changed 'uv sync' to 'uv sync --group dev' - Ensures commitizen package from dev dependencies is installed - Fixes 'Failed to spawn: cz' error in CI workflow * fix(ci): explicitly install commitizen in workflow - Added 'uv pip install commitizen' step - Fixes compatibility issue with uv 0.4.18 which doesn't support --group flag - Ensures commitizen is available for commit message validation * fix: set scope3.com as default domain for backwards compatibility - Changed BASE_DOMAIN default from 'example.com' to 'scope3.com' - Updated .env.example to reflect scope3.com defaults - Ensures existing Fly.io deployment works without environment variable changes - Added documentation about backwards compatibility - New deployments can override with environment variables * docs: add deployment impact analysis for scope3 removal - Documents backwards compatibility approach - Explains why scope3.com defaults were chosen - Details current Fly.io configuration - Outlines future migration path - Provides rollback plan and risk assessment - Recommends deployment strategy * chore: remove temporary documentation files - Remove DEPLOYMENT_IMPACT.md (temporary analysis doc) - Remove SCOPE3_REMOVAL_COMPLETE.md (temporary completion doc) - Remove SCOPE3_REMOVAL_PROGRESS.md (temporary progress tracking) - Keep codebase cleaner without extra docs * docs: add comprehensive hosting guide and clean up fly.toml - Add docs/HOSTING.md with complete deployment instructions - Cover all required environment variables with examples - Document Fly.io, Docker, and Kubernetes deployment options - Include Google OAuth setup, database setup, troubleshooting - Remove unnecessary SKIP_NGINX and A2A_MOCK_MODE from fly.toml - Move GCP_PROJECT_ID from fly.toml to secrets (more secure) - Remove scripts/remove_scope3_deps.py (temporary script) - Add clear comments about domain configuration in fly.toml --------- 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Remove all hardcoded Scope3 domain references and replace with configurable environment variables, making the codebase deployable with any domain. This is a non-breaking change - existing deployments can continue using scope3.com by setting environment variables.
Changes
Core Infrastructure
domain_config.pymodule with 15+ utility functionsNew Environment Variables
Added 4 new configuration options (all optional, with sensible defaults):
BASE_DOMAIN(default: example.com)SALES_AGENT_DOMAIN(default: sales-agent.example.com)ADMIN_DOMAIN(default: admin.sales-agent.example.com)SUPER_ADMIN_DOMAIN(default: example.com)Files Modified
Core Modules:
src/core/domain_config.py(NEW)src/core/main.pysrc/core/schema_validation.pysrc/a2a_server/adcp_a2a_server.pyAdmin Application (13 files):
src/admin/app.pysrc/admin/domain_access.pysrc/admin/blueprints/auth.pysrc/admin/blueprints/core.pysrc/admin/blueprints/public.pysrc/admin/blueprints/schemas.pysrc/admin/blueprints/authorized_properties.pysrc/admin/blueprints/tenants.pyFrontend & Services:
src/landing/landing_page.pystatic/js/tenant_settings.jstemplates/tenant_settings.htmlConfiguration:
.env.examplefly.tomlCLAUDE.mdBackwards Compatibility
✅ Fully backwards compatible:
SALES_AGENT_DOMAIN=sales-agent.scope3.comand other domain env varsTesting
✅ Unit tests: 840 passed, 42 skipped
🧪 Recommended testing before merge:
./run_all_tests.sh ci # Full test suite with PostgreSQLBenefits
How to Use
For new deployments:
# Set in .env.secrets BASE_DOMAIN=yourdomain.com SALES_AGENT_DOMAIN=sales-agent.yourdomain.com ADMIN_DOMAIN=admin.sales-agent.yourdomain.com SUPER_ADMIN_DOMAIN=yourdomain.comFor existing scope3.com deployments:
# Continue using scope3.com domains - just set env vars BASE_DOMAIN=scope3.com SALES_AGENT_DOMAIN=sales-agent.scope3.com ADMIN_DOMAIN=admin.sales-agent.scope3.com SUPER_ADMIN_DOMAIN=scope3.comDocumentation
SCOPE3_REMOVAL_COMPLETE.md- Comprehensive summary with testing checklistSCOPE3_REMOVAL_PROGRESS.md- Detailed implementation notes🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com