Repository navigation
gardener workflows-off: the daily report shows each keep-on entry (#867 part 2) - #1412
Conversation
With keepOnStatus, the check reads schedule-kick's keep-on-status.json: a keeper that stopped (missing, unreadable, other version, or a last pass older than keepOnMaxAgeMinutes), each entry's errors, pauses and warnings, a repository keep-on has no entry for, and the off workflows as keep-on sees them (off on purpose with the reason: a note; held: a warning that says so). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: Claude Opus 5.5 (code lens, round 1) · read at: a8f0485 major: a pass that broke is reported as "keep-on has no entry for this repository" (a note), and the error is not shown. When What holds: repository matching is case-insensitive at both ends (key repo part, State question: the check only reads, so a second run gives the same result. keep-on writes the status atomically (tmp file + 🤖 Generated with Claude Code |
…#867 lens round 1) - A keep-on status with a top-level error (the pass broke, or the config was refused) is one keep-on-failed warning that quotes the error, with no keep-on-none notes; the home folder shows as "~". - A last pass dated more than 5 minutes in the future is keep-on-future (warn), as a stale one is. - Findings name the status file by its base name, and an unreadable file's OSError text no longer carries its path. - A repository with no workflow files is not "no entry" (an every entry for it writes no target). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fix round 1 for the code lens (read at a8f0485), now at d67d120.
RedCheck gets 6 more rows: the failed pass, its State question: the check still only reads, so a second run gives the same findings. A failed pass returns before any target is used, so nothing is hidden as "meant" (the safe side). A future-dated status is like a stale one: its targets are still used, next to the warning. A status left over from a failed pass and then replaced by a good pass reads as the good pass (keep-on writes it whole, with 🤖 Generated with Claude Code |
What
Part 2 of #867: one place that shows every keep-on entry's status. Part 1 (#1276) left "a single place that shows the status of every entry". That place is now the gardener's daily report issue, through its existing
workflows-offcheck.With the new option
keepOnStatus(the path of schedule-kick'skeep-on-status.json, absolute or~/...),workflows-offreads keep-on's last pass. It makes no API call for this. For the check'srepos:workflows.keep-on-unreadable(warn). A last pass older thankeepOnMaxAgeMinutes(1 to 10080, default 30; keep-on runs every 15 s) isworkflows.keep-on-stale(warn). One dated more than 5 minutes in the future (a wrong clock) isworkflows.keep-on-future(warn). Either way, a workflow switched off since then stays off. The plain off warnings still show.error(the pass broke:targetsempty; or the config was refused:entries, notargets) is oneworkflows.keep-on-failedwarning that quotes the error, with no "no entry" notes. The off workflows are then reported as if keep-on were not configured.workflows.keep-on-error(warn),workflows.keep-on-paused(note) andworkflows.keep-on-warning(note). A whole-entry error readsOWNER/REPO (every workflow).workflows.keep-on-none), so a project repo left out of keep-on is noticed. A repository with no workflow files is not: aneveryentry for it writes no target.~.offlist names (matched without case, as keep-on matches) is a note with the reason (workflows.off-meant) instead of aworkflows.offwarning. A workflow held since aneveryentry's first pass stays a warning, and its text says keep-on holds it and why.Without
keepOnStatus, nothing changes. Docs: the gardener README (workflows-off) and the schedule-kick README (Keep-on, "The daily report").State question (runs again, stops half-way, old or empty state): the check only reads the status file and writes nothing, so a second run gives the same findings. An old status is the
keep-on-stalefinding. A future-dated status iskeep-on-future. A status whose pass failed iskeep-on-failed, and, as with an unreadable one, nothing is shown as "meant". An empty, partly written or missing file iskeep-on-unreadable, and the off workflows are then reported as if keep-on were not configured (the safe side: nothing is hidden as "meant").Tests (red, then green)
New class
WorkflowsOffKeepOninfork-kit/gardener/tests/checks.test.py. Run againstorigin/main's check, all 11 tests fail. With the change, they pass, and so does the whole file (91 tests, about 30 s).test_an_off_workflow_keep_on_means_off_is_a_note_with_its_reason: is a workflow in keep-on'sofflist (Old.ymlin the repository,old.ymlinoff) a note with its reason, while the other off workflows stay warnings?test_a_held_workflow_says_keep_on_holds_it: does a held workflow's warning say keep-on holds it, and does its fix name both ways out?test_errors_pauses_and_warnings_of_these_repositories_only: are another repository's errors and warnings left out?test_a_repository_keep_on_has_no_entry_for_is_a_notetest_an_old_last_pass_means_keep_on_has_stopped: is the result silent at 29 minutes, a finding at 31, and silent again withkeepOnMaxAgeMinutes: 60?test_a_missing_or_broken_status_is_a_warning_and_the_off_workflows_still_show: is this true for a missing file, a half-written file and version 2?test_bad_options_fail_the_check: a relative path, 0 minutes, a string.test_a_pass_that_broke_or_a_refused_config_is_one_warning_with_its_error: both of schedule-kick's error shapes; the error is quoted with~for the home folder.test_a_last_pass_in_the_future_is_a_warning: silent at 3 minutes ahead, a warning at 60.test_the_status_path_is_never_shown: a missing file and an old status with a warning; no finding holds the folder.test_a_repository_without_workflow_files_needs_no_entry~, the future date, the base name, the OSError text without its path and the no-workflow-files repository. For each row, its test fails without the rule..github/fork-ci-tests.txt: unchanged (the file still runs in about 30 s, its listed weight is ~31 s).Checks
vp fmt/vp linton the changed files. The fork-checks scripts (schema, upstream files, seams) pass againstorigin/main.Left for #867
everyentry for each project repository in the machine's private schedule-kick config, andkeepOnStatusin the gardener's private config. Both are config only and not in this repository.everyfor this fork itself first needs anoffline for each workflow that is off on purpose (part 1 counted 29).Part of #867
🤖 Generated with Claude Code