@animastor/orchestration 1.4.1 → 1.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animastor/orchestration",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Animastor Orchestration 1.2.0 — generation orchestration v2 (ADR ORCHESTRATION_V2): `gen` namespace — PG is the single source of truth (gen_commands, gen_jobs), commands / claim (FOR UPDATE SKIP LOCKED) / one-transaction acceptance / sweeper / progress over a host-supplied pg pool and host ports; no Redis, no Express, no ComfyUI. The 0.3.x orchestration (dispatch/reconcile/lease/FSM, O-2..O-10 ports, host bindings) ships unchanged under src/legacy/ with the same root exports until migration stage 4.",
5
5
  "keywords": [
6
6
  "animastor",
@@ -0,0 +1,28 @@
1
+ // ======================================================
2
+ // gen/sql/006-default-v2 — v2 is the default orchestration (owner decision 26.11)
3
+ // ======================================================
4
+ // Owner decision (2026-11-26): every book is v2, legacy is not needed. This
5
+ // migration closes the reading half of that decision:
6
+ //
7
+ // books.orchestration DEFAULT 'v2' (001 created the column with 'legacy')
8
+ // UPDATE books 'legacy' → 'v2'
9
+ //
10
+ // No code writes the column explicitly — every consumer (book-repo
11
+ // getBookOrchestration, orchestration-v2/book-flag) reads it, so a new book
12
+ // takes the default and an existing one is flipped here. 001 is untouched: on
13
+ // a fresh database the column is still created with 'legacy' and immediately
14
+ // re-defaulted by this step, which keeps both histories byte-identical.
15
+ //
16
+ // Idempotent: ALTER … SET DEFAULT is unconditional and the UPDATE matches
17
+ // nothing on a second run, so the migration runner can apply it on every
18
+ // start. Nothing here touches the legacy code, the legacy tables or any
19
+ // route — decommissioning is a later stage (ADR §12 stage 4).
20
+
21
+ 'use strict';
22
+
23
+ const GEN_DEFAULT_V2_SQL = Object.freeze([
24
+ `ALTER TABLE books ALTER COLUMN orchestration SET DEFAULT 'v2'`,
25
+ `UPDATE books SET orchestration = 'v2' WHERE orchestration = 'legacy'`,
26
+ ]);
27
+
28
+ module.exports = { GEN_DEFAULT_V2_SQL };
@@ -8,6 +8,7 @@ const { GEN_COMMAND_JOBS_SQL } = require('./002-command-jobs');
8
8
  const { GEN_SCOPE_SCENES_SQL } = require('./003-scope-scenes');
9
9
  const { GEN_COMMAND_SKIPS_SQL } = require('./004-command-skips');
10
10
  const { GEN_VOICE_REFERENCE_SQL } = require('./005-voice-reference');
11
+ const { GEN_DEFAULT_V2_SQL } = require('./006-default-v2');
11
12
  const { withTx } = require('../util');
12
13
 
13
14
  const MIGRATIONS = Object.freeze([
@@ -16,6 +17,7 @@ const MIGRATIONS = Object.freeze([
16
17
  Object.freeze({ id: '003-scope-scenes', statements: GEN_SCOPE_SCENES_SQL }),
17
18
  Object.freeze({ id: '004-command-skips', statements: GEN_COMMAND_SKIPS_SQL }),
18
19
  Object.freeze({ id: '005-voice-reference', statements: GEN_VOICE_REFERENCE_SQL }),
20
+ Object.freeze({ id: '006-default-v2', statements: GEN_DEFAULT_V2_SQL }),
19
21
  ]);
20
22
 
21
23
  /**