Repository navigation
feat(connectors): establish Phase 5.1 connector interface and capability model - #43
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. Finishing Touches
Comment |
This was referenced Oct 27, 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.
Executive Summary
Phase 5.1 delivers DERA's universal database connector foundation (
packages/connectors/src/dera_connectors/). It defines the typed asynchronousDatabaseConnectorprotocol, a granular capability discovery taxonomy, universal metadata models with deterministic sorting, connection lifecycle management, sanitized error classification, read-only security enforcement, SSRF egress defenses, an explicit driver registry, a deterministic mock connector (FakeDatabaseConnector), and a reusable conformance test suite (BaseConnectorConformanceTests).Strict invariants are maintained:
Repository Baseline
82071dbe4bb070f98ac5fc690223e8f003d9c7c4docs/audit/PHASE_5_1_CONNECTOR_BASELINE.md.Connector Architecture & Layers
Key Deliverables & Modules
dera_connectors/protocol.py): Strongly typedDatabaseConnectorprotocol with async context management.dera_connectors/engine.py):DatabaseEngine(postgresql,sqlite,mysql,mariadb),DatabaseProvider(supabase,aws_rds,gcp_cloudsql, etc.), and sanitizedDatabaseIdentity.dera_connectors/capabilities.py): 17 discrete capabilities (SCHEMA_ENUMERATION,TABLE_ENUMERATION,COLUMN_INSPECTION, etc.) and 4 status values (SUPPORTED,UNSUPPORTED,RESTRICTED,UNKNOWN).dera_connectors/metadata.py): Pydantic v2 models for schemas, tables, columns, primary keys, foreign keys, unique constraints, check constraints, indexes, and views with deterministic ordering.dera_connectors/configuration.py):ConnectorConfig,TLSSettings,TimeoutSettings,SecretStrpassword protection, andsafe_dict()secret masking.dera_connectors/lifecycle.py):ConnectionLifecycleenforcing explicit transitions (CREATED->CONNECTING->CONNECTED->CLOSING->CLOSED).dera_connectors/security.py):validate_read_only_sqlblocking mutation keywords;validate_network_targetblocking loopback, link-local, and cloud metadata endpoints (169.254.169.254,metadata.google.internal).dera_connectors/errors.py): Standardized error hierarchy (CONNECTOR_UNAVAILABLE,CONNECTOR_AUTHENTICATION_FAILED,CONNECTOR_PERMISSION_DENIED, etc.) with automatic secret masking.dera_connectors/registry.py): ExplicitConnectorRegistryandcreate_connector()factory avoiding dynamic arbitrary imports.dera_connectors/testing/fake_connector.py): Deterministic mock implementing the protocol for unit testing.dera_connectors/testing/conformance.py):BaseConnectorConformanceTestsvalidating protocol conformance, lifecycle, ordering, and security across future adapters.dera_api/schemas/connectors.py): Pydantic schemas for engine discovery, capability matrices, connection test results, and metadata inspection.Test Results & Telemetry
python -m ruff check .passed)Documentation Changes
docs/connectors/README.mddocs/connectors/ARCHITECTURE.mddocs/connectors/CONNECTOR_PROTOCOL.mddocs/connectors/CAPABILITY_MODEL.mddocs/connectors/METADATA_CONTRACTS.mddocs/connectors/CONNECTION_LIFECYCLE.mddocs/connectors/READ_ONLY_SECURITY.mddocs/connectors/CREDENTIAL_HANDLING.mddocs/connectors/ERROR_MODEL.mddocs/connectors/CONFORMANCE_TESTING.mddocs/connectors/ADAPTER_DEVELOPMENT.mddocs/connectors/ENGINE_COMPATIBILITY.mddocs/audit/PHASE_5_1_CONNECTOR_BASELINE.mddocs/audit/PHASE_5_1_CONNECTOR_ACCEPTANCE.mddocs/audit/README.mdAcceptance Audit & Phase 5.2 Handoff
docs/audit/PHASE_5_1_CONNECTOR_ACCEPTANCE.md.