Skip to content

Strengthen source-control provider foundation#72

Merged
ColeMurray merged 2 commits intomainfrom
foundation/single-provider-guardrails-clean
Feb 6, 2026
Merged

Strengthen source-control provider foundation#72
ColeMurray merged 2 commits intomainfrom
foundation/single-provider-guardrails-clean

Conversation

@ColeMurray
Copy link
Owner

Summary

  • add deployment-level SCM_PROVIDER resolution with a default of github
  • route provider selection through the source-control factory and return explicit 501 for unimplemented providers on non-public routes
  • document single-provider boundaries with an ADR and a provider contribution checklist
  • add focused tests for provider env resolution and provider factory behavior

Validation

  • npm run typecheck -w @open-inspect/control-plane
  • npm -w @open-inspect/control-plane exec vitest run src/source-control/config.test.ts src/source-control/providers/index.test.ts

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Terraform Validation Results

Step Status
Format ⚠️
Init
Validate

Note: Terraform plan was skipped because secrets are not configured. This is expected for external contributors. See docs/GETTING_STARTED.md for setup instructions.

Pushed by: @ColeMurray, Action: pull_request

@greptile-apps
Copy link

greptile-apps bot commented Feb 6, 2026

Greptile Overview

Greptile Summary

This PR establishes a clean architectural foundation for source control provider abstraction with single-provider-per-deployment constraints. The implementation adds deployment-level SCM_PROVIDER configuration (defaulting to github), routes provider selection through a factory with explicit 501 Not Implemented responses for unimplemented providers on non-public routes, and documents the single-provider boundaries through an ADR and contribution checklist.

  • Added resolveScmProviderFromEnv() function that normalizes provider names and validates against supported values (github, bitbucket)
  • Modified router to enforce provider implementation check via enforceImplementedScmProvider() middleware
  • Updated createSourceControlProvider() factory to throw explicit errors for bitbucket (not yet implemented) vs unknown providers
  • Added comprehensive tests for provider resolution and factory behavior
  • Created ADR 0001 documenting the single-provider deployment decision and boundary rules
  • Added provider contribution checklist to guide future SCM integrations

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Terraform Validation Results

Step Status
Format ⚠️
Init
Validate

Note: Terraform plan was skipped because secrets are not configured. This is expected for external contributors. See docs/GETTING_STARTED.md for setup instructions.

Pushed by: @ColeMurray, Action: pull_request

@ColeMurray ColeMurray merged commit 3718b7d into main Feb 6, 2026
10 checks passed
@ColeMurray ColeMurray deleted the foundation/single-provider-guardrails-clean branch February 6, 2026 08:45
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