Skip to content

Add pipeline orchestration, config, and remove old triage modules - #11

Open
qu4rkn3t wants to merge 1 commit into
cloud-bulldozer:mainfrom
qu4rkn3t:phase2/pipeline
Open

Add pipeline orchestration, config, and remove old triage modules#11
qu4rkn3t wants to merge 1 commit into
cloud-bulldozer:mainfrom
qu4rkn3t:phase2/pipeline

Conversation

@qu4rkn3t

@qu4rkn3t qu4rkn3t commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

Wires up the full Phase 2 pipeline: gets markdown from JIRA, TODO parse markdown, creates data models, and goes through the stages of Phase 2. Also removes the old analysis_llm.py, filtering.py, and triage_llm.py modules that this replaces, and adds the commit triage README.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

Passes tests targeted at features like heuristics (this is just a wrapper so no individual tests). Works on real regression data as well.

Copilot AI lite review requested due to automatic review settings August 5, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds scaffolding for “Phase 2” commit-triage orchestration and documentation, while removing legacy commit-triage modules. In its current state, the new pipeline module cannot be imported/executed because it references several perf_keeper.commit_triage.* modules that are not present in this PR, and the new README documents files/APIs that don’t exist.

Changes:

  • Introduces a new commit_triage pipeline orchestrator (run, run_for_jira) and shared configuration constants/patterns.
  • Adds perf_keeper/commit_triage/README.md describing the Phase 2 commit-triage pipeline and usage.
  • Removes the legacy triage module stubs/docstrings (analysis_llm.py, filtering.py, triage_llm.py) and the package docstring.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
perf_keeper/commit_triage/triage_llm.py Removes legacy module content.
perf_keeper/commit_triage/README.md Adds Phase 2 commit-triage documentation and usage example.
perf_keeper/commit_triage/pipeline.py Adds Phase 2 pipeline orchestration (heuristics scoring + LLM stages + report).
perf_keeper/commit_triage/filtering.py Removes legacy module content.
perf_keeper/commit_triage/config.py Adds shared constants, regexes, and heuristic/config defaults for commit triage.
perf_keeper/commit_triage/analysis_llm.py Removes legacy module content.
perf_keeper/commit_triage/init.py Removes package docstring content.
Suppressed comments (3)

perf_keeper/commit_triage/pipeline.py:31

  • These imports reference modules/symbols that are not present in the codebase (perf_keeper/commit_triage/heuristics.py, perf_keeper/commit_triage/llm.py). Importing pipeline.py will raise ModuleNotFoundError, so the Phase 2 pipeline cannot run as-is.
from perf_keeper.commit_triage.heuristics import (
    s1_temporal_proximity,
    s2_modification_intensity,
    s3_nesting_depth_shift,
    s4_control_flow_delta,
    s5_change_concentration,
    s6_component_proximity,
    should_discard,
)
from perf_keeper.commit_triage.llm import LLMClient

perf_keeper/commit_triage/pipeline.py:42

  • These imports reference additional missing modules (perf_keeper/commit_triage/models.py, perf_keeper/commit_triage/prompts.py). As written, run() cannot be executed because the required types and prompt-building helpers are not available.
from perf_keeper.commit_triage.models import (
    CommitModel,
    FlashResponse,
    FrontierResponse,
    RegressionContext,
)
from perf_keeper.commit_triage.prompts import (
    build_flash_prompts,
    build_frontier_prompts,
    load_all_diffs,
)

perf_keeper/commit_triage/README.md:34

  • The usage example imports build_regression_context, make_affected_metric, create_client, GEMINI_FLASH, and GEMINI_PRO, but those symbols/modules are not present in the current perf_keeper.commit_triage package. The example will fail with ImportError unless the missing modules are added or the snippet is updated to match the actual public API.
```python
from perf_keeper.commit_triage.data_acquisition import build_regression_context, make_affected_metric
from perf_keeper.commit_triage.llm import create_client, GEMINI_FLASH, GEMINI_PRO
from perf_keeper.commit_triage import pipeline

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to +13
if TYPE_CHECKING:
from perf_keeper.commit_triage.jira_client import JiraClient

Comment on lines +13 to +27
```
commit_triage/
├── pipeline.py # entry point: run(context, flash_client, frontier_client)
├── models.py # RegressionContext, CommitModel, PRModel, FileModel, LLM output types
├── data_acquisition.py # async GitHub client; build_regression_context() assembles the context
├── heuristics.py # S1-S6 signal functions and file discard logic
├── llm.py # GoogleLLMClient (Gemini); create_client() for instantiation
├── prompts.py # flash/frontier prompt builders; handles context-window splitting
├── report.py # Markdown report for JIRA attachment and Qdrant/BM25 retrieval
├── config.py # signal weights, thresholds, model names
├── templates/
│ ├── flash.md # flash prompt template
│ └── frontier.md # frontier prompt template
└── tests/ # 274 unit tests
```
@qu4rkn3t
qu4rkn3t requested a review from vishnuchalla August 5, 2026 13:23
@qu4rkn3t qu4rkn3t added the enhancement New feature or request label Aug 5, 2026
@qu4rkn3t qu4rkn3t self-assigned this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants