Skip to content

ci(fleet-patrols): pin each schedule cron to its job if: twin in the watchdog gate - #26653

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-4ax6fd
Oct 27, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-4ax6fd

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #26526
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:check-platform-checklist-watchdog 新增第 7 条:fleet-patrols.yml 里每个 on.schedule cron 都必须有某个 job 的 if: 与之逐字相同,反之亦然;只改脚本,workflow 只读。
  • 为什么改:同一个 cron 写在两处,只改一处时巡查会静默停跑或空跑,CI 毫无红灯;现在任一侧单边修改都会在 lint 的既有步骤里变红。
  • 风险与回滚:只是一条新增的静态断言,今天 main 上四对 cron 全部相同,读数绿;回滚即 revert 本 PR。
  • 先看: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.mjs gains clause 7, judgeScheduleTwins(doc), called from judgeWorkflow:

  • every on.schedule[].cron must be named by some job-level if: as github.event.schedule == 'CRON' (byte-for-byte, because github.event.schedule carries the string exactly as the schedule spells it);
  • every cron a job-level if: names that way must be an on.schedule entry;
  • a job-level if: that reads github.event.schedule in 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 7 section; --list and 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 of lint.yml's Platform-checklist watchdog workflow pin step (--self-test, then the gate), and the clause rides both.

Forced test edits (the self-test is in the same file):

  • the GOOD fixture's watchdog job gains a job-level if: 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_FLOOR 8 → 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:

  • two crons, each named by its own job ⇒ silent (positive control);
  • ⭐ a cron added under on.schedule with no job if: twin ⇒ fires, and is the only finding;
  • ⭐ a job if: cron edited with no on.schedule twin ⇒ names the job, and the cron it left behind fires from the other side;
  • a cron edited under on.schedule alone ⇒ exactly two findings, one each way;
  • a job if: cron with no schedule: at all ⇒ fires;
  • != spelling and the reversed spelling ⇒ refused as unreadable;
  • a twin in a STEP-level if: is not a job twin ⇒ fires.

Self-test: 44 → 53 assertions across 8 → 9 floored batteries.

