Repository navigation
feat(workflows): add mctl-agents-shepherd CWFT + CronWorkflow (suspended) - #88
Conversation
…ded) Adds the Tier 3 PR shepherd companion to mctl-gitops: - ClusterWorkflowTemplate `mctl-agents-shepherd` mirrors cwft-mctl-agents-implement.yaml (SSH clone-gitops, run-shepherd container, .status.yaml-only commit-and-push, telegram onExit, shared `mctl-gitops-main-writes` mutex, 8Gi PVC, 7200s deadline). Runs `python -m orchestrator.run_shepherd` in ghcr.io/mctlhq/mctl-agents:1.9.0 with --service / --slug / --dry-run wired through env-var argv-build (no inline workflow.parameters interpolation in shell bodies, per the Argo template glob-scan footgun documented in project memory). - CronWorkflow `mctl-agents-shepherd` runs every 30 minutes with concurrencyPolicy: Forbid. Suspended at install time so the operator can run the first shepherd one-shot before letting the cron loose. The 1.9.0 image tag references mctl-agents PR #12 which has not shipped yet — the run-shepherd step will ImagePullBackOff until then. Intentional: ArgoCD syncs the CWFT the moment the tag drops, no second gitops PR needed. Spec: platform-gitops/agents-state/mctl-agents/proposals/tier3-pr-shepherd/
|
@codex review |
|
@copilot review |
Here's my review of the two new files: cwft-mctl-agents-shepherd.yaml ✅ Correctly mirrors ✅ Security: workflow params are injected via env vars ( ✅ ✅
cronworkflow-mctl-agents-shepherd.yaml ✅ Overall: no blocking issues. The two files are correct, secure, and consistent with the codebase patterns. Ready to merge once mctl-agents#12 ships |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
- Flip issue-86 (production alert PrometheusRule) to status=accepted. - #86: correct namespace (monitoring) + labels (prometheus: kube-prometheus / role: alert-rules) to match deploy/alerts/canary.rules.yaml; drop the three alerts already covered by the deployed mctl-telegram-alerts VMRule (RateLimitWave/ClientErrorsSpike/AuthFailuresSpike); document VM-operator auto-conversion and the gitops mirror path. - #88: note CRD infra already exists (canary precedent); burn-rate groups APPEND to #86's rules file; sequence after #86. - #92: link canary section to existing docs/runbooks/canary.md instead of duplicating; map auth/client/ratelimit runbook anchors to the #59 VMRule alerts; fix anchor table.
Summary
Companion gitops PR for the Tier 3 PR shepherd. Lands two new files
under
platform-gitops/argo-workflows/cluster-templates/so thatonce
ghcr.io/mctlhq/mctl-agents:1.9.0ships, ArgoCD can sync thetemplate and the operator can drive the first one-shot manually
before un-suspending the cron.
cwft-mctl-agents-shepherd.yaml— ClusterWorkflowTemplatemctl-agents-shepherd. Mirrorscwft-mctl-agents-implement.yaml(SSH clone-gitops, run container,
.status.yaml-only commit-and-push,telegram onExit, shared
mctl-gitops-main-writesmutex, 8Gi PVC,7200s deadline). Runs
python -m orchestrator.run_shepherdwith--service,--slug,--dry-runwired through env-var argv-build(no inline
workflow.parametersinterpolation in shell bodies, perthe Argo template glob-scan footgun documented in project memory).
cronworkflow-mctl-agents-shepherd.yaml— CronWorkflowmctl-agents-shepherd. Schedule*/30 * * * *,concurrencyPolicy: Forbid,suspend: true. Operator un-suspends after the first one-shotsucceeds.
The image tag
1.9.0references the upcomingmctl-agentsbuildthat ships
orchestrator/run_shepherd(mctlhq/mctl-agents#12). Therun-shepherdstep will ImagePullBackOff until that tag ispublished — intentional. ArgoCD picks up the new template the moment
the tag drops; no second gitops PR is needed.
Tier 3 spec lives in
platform-gitops/agents-state/mctl-agents/proposals/tier3-pr-shepherd/(requirements, design, tasks). Task 6 in that spec is exactly this
PR's scope.
Test plan
yq eval '.kind' …confirms both files parse to the expectedClusterWorkflowTemplate/CronWorkflowkinds.kubectl --dry-run=client apply -f …against the live mctl-preprodAPI server accepts both manifests (CRDs validate).
argo-workflows-configApplication syncscleanly;
kubectl -n argo-workflows get clusterworkflowtemplate mctl-agents-shepherdreturns the resource.mctl-agents:1.9.0ships: operator submits a one-shotWorkflow with
--dry-run=trueagainst a single proposal to verifythe decide() path before un-suspending the cron.
kubectl -n argo-workflows get cron mctl-agents-shepherd -o jsonpath='{.status.lastScheduledTime}'advances every 30 min and
concurrencyPolicy: Forbiddropsoverlaps cleanly.