Skip to content

feat(tools): cross-signal correlation with ArgoCD timeline (Phase 4/4)#107

Merged
rlaope merged 1 commit into
masterfrom
feat/correlate-inquiry
May 28, 2026
Merged

feat(tools): cross-signal correlation with ArgoCD timeline (Phase 4/4)#107
rlaope merged 1 commit into
masterfrom
feat/correlate-inquiry

Conversation

@rlaope
Copy link
Copy Markdown
Owner

@rlaope rlaope commented May 28, 2026

Summary

  • Adds correlate.workload: a read-only tool that merges the change timeline (k8s + docker, which already includes k8s events) with ArgoCD sync history into one newest-first evidence chain, and surfaces a candidate-cause line (the most recent non-event change/sync in the window).
  • Integrates ArgoCD as a change.ChangeSource via a new exported ArgoClient.AppHistory wrapper over the existing read-only v1 API (GET only, app name url.PathEscape-d).
  • Capstone of the signal-domain rollout. Read-only, RiskLow.

Closes #103.

What's new

  • internal/core/tools/gitops/argocd.go — exported (*ArgoClient).AppHistory(ctx, app) (reuses RawGet + parseArgoHistory).
  • internal/core/tools/correlate/correlate.workload tool, argoSource (change.ChangeSource over Argo history), historyToEvents, register, tests.
  • internal/wiring/tools.go — correlate registration (k8s hub + docker hub + gitops Argo clients); MarkSkipped when no source.
  • internal/wiring/skills_test.gocorrelate.workload in canonicalToolNames.

Scope

v1 correlates change + k8s events + ArgoCD sync, time-aligned, with symptom→candidate-cause. Prometheus-metric and log/trace correlation are deferred to v2 (noted for a follow-up issue).

Test plan

  • go build ./...
  • go test ./... (history→event parse/since/unparseable; argoSource via mock; ambiguous-endpoint error; merge newest-first across sources; candidate-cause skips events & picks newest change/sync; partial-failure tolerance; all-fail hard error; workload-required; RiskLow)
  • golangci-lint v2.12 run ./... → 0 issues
  • code review (oh-my-claudecode:code-reviewer, opus) → APPROVE, 0 blocking
  • Live QA against a real ArgoCD endpoint + cluster (not available in dev env)

Follow-ups (non-blocking, from review): align pre-existing ArgoHistoryEntry json tag deployed_atdeployedAt; extract the now-duplicated matchesWorkload into a shared dockerclient helper; v2 metric/log/trace correlation.

🤖 Generated with Claude Code

… 4/4)

Add a read-only correlate.workload tool that merges the change timeline
(k8s + docker) with ArgoCD sync history into one newest-first evidence chain
and surfaces a candidate-cause line (the most recent non-event change/sync).
ArgoCD is integrated as a change.ChangeSource via a new exported
ArgoClient.AppHistory wrapper over the existing read-only v1 API.

v1 correlates change + k8s events + Argo sync; Prometheus-metric and
log/trace correlation are deferred to v2. Read-only, RiskLow.

Phase 4 of #103.

Signed-off-by: rlaope <piyrw9754@gmail.com>
@rlaope rlaope merged commit dc35d04 into master May 28, 2026
2 checks passed
@rlaope rlaope deleted the feat/correlate-inquiry branch May 28, 2026 07:36
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.

feat(tools): cross-signal correlation & external source integration (Phase 4/4)

1 participant