Skip to content

feat: add Argo CD deployment investigation integration#948

Merged
muddlebee merged 6 commits intoTracer-Cloud:mainfrom
MestreY0d4-Uninter:issue/320-argocd-integration
Apr 29, 2026
Merged

feat: add Argo CD deployment investigation integration#948
muddlebee merged 6 commits intoTracer-Cloud:mainfrom
MestreY0d4-Uninter:issue/320-argocd-integration

Conversation

@MestreY0d4-Uninter
Copy link
Copy Markdown
Contributor

@MestreY0d4-Uninter MestreY0d4-Uninter commented Apr 25, 2026

Fixes #320

Describe changes -

This PR adds a first-class, read-only Argo CD integration for deployment and drift investigation.

What changed:

  • Added a dedicated app/services/argocd client for application listing, application status/summary, managed resources, and server-side diff retrieval.
  • Added Argo CD integration config, catalog/env resolution, and local verification support.
  • Added read-only investigation tools:
    • ArgoCDApplicationStatusTool
    • ArgoCDApplicationDiffTool
  • Wired Argo CD into source detection, evidence typing, investigation post-processing, and RCA evidence summaries.
  • Added regression coverage for client behavior, catalog/verify resolution, source detection, and tools.

Security and safety hardening:

  • Remote Argo CD URLs must use https://; plain http:// is accepted only for localhost/loopback development endpoints, including IPv6 loopback.
  • Bearer token auth and username/password session auth are supported, but ambiguous dual-auth configuration is rejected.
  • Credentials, session tokens, bearer/JWT-like values, Kubernetes Secret diffs, private-key-like content, and password/token-like fields are redacted before surfacing errors, diffs, tool output, or evidence.
  • Argo CD API usage remains read-only except for POST /api/v1/session, which is used only to obtain a session token when username/password auth is configured.
  • HTTP 401 handling avoids unsafe retry loops and redacts sensitive response content.

Screenshots (if UI) -

N/A — backend integration and investigation tooling only.

Demo video -

https://github.com/MestreY0d4-Uninter/opensre/releases/download/pr-948-argocd-real-demo/opensre-pr948-argocd-real-walkthrough.mp4

Release artifact page: https://github.com/MestreY0d4-Uninter/opensre/releases/tag/pr-948-argocd-real-demo

What it shows:

  • A real local Argo CD instance running on kind for the PR branch validation.
  • The documented CLI path: opensre integrations verify argocd.
  • Read-only Argo CD application status and list-mode evidence collection.
  • A live GitOps drift scenario: the demo app is synced, the Kubernetes Deployment is scaled outside Git, Argo CD reports OutOfSync, and ArgoCDApplicationDiffTool returns drift_detected=true with a replica diff.
  • Credentials are hidden/redacted; no raw token, password, JWT, or Kubernetes Secret value is shown.

Transparency note: this is a real terminal-session recording with commands entered into a live shell by automation for repeatability. The commands run against a local kind-hosted Argo CD instance and exercise the real OpenSRE code paths.


Code Understanding and AI Usage

Used AI?

  • No
  • Yes → confirmed:
    • I reviewed every line of the AI-generated code
    • I can explain the logic
    • I tested edge cases
    • I adapted it to the project's conventions

Approach:

  • The implementation follows existing OpenSRE integration patterns: app/services/*/client.py, integration catalog/verify wiring, BaseTool investigation tools, source detection, and evidence/post-processing hooks.
  • The first slice is intentionally read-only to keep the blast radius bounded while still supporting the issue's deployment/drift investigation use case.
  • The main security focus was avoiding accidental credential exposure through configurable URLs, HTTP errors, Argo CD diffs, Kubernetes Secret manifests, and tool/evidence output.
  • Edge cases covered include invalid/remote plaintext URLs, localhost/IPv6 loopback URLs, dual-auth rejection, whitespace-only list filters, auth failures, session-token 401 behavior, diff truncation, and env isolation.

Validation

Follow-up validation after maintainer review:

  • Addressed the .env.example request by adding the documented Argo CD environment variables.
  • Verified the documented command against a real local Argo CD instance:
    • uv run opensre integrations verify argocd
    • Result: argocd local env passed Connected to Argo CD and listed 1 application.
  • Verified the real read-only status/list/diff tool paths against the same Argo CD instance.
  • Verified drift detection with live Kubernetes drift:
    • sync_status: OutOfSync
    • drift_detected: true
    • diff_count: 1
    • replica drift shown for the guestbook-ui Deployment.
  • Verified the negative path after restoring desired replicas:
    • drift_detected: false
    • diff_count: 0
  • Focused regression suite after follow-up changes:
    • 245 passed
  • Quality gates after follow-up changes:
    • make lint: passed
    • make format-check: passed
    • make typecheck: passed
    • git diff --check: passed
  • Demo video validation:
    • Duration: 42.93s
    • Resolution: 1280x720
    • SHA-256: 515c60b1e8a25c12302f5a6f48a5fb5ea697ed501b2c4ab8140ca898c2c9c5a7
    • OCR/secret scan found no raw Argo CD password, bearer token, JWT, GitHub token, AWS key, or private key.

Local validation completed before opening the PR:

  • Focused Argo CD tests:

    • uv run pytest -q tests/services/argocd/test_client.py tests/integrations/test_argocd_catalog_verify.py tests/nodes/plan_actions/test_detect_sources_argocd.py tests/tools/test_argocd_tools.py
    • Result: 33 passed
  • Expanded related tests:

    • uv run pytest -q tests/integrations/test_argocd_catalog_verify.py tests/integrations/test_catalog_multi_instance.py tests/integrations/test_verify.py tests/nodes/plan_actions/test_detect_sources_argocd.py tests/tools/test_argocd_tools.py tests/tools/test_registry.py
    • Result: 60 passed
  • Parallel focused run:

    • Argo CD focused suite under xdist with 4 workers
    • Result: 33 passed
  • Type checking:

    • make typecheck
    • Result: Success: no issues found in 396 source files
  • Lint:

    • make lint
    • Result: All checks passed!
  • Formatting:

    • make format-check
    • Result: 910 files already formatted
  • Whitespace/diff validation:

    • git diff --check --cached
    • Result: passed
  • Coverage/full non-synthetic local suite:

    • make test-cov
    • Result: 3294 passed, 2 skipped, 1 xfailed, 1 warning
  • Local Argo CD scenario simulator:

    • Simulated Argo CD endpoints with a local ThreadingHTTPServer
    • Validated remote HTTP rejection, loopback HTTP allowance, dual-auth rejection, bearer list/status/diff flow, diff redaction, HTTP error redaction, lazy session login, verify surface, tools, and env catalog resolution.

Checklist

  • Linked issue
  • Self-review completed
  • Purpose of each new function/class is clear from names, structure, and docstrings/comments where useful
  • Tests added for edge cases and regressions
  • Code style validated

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 25, 2026

Greptile Summary

This PR adds a read-only Argo CD integration covering client auth (bearer token + session login), credential redaction, URL safety enforcement, source detection, and two investigation tools (ArgoCDApplicationStatusTool, ArgoCDApplicationDiffTool). The implementation is well-structured and security-hardened, but there is one logic defect that breaks a stated use case.

  • P1 — list-mode evidence loss: _map_argocd_application_status reads data.get("application", {}) (singular), but list_applications() returns "applications" (plural). When ArgoCDApplicationStatusTool runs without an application_name, all fetched application data is silently dropped from evidence — the "Listing visible Argo CD applications" use case is broken end-to-end.

Confidence Score: 4/5

Safe to merge after fixing the list-mode evidence mapper; the P1 is isolated and doesn't affect the single-app status or diff paths.

One confirmed P1 logic defect: _map_argocd_application_status silently drops all application data in list-mode. All other findings are P2 style/quality suggestions. The rest of the integration — auth, redaction, URL validation, drift detection, and tests — is solid.

app/nodes/investigate/processing/post_process.py (lines 325–329) and app/tools/ArgoCDApplicationStatusTool/init.py (list-mode handling)

Important Files Changed

Filename Overview
app/nodes/investigate/processing/post_process.py Adds Argo CD evidence mappers and summary builders; _map_argocd_application_status uses "application" (singular) but list_applications() returns "applications" (plural), silently dropping all listed apps from evidence in the list-mode path.
app/tools/ArgoCDApplicationStatusTool/init.py New BaseTool for application status/listing; the list-applications path (application_name omitted) fetches data but the evidence mapper discards the "applications" list, rendering that path ineffective.
app/services/argocd/client.py New Argo CD REST client with bearer/session auth, credential redaction, URL safety validation, and diff sanitization; minor issue: _normalize_str validator strips "bearer " prefix from non-token fields like project and username.
app/nodes/plan_actions/detect_sources.py Adds Argo CD source detection from alert annotations and hint keywords; "deploy" hint keyword is overly broad and may trigger spurious Argo CD calls for unrelated alerts.
app/integrations/models.py Adds ArgoCDIntegrationConfig with URL scheme validation (https-only except loopback), dual-auth rejection, and bool/string normalization; well-structured.
app/integrations/catalog.py Wires Argo CD into integration classification and env loading with multi-instance support, proper auth-presence checks, and graceful validation-failure handling.
app/integrations/verify.py Adds _verify_argocd that validates config, calls list_applications, and returns a human-readable result; follows existing verification patterns cleanly.
app/tools/ArgoCDApplicationDiffTool/init.py New BaseTool for server-side diff retrieval; correctly gates on application_name via is_available, passes through redacted diffs, and handles client-not-configured path cleanly.
tests/services/argocd/test_client.py Comprehensive client tests covering auth flows, redaction, diff sanitization, truncation, and SSL flag propagation using httpx.MockTransport.

Sequence Diagram

sequenceDiagram
    participant DS as detect_sources
    participant ST as ArgoCDStatusTool
    participant DT as ArgoCDDiffTool
    participant C as ArgoCDClient
    participant API as Argo CD API

    DS->>DS: Extract app_name / hint from alert
    DS-->>ST: sources[argocd] = {base_url, bearer_token, application_name, ...}

    ST->>C: make_argocd_client(base_url, token)
    alt application_name present
        C->>API: GET /api/v1/applications/{name}
        API-->>C: application payload
        C-->>ST: {application: {...}, recent_history: [...]}
        ST-->>post_process: _map_argocd_application_status → argocd_application, argocd_revision_history
    else application_name absent
        C->>API: GET /api/v1/applications
        API-->>C: {items: [...]}
        C-->>ST: {applications: [...], total: N}
        ST-->>post_process: ⚠️ _map_argocd_application_status drops applications list
    end

    DT->>C: make_argocd_client(base_url, token)
    C->>API: GET /api/v1/applications/{name}/server-side-diff
    API-->>C: {diffs: [...]}
    C-->>DT: {drift_detected: bool, diffs: [sanitized]}
    DT-->>post_process: _map_argocd_application_diff → argocd_drift_detected, argocd_diff
Loading

Comments Outside Diff (1)

  1. app/nodes/plan_actions/detect_sources.py, line 397-401 (link)

    P2 "deploy" hint is too broad

    "deploy" is a very common word in alerting annotations and could trigger Argo CD source detection for alerts that have nothing to do with GitOps (e.g., any alert mentioning a Kubernetes Deployment or a CI/CD step). This would add unnecessary API calls to the Argo CD integration. Consider restricting the keyword to more Argo CD-specific terms such as "argocd", "argo cd", "gitops", and "outofsync"/"out of sync", or gating on at least an application_name hint before relying on free-text hint matching alone.

Reviews (1): Last reviewed commit: "feat(argocd): add read-only deployment i..." | Re-trigger Greptile

Comment thread app/nodes/investigate/processing/post_process.py
Comment thread app/services/argocd/client.py Outdated
Comment on lines +93 to +107
@field_validator(
"bearer_token",
"username",
"password",
"project",
"app_namespace",
"integration_id",
mode="before",
)
@classmethod
def _normalize_str(cls, value: object) -> str:
text = str(value or "").strip()
if text.lower().startswith("bearer "):
text = text.split(None, 1)[1].strip()
return text
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.

P2 _normalize_str applied to non-token fields strips "bearer " prefix unexpectedly

The same _normalize_str validator is applied to username, project, app_namespace, and integration_id in addition to bearer_token. The "bearer " prefix-stripping logic only makes sense for token fields. While unlikely to trigger in practice, a project or namespace whose string value happens to begin with "bearer " would be silently mutated. Consider applying the "bearer " stripping only to bearer_token, or splitting the validator into two separate validators.

@MestreY0d4-Uninter
Copy link
Copy Markdown
Contributor Author

Updated in b9e297f009f21cc112ff43d65167e8ff946f83bf and addressed the Greptile findings:

  • preserved the Argo CD applications list in list-mode evidence mapping instead of dropping it;
  • narrowed bearer-prefix stripping so it only applies to bearer tokens, not generic string fields;
  • added/updated regression coverage for both cases.

Validation:

  • uv run pytest -q tests/services/argocd/test_client.py tests/integrations/test_argocd_catalog_verify.py tests/nodes/plan_actions/test_detect_sources_argocd.py tests/tools/test_argocd_tools.py — passed
  • make typecheck — passed
  • make lint — passed
  • make format-check — passed
  • git diff --check — passed
  • GitHub checks on the updated head are green: quality, Analyze (python), typecheck, test, and CodeQL passed.

Copy link
Copy Markdown
Collaborator

@muddlebee muddlebee left a comment

Choose a reason for hiding this comment

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

looks good overall, few suggestions..

).lower()
has_gitops_hint = any(
marker in argocd_hint_text
for marker in ("argocd", "argo cd", "gitops", "drift", "deploy")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"deploy" is a substring match — "EKS pod deployment failed", "deploy pipeline", etc. all trigger this, adding Argo CD as a source for unrelated alerts. Replace with tighter Argo CD-specific terms: ("argocd", "argo cd", "argo-cd", "gitops", "outofsynced").

Comment thread app/services/argocd/client.py Outdated
headers["Authorization"] = f"Bearer {token}"
headers.update(kwargs.pop("headers", {}) or {})
response = self._get_client().request(method, path, headers=headers, **kwargs)
response.raise_for_status()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If raise_for_status() throws a 401, _session_token is never cleared. A reused client instance will replay the expired token instead of re-authenticating. Clear self._session_token = "" when catching a 401 here, or document on the class that instances must not be reused after session expiry.

Comment thread app/services/argocd/client.py Outdated
)


def _is_loopback_host(host: str) -> bool:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

_is_loopback_host and _validate_base_url are identical to the versions in app/integrations/models.py. Extract to app/utils/ or import from models to avoid the logic diverging.

Comment thread app/nodes/root_cause_diagnosis/evidence_checker.py
@MestreY0d4-Uninter
Copy link
Copy Markdown
Contributor Author

Updated in 99ff09c55e5c2b3c70e205fccc6589d18ec78cbf and addressed the latest Argo CD review comments:

  • tightened Argo CD source hints by removing the generic deploy/drift substring triggers and keeping Argo CD/GitOps-specific markers;
  • clear cached username/password session tokens on 401, retry once with a fresh session, and keep retired tokens in the redaction set for surfaced errors;
  • moved the HTTPS-or-loopback HTTP URL validation into a shared app.utils.url_validation helper used by both integration config and the service client;
  • registered argocd_applications as investigated evidence so list-mode status calls count toward the evidence gate.

Validation run locally:

  • uv run pytest -q tests/services/argocd/test_client.py tests/integrations/test_argocd_catalog_verify.py tests/nodes/plan_actions/test_detect_sources_argocd.py tests/tools/test_argocd_tools.py tests/nodes/root_cause_diagnosis/test_healthy_short_circuit.py -q → 205 passed
  • make lint
  • make format-check
  • make typecheck
  • git diff --check

@muddlebee
Copy link
Copy Markdown
Collaborator

Nice work. Demo video is missing though? Can you quickly add in the PR description

@MestreY0d4-Uninter
Copy link
Copy Markdown
Contributor Author

Follow-up self-review fix in dce3da0bc2d23e188e641d0031eeb951c6ee33b8:

  • added argocd_diff to investigated evidence so diff-only Argo CD investigations count the same way status/list-mode investigations do;
  • included Argo CD status/list/diff keys in evidence availability so diagnosis does not treat Argo CD-only evidence as missing;
  • added regression coverage for the healthy short-circuit and evidence-availability paths.

Additional validation:

  • uv run pytest -q tests/nodes/root_cause_diagnosis/test_evidence_checker.py tests/nodes/root_cause_diagnosis/test_healthy_short_circuit.py tests/tools/test_argocd_tools.py tests/services/argocd/test_client.py tests/integrations/test_argocd_catalog_verify.py tests/nodes/plan_actions/test_detect_sources_argocd.py -q → 232 passed
  • make lint
  • make format-check
  • make typecheck
  • git diff --check

@MestreY0d4-Uninter
Copy link
Copy Markdown
Contributor Author

Added the demo video to the PR description.

It shows the Argo CD setup/configuration, local verification, read-only status/list/diff paths, and secret/diff redaction behavior. Transparency note: the recording uses a live shell with automated input and a local Argo CD-compatible endpoint, so the real OpenSRE code path is exercised without exposing live credentials or Kubernetes Secrets.

@muddlebee
Copy link
Copy Markdown
Collaborator

setup and usage are documented clearly

missing as per Acceptance criteria

#320

@MestreY0d4-Uninter MestreY0d4-Uninter force-pushed the issue/320-argocd-integration branch from 3651b38 to 3a66b7e Compare April 28, 2026 14:49
@MestreY0d4-Uninter
Copy link
Copy Markdown
Contributor Author

MestreY0d4-Uninter commented Apr 28, 2026

Thanks for the catch. Addressed in the latest commit (250c02a).

Added docs/argocd.mdx and registered it in the docs navigation. The page now covers:

  • setup via environment variables, persistent store, and ARGOCD_INSTANCES
  • token vs username/password auth, including the no-dual-auth rule
  • HTTPS/loopback HTTP behavior and TLS verification
  • opensre integrations verify argocd
  • investigation usage, supported alert hints, and the two Argo CD evidence tools
  • read-only scope and secret/diff redaction behavior

I also updated the multi-instance integrations page to include ARGOCD_INSTANCES.

Local validation passed:

  • python -m json.tool docs/docs.json
  • git diff --check
  • Mintlify local preview served /argocd successfully
  • make lint
  • make format-check
  • make typecheck
  • focused Argo CD/evidence pytest slice: 65 passed

Update: the first GitHub Actions run was cancelled before a hosted runner acquired the jobs. I re-pushed the same tree to trigger fresh checks; current head 250c02a is now green (quality, typecheck, test, Analyze (python), and CodeQL passed; Kubernetes/thorough jobs were skipped by workflow rules).

@MestreY0d4-Uninter MestreY0d4-Uninter force-pushed the issue/320-argocd-integration branch from 3a66b7e to 250c02a Compare April 28, 2026 15:08
muddlebee
muddlebee previously approved these changes Apr 28, 2026
@muddlebee
Copy link
Copy Markdown
Collaborator

muddlebee commented Apr 28, 2026

@MestreY0d4-Uninter you still need to add entry here https://github.com/Tracer-Cloud/opensre/blob/main/.env.example for the env vars you created and document it!!

and in your demo I dont understand the command you ran? could you pls run any of the scenario mentioned in the docs instead? and not some unit tests pls

@muddlebee
Copy link
Copy Markdown
Collaborator

and pls give a walk through whats happening in demo

Comment thread app/integrations/catalog.py Outdated
Comment on lines +88 to +90
"argocd": "argocd",
"argo cd": "argocd",
"argo-cd": "argocd",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we need all of them? probably best to just stick to one

@MestreY0d4-Uninter
Copy link
Copy Markdown
Contributor Author

Thanks for the follow-up notes. I addressed the remaining items in the latest head commit (70e8c32):

  • added the Argo CD env vars to .env.example;
  • made the documented opensre integrations verify argocd path work from the main CLI;
  • kept the catalog key canonical as argocd only, while preserving Argo CD spelling variants only for alert/source hints;
  • replaced the PR description demo with a real local kind-hosted Argo CD walkthrough instead of the earlier compatible-endpoint demo;
  • verified read-only status/list/diff against that real Argo CD instance, including a live Deployment replica drift scenario where Argo CD reports OutOfSync and ArgoCDApplicationDiffTool returns drift_detected=true.

Validation after the follow-up changes:

  • focused related pytest slice: 245 passed;
  • make lint: passed;
  • make format-check: passed;
  • make typecheck: passed;
  • git diff --check: passed;
  • GitHub Actions on the current head are green (quality, typecheck, test, Analyze/CodeQL; Kubernetes/thorough jobs are skipped by the workflow).

The PR description now includes the updated demo video link and a walkthrough of what is happening in the demo. Credentials are hidden/redacted, and the video OCR/secret scan did not find raw passwords, bearer tokens, JWTs, GitHub tokens, AWS keys, or private keys.

Copy link
Copy Markdown
Collaborator

@muddlebee muddlebee left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

@yashksaini-coder yashksaini-coder left a comment

Choose a reason for hiding this comment

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

Senior Review — PR #948: Argo CD Deployment Investigation Integration

Overall Assessment

Solid, production-quality implementation. One hard blocker (merge conflicts), the rest is minor. The contributor has been extremely responsive — Greptile's P1 (list-mode evidence loss), all three muddlebee P2 issues, and the "deploy" keyword broadness were all addressed in follow-up commits. Architecture follows established patterns cleanly.


✅ What's Done Well

Security hardening (thorough)

  • HTTPS-only with loopback HTTP exception, extracted to app/utils/url_validation (shared with models) — no logic duplication
  • Dual-auth rejection in ArgoCDConfig._no_dual_auth()
  • Bearer token stripped from non-token field validators correctly (fixed from Greptile's original P2)
  • Credentials, session tokens, and retired tokens all included in _redact() — retired token set is a nice touch
  • 401 session retry with _retired_session_tokens clearing — prevents stale token replay
  • _SECRET_LINE_RE + _GENERIC_SECRET_VALUE_RE diff sanitization covers JWTs, GitHub tokens, AWS keys, private keys

Architecture follows project conventions

  • ArgoCDConfig(StrictConfigModel) ✅ (unlike the original Airflow PR which used BaseModel)
  • source="argocd" ✅ (correct for prioritizer scoring)
  • "argocd" in EvidenceSource Literal ✅
  • argocd_applications + argocd_diff registered in evidence gate ✅
  • URL validation in app/utils/url_validation (shared helper, not duplicated) ✅
  • Docs in docs/argocd.mdx with nav registration ✅
  • .env.example updated ✅
  • Multi-instance support via ARGOCD_INSTANCES

Greptile P1 fixed

  • _map_argocd_application_status now correctly reads data.get("applications", []) (plural), so list-mode evidence is preserved

Hint keywords tightened (muddlebee P2 fixed)

  • "deploy", "drift" removed; now only "argocd", "argo cd", "argo-cd", "gitops", "outofsync", "outofsynced"

Tests: 44 pass, comprehensive coverage

  • Client auth flows (bearer, session login, dual-auth rejection, 401 retry)
  • Diff sanitization and truncation
  • Catalog/verify resolution, multi-instance
  • Source detection with tightened hint markers
  • Tool behavior (status single-app, list-mode, diff, not-configured path)

🔴 Blocker — Merge Conflicts

mergeable_state: dirtymain has moved significantly (201 files diverged) since this PR was last rebased. The PR cannot be merged until conflicts are resolved.

Key files that will need attention on rebase:

  • app/integrations/catalog.py (Airflow integration was merged into main via #570)
  • app/nodes/investigate/processing/post_process.py
  • app/nodes/plan_actions/detect_sources.py
  • app/types/evidence.py (Airflow added "airflow" to EvidenceSource)
  • .env.example

Action needed: Rebase issue/320-argocd-integration onto latest main, resolve conflicts, and push. All quality gates should re-pass since the Argo CD changes are orthogonal to what landed in main.


⚠️ Minor Observations (non-blocking)

VaibhavUpreti's catalog.py comment — "do we need all of them?" Looking at the code, ARGOCD_AUTH_TOKEN with ARGOCD_TOKEN as fallback is intentional to handle both naming conventions (some Argo CD tooling exports ARGOCD_TOKEN). This is fine and follows the same fallback pattern used elsewhere.

surfaces not set on either toolArgoCDApplicationStatusTool and ArgoCDApplicationDiffTool default to investigation-only. Given these tools are read-only and investigation-focused, that's appropriate. Adding surfaces=("investigation", "chat") would be a cosmetic consistency improvement but is not blocking.


Summary

Category Status
Code quality ✅ Clean (ruff, mypy)
Tests ✅ 44 pass
Security hardening ✅ Thorough
Architecture fit ✅ Follows conventions
Greptile P1 (list-mode) ✅ Fixed
muddlebee P2 issues ✅ Fixed
Docs + .env.example ✅ Complete
CI checks (last head) ✅ All green
Merge conflicts Blocker — rebase onto main required

Once the rebase is done and CI is green again, this is mergeable.

@muddlebee
Copy link
Copy Markdown
Collaborator

@MestreY0d4-Uninter pls fix merge conflicts

@MestreY0d4-Uninter MestreY0d4-Uninter force-pushed the issue/320-argocd-integration branch from 70e8c32 to 4082ffc Compare April 29, 2026 16:35
Closes Tracer-Cloud#320

Adds a first-class read-only Argo CD integration for deployment status and drift investigation, including catalog/env/verify wiring, investigation tools, source detection, evidence integration, transport/auth hardening, and regression coverage.
Preserve application lists in Argo CD status evidence and keep bearer-prefix stripping scoped to token fields only.
@MestreY0d4-Uninter MestreY0d4-Uninter force-pushed the issue/320-argocd-integration branch from 4082ffc to 8b0ebb6 Compare April 29, 2026 16:40
@MestreY0d4-Uninter
Copy link
Copy Markdown
Contributor Author

Thanks @muddlebee, fixed.

I rebased the branch onto the latest main and force-pushed the refreshed PR head (8b0ebb67b39fa9babc96c36c9622a2d6450ca799). The merge-conflict blocker is resolved now: GitHub reports mergeStateStatus: CLEAN and the PR still has reviewDecision: APPROVED.

Validation:

  • python -m json.tool docs/docs.json
  • focused Argo CD/regression slice: 245 passed
  • MoA-claim spot checks for Argo CD evidence/session/source-detection paths: 6 passed
  • make lint
  • make format-check
  • make typecheck
  • make test-cov: 4053 passed, 2 skipped, 1 xfailed
  • GitHub checks are green: quality, typecheck, test, Analyze (python), CodeQL

I also re-checked the earlier review items against the current head; no remaining blocker found.

@muddlebee muddlebee merged commit 956eda6 into Tracer-Cloud:main Apr 29, 2026
7 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎊 Achievement unlocked: PR Merged. @MestreY0d4-Uninter passed code review, survived CI, and shipped. Respect. 🤝


👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome.

@muddlebee
Copy link
Copy Markdown
Collaborator

@MestreY0d4-Uninter nice work. and from next time lets try to keep the commits after rebase/resolve conflicts clean :) difficult to spot any errors or missing..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add ArgoCD integration for deployment and drift investigation

4 participants