Repository navigation
schedule-kick keep-on: an "every" entry keeps all workflows on but the ones meant to be off (#867) - #1276
Conversation
…e ones meant to be off (#867) A keepOn entry with "every": true and an "off" list (each workflow with the reason it is meant to be off) keeps every workflow of the repository on, not only named ones. Its first re-enable of a workflow also tells the owner over the alert channel. A full page of workflows is an error, since it cannot tell it saw them all. Each re-enable line says what GitHub's state tells about who switched it off (a person or a token, or GitHub for inactivity). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: Claude Opus 5.5 (code lens) · read at: 3acc202 blocker: none Checked and fine: a missing, wrong-type or reasonless Tests: I ran the PR's keepon.test.py against State question:
🤖 Generated with Claude Code |
… told only after a send (#867) Fix round 1 for the code lens on #1276. - An `every` entry's first pass (no `OWNER/REPO *` record yet) turns nothing on: it holds the workflows it would turn on, shows them as `held`, and sends one alert listing them. Later passes turn on only workflows that go off after it. `schedule-kick keep-on --accept OWNER/REPO` clears the held list; an `off` line, or the workflow coming on by other means, drops one from it. Broken or missing state is a first pass again. - `maxPerPass` (every entries, default 3, 1 to 20): a pass that would turn on more turns on none, is an error, and alerts at most once an hour while it lasts. - The first-re-enable message: a `pending` mark is written before the enable call, `told` is set only after the send works; a failed send or a pass that stops after the enable tells on the next pass. - `off` names match file names without case; a case-only or stale name is a status warning (`ok` stays true), printed by `check` from the last pass's status file. - The `OWNER/REPO *` record survives the prune, so a list error that comes and goes alerts once an hour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
FixRound 1 for the code lens (#1276 (comment)). Head Major 1: mass re-enable guard.
Major 2: the owner is told. Before the enable call, Minors.
State question.
Tests ( The other schedule-kick files: 🤖 Generated with Claude Code |
|
lens: code · reviewer: Claude Opus 5.5 (code lens, round 2) · read at: 111bd80 blocker: none Round 1, fixed: the mass re-enable (the first pass only reports, Checked and fine: an old State question:
Tests: I ran only a probe of 4 tests against the PR head, built on the PR's own 🤖 Generated with Claude Code |
… hour - Alert-channel messages (errors, the held list, first re-enables) are queued and sent only after every entry's enables are done and written. Each target tries one at most once an hour, sent or not (tellTriedAt, heldTriedAt, and the existing alertedAt/capAlertedAt), and a pass stops at its first failed send, so no alert channel, or a hanging alert command, never stops keep-on from turning workflows back on and logs one line an hour, not one a pass. - --accept with more held than maxPerPass no longer says to raise maxPerPass (at most 20): it says to turn the rest on by hand or release them via "off". - The first "every" pass no longer holds a workflow a named entry kept on (its re-enable counter): it is turned on as before the move. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Round-2 fixes (9e1342e):
RedCheck: updated the mutations for the moved code, and added mutations for the named-entry rule, one failed send a pass, and the try being written before a send. 🤖 Generated with Claude Code |
|
override for head 9e1342e: round-2 fix diff read by the orchestrator (last round, no round 3): outbox runs after the enables, the hourly tried-at is saved before the send, and the loop stops on the first failed send. Fixed as the round-2 lens asked. |
What
Part 1 of #867:
schedule-kick keep-oncan keep every workflow of a repository on, not only named ones."every": trueentries. AkeepOnentry with"every": trueand anoffobject, in place ofworkflows, turns back on every workflow of the repository that isdisabled_manuallyordisabled_inactivity, except the onesoffnames. Eachoffname needs the reason it is meant to be off (1 to 200 characters, at most 100 names).offis required:{}is the owner's word that none is meant to be off.offwithoutevery, oreverywithworkflows, is refused.offis left as it is. If it is on, the status sayslisted as off but active. A workflow GitHub lists asdeletedis skipped.everyalso sends an alert-channel message ("if it is meant to be off, add it to off with the reason"). That way a workflow switched off on purpose but left out ofoffgets noticed instead of being kept on silently. Later re-enables are journal lines, as for named entries.disabled_manuallyis a person or a token (the repository API does not say which; the owner's security log does,action:workflows.disable_workflow), anddisabled_inactivityis GitHub itself after 60 days without activity.schedule-kick checkprints aneveryentry with itsoffnames. README: the Keep-on section (renamed "Keep-on: turn workflows back on") and the config example.Nothing changes for an existing config: named entries work as before, and only their re-enable line gets the "who" part at the end.
Before switching this fork to
every: 29 of its 46 workflows aredisabled_manuallytoday (upstream's CI, release, mobile and preview workflows, plus a few old canary or scratch files that GitHub still lists). Each needs anoffline, or the first pass turns it on (and sends one alert each). The machine's config is private, so this PR does not write it.Left for later parts of #867: an entry for each project repository (config only, once this lands), and a single place that shows the status of every entry.
Tests (red, then green)
fork-kit/schedule-kick/tests/keepon.test.py. Run againstorigin/main'slib/, the 6 new tests fail (5 errors, 1 failure) and so does RedCheck. With the change, all 27 pass. The other schedule-kick test files (kick,heads,cron,install,late) pass too.Every.test_every_workflow_is_kept_on_but_the_ones_meant_to_be_off: are the off workflows not named inoffturned back on, while anoffworkflow stays off, anoffworkflow that is on is never switched off, and adeletedone is skipped?Every.test_the_owner_hears_of_the_first_re_enable_of_each_workflow_only: does the first re-enable send one alert, and a second switch-off of the same workflow only a journal line?Every.test_a_full_page_is_an_error_since_it_cannot_tell_it_saw_every_workflow: with 100 rows, is nothing turned on and the entry an error with an alert?Every.test_a_list_error_names_the_whole_entry: does a list error show asOWNER/REPO (every workflow)?Every.test_the_config_needs_the_off_list_and_a_reason_for_each: are a missingoff, an empty or non-text reason, a bad file name,everywithworkflows,offwithoutevery, and a non-booleaneveryall refused, and doescheckprint the entry?KeepOn.test_a_re_enable_says_what_github_tells_about_who_switched_it_off: does each re-enable line say who switched it off, for both off states?.github/fork-ci-tests.txt: unchanged. The file still runs in about 1 s.Checks
vp fmt/vp linton the changed files. The fork-checks scripts (schema, upstream files, seams) pass againstorigin/main.Part of #867
🤖 Generated with Claude Code