Skip to content

chore: add drift-engine ingestion, scoring, pipeline compatibility stubs (ADR-100 phase 3c)#710

Open
mick-gsk wants to merge 1 commit into
mainfrom
split/576-664c-ingestion-scoring-stubs
Open

chore: add drift-engine ingestion, scoring, pipeline compatibility stubs (ADR-100 phase 3c)#710
mick-gsk wants to merge 1 commit into
mainfrom
split/576-664c-ingestion-scoring-stubs

Conversation

@mick-gsk
Copy link
Copy Markdown
Owner

@mick-gsk mick-gsk commented May 3, 2026

Split from #576 (ADR-100 monorepo migration). Part of the PR decomposition into atomic, reviewable units.

Copilot AI review requested due to automatic review settings May 3, 2026 17:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 at drift_engine implementations.
  • 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 thread src/drift/analyzer.py
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 thread src/drift/pipeline.py
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 (
Copy link
Copy Markdown

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@github-actions github-actions Bot added scoring Changes to composite scoring or weights ingestion Changes to file discovery or AST parsing labels May 3, 2026
@mick-gsk mick-gsk closed this May 4, 2026
@mick-gsk mick-gsk deleted the split/576-664c-ingestion-scoring-stubs branch May 4, 2026 05:09
@mick-gsk mick-gsk restored the split/576-664c-ingestion-scoring-stubs branch May 4, 2026 05:14
@mick-gsk mick-gsk reopened this May 4, 2026
@mick-gsk mick-gsk added the release:maintenance Include this PR under Maintenance in release notes label May 4, 2026
@github-actions github-actions Bot added lane/standard Fixes and features — standard review path lane/high-risk Signals/scoring/architecture — full gates + audit required labels May 4, 2026
@mick-gsk mick-gsk added the size/XL Diff ≥ 500 lines — consider splitting label May 4, 2026
@github-actions github-actions Bot added the agent-review-requested Agent review was requested automatically label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-review-requested Agent review was requested automatically ingestion Changes to file discovery or AST parsing lane/high-risk Signals/scoring/architecture — full gates + audit required lane/standard Fixes and features — standard review path release:maintenance Include this PR under Maintenance in release notes scoring Changes to composite scoring or weights size/XL Diff ≥ 500 lines — consider splitting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants