Repository navigation
feat(fleet): probe sync-upstream freshness on both fleet forks (#12235) - #12722
Conversation
Daily 14:30 UTC probe judges each fork's sync-upstream with scripts/fleet/fleet-sync-probe.py: a successful scheduled run within 30h and no failed latest run. A stale or failing sync opens or updates one alert issue (meta/fleet-sync-probe); a green probe closes it. The org fork's schedule has not fired since 2026-11-05 — silent for 16 days — which this probe would have surfaced within a day.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f928a831f6
ℹ️ 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".
| schedule: | ||
| - cron: "30 14 * * *" |
There was a problem hiding this comment.
Register the new daily fleet sync probe schedule
The new daily trigger is absent from doc/fleet-schedule-registry.md, whose GitHub Actions section inventories recurring workflow probes. Add this probe's cadence, scope, owner, and stop criteria in the same change so the placement audit can discover it. The repository explicitly requires same-pass registration for schedules on any surface and classifies omissions as defects.
AGENTS.md reference: AGENTS.md:L60-L65
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in ea9df88: see commit. Dispositioned by shepherd (task 21091).
| parser = argparse.ArgumentParser( | ||
| description="Judge one fleet fork's sync-upstream freshness (#12235).") |
There was a problem hiding this comment.
Disable implicit option abbreviations in the strict parser
With argparse's default allow_abbrev=True, undeclared flags such as --max-age-hour, --rep, and --runs-jso are accepted as abbreviations and proceed to read the input file instead of producing a usage error. Set allow_abbrev=False to enforce the repository's explicit requirement that unknown and typo'd flags be rejected before side effects.
AGENTS.md reference: AGENTS.md:L44-L47
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in ea9df88: see commit. Dispositioned by shepherd (task 21091).
| if ! gh api "repos/${repo}/actions/workflows/sync-upstream.yml/runs?per_page=10" \ | ||
| --jq '.workflow_runs' > "/tmp/runs-${slug}.json"; then |
There was a problem hiding this comment.
Retrieve scheduled runs beyond the first ten results
If ten manual dispatches follow a successful scheduled sync within the 30-hour window, this request excludes that scheduled success. The Python probe then reports no successful scheduled sync ever and the alert step opens or keeps open an issue despite a healthy schedule. Retrieve scheduled successes separately or fetch sufficient history to cover the freshness window; gh api --help documents --paginate as making additional requests to fetch all pages, but this workflow requests only the first ten runs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in ea9df88: see commit. Dispositioned by shepherd (task 21091).
- strict parser: allow_abbrev=False so abbreviated flags are rejected - register fleet-sync-probe in doc/fleet-schedule-registry.md - widen runs fetch from per_page=10 to per_page=100
Summary
Refs #12235 — step 4's second half: make a failed or missing sync visible within a day.
Adds a daily 14:30 UTC probe (same alert-issue pattern as dispatch-health-probe.yml, #6992) that judges each fleet fork's sync-upstream with
scripts/fleet/fleet-sync-probe.py: a successful scheduled run within the last 30h, and no failed latest run. A stale or failing sync opens or updates one alert issue (meta/fleet-sync-probe); a green probe comments the recovery and closes it. The contract test runs in workflow-lint.yml.The 30h window and 14:30 UTC slot are set from observation: sync-upstream's cron is 04:23 UTC but its runs land 11:23–13:40 UTC under GitHub load delay, so the probe runs after that window and tolerates a day of delay variance.
Step 3 of #12235 (dispatch_id_input on fleet-org and fleet-org-blacksmith) is already on main — verified in pkgs/fleet/fleet-surfaces.json, where all five GitHub Actions/Blacksmith surfaces declare it. Steps 1–2 (port the org cache options into upstream dezren39/fleet's fleet-run.yml; let sync-upstream bring the org copy level) live in the dezren39/fleet repo, not this one, and are not in this slice.
Evidence
Before (live runs API, 2026-11-22 ~23:58 UTC) — the probe run against real data:
developing-today/fleet: FAIL — no successful scheduled sync within 30h: last scheduled success 2026-11-05T12:34:20Z (419.4h ago); latest run 45019411056 (workflow_dispatch, success, 2026-11-22T11:52:09Z)developing-today-forks/fleet: PASS — last scheduled success 2026-11-22T12:40:01Z (11.3h ago)That is the exact symptom step 4 names: the org fork's schedule has not fired since 2026-11-05 while upstream fired its scheduled run every day 11-08..11-22 (verified via the runs API; workflow state is
activein all three repos, so this is not a disabled workflow). The probe would have surfaced the gap within a day of the first missed slot.After (this PR):
bash .github/scripts/fleet-sync-probe.test.sh— all contract cases pass, including the real 2026-11-22 shapes of both forks (org fork fails the probe, forks copy passes), the merge-conflict failure shape, dispatch-only history, empty runs, in-progress latest run, the 29h/31h window boundary, usage errors (exit 2), and missing/malformed runs files (named read failures, never a verdict).ACTIONLINT_BIN=<pinned 1.7.7, checksum-verified> bash .github/scripts/check-workflows.sh .github/workflows/fleet-sync-probe.yml .github/workflows/workflow-lint.yml— OK (actionlint + shellcheck -S warning over the run blocks).bash .github/scripts/check-ci-policy-agreement.sh— OK. The workflow declares onlyschedule+workflow_dispatch(no push/PR triggers), per .github/ci-policy.md.Known pre-existing failure, not this PR: the full-set
check-workflows.shrun reports one shellcheck warning in.github/workflows/pm-console-edge-deploy.yml:107(SC2034, unusedattempt), a file this PR does not touch — it fails the same way on main.Merge Danger
Low. New scheduled workflow plus alert-issue automation only; no push/PR triggers, no deploys, no secrets beyond the default
GITHUB_TOKEN(permissions: contents: read, issues: write). Expected first-run behavior: the probe will go red and open an alert issue for the org fork, because its schedule has not fired since 2026-11-05 — that is the point of the probe, not a regression. The alert issue is the tracked item until the org fork's schedule is healthy again.Refs #12235
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.