fix(scheduling): re-land #11259 scheduler runtime (tz/cron/event-bridge) clobbered by #11271 (#11413) - #11427
Conversation
…ge) clobbered by #11271 (#11413) #11271's stale-base squash byte-reverted the #11259 one-scheduler runtime. This re-lands plugin-scheduling's core from the pre-clobber parent (5b714c7^): - trigger-tz.ts (re-created; DELETED at tip) — OWNER_LOCAL_TZ + resolveTriggerTz seam - event-bridge.ts (re-created) — scheduled-task event bridge - due.ts / next-fire-at.ts — resolveTriggerTz(trigger.tz, ownerFacts) instead of raw trigger.tz (raw tz made invalid 'owner_local' silently evaluate as UTC) - index.ts / runner.ts / types.ts + tests Purely additive to the export surface (restores the tz seam + event bridge the good merges added); develop's current consumers are unaffected. It's the dependency ROOT of the goals/calendar/PA restores (they import OWNER_LOCAL_TZ from here) — landing first so their re-lands resolve cleanly. Verified: plugin-scheduling typecheck clean; scheduled-task tests 207 pass / 0 fail. Part of #11413. Refs #11259.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…11433) #11271's stale-base squash reverted plugin-calendar files (part of #11259 LifeOps). Restored from pre-clobber parent (5b714c7^). Kept develop's newer calendar-destructive-ops/prune-grant-scope tests (divergent — not overwritten). Verified under vitest (calendar's real test harness): 130 passed / 2 skipped / 0 failed. Stacked on the scheduling restore PR (#11427). Part of #11413. Refs #11259.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
…ork (#11376) The #11271 failure mode: a 304-file squash titled as a small cloud-refund refactor carried a stale checkout's file contents over work already merged on develop — no conflicts, merge-base only 8 minutes old, so no base-age check could have caught it. This lands the final #11376 acceptance criterion: a fast required PR check that makes that impossible to repeat silently. - .github/workflows/stale-base-guard.yml — runs on every PR in seconds: blobless --depth=1500 fetch, guard script snapshotted from the BASE branch (a PR cannot neuter the gate that judges it), GIT_NO_LAZY_FETCH=1 so any accidental content read fails loudly. `stale-base-ack` label = loud override for deliberate reverts; labeled/unlabeled events re-trigger. - packages/scripts/stale-base-guard.mjs — plumbing-only (oid compares, no blob reads): flags a PR when it sets a file byte-identically back to an older blob from the target's first-parent history, discarding newer merged work. Heal/re-land PRs (restoring work a clobber reverted) pass by construction; deletion-only findings are non-blocking notices unless a modification-revert corroborates the stale-tree signature. Staleness backstop: merge-base > 200 first-parent commits or > 72 h behind the tip. - packages/scripts/stale-base-guard.self-test.mjs — 9 fixture-repo scenarios (clobber shape, heal, deletions, re-adds, backstops, --window, --ack, missing merge-base); the workflow runs it before the guard on every PR. Proven on real history (evidence in .github/issue-evidence/11376-stale-base-guard/): the actual #11271 topology FAILS with 297 silent-revert findings in ~8 s; the five #11271-restore merges (#11427 #11430 #11433 #11490 #11522) and ten live open PRs all PASS with 0 findings; the exact CI clone shape verified against github.com (fetch 2.4 s, guard sub-second). Refs #11376 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ork (#11376) The #11271 failure mode: a 304-file squash titled as a small cloud-refund refactor carried a stale checkout's file contents over work already merged on develop — no conflicts, merge-base only 8 minutes old, so no base-age check could have caught it. This lands the final #11376 acceptance criterion: a fast required PR check that makes that impossible to repeat silently. - .github/workflows/stale-base-guard.yml — runs on every PR in seconds: blobless --depth=1500 fetch, guard script snapshotted from the BASE branch (a PR cannot neuter the gate that judges it), GIT_NO_LAZY_FETCH=1 so any accidental content read fails loudly. `stale-base-ack` label = loud override for deliberate reverts; labeled/unlabeled events re-trigger. - packages/scripts/stale-base-guard.mjs — plumbing-only (oid compares, no blob reads): flags a PR when it sets a file byte-identically back to an older blob from the target's first-parent history, discarding newer merged work. Heal/re-land PRs (restoring work a clobber reverted) pass by construction; deletion-only findings are non-blocking notices unless a modification-revert corroborates the stale-tree signature. Staleness backstop: merge-base > 200 first-parent commits or > 72 h behind the tip. - packages/scripts/stale-base-guard.self-test.mjs — 9 fixture-repo scenarios (clobber shape, heal, deletions, re-adds, backstops, --window, --ack, missing merge-base); the workflow runs it before the guard on every PR. Proven on real history (evidence in .github/issue-evidence/11376-stale-base-guard/): the actual #11271 topology FAILS with 297 silent-revert findings in ~8 s; the five #11271-restore merges (#11427 #11430 #11433 #11490 #11522) and ten live open PRs all PASS with 0 findings; the exact CI clone shape verified against github.com (fetch 2.4 s, guard sub-second). Refs #11376 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ork (#11376) (#11629) The #11271 failure mode: a 304-file squash titled as a small cloud-refund refactor carried a stale checkout's file contents over work already merged on develop — no conflicts, merge-base only 8 minutes old, so no base-age check could have caught it. This lands the final #11376 acceptance criterion: a fast required PR check that makes that impossible to repeat silently. - .github/workflows/stale-base-guard.yml — runs on every PR in seconds: blobless --depth=1500 fetch, guard script snapshotted from the BASE branch (a PR cannot neuter the gate that judges it), GIT_NO_LAZY_FETCH=1 so any accidental content read fails loudly. `stale-base-ack` label = loud override for deliberate reverts; labeled/unlabeled events re-trigger. - packages/scripts/stale-base-guard.mjs — plumbing-only (oid compares, no blob reads): flags a PR when it sets a file byte-identically back to an older blob from the target's first-parent history, discarding newer merged work. Heal/re-land PRs (restoring work a clobber reverted) pass by construction; deletion-only findings are non-blocking notices unless a modification-revert corroborates the stale-tree signature. Staleness backstop: merge-base > 200 first-parent commits or > 72 h behind the tip. - packages/scripts/stale-base-guard.self-test.mjs — 9 fixture-repo scenarios (clobber shape, heal, deletions, re-adds, backstops, --window, --ack, missing merge-base); the workflow runs it before the guard on every PR. Proven on real history (evidence in .github/issue-evidence/11376-stale-base-guard/): the actual #11271 topology FAILS with 297 silent-revert findings in ~8 s; the five #11271-restore merges (#11427 #11430 #11433 #11490 #11522) and ten live open PRs all PASS with 0 findings; the exact CI clone shape verified against github.com (fetch 2.4 s, guard sub-second). Refs #11376 Co-authored-by: lalalune <shaw.nicola.walters@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Part of #11413. Re-lands the dependency root of the reverted #11259 one-scheduler runtime:
plugin-scheduling's core, which #11271's stale-base squash byte-reverted (trigger-tz.ts + event-bridge.ts were DELETED at develop tip).Restored from the pre-clobber parent
5b714c74e60^(blob-identity verified):OWNER_LOCAL_TZ+resolveTriggerTzseam. Without it,buildTzFormatter's catch→null makes an invalidowner_localtrigger tz silently evaluate as UTC (wrong fire times).index.tsimports.resolveTriggerTz(trigger.tz, ownerFacts)instead of passing rawtrigger.tzto the cron computation.Additive & safe: it restores the tz seam + event bridge the good merges added; it removes nothing develop's current (clobbered) consumers use. Landing this first so the follow-up goals/calendar/PA re-lands (which import
OWNER_LOCAL_TZfrom this package) resolve cleanly once CI rebuilds this dist.Verified:
plugin-schedulingtypecheck clean (0 errors);bun test src/scheduled-task/→ 207 pass / 0 fail; clean rebuild confirmsOWNER_LOCAL_TZexported from dist.Next slices under #11413: goals + calendar + PA (checkin/completion-checks), then feed/benchmarks. — nubs-cloud [cloud-frontdoor]