feat(api-proxy): centralize port configuration in types.ts#955
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Add comprehensive environment variable documentation for squid, api-proxy,
and agent containers. Clearly document which token variables are redacted
with placeholder values ('placeholder-token-for-credential-isolation') in
the agent container for credential isolation.
Key additions:
- Separate tables for each container's environment variables
- Document real credentials in api-proxy vs placeholders in agent
- Explain one-shot-token protection mechanism
- Include all three API proxy endpoints (OpenAI, Anthropic, Copilot)
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (2 files)
✨ New Files (1 files)
Coverage comparison generated by |
Bun Build Test Results
Overall: PASS ✅ All Bun projects built and tested successfully.
|
Deno Build Test Results
Overall: ✅ PASS All Deno tests completed successfully.
|
Node.js Build Test ResultsAll Node.js projects successfully installed and passed their tests.
Overall: ✅ PASS All 3 projects completed successfully with no errors.
|
C++ Build Test Results
Overall: PASS ✅ All C++ builds completed successfully.
|
Smoke Test ResultsLast 2 Merged PRs:
Test Results: Overall Status: PASS cc:
|
Go Build Test Results
Overall: PASS ✅ All Go projects successfully downloaded dependencies and passed their tests.
|
.NET Build Test Results
Overall: PASS ✅ All .NET projects restored, built, and executed successfully.
|
|
Smoke Test Results Last 2 Merged PRs:
Test Results:
Overall Status: PASS
|
✅ Java Build Test ResultsAll Java projects compiled and tested successfully through the firewall.
Overall: PASS Test Details:
|
Rust Build Test Results
Overall: PASS ✅ All Rust projects built and tested successfully.
|
🔍 Chroot Version Comparison Test Results
Result: Tests FAILED - Not all runtime versions match between host and chroot environment. The chroot mode allows binaries from the host system to be transparently accessed inside the container, but version mismatches between the agent container's base environment and the host can occur.
|
|
Smoke Test Results (2026-02-18)
|
There was a problem hiding this comment.
Pull request overview
This pull request centralizes API proxy port configuration by creating a single source of truth for port numbers in types.ts. Previously, port numbers (10000, 10001, 10002) were hardcoded throughout the codebase. This refactoring improves maintainability by establishing the API_PROXY_PORTS constant and updating all references in TypeScript code to use it.
Changes:
- Created
API_PROXY_PORTSconstant in types.ts with comprehensive documentation - Updated docker-manager.ts and host-iptables.ts to use centralized port constants
- Enhanced documentation in api-proxy-sidecar.md with detailed environment variable tables for all three containers (squid, api-proxy, agent)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Added API_PROXY_PORTS constant and API_PROXY_HEALTH_PORT, updated JSDoc comments with links to constants |
| src/docker-manager.ts | Imported and used API_PROXY_PORTS and API_PROXY_HEALTH_PORT constants instead of hardcoded port numbers |
| src/host-iptables.ts | Imported API_PROXY_PORTS constant and uses Math.min/max to calculate port range dynamically |
| containers/api-proxy/Dockerfile | Updated to expose port 10002 for GitHub Copilot with clarifying comments |
| docs/api-proxy-sidecar.md | Added comprehensive environment variable tables for squid, api-proxy, and agent containers with detailed explanations of credential isolation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.