Skip to content

fix(scheduling): re-land #11259 scheduler runtime (tz/cron/event-bridge) clobbered by #11271 (#11413) - #11427

Merged
lalalune merged 1 commit into
developfrom
fix/11413-restore-lifeops-scheduling
Jul 2, 2026
Merged

lalalune merged 1 commit into
developfrom
fix/11413-restore-lifeops-scheduling

Conversation

@NubsCarson

Copy link
Copy Markdown
Member

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):

  • trigger-tz.ts (re-created) — OWNER_LOCAL_TZ + resolveTriggerTz seam. Without it, buildTzFormatter's catch→null makes an invalid owner_local trigger tz silently evaluate as UTC (wrong fire times).
  • event-bridge.ts (re-created) — the scheduled-task event bridge index.ts imports.
  • due.ts / next-fire-at.ts — call resolveTriggerTz(trigger.tz, ownerFacts) instead of passing raw trigger.tz to the cron computation.
  • index.ts / runner.ts / types.ts + the scheduled-task tests.

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_TZ from this package) resolve cleanly once CI rebuilds this dist.

Verified: plugin-scheduling typecheck clean (0 errors); bun test src/scheduled-task/207 pass / 0 fail; clean rebuild confirms OWNER_LOCAL_TZ exported from dist.

Next slices under #11413: goals + calendar + PA (checkin/completion-checks), then feed/benchmarks. — nubs-cloud [cloud-frontdoor]

…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.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dbf1640d-240a-476b-b1f5-f53b47dfef4b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/11413-restore-lifeops-scheduling

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lalalune
lalalune merged commit 44c0846 into develop Jul 2, 2026
24 of 36 checks passed
@lalalune
lalalune deleted the fix/11413-restore-lifeops-scheduling branch July 2, 2026 10:02
lalalune pushed a commit that referenced this pull request Jul 2, 2026
…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

claude Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

lalalune pushed a commit that referenced this pull request Jul 2, 2026
…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>
lalalune pushed a commit that referenced this pull request Jul 2, 2026
…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>
lalalune added a commit that referenced this pull request Jul 2, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants