Repository navigation
fix(llc): validate adapter_type at hire time + decompose #9008/#9033 remaining ACs - #10227
Merged
Merged
Conversation
Audit of #9008 (copilot_local) / #9033 (subscription adapters) found all 5 adapter types registered but agent_hires accepted ANY adapter_type string with no validation — an unknown/typo'd type silently created an agent whose every heartbeat is then skipped (no adapter registered), looking degraded forever (worse since #9951 made that a perpetual SKIPPED status). Add registered_adapter_types() to the adapter registry and reject an unregistered adapter_type at hire with 422 (mirrors the existing model validation). Tests: unknown → 422, registered (copilot_local) → 201, and the five canonical types are registered. The larger remaining ACs for #9008/#9033 are decomposed into discovery issues: #10219 (frontend adapter selector + GET /api/llc/adapters), #10220 (token usage → budget), #10217 (subscription OAuth wiring), #10218 (quota → auto-pause + board notification). Part of umbrella #9923.
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
This was referenced Jun 16, 2026
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.
Thinking Path
"Take next batch under #9923" → the remaining members are three L features. Audited #9008 (copilot_local) and #9033 (subscription adapters): all 5 adapter types are implemented and registered, but the features are not done — substantial ACs remain (frontend selector, OAuth wiring, token→budget, quota auto-pause). Rather than half-build two L features, this PR ships the one real bug the audit found and decomposes the rest into scoped discovery issues.
What Changed
adapter_typevalidation at hire (the bug):POST /companies/{id}/agent-hiresaccepted anyadapter_typestring. An unknown/typo'd value silently created an agent whose every heartbeat is skipped ("no adapter registered") — looking degraded forever, and (since Heartbeat skip paths record phantom COMPLETED + bump last_heartbeat_at — add SKIPPED status (PR #9948 follow-up) #9951) recorded as a perpetualSKIPPED. Now rejected with 422, mirroring the existing model validation.registered_adapter_types()helper added to the adapter registry (base.py), exported fromllc.adapters.Remaining #9008/#9033 ACs → discovery issues (NOT closed here)
GET /api/llc/adaptersintrospection (AC1 for both)BudgetService.ingest_cost_event(plugin(llc/adapters): GitHub Copilot CLI LLC adapter — run Copilot agents as AutoBot LLC workers #9008 AC5, feat(llc/adapters): subscription-mode adapters — run agents on Claude Max, Codex, or Copilot subscription without API key #9033 AC4)Verification
pytest llc/tests/test_budget_provision.py→ 14 passed (3 new: unknown adapter → 422,copilot_local→ 201, all five types registered)Model Used
Claude Opus 4.8
Addresses part of #9008 and #9033 (umbrella #9923); remaining ACs tracked in #10217/#10218/#10219/#10220.