Skip to content

Add custom hourly intervals for scheduled tasks - #15799

Merged
danielhanchen merged 5 commits into
unslothai:mainfrom
Imagineer99:feat/hourly-scheduled-tasks
Oct 30, 2026
Merged

danielhanchen merged 5 commits into
unslothai:mainfrom
Imagineer99:feat/hourly-scheduled-tasks

Conversation

@Imagineer99

@Imagineer99 Imagineer99 commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Adds an Hourly repeat option with intervals of 1–24 whole hours, including every 2 hours, and shows the next run time in the task list.

New tasks, interval changes, and resumed tasks wait one full interval. Subsequent runs stay anchored to the saved due time, skipping missed occurrences without drift. Manual runs and metadata-only edits preserve the cadence. No database migration is required.

Validation:

  • 14,251 frontend tests and 187 backend scheduling tests passed, plus account-isolation and lifecycle checks.
  • Typecheck, production build, translation checks, and changed-file lint passed.
  • Live UI/API checks covered create, edit, reload, pause/resume, Run now, and deletion.
  • A two-hour real-clock test verified three scheduled executions, saved replies, and preserved cadence across a backend restart.

Native Unsloth Desktop behavior was not tested.

Before / after

Merge base ee3c271 vs head 67097f6, two isolated Studio installs, Chromium.

Task list: a 2 hour task is refused on the merge base (HTTP 422) and accepted on the branch, where it shows "Every 2 hours" with its next run one interval out.

Task list before and after

Repeat menu: Hourly is added as the second option.

Repeat menu before and after

New task dialog with Hourly picked: the Time row is replaced by "Interval (hours)" and the note about when the first run happens.

Dialog before and after

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T15:00:13.111410Z
We couldn’t complete this review. Comment @codex review to try again.
6ee0a86 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

danielhanchen added a commit that referenced this pull request Oct 28, 2026
## Summary

`studiobench-ui-parity` fails its `Merge base vs itself, the null`
control on unrelated PRs (#15798 and #15799, both runs around 15:00):
one of the four cells times out and the control refuses to print a
verdict over the remaining pairs.

```
cell FAILED: TimeoutError: ElementHandle.click: Timeout 8000ms exceeded.
  15 x waiting for element to be visible, enabled and stable
     - <div class="mt-4 flex shrink-0 flex-wrap items-center justify-end gap-x-1 gap-y-2">...</div>
       from <div data-testid="overlay-rail" ...> subtree intercepts pointer events
1 of 4 planned cells left no usable reading
```

The element in the way is the button row of the llama.cpp update card
(`components/llama-update-banner.tsx`), which floats in the bottom-right
`overlay-rail` over the composer. It appears when the backend sees a
newer llama.cpp prebuilt than the runner installed, so whether a cell
gets it depends on release timing, not on the build under test. Neither
side of a null control is wrong here; the run just has an out-of-band
card in it.

## Change

`studiobench/runtime/lifecycle.seed_init_script` now also writes
`unsloth_<channel>_notification_frequency = "off"` for every
notification channel (`llama`, `whisper`, `audio`, `unsloth`). With
every channel muted, `updateBannerAllowed` finds no audible component
and the card never renders; the update check itself still runs. Callers
can still override any key through `extra_local_storage`.

`runtime/selftest/test_studiobench_quiet_notifications.py` keeps this
honest against the frontend: the muted channels must equal
`NOTIFICATION_CHANNELS`, the key must match `frequencyKey` in
`use-notification-frequency.ts`, `"off"` must still be a
`NOTIFICATION_FREQUENCIES` value, and the seed script must write them.

## Testing

- `tests/studio/studiobench`: 1509 passed, 145 skipped (the new selftest
included).
- Sabotage, one at a time: dropping the mute from the seed payload,
dropping the `unsloth` channel, and renaming the frontend key to
`unsloth_${channel}_notify_frequency` each fail exactly one of the three
new tests.
- Not reproduced end to end here: forcing a pending llama.cpp update on
a local Studio needs a newer prebuilt than the one installed. The mute
path itself is the frontend's own (`updateBannerAllowed` requires an
audible, unmuted component), covered by
`notification-frequency*.test.ts` and `llama-job-lifecycle.test.ts`.
danielhanchen added a commit that referenced this pull request Oct 28, 2026
…rowth (#15822)

## Summary

`Frontend build + bundle sanity` fails on main (seen on #15806, #15799,
#15798, #15795; reproduces locally on `556b28bb40`):

```
eager startup JS: 5837.8 KB raw, 1806.0 KB transfer, 85 chunks
over the startup budget: transfer 1806.0 KB > 1795.7 KB, raw 5837.8 KB > 5819.8 KB
```

Building every frontend commit since the last budget base (`8222149ee`)
and measuring the eager set the same way
`scripts/check-bundle-budget.ts` does:

| commit | raw B | transfer B |
|---|---|---|
| `ed9857c0c3` (#15718) | 5,942,150 | 1,836,750 |
| `39b8a6ce13` (#15678, Trick or treat row) | 5,972,134 | 1,847,702 |
| `556b28bb40` (main) | 5,977,895 | 1,849,311 |

Every other step in the range moves by 0.0 to 0.5 KB. #15678 added
29,984 B raw / 10,952 B transfer in one step and merged without
re-measuring. #15485 then raised the budget by its own 1,953 B, but
measured against `8222149ee`, a base from before #15678, so main has
been over ever since.

## Change

`BUDGET` in `studio/frontend/scripts/check-bundle-budget.ts` is raised
by #15678's measured growth (+29,984 B raw, +10,952 B transfer), with
the measurement recorded next to the earlier raises. Main is then within
budget with 0.5 KB transfer / 11.3 KB raw to spare, so the next
unmeasured growth still fails here.

I tried the gate's first suggestion before raising it. Loading the Trick
or treat dialog on first open (`React.lazy` in `app-sidebar.tsx`) saves
only 10.4 KB raw / 3.0 KB transfer, and it raises the startup set from
85 to 90 chunks: the case the script warns about, where a dynamic import
splits shared modules into extra startup chunks. The rest of #15678's
weight is its Halloween color themes in
`features/settings/lib/color-themes.ts`, which the theme store reads at
startup to apply the saved theme. So that is not a laziness fix, and I
left it out.

## Testing

- `npm run build && npm run bundle:check`: over on main, `within budget
(0.5 KB transfer, 11.3 KB raw to spare)` with this change.
- `tests/bundle-budget-cli.test.ts`,
`tests/bundle-budget-closure.test.ts`: 43 passed.
- Measurements on Node 24.22.1, one machine and build, as the earlier
entries.
danielhanchen added a commit that referenced this pull request Oct 28, 2026
## Summary

UI jobs fail on unrelated PRs when a llama.cpp, whisper.cpp or audio.cpp
release is published mid-run. The prebuilt the job just installed
becomes one behind, and Studio shows its update card in the bottom-right
overlay rail, over the controls the scripts click:

- **Windows UI lane** (the `Chat UI Tests` staging run for #15796, on
current main `56278f5f65`): `FAIL in step "turn 3: 'Reply with exactly:
world'"`, `Locator.click` on `button[aria-label="Send message"]` times
out because the card's button row (`components/llama-update-banner.tsx`)
intercepts the click.
- **UI parity null control** (`Merge base vs itself, the null` on #15798
/ #15799): one cell times out the same way.

`UNSLOTH_DISABLE_UPDATE_CHECK=1` already keeps the card down: with it
set, `get_update_status` never reports an update
(`utils/update_status.update_checks_disabled`), and
`test_studiobench_ci_update_checks_off.py` already requires it, but only
for two named workflows (`studiobench-ci.yml`, `studio-ui-smoke.yml`).
The Windows and Mac UI smokes, the parity arms, inline images, composer
compatibility and the frontend browser jobs never set it.

#15805 muted the notifications in studiobench's browser seed; this
covers every browser lane at the backend, including the Playwright
scripts that seed nothing.

## Change

- `UNSLOTH_DISABLE_UPDATE_CHECK: '1'` at job level in every job that
installs Playwright's browsers or runs studiobench:
`studio-windows-ui-smoke` / `studio-mac-ui-smoke` `ui-smoke`,
`studio-ui-smoke` `ui-indicator`, `studiobench-ui-parity` `arms` /
`verdict`, `studiobench-ci` `selftests`, `studio-inline-images`
`images`, `studio-composer-compatibility` `composer`,
`studio-frontend-ci` `build` / `windows`. Jobs without a real Studio
backend are unaffected by it.
- `tests/studio/test_studiobench_ci_update_checks_off.py` now discovers
those jobs across all workflows (installs Playwright browsers, runs
studiobench, or boots Studio for Playwright) instead of checking two
named files, so a new UI lane cannot ship without the switch. A `KNOWN`
set of five lanes fails the guard if discovery stops recognising them.
The step-level override check and the backend-name check are unchanged.

No update-flow lane is touched: `studio-update-smoke` /
`studio-windows-update-smoke` do not drive a browser, and
`playwright_update_banner_layout.py` (Mac UI smoke) stubs
`/api/llama/update-status` and `/api/studio/update-status` with
`context.route`, so it does not depend on the backend's check.

## Testing

- The guard: 14 passed with this change; against main's workflows it
fails for all 10 uncovered jobs, the Windows UI lane and parity arms
included.
- All 124 test files that read `.github/workflows`: main and this branch
fail the same single test
(`test_cached_paths_hold_no_credentials.py::test_model_cache_variables_are_not_treated_as_credential_homes`,
pre-existing on this host); 6058 passed on main, 6069 here (the new
parametrized cases).
@danielhanchen danielhanchen self-assigned this Oct 30, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 30, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 30, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 30, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member

Review record for #15799, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#636.

Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found.

Round 1: reviewed mirror 61201858b (no equivalent commit found on this PR)

chatgpt-codex-connector[bot] (on the mirror)

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 61201858b5

No triage reaction was recorded on the mirror

Round 2: reviewed mirror 5ce0b64914 (this PR's 67097f613)

chatgpt-codex-connector[bot] (on the mirror)

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 5ce0b64914

No triage reaction was recorded on the mirror

Verdict

The round converged at mirror 5ce0b64914 (this PR's 67097f613).

This is the review as it stood at that commit. Anything pushed to this PR afterwards was not part of it.

@danielhanchen
danielhanchen merged commit 7485276 into unslothai:main Oct 30, 2026
5 of 51 checks passed
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.

3 participants