Skip to content

feat: merge multi-provider-llm-configuration — construction complete - #94

Merged
MichielDean merged 2 commits into
mainfrom
feature/multi-provider-llm-configuration
Jul 25, 2026
Merged

MichielDean merged 2 commits into
mainfrom
feature/multi-provider-llm-configuration

Conversation

@MichielDean

Copy link
Copy Markdown
Owner

Auto-merged from devteam construction phase for feature multi-provider-llm-configuration

@MichielDean
MichielDean force-pushed the feature/multi-provider-llm-configuration branch 4 times, most recently from 91e6651 to 940b95b Compare July 25, 2026 19:58
Implements the full vertical slice for the multi-provider-llm-configuration
feature (19 MVP units):

- migration_017.go: 4 config tables (providers, provider_models, tier_models,
  role_overrides) + sentinel __platform__ feature row for audit FK (F-01 fix)
- internal/config: ProviderConfig/ProviderModel/TierModel/RoleOverride/
  ResolvedProvider types; ProviderStore + TierStore (DB CRUD); ConfigMerger
  (DB+YAML overlay, DB wins); ResolveProvider (tier+override precedence,
  fail-fast on missing key); DeriveKeyState (never returns raw key value)
- internal/role: writeOpencodeJSON builder replaces 3 hardcoded ollama blocks;
  DispatchRequest.Provider field; buildAgentMD follows resolved model;
  buildAgentEnvPairs injects API key into tmux env; opencode.json mode 0600
  (carries resolved key, NFR-SEC-01)
- internal/api: config_handlers.go (GET/PUT providers, tiers, role-overrides);
  config_guard.go (localhost OR X-Admin-Secret, NFR-SEC-02); routes registered
  in server.go; audit via RecordAuditEvent('__platform__', ...)
- internal/db: EventProviderConfigMutated + EventTierConfigMutated constants
- internal/pipeline: ResolveProviderForRole wired at both dispatch sites
- cmd/devteam/main.go: SIGTERM graceful shutdown handler (construction prereq)
- ui/src: AdminProvidersPage two-persona admin UI (Operator providers section
  + Team Lead tier matrix + role overrides); API client + types; route + nav
- no_branches_test.go: static scan enforcing NFR-INTEG-01 (no provider-specific
  code branches; presets are data)

All Go tests pass (internal/db, internal/config, internal/api, internal/role,
internal/pipeline). UI builds cleanly (tsc + vite). go vet clean on touched
packages. Secrets never persisted: api_key_env stores $VAR references only;
key_state derived at read time; resolved key lives only in 0600 opencode.json
+ tmux session env.
@MichielDean
MichielDean force-pushed the feature/multi-provider-llm-configuration branch from 940b95b to 2bee718 Compare July 25, 2026 20:15
PR #94 CI failed frontend (lint + build) — App.tsx had leftover
</Suspense>} /> lines after the /admin/providers route close,
causing TS17002/TS1381/TS1382/TS1005 errors. Removed the
duplicate closing tags.
@MichielDean
MichielDean merged commit cd69abc into main Jul 25, 2026
6 of 10 checks passed
MichielDean added a commit that referenced this pull request Jul 26, 2026
## Summary
Enforces the 4-level testing mandate on recently merged features:
- **E2E**: `providers.spec.ts` covers `AdminProvidersPage`
(multi-provider-llm feature) — page renders, effect-timing banner,
operator section, tier matrix, role overrides, navigation
- **Smoke**: `smoke_test.go` verifies server starts on a random port and
key API endpoints respond (features, repos, settings/defaults,
config/providers)

## Why
Audit of the 5 merged features (#90, #93, #94, #95) showed:
- Unit tests: 543 — good
- Integration tests: handler-level httptest tests — good
- E2E tests: admin.spec.ts covered settings/admin-ui but NOT
multi-provider-llm or github-auth
- Smoke tests: no dedicated smoke test verifying server starts and
responds

This PR closes the e2e and smoke gaps.

Co-authored-by: Lobsterdog Contributors <noreply@lobsterdog.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant