@gentbajko/slopify 4.3.2 → 4.3.3

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.
@@ -194,6 +194,8 @@ export function createRunner(deps) {
194
194
  }
195
195
  function startEligible(projectId) {
196
196
  const stages = deps.stages.stagesOf(projectId);
197
+ // Worked out once for this sweep and thrown away at the end of it.
198
+ const pass = new Map();
197
199
  const releasesKind = (dependent) => (kind) => {
198
200
  const matches = stages.filter((stage) => stage.kind === kind);
199
201
  return (matches.length > 0 && matches.every((stage) => releases(dependent, kind, stage.state)));
@@ -205,7 +207,7 @@ export function createRunner(deps) {
205
207
  const dependencies = deps.stages.dependenciesOf?.(projectId, stage.kind) ?? graph[stage.kind];
206
208
  if (deps.stages.ready === undefined
207
209
  ? !dependencies.every(releasesKind(stage.kind))
208
- : !deps.stages.ready(stage.work)) {
210
+ : !deps.stages.ready(stage.work, pass)) {
209
211
  continue;
210
212
  }
211
213
  if (deps.stages.paused?.(projectId))
package/dist/main.js CHANGED
@@ -1139,7 +1139,7 @@ alignSubtitles: aligner = alignSubtitlesWith(() => readSettings({ db, log }).sub
1139
1139
  return projectStandings(execution, projectId);
1140
1140
  },
1141
1141
  standingsOf: (projectId) => executionStandings(execution, projectId),
1142
- ready: (work) => invocationReady(execution, work),
1142
+ ready: (work, pass) => invocationReady(execution, work, pass),
1143
1143
  // A project in the trash (Settings → Trash) holds like a paused one until it is restored.
1144
1144
  paused: (projectId) => projectPaused(db, projectId) ||
1145
1145
  queueWaiting(db, projectId) ||
@@ -0,0 +1,11 @@
1
+ # Slopify 4.3.3
2
+
3
+ Released 9 November 2026.
4
+
5
+ A video with many images no longer stops the app while it decides what to run next.
6
+
7
+ ## The run stops blocking the app
8
+
9
+ - **Every time a run asked itself what to start next, it worked the answer out from scratch for each waiting step** — reading the whole revision back off disk, a check for every output and every picture, the article read again, and every step re-derived from the narration up. With twelve pictures that happened a few dozen times across a run and nobody saw it. With 240 it happened tens of thousands of times, one core went to nothing but that, and the app stopped answering: pages hung, and nothing could be opened until it was restarted.
10
+ - **It is now worked out once for each sweep and shared by every step in it.** A sweep starts with nothing carried over from the one before, so a step that has just finished is still seen the moment it finishes.
11
+ - **Nothing about what runs, or in what order, has changed** — only how often the same answer is worked out.
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "id": "4.3.3",
4
+ "title": "Slopify 4.3.3",
5
+ "version": "4.3.3",
6
+ "date": "2026-11-09"
7
+ },
2
8
  {
3
9
  "id": "4.3.2",
4
10
  "title": "Slopify 4.3.2",
@@ -82,7 +82,23 @@ export function executionStages(deps, projectId) {
82
82
  };
83
83
  });
84
84
  }
85
- export function invocationReady(deps, work) {
85
+ // The view and the plan a sweep works out once. Reading a revision stats every output and
86
+ // every piece on disk and reads the article back, and planning it derives every recipe from
87
+ // the narration up; at twelve images that was a few dozen times over a run and nobody saw it,
88
+ // at 240 it is tens of thousands and the server stops answering. `pass` is the caller's
89
+ // scratch space for one sweep (`kernel/runner`): within it nothing writes the pieces or
90
+ // outputs these are read from, so the answer cannot have gone stale. Without one, every call
91
+ // works it out afresh, as it always did.
92
+ function passPlan(pass, key, make) {
93
+ if (pass === undefined)
94
+ return make();
95
+ if (pass.has(key))
96
+ return pass.get(key);
97
+ const value = make();
98
+ pass.set(key, value);
99
+ return value;
100
+ }
101
+ export function invocationReady(deps, work, pass) {
86
102
  const row = deps.db
87
103
  .prepare("SELECT recipe_context,retry_at FROM revision_work WHERE id=? AND project_id=? AND revision_id=?")
88
104
  .get(work.workId, work.projectId, work.revisionId);
@@ -91,10 +107,12 @@ export function invocationReady(deps, work) {
91
107
  // Waiting out a failure time can fix: `dueRetries` clears the wait when it runs out.
92
108
  if (row.retry_at !== null)
93
109
  return false;
94
- const view = executionView(deps, work.projectId, work.revisionId);
110
+ const view = passPlan(pass, `view:${work.projectId}:${work.revisionId}`, () => executionView(deps, work.projectId, work.revisionId));
95
111
  if (view === undefined)
96
112
  return false;
97
- const plan = executionPlan(deps, view, savedCatalogue(row.recipe_context));
113
+ // The catalogue is the work row's own, so it belongs in the key: two steps saved under
114
+ // different catalogues must not share a plan.
115
+ const plan = passPlan(pass, `plan:${work.projectId}:${work.revisionId}:${String(row.recipe_context)}`, () => executionPlan(deps, view, savedCatalogue(row.recipe_context)));
98
116
  const pieces = workPieces(deps.db, work.workId);
99
117
  return pieces.some((piece) => {
100
118
  if (piece.state === "done" ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gentbajko/slopify",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "description": "Turn a prompt into a finished video, locally, with your own provider keys",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Gent Bajko",