Skip to content

docs(runbooks): the converge flaps ScheduledJobFailed when left off main - #1728

Merged
Gerrrt merged 3 commits into
mainfrom
gerrrt/doc-converge-off-main-flapping
Nov 24, 2026
Merged

Gerrrt merged 3 commits into
mainfrom
gerrrt/doc-converge-off-main-flapping

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 24, 2026

Copy link
Copy Markdown
Owner

What changed

Documentation only. docs/runbooks/converge-the-host.md's When it refuses
gains a ### The tree is on another branch subsection, and docs/changelog.md
records today's instance. Nothing in the running lab changes.

Why

The hourly converge only ever fast-forwards main, so it refuses when its
deployment checkout is left on a branch — and that checkout doubles as the tree
branches are authored from. So ScheduledJobFailed{homelab_job=converge} flaps
whenever branch work overlaps a converge window. It happened on 2026-11-24 (the
robo tree on prometheus sat on gerrrt/hicks-pool-leases, then
gerrrt/close-morpheus-audit, across the 18:27 and 19:28 converges, which both
exited 2; the 20:27 run found main and cleared it). The runbook documented
every other refusal but not this one; this fills the gap and records that the
refusal is benign (the branch check runs before any fetch, so nothing deploys)
and self-clears on the next converge that finds main.

Blast radius

Documentation only — no host, VLAN, or service behaviour changes.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

  • make validate passes — not run locally (it pulls ~38 GB of images;
    left to CI). Ran the docs-relevant subset instead:
    • scripts/check_docs.py — PASS (182 Prometheus + 28 Loki rules,
      8 dashboards, 156 panels, 14 assertions)
    • scripts/check_close_keywords.py — PASS
    • scripts/lint.sh — yamllint, shellcheck, ruff, actionlint PASS;
      markdownlint, zizmor, packer, tofu, editorconfig SKIPPED (need a Docker
      daemon); ansible-lint failed to run locally on a uv --pip-args
      incompatibility, unrelated to this docs change. CI runs the full set.
  • Deployed to the lab and confirmed working — N/A (documentation only)
  • Docs updated (docs/, service README, or docs/roadmap.md)

🤖 Generated with Claude Code

converge-the-host.md's "When it refuses" had no entry for the not-on-main
refusal — the one that recurs, because the deployment checkout doubles as the
tree branches are authored from and the hourly timer does not wait for that
work to finish. Add a subsection quoting the real error, saying the flap is
benign (the branch check runs before any fetch, so nothing deploys) and
self-clears on the next converge that finds main, and pointing at a git
worktree as the way to keep the checkout on main while authoring. The
changelog records today's instance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 21:12
@Gerrrt
Gerrrt enabled auto-merge (squash) November 24, 2026 21:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documentation still needs to acknowledge possible service restarts despite branch refusal and clarify that the alert clears only after a successful scheduled converge.

2 open issues
What changed in this PR

This documentation-only PR fills a gap in the host-convergence runbook: scheduled convergence refuses deployment when the checkout is off main, triggering ScheduledJobFailed. No runtime behavior changes.

Changes:

  • Adds troubleshooting guidance for branch-related refusals, including recovery and using a separate Git worktree.
  • Records the November 24 incident and observed recovery in the changelog.
File Description
docs/​runbooks/​converge-the-host.md Documents off-main refusals and operator guidance.
docs/​changelog.md Records the incident and corresponding runbook addition.

Review effort: Balanced

Comment thread docs/runbooks/converge-the-host.md Resolved
Comment thread docs/runbooks/converge-the-host.md Resolved
Gerrrt and others added 2 commits November 24, 2026 13:18
…eds a clean pass

Address #1728 review. revive_stopped (converge.sh:1261) runs before the branch
check (1289), so a converge that refuses on a branch may already have restarted
a stopped stack service — on its last-applied config, not the branch's. Say
that, keeping "no branch configuration is deployed" distinct from "no effect".
And ScheduledJobFailed reads the last exit code, so it clears on the next
successful converge (main and clean), not merely on return to main; point at
the journal when it persists. Same qualification in the changelog entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ff-main-flapping

# Conflicts:
#	docs/changelog.md
@Gerrrt
Gerrrt merged commit 2774f2e into main Nov 24, 2026
9 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/doc-converge-off-main-flapping branch November 24, 2026 21:34
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.

2 participants