refactor(correlation): move upstream correlation under agent#2705
Conversation
Greptile code reviewThis repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md. Run a review — add a PR comment with: Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5. Optional: automate with the greploop skill. |
Greptile SummaryThis PR is a pure structural refactor that relocates the upstream correlation package from
Confidence Score: 5/5Safe to merge — this is a mechanical path rename with no logic changes and no remaining references to the old location. Every import site across application code, CLI, pipeline, and tests has been updated to the new path. A repo-wide search for any lingering app.correlation references returns empty. The lazy import pattern used in runners.py and pipeline.py ensures the monkeypatch targets in the test suite resolve correctly at call time. No files require special attention — all changed files are straightforward import-path updates. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[app/pipeline/pipeline.py] -->|lazy import| B[app/agent/correlation/node.py]
A -->|lazy import| C[app/agent/correlation/datadog_adapter.py]
A -->|lazy import| D[app/agent/correlation/datadog_provider.py]
E[app/pipeline/runners.py] -->|lazy import| B
F[app/cli/commands/tests.py] -->|import| G[app/agent/correlation/runtime.py]
F -->|import| H[app/agent/correlation/upstream.py]
B -->|import| G
B -->|import| I[app/agent/correlation/providers.py]
G -->|import| J[app/agent/correlation/scoring.py]
G -->|import| K[app/agent/correlation/reporting.py]
G -->|import| L[app/agent/correlation/models.py]
I -->|import| H
C -->|import| H
D -->|import| C
D -->|import| H
K -->|import| L
J -->|import| L
J -->|import| H
M[app/agent/correlation/__init__.py] -->|re-exports| C
M -->|re-exports| D
M -->|re-exports| I
M -->|re-exports| H
Reviews (1): Last reviewed commit: "refactor(correlation): move upstream cor..." | Re-trigger Greptile |
674e433 to
75bd1b0
Compare
|
Hi Anwesh, I accidentally picked up these two files when I ran: Get-ChildItem app,tests,docs -Recurse -Include .py,.md | I think docs/good-first-issues/README.md could use an update. I'm also not sure what the current goal of tests/synthetic/rds_postgres/README_PROBLEMS.md is. It might be worth reviewing both in a separate docs PR. |
|
😭 Clear commit message. Green tests. Kind review. @cerencamkiran, stop making the rest of us look bad. 👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome. |

Summary
Moves the upstream correlation package from app/correlation to app/agent/correlation to align with the current agent-centered layout.
Changes
Validation
ruff format app tests
ruff check app tests
pytest tests/test_datadog_provider.py tests/test_datadog_adapter.py tests/test_upstream_correlation_provider.py -q
pytest tests/nodes/investigate/test_correlate_upstream.py tests/pipeline/test_correlation_config.py tests/synthetic/rds_postgres/test_observation_correlation.py -q