refactor(setup_wizard): replace port magic numbers with constants#3527
Merged
mrveiss merged 1 commit intoDev_new_guifrom Apr 5, 2026
Merged
refactor(setup_wizard): replace port magic numbers with constants#3527mrveiss merged 1 commit intoDev_new_guifrom
mrveiss merged 1 commit intoDev_new_guifrom
Conversation
…ARS and _CHROMADB_PORT constant (#3526) Replace hardcoded 8080 with _ROLE_INFRA_VARS["ai-stack"][1] so the AI stack port has a single definition, and introduce _CHROMADB_PORT = 8100 as a module-level constant so the ChromaDB port stays in sync with the Ansible role defaults without silent divergence. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
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
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.
Closes #3526
Summary
infra_vars["ai_stack_port"] = 8080with_ROLE_INFRA_VARS["ai-stack"][1]so the AI stack port has exactly one definition; changing_ROLE_INFRA_VARSis now sufficient._CHROMADB_PORT = 8100as a module-level constant (with a comment pointing at both Ansible role defaults files that must stay in sync) and uses it in place of the bare8100literal.Test plan
grep -n "ai_stack_port\|backend_chromadb_port" autobot-slm-backend/api/setup_wizard.pythat no bare literals remain.python3 -m black --check --line-length=88 autobot-slm-backend/api/setup_wizard.pypasses.python3 -m flake8 --max-line-length=100 autobot-slm-backend/api/setup_wizard.pypasses.🤖 Generated with Claude Code