Repository navigation
fix: silence mctl-agents-reconcile Telegram notify on routine success - #536
Conversation
The hourly reconcile CronWorkflow notified on every tick regardless of outcome, spamming Telegram with "✅ Succeeded" messages even though reconcile only repairs rare dropped write-backs and a routine tick has nothing to report. Apply the same quiet-unless-action-or-failure policy already used by argo-pvc-janitor: skip the Telegram leg entirely when WORKFLOW_STATUS is Succeeded, keep it for Failed/Error/other.
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude finished @mashkovd's task in 37s —— View job Code Review — PR #536Reviewing:
Summary✅ No P1/P2 findings — good to merge Change: Adds a guard clause to skip Telegram notifications when What's correct:
No security, correctness, or operational issues found. The change is focused, well-motivated, and follows established patterns. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e47b12341
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| if [ "$WORKFLOW_STATUS" = "Succeeded" ]; then | ||
| echo "reconcile succeeded; routine tick, skipping Telegram notify." | ||
| exit 0 |
There was a problem hiding this comment.
Preserve success notifications when reconcile repaired state
When run_shepherd --reconcile actually flips one or more .status.yaml files, commit-and-push commits/pushes them and exits 0, so the workflow still reaches WORKFLOW_STATUS=Succeeded; this new unconditional success guard therefore suppresses the only Telegram signal for the non-routine case where the reconciler did something. The nearby argo-pvc-janitor/agent workflows skip only Succeeded runs with no activity, so this needs an activity marker or equivalent check instead of treating every successful reconcile as a routine tick.
Useful? React with 👍 / 👎.
| if [ "$WORKFLOW_STATUS" = "Succeeded" ]; then | ||
| echo "reconcile succeeded; routine tick, skipping Telegram notify." | ||
| exit 0 |
There was a problem hiding this comment.
Report reconcile failures masked by continueOn
If run-reconcile exits non-zero before producing any status changes, the step's continueOn lets commit-and-push run and then succeed with no diff, a pattern this repo already documents as making the whole workflow report Succeeded. This guard now exits before Telegram in that scenario, so token/API/auth regressions can silently stop the reconciler; check steps.reconcile.status or add a final assert before treating a succeeded workflow as a routine tick.
Useful? React with 👍 / 👎.
Summary
mctl-agents-reconcile's hourly CronWorkflow notifies Telegram on every tick regardless of outcome — the screenshot the user shared showed repeated "✅ mctl-agents: reconcile — Succeeded" messages hourly, with nothing actionable in any of them..status.yamlwrite-backs (per the CronWorkflow's own description) — a routine successful tick has nothing worth reporting.argo-pvc-janitor: skip the Telegram leg whenWORKFLOW_STATUS == Succeeded, keep it forFailed/Error/other.Test plan
python3 -c "import yaml; yaml.safe_load(...)"){{...}}introduced in comments (glob-scan validator safe)@claude reviewand CI green before merge