fix(proxy): enforce OpenSpec architecture ratchets - #1892
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change extracts proxy eligibility and lease-estimation helpers, preserves façade delegation, and moves architecture thresholds into validated OpenSpec TOML consumed by the architecture checker. ChangesProxy runtime helper extraction
Architecture threshold source of truth
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The PR restores documented proxy architecture limits and preserves runtime compatibility, with the affected validations and focused tests passing. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Restore the normative proxy architecture ratchets and make OpenSpec the single source of truth for every numeric limit enforced by the architecture checker. The runtime refactor is behavior-neutral: it moves cohesive service and model-eligibility helpers behind existing compatibility façades so
service.pyandload_balancer.pyfit their accepted limits again.Type of change
fix:— bug fix (no behavior change beyond the bug)feat:— new user-facing feature or capabilityrefactor:— internal refactor (no behavior change, no API change)docs:— documentation onlychore:/ci:/build:— tooling, CI, packagingtest:— test-only changeLinked issue: None; this does not claim to resolve an existing issue. Related PRs are documented below.
OpenSpec
Change directory:
openspec/changes/archive/2026-08-23-enforce-proxy-architecture-ssot/Changes
proxy-architecturespec, and load that block with strict fail-closed validation.service.pyto 2,594 lines andload_balancer.pyto 3,008 lines while keepingLoadBalancer.select_account()at 478 lines.Related work
Test plan
Passed:
Ruff
checkandformat --check, plusty check, passed formodel_eligibility.py,load_balancer.py,_service/api_key_usage.py,service.py,check_proxy_architecture.py,test_check_proxy_architecture.py, andtest_proxy_api_key_usage.py.The repository-wide
openspec validate --specs --no-interactivesweep was also run. The affectedproxy-architecturespec passes, while the sweep still reports seven failures in unchanged specs:database-backends,frontend-architecture,model-catalog-compat,query-caching,responses-api-compat,usage-error-metrics, andusage-refresh-policy.Full local CI was intentionally not run; required GitHub CI is the integration gate for this focused routing-sensitive change.
Checklist
<type>(<scope>)?: <subject>).openspec validate --specspasses (seven unchanged specs still fail, as documented above)..env.example, dashboard navigation, or user-visible surface changed.CHANGELOG.mdis not edited by hand.Summary by CodeRabbit
New Features
Bug Fixes
Tests