Add pipeline orchestration, config, and remove old triage modules - #11
Open
qu4rkn3t wants to merge 1 commit into
Open
Add pipeline orchestration, config, and remove old triage modules#11qu4rkn3t wants to merge 1 commit into
qu4rkn3t wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
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_triagepipeline orchestrator (run,run_for_jira) and shared configuration constants/patterns. - Adds
perf_keeper/commit_triage/README.mddescribing 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). Importingpipeline.pywill raiseModuleNotFoundError, 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, andGEMINI_PRO, but those symbols/modules are not present in the currentperf_keeper.commit_triagepackage. The example will fail withImportErrorunless 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 | ||
| ``` |
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.
Type of change
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
Testing
Passes tests targeted at features like heuristics (this is just a wrapper so no individual tests). Works on real regression data as well.