chore: add drift-engine ingestion, scoring, pipeline compatibility stubs (ADR-100 phase 3c)#710
Open
mick-gsk wants to merge 1 commit into
Open
chore: add drift-engine ingestion, scoring, pipeline compatibility stubs (ADR-100 phase 3c)#710mick-gsk wants to merge 1 commit into
mick-gsk wants to merge 1 commit into
Conversation
…ubs (ADR-100 phase 3c)
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Replaces several legacy drift modules with compatibility stubs that re-export implementations from drift_engine as part of the ADR-100 monorepo migration.
Changes:
- Replaced scoring, pipeline, analyzer, and ingestion implementation modules with thin re-export shims.
- Updated package-level
__init__exports to point atdrift_engineimplementations. - Preserved most legacy module entry points by forwarding names to the new package.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/drift/scoring/engine.py |
Replaces the scoring engine module with a re-export shim to drift_engine.scoring.engine. |
src/drift/scoring/__init__.py |
Redirects package-level scoring exports to drift_engine. |
src/drift/pipeline.py |
Replaces the pipeline implementation with a re-export shim to drift_engine.pipeline. |
src/drift/ingestion/ts_parser.py |
Replaces the TS parser module with a re-export shim. |
src/drift/ingestion/test_detection.py |
Replaces test/generated-file detection helpers with a re-export shim. |
src/drift/ingestion/github_api.py |
Replaces the GitHub API client module with a re-export shim. |
src/drift/ingestion/git_history.py |
Replaces git-history analysis with a re-export shim. |
src/drift/ingestion/git_blame.py |
Replaces git-blame helpers with a re-export shim. |
src/drift/ingestion/file_discovery.py |
Replaces file discovery logic with a re-export shim. |
src/drift/ingestion/external_report.py |
Replaces external report importers with a re-export shim. |
src/drift/ingestion/ast_parser.py |
Replaces the Python AST parser module with a re-export shim. |
src/drift/ingestion/__init__.py |
Redirects package-level ingestion exports to drift_engine. |
src/drift/analyzer.py |
Replaces the top-level analyzer/orchestrator module with a re-export shim. |
Comment on lines
+3
to
35
| from drift_engine.analyzer import ( | ||
| ProgressCallback as ProgressCallback, | ||
| ) | ||
| from drift.signals.base import create_signals | ||
| from drift.trend_history import ( | ||
| NOISE_FLOOR, | ||
| from drift_engine.analyzer import ( | ||
| _build_trend_context as _build_trend_context, | ||
| ) | ||
| from drift.trend_history import ( | ||
| apply_trend_and_persist_snapshot as trend_apply_and_persist, | ||
| from drift_engine.analyzer import ( | ||
| _fetch_git_history as _fetch_git_history, | ||
| ) | ||
| from drift.trend_history import ( | ||
| build_trend_context as trend_build_context, | ||
| from drift_engine.analyzer import ( | ||
| _HeadMatchIndex as _HeadMatchIndex, | ||
| ) | ||
| from drift.trend_history import ( | ||
| load_history as trend_load_history, | ||
| from drift_engine.analyzer import ( | ||
| _is_git_repo as _is_git_repo, | ||
| ) | ||
| from drift.trend_history import ( | ||
| load_history_with_status as trend_load_history_with_status, | ||
| from drift_engine.analyzer import ( | ||
| _load_history as _load_history, | ||
| ) | ||
| from drift.trend_history import ( | ||
| save_history as trend_save_history, | ||
| from drift_engine.analyzer import ( | ||
| _save_history as _save_history, | ||
| ) | ||
| from drift.trend_history import ( | ||
| snapshot_scope as trend_snapshot_scope, | ||
| from drift_engine.analyzer import ( | ||
| analyze_diff as analyze_diff, | ||
| ) | ||
| from drift_engine.analyzer import ( | ||
| analyze_repo as analyze_repo, | ||
| ) | ||
| from drift_engine.analyzer import ( | ||
| get_head_fingerprints_for_diff as get_head_fingerprints_for_diff, | ||
| ) | ||
| from drift_engine.analyzer import ( | ||
| get_head_match_index_for_diff as get_head_match_index_for_diff, | ||
| ) |
Comment on lines
+3
to
83
| from drift_engine.pipeline import ( | ||
| _GIT_HISTORY_CACHE as _GIT_HISTORY_CACHE, | ||
| ) | ||
| from drift.models import ( | ||
| AnalysisStatus, | ||
| CommitInfo, | ||
| FileHistory, | ||
| FileInfo, | ||
| Finding, | ||
| ParseResult, | ||
| PatternCategory, | ||
| PatternInstance, | ||
| RepoAnalysis, | ||
| from drift_engine.pipeline import ( | ||
| _GIT_HISTORY_CACHE_LOCK as _GIT_HISTORY_CACHE_LOCK, | ||
| ) | ||
| from drift.scoring.engine import ( | ||
| apply_path_overrides, | ||
| assign_impact_scores, | ||
| auto_calibrate_weights, | ||
| composite_score, | ||
| compute_module_scores, | ||
| compute_signal_scores, | ||
| from drift_engine.pipeline import ( | ||
| _GIT_HISTORY_CACHE_MAX_ENTRIES as _GIT_HISTORY_CACHE_MAX_ENTRIES, | ||
| ) | ||
| from drift.signals.base import ( | ||
| AnalysisContext, | ||
| BaseSignal, | ||
| SignalCacheDependencySpec, | ||
| SignalCapabilities, | ||
| create_signals, | ||
| from drift_engine.pipeline import ( | ||
| _GIT_HISTORY_CACHE_TTL_SECONDS as _GIT_HISTORY_CACHE_TTL_SECONDS, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| DEFAULT_FUTURE_TIMEOUT_SECONDS as DEFAULT_FUTURE_TIMEOUT_SECONDS, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| DEFAULT_WORKERS as DEFAULT_WORKERS, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| AnalysisPipeline as AnalysisPipeline, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| DegradationInfo as DegradationInfo, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| IngestionPhase as IngestionPhase, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| ParsedInputs as ParsedInputs, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| PhaseTimings as PhaseTimings, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| PhaseTimingValue as PhaseTimingValue, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| PipelineArtifacts as PipelineArtifacts, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| ProgressCallback as ProgressCallback, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| ResultAssemblyPhase as ResultAssemblyPhase, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| ScoredFindings as ScoredFindings, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| ScoringPhase as ScoringPhase, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| SignalOutput as SignalOutput, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| SignalPhase as SignalPhase, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| _current_git_head as _current_git_head, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| _determine_default_workers as _determine_default_workers, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| _prune_git_history_cache as _prune_git_history_cache, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| fetch_git_history as fetch_git_history, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| is_git_repo as is_git_repo, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| make_degradation_event as make_degradation_event, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| parse_git_history as parse_git_history, | ||
| ) | ||
| from drift_engine.pipeline import ( | ||
| resolve_worker_count as resolve_worker_count, | ||
| ) |
| """Scoring engine for Drift.""" | ||
|
|
||
| from drift.scoring.engine import ( | ||
| from drift_engine.scoring.engine import ( |
Comment on lines
+3
to
+5
| from drift_engine.ingestion.ast_parser import parse_file | ||
| from drift_engine.ingestion.file_discovery import discover_files | ||
| from drift_engine.ingestion.git_history import ( |
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
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.
Split from #576 (ADR-100 monorepo migration). Part of the PR decomposition into atomic, reviewable units.