@gentbajko/slopify 4.5.5 → 4.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/image/codex.js +15 -0
- package/dist/extension/slopify-studio-chrome.zip +0 -0
- package/dist/extension/slopify-studio-firefox.zip +0 -0
- package/dist/patch-notes/4.5.6.md +12 -0
- package/dist/patch-notes/4.5.7.md +11 -0
- package/dist/patch-notes/index.json +12 -0
- package/dist/slices/schedules/continue-stopped.js +45 -0
- package/dist/slices/schedules/scheduler.js +11 -0
- package/package.json +1 -1
|
@@ -53,6 +53,11 @@ function reviews(req) {
|
|
|
53
53
|
// The binary's image tool (`ImagegenArgs`: prompt, referenced_image_paths,
|
|
54
54
|
// num_last_images_to_include) takes each referenced image as an absolute path it reads
|
|
55
55
|
// itself, so the copy sits in the job's own folder - the sandbox's writable, readable root.
|
|
56
|
+
// Codex's per-minute limit ("429 Too Many Requests"), not the plan's usage limit
|
|
57
|
+
// (`codexPlanLimit`): quota is left, so the step waits and draws again (`retry-policy.ts`).
|
|
58
|
+
function throttled(message) {
|
|
59
|
+
return /\b429\b|too many requests|rate.?limit/i.test(message);
|
|
60
|
+
}
|
|
56
61
|
export function codexReferencePath(directory, image) {
|
|
57
62
|
return join(directory, image.mime === "image/jpeg" ? "reference.jpg" : "reference.png");
|
|
58
63
|
}
|
|
@@ -297,6 +302,11 @@ export function codexImage(deps) {
|
|
|
297
302
|
const planLimit = codexPlanLimit(message, new Date());
|
|
298
303
|
if (planLimit !== undefined)
|
|
299
304
|
throw codexLimitError(message, planLimit);
|
|
305
|
+
if (throttled(message))
|
|
306
|
+
throw providerError({
|
|
307
|
+
kind: "rate_limit",
|
|
308
|
+
message: cliReported(binary, redact(message), imageNext),
|
|
309
|
+
});
|
|
300
310
|
throw providerError({
|
|
301
311
|
kind: /refus|content.policy|safety/i.test(message) ? "refusal" : "other",
|
|
302
312
|
message: /refus|content.policy|safety/i.test(message)
|
|
@@ -313,6 +323,11 @@ export function codexImage(deps) {
|
|
|
313
323
|
const planLimit = codexPlanLimit(message, new Date());
|
|
314
324
|
if (planLimit !== undefined)
|
|
315
325
|
throw codexLimitError(message, planLimit);
|
|
326
|
+
if (throttled(message))
|
|
327
|
+
throw providerError({
|
|
328
|
+
kind: "rate_limit",
|
|
329
|
+
message: cliReported(binary, redact(message), imageNext),
|
|
330
|
+
});
|
|
316
331
|
throw providerError({
|
|
317
332
|
kind: /image.generation|image tool|feature.*unavailable/i.test(message)
|
|
318
333
|
? "unsupported"
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Slopify 4.5.6
|
|
2
|
+
|
|
3
|
+
Released 1 December 2026.
|
|
4
|
+
|
|
5
|
+
A restart no longer leaves a schedule's videos Stopped.
|
|
6
|
+
|
|
7
|
+
## A schedule's videos go on by themselves after a restart
|
|
8
|
+
|
|
9
|
+
- **Videos made ahead no longer read Stopped after a restart.** A restart stops every run that was going, and a video made ahead then read Stopped until someone pressed Continue the run or its day came. Now, a minute after Slopify starts, each of a schedule's videos that a restart stopped goes on as Continue the run would take it on. A video made ahead goes back to Waiting for its day.
|
|
10
|
+
- **A video its day already took no longer holds the schedule back.** When the computer restarted while a schedule's video was still being finished (its shorts or its PDF, say), it stayed Stopped and the schedule skipped every run after it until someone pressed Continue the run. That video now finishes by itself after the restart, and the next runs go ahead.
|
|
11
|
+
- The same limits as the day apply: nothing already made is made or paid for again, a project you paused stays paused, a checkpoint of yours still waits for your approval, and paid steps nobody started are left for you (the log says which video and why).
|
|
12
|
+
- Technical: new `continueStopped` (`schedules/continue-stopped.ts`) runs once, on the schedule runner's first tick after start. It takes every live project with a `prepared_videos` row or in an unsettled `schedule_runs` row of a live schedule, and for each that `projectHolds` reads as stopped it calls `ScheduleDeps.continueRun` (`continueHeldRun`).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Slopify 4.5.7
|
|
2
|
+
|
|
3
|
+
Released 1 December 2026.
|
|
4
|
+
|
|
5
|
+
A picture Codex turns away for drawing too fast now waits and is drawn again, instead of failing.
|
|
6
|
+
|
|
7
|
+
## Codex's "Too Many Requests" waits instead of failing
|
|
8
|
+
|
|
9
|
+
- **A picture Codex refuses with "429 Too Many Requests" now waits and tries again.** Codex answers this when pictures are asked for faster than its per-minute limit allows, even with plenty of your plan left. Slopify took it for an ordinary failure, so each picture used up its few attempts within seconds and the step failed, often a short's pictures while two videos were drawing at once. It now waits about 2, 4, 8 and 16 minutes, as for any rate limit, and the step only fails if Codex is still refusing after half an hour.
|
|
10
|
+
- Codex's plan usage limit ("You've hit your usage limit") is unchanged: it still says when the plan resets.
|
|
11
|
+
- Technical: `adapters/image/codex.ts` throws `kind: "rate_limit"` for a `turn.failed` or `error` event whose message matches `429`, `too many requests` or `rate limit` (after the plan-limit check), so `autoRetryDelay` (`kernel/runner/retry-policy.ts`) puts the step back to wait.
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"id": "4.5.7",
|
|
4
|
+
"title": "Slopify 4.5.7",
|
|
5
|
+
"version": "4.5.7",
|
|
6
|
+
"date": "2026-12-01"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"id": "4.5.6",
|
|
10
|
+
"title": "Slopify 4.5.6",
|
|
11
|
+
"version": "4.5.6",
|
|
12
|
+
"date": "2026-12-01"
|
|
13
|
+
},
|
|
2
14
|
{
|
|
3
15
|
"id": "4.5.5",
|
|
4
16
|
"title": "Slopify 4.5.5",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorText } from "../../kernel/errors.js";
|
|
3
|
+
import { projectHolds } from "../reviews/holds.js";
|
|
4
|
+
import { projectIsActive } from "./repo.js";
|
|
5
|
+
// The videos a schedule owns: made ahead for a day still to come, or taken by a run whose
|
|
6
|
+
// videos aren't all finished. Oldest first. A deleted schedule owns nothing.
|
|
7
|
+
function scheduledProjects(db) {
|
|
8
|
+
const ids = db
|
|
9
|
+
.prepare(`SELECT p.project_id AS id FROM prepared_videos p
|
|
10
|
+
JOIN schedules s ON s.id=p.schedule_id AND s.deleted_at IS NULL
|
|
11
|
+
UNION
|
|
12
|
+
SELECT admitted.value AS id FROM schedule_runs r, json_each(r.project_ids_json) AS admitted
|
|
13
|
+
JOIN schedules s ON s.id=r.schedule_id AND s.deleted_at IS NULL
|
|
14
|
+
WHERE r.projects_settled_at IS NULL AND r.status!='running'`)
|
|
15
|
+
.all()
|
|
16
|
+
.map((row) => z.string().parse(row.id));
|
|
17
|
+
return [...new Set(ids)].filter((id) => projectIsActive(db, id));
|
|
18
|
+
}
|
|
19
|
+
// A restart stops every run that was going (`recoverWork`), and a schedule's videos then read
|
|
20
|
+
// Stopped until someone presses Continue the run: a made-ahead video until its day, and one its
|
|
21
|
+
// day already took never finishes, so the schedule skips its next runs. A schedule runs without
|
|
22
|
+
// anyone watching, so once Slopify is back each of its videos a restart stopped goes on as
|
|
23
|
+
// Continue the run would take it on (`continueHeldRun`): never past a Pause or a person's
|
|
24
|
+
// checkpoint, and never a paid step nobody started. Returns the projects it continued.
|
|
25
|
+
export async function continueStopped(deps) {
|
|
26
|
+
const { continueRun } = deps;
|
|
27
|
+
if (continueRun === undefined)
|
|
28
|
+
return [];
|
|
29
|
+
const continued = [];
|
|
30
|
+
for (const projectId of scheduledProjects(deps.db)) {
|
|
31
|
+
if (!projectHolds(deps.db, { projectId }).stopped.has(projectId))
|
|
32
|
+
continue;
|
|
33
|
+
try {
|
|
34
|
+
const outcome = await continueRun(projectId);
|
|
35
|
+
if (outcome.kind === "continued")
|
|
36
|
+
continued.push(projectId);
|
|
37
|
+
else if (outcome.kind === "refused")
|
|
38
|
+
deps.log.write("warn", "schedule.continue", { projectId, detail: outcome.sentence });
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
deps.log.write("error", "schedule.continue", { projectId, detail: errorText(error) });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return continued;
|
|
45
|
+
}
|
|
@@ -3,6 +3,7 @@ import { reviewDraft } from "../play-drafts/review.js";
|
|
|
3
3
|
import { createDraft } from "../play-drafts/service.js";
|
|
4
4
|
import { startPlayDraft } from "../play-drafts/start.js";
|
|
5
5
|
import { nextOccurrence } from "./calendar.js";
|
|
6
|
+
import { continueStopped } from "./continue-stopped.js";
|
|
6
7
|
import { claimDesignRun } from "./design-run.js";
|
|
7
8
|
import { overlapSentence } from "./held-back.js";
|
|
8
9
|
import { missedGraceMs } from "./next-run.js";
|
|
@@ -11,6 +12,8 @@ import { activeRun, dueSchedules, insertRun, recordRunDispatch, recordRunStartId
|
|
|
11
12
|
import { generateTopics, generationDue, releaseTopicLeases } from "./topics.js";
|
|
12
13
|
export function createScheduleRunner(deps) {
|
|
13
14
|
let ticking = false;
|
|
15
|
+
// The first tick after Slopify starts continues the schedule's videos a restart stopped.
|
|
16
|
+
let restarted = true;
|
|
14
17
|
// ceiling: one entry per schedule generating now.
|
|
15
18
|
const generations = new Set();
|
|
16
19
|
const stopping = new AbortController();
|
|
@@ -58,6 +61,14 @@ export function createScheduleRunner(deps) {
|
|
|
58
61
|
try {
|
|
59
62
|
recoverRunningRuns(deps.db, now.toISOString(), "The previous schedule tick could not record this run's result.");
|
|
60
63
|
startGenerations(now);
|
|
64
|
+
if (restarted) {
|
|
65
|
+
restarted = false;
|
|
66
|
+
const continued = await continueStopped(deps);
|
|
67
|
+
if (continued.length > 0)
|
|
68
|
+
deps.log.write("info", "schedule.continue", {
|
|
69
|
+
detail: `Continued ${String(continued.length)} scheduled video(s) a restart stopped.`,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
61
72
|
const due = dueSchedules(deps.db, now.toISOString());
|
|
62
73
|
const claimed = due.flatMap((schedule) => claim(deps, schedule, now));
|
|
63
74
|
const settled = await Promise.allSettled(claimed.map((entry) => execute(deps, entry)));
|