Repository navigation
ci(fleet-patrols): pin each schedule cron to its job if: twin in the watchdog gate - #26653
Merged
Merged
Conversation
…watchdog gate check-platform-checklist-watchdog gains clause 7: every on.schedule cron in fleet-patrols.yml must be named by some job-level if: as github.event.schedule == 'CRON', and every cron a job's if: names must be an on.schedule entry. A job-level if: reading github.event.schedule in any other spelling is refused as unreadable rather than skipped. The self-test gains a floored battery driving both one-sided edits; the workflow is read only. Claude-Session: https://claude.ai/code/session_01ADHkmRDtDiaiKtmnnobjEt Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对ACCEPT ·
Generated by Claude Code |
This was referenced Oct 28, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Fixes #26526
Clause-②: no
Metadata-protocol: none
维护者速读
check-platform-checklist-watchdog新增第 7 条:fleet-patrols.yml里每个on.schedulecron 都必须有某个 job 的if:与之逐字相同,反之亦然;只改脚本,workflow 只读。scripts/check-platform-checklist-watchdog.mjs的judgeScheduleTwins,以及 self-test 里 clause 7 那组用例。node scripts/check-platform-checklist-watchdog.mjs --self-test && node scripts/check-platform-checklist-watchdog.mjs,预期两行 OK(53 条断言、9 组)。What changes
scripts/check-platform-checklist-watchdog.mjsgains clause 7,judgeScheduleTwins(doc), called fromjudgeWorkflow:on.schedule[].cronmust be named by some job-levelif:asgithub.event.schedule == 'CRON'(byte-for-byte, becausegithub.event.schedulecarries the string exactly as the schedule spells it);if:names that way must be anon.scheduleentry;if:that readsgithub.event.schedulein any other spelling (!=, the reversed operand order, …) is refused as unreadable, never skipped: a comparison the clause cannot read is one it cannot check.The docblock's clause list (six → seven) gains the clause and a
## Clause 7section;--listand the OK line name it.No edit to
.github/workflows/**, no new CI job, required context or package script: the watchdog already runs as the two lines oflint.yml'sPlatform-checklist watchdog workflow pinstep (--self-test, then the gate), and the clause rides both.Forced test edits (the self-test is in the same file):
GOODfixture'swatchdogjob gains a job-levelif:in the real file's folded shape — without it the positive control's cron has no twin and clause 7 fires on it;SELF_TEST_BATTERY_FLOOR8 → 9, so deleting the new battery from the roster reds.Tests
New battery
clause 7 — every schedule cron and every job if: cron has its twin, floor 9, 9 cases:on.schedulewith no jobif:twin ⇒ fires, and is the only finding;if:cron edited with noon.scheduletwin ⇒ names the job, and the cron it left behind fires from the other side;on.schedulealone ⇒ exactly two findings, one each way;if:cron with noschedule:at all ⇒ fires;!=spelling and the reversed spelling ⇒ refused as unreadable;if:is not a job twin ⇒ fires.Self-test: 44 → 53 assertions across 8 → 9 floored batteries.
Acceptance notes
9f54e952): all FOUR jobs route by the same spelling,(github.event_name != 'schedule' || github.event.schedule == 'CRON')—required-set-patrol:271,platform-checklist-watchdog:475,release-coverage-patrol:857,board-snapshot:1182. No job uses another spelling, so the pin reads exactly that one and refuses any other loudly rather than widening.fleet-patrols.yml's header (lines 22–25) still says of the two one-sided shapes "neither shape is red anywhere". After this PR the watchdog gate reds both. The file is Tier H and outside this card's surface; the sentence wants a governed follow-up naming clause 7.PATROL_SCHEDULErestates two of the crons in jobenv:(:515 for the watchdog, :983 for release-coverage), already flagged in the workflow as "Two readers, one fact". This card's scope ison.scheduleagainst jobif:; the env twin stays unpinned.check:platform-checklist-watchdogpackage script; the existing check is thelint.ymlstep above, which is what runs the clause.Verification
Gate list derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat head9f54e952(1 path, +101 / −4).Watchdog gate and self-test at 9f54e95
One-sided edits of the REAL fleet-patrols.yml (scratch probe, not committed)
Derived local gate commands at 9f54e95
ESLint on the file:
pnpm exec eslint --no-inline-config scripts/check-platform-checklist-watchdog.mjsexit 0. No package touched, so no build closure (①) and no package test/typecheck (②);skip-changeset: the diff is a rootscripts/file of the private root package and publishes nothing.Generated by Claude Code