Skip to content

feat(tools): orchestrator-agnostic change & deploy inquiry (Phase 1/4)#104

Merged
rlaope merged 2 commits into
masterfrom
feat/change-inquiry
May 28, 2026
Merged

feat(tools): orchestrator-agnostic change & deploy inquiry (Phase 1/4)#104
rlaope merged 2 commits into
masterfrom
feat/change-inquiry

Conversation

@rlaope
Copy link
Copy Markdown
Owner

@rlaope rlaope commented May 28, 2026

Summary

  • Adds a read-only change.recent tool that reports recent rollout / image / scale / restart events for a workload across both Kubernetes and Docker on one newest-first timeline.
  • Introduces a ChangeSource seam (internal/core/tools/change/) with k8s and docker implementations, plus a read-only Docker client adapter (internal/clients/docker/, list/inspect only) and a DockerHosts config field.
  • This is Phase 1 of 4 in the signal-domain rollout from the cloudy capability spec. Read-only invariant preserved (no mutating tools, all RiskLow).

Closes #100.

What's new

  • internal/core/tools/change/ChangeSource interface + ChangeEvent/ChangeQuery + MergeSorted; K8sSource (deployment/statefulset/daemonset revisions via ReplicaSet/ControllerRevision, rollout, image, scale, HPA, events); DockerSource (container_create/restart, running image, image_pull); change.recent tool (RiskLow).
  • internal/clients/docker/ — read-only Docker SDK adapter (v28.5.2), Hub/Client by host name.
  • internal/clients/k8s/client.goReplicaSets + ControllerRevisions accessors.
  • internal/config/config.goDockerHosts field; internal/wiring/tools.go — change-group wiring (registers with whichever backend is available; honest skip reason).

Test plan

  • go build ./...
  • go test ./... (no-cache; 19 new tests in change pkg, all green)
  • golangci-lint v2.12 run ./... → 0 issues
  • go vet ./... / gofmt clean
  • Live QA against a real cluster + Docker host (not available in dev env; reviewer/maintainer to verify behavior)

🤖 Generated with Claude Code

rlaope added 2 commits May 28, 2026 15:30
… 1/4)

Add a read-only change.recent tool that reports recent rollout, image,
scale, and restart events for a workload across both Kubernetes and Docker
on one newest-first timeline. Introduces a ChangeSource seam with k8s and
docker implementations, a read-only Docker client adapter (list/inspect
only), and a DockerHosts config field.

Phase 1 of #100.

Signed-off-by: rlaope <piyrw9754@gmail.com>
- k8s: match ControllerRevisions by owner kind+name so a same-named
  StatefulSet and DaemonSet no longer duplicate each other's rollout events
- k8s: skip the Events field-selector query when the workload contains
  selector metacharacters instead of silently returning zero events
- docker: validate Docker host endpoints eagerly in NewHub (an empty
  endpoint is a config error, not a silent DOCKER_HOST fallback)
- docker: match workloads and image repos by exact name/segment rather than
  substring, so "api" no longer matches "api-gateway"
- docker: drop the misleading digest to tag "image" diff and skip images
  with an unset creation time

Phase 1 of #100.

Signed-off-by: rlaope <piyrw9754@gmail.com>
@rlaope rlaope merged commit 352903a into master May 28, 2026
2 checks passed
@rlaope rlaope deleted the feat/change-inquiry branch May 28, 2026 06:48
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): orchestrator-agnostic change & deploy inquiry (Phase 1/4)

1 participant