Acceptance notes

  • Mechanism hypothesis (measured, head 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.
  • Stale workflow prose (governed, not edited): 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.
  • A third spelling, not pinned: PATROL_SCHEDULE restates two of the crons in job env: (:515 for the watchdog, :983 for release-coverage), already flagged in the workflow as "Two readers, one fact". This card's scope is on.schedule against job if:; the env twin stays unpinned.
  • Not pinned on purpose: two jobs naming the same cron (both would run on it). The card asked for orphans on either side, not multiplicity.
  • The card's acceptance names "its existing package.json check": there is no check:platform-checklist-watchdog package script; the existing check is the lint.yml step above, which is what runs the clause.

Verification

Gate list derived by node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at head 9f54e952 (1 path, +101 / −4).

Watchdog gate and self-test at 9f54e95
OK check-platform-checklist-watchdog self-test: 53 assertions across 9 floored batteries, every clause driven by a fixture that makes it fire.
OK .github/workflows/fleet-patrols.yml: schedule + workflow_dispatch present, pull_request_target / merge_group absent, any pull_request trigger paths-filtered to this file and the sibling patrol jobs' own inputs alone, no board write reachable from a pull_request run, every schedule cron twinned with a job `if:`, invoked through `pnpm check:platform-checklist`.
One-sided edits of the REAL fleet-patrols.yml (scratch probe, not committed)
real file at HEAD: 0 finding(s)
schedule side only: '19 4 * * *' -> '19 5 * * *': 2 finding(s)
   - job `release-coverage-patrol`'s `if:` compares `github.event.schedule` to `19 4 * * *`, which no `on.schedule` entry declares …
   - `on.schedule` declares the cron `19 5 * * *` but no job's `if:` compares `github.event.schedule` to it …
job if: side only: board-snapshot '7 2,8,14,20' -> '7 3,9,15,21': 2 finding(s)
   - job `board-snapshot`'s `if:` compares `github.event.schedule` to `7 3,9,15,21 * * *`, which no `on.schedule` entry declares …
   - `on.schedule` declares the cron `7 2,8,14,20 * * *` but no job's `if:` compares `github.event.schedule` to it …
Derived local gate commands at 9f54e95
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs --self-test :: exit 0
node scripts/check-platform-checklist-watchdog.mjs :: exit 0
node scripts/check-platform-checklist-watchdog.mjs --self-test :: exit 0
node scripts/check-self-test-wired.mjs :: exit 0
node scripts/check-self-test-wired.mjs --self-test :: exit 0
node scripts/check-self-test-workflow-commands.mjs :: exit 0
node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0
node scripts/check-whole-set-label-write.mjs :: exit 0
node scripts/check-whole-set-label-write.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:bash32-floor :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:cli-command-ids :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:entry-guard :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:ratchet-remedy-authority :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:scripts-symbol-anchors :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:pm-dispatch-gates :: exit 0

dispatch-gates --ran: Run reconciliation — 32 derived, 32 run, 0 NOT-MEASURED, 0 UNRUN (a DERIVED zero — all 32 recorded an exit code and none of them is 3).

Artifact-roster families whose roster lives under scripts/ (outside the derived 32), read too:
node scripts/check-published-list-mirrors.mjs :: exit 0
node scripts/check-published-list-mirrors.mjs --self-test :: exit 0
node scripts/check-dts-references.mjs --self-test :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:i18n-stale-fill :: exit 0
pnpm check:dts-closure :: exit 3 (PREREQUISITE NOT MET: no package build in this worktree; NOT MEASURED, CI runs it)
pnpm check:published-readme-exports :: exit 3 (PREREQUISITE NOT MET: no package build; NOT MEASURED, CI runs it)

ESLint on the file: pnpm exec eslint --no-inline-config scripts/check-platform-checklist-watchdog.mjs exit 0. No package touched, so no build closure (①) and no package test/typecheck (②); skip-changeset: the diff is a root scripts/ file of the private root package and publishes nothing.


Generated by Claude Code

…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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:skills#1 · session_01ADHkmSrRBdu9MdC6fc33Uu · head 9f54e952 · 2026-10-27T11:50Z

  1. 形态 — one file, scripts/check-platform-checklist-watchdog.mjs (+101/−4): clause 7 judgeScheduleTwins and a nine-case battery. .github/workflows/** read only; no new CI job, required context or package script (it rides the watchdog's existing lint step). check-governed-merges --pr 26653: NOT governed.
  2. 前提实测 — seat read the clause: both directions are pinned byte-for-byte (a declared cron no job if: names; a job if: cron no on.schedule entry declares), and a job if: that mentions github.event.schedule in any other spelling is refused as unreadable, never skipped. Dev measured all four patrol jobs on one spelling; the live file is silent, a one-sided edit gives two failures each way.
  3. 门禁 check-runs — head 9f54e952: 26 success, 17 skipped, 0 failing.
  4. 接受的偏差 — forced test edits named in the body: the GOOD fixture gains a job if:; SELF_TEST_BATTERY_FLOOR 8 → 9.
  5. 范围外去向 — the stale header sentence in fleet-patrols.yml (a one-sided cron edit "reds nowhere") is Tier H and carried onto ci(fleet-patrols): prose across lint.yml, three workflows, five scripts and the dispatch-gates self-test still names the four retired patrol workflow files — sweep them to the fleet-patrols job names #26525's sweep (comment 6440937713). Skills-docs: none.
  6. 落地条款 — not governed: ready + auto-merge through the queue by this seat.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 27, 2026 11:51
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 27, 2026 11:51
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 86ae47e Oct 27, 2026
44 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-4ax6fd branch October 27, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants