commit ba6a83a66c69a50f5863cc6d152227579f443c88
parent 180f7a7732a2a52a89dd737258f655c4e46ee2ab
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 12 Nov 2026 20:46:38 -0500
umtool: editing a take with --take is the supported path -- the "deprecated, open the take in the draft" line is gone
Cause: b815491b (9 Nov, L3 S6) made window --take, timeline <verb> --take, posts … --in-take and
(968ce9fc) take --import-item print "deprecated -- edits land in the draft now; open the take there
first (umtool takes open <p> <t>) and edit without it". The code says otherwise: those writes go
through takeEdit/takeScope into takes/<t>/take.json's patch with an undo point of their own and never
touch video.manifest.json; set --take and look --take (12 Nov) do the same and print nothing; and
knobs.md says "the take-scoped CLI ... stays for agents". The advice is the harmful part:
versions.mjs openVersion writes the version OVER the draft (the draft saved as a version first, one
undo point), so following it changes the operator's draft.
Fix: the four CLI paths say nothing on stderr; behaviour, stdout and --json are unchanged.
takeDeprecation.mjs stays for the old take walk's route (/api/report/takes/timeline), which keeps its
line and Deprecation header. Docs: groups.mjs (cli.md regenerated), knobs.md.
Tests: takeEditFirstClass.test.mjs (window --take and set --take through the CLI: the take's patch
written, the draft byte-identical, stderr empty); takeEdit.test.mjs and takeScope.test.mjs now assert
no deprecation line (they asserted it).
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
12 files changed, 73 insertions(+), 21 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -111,6 +111,7 @@
- **A saved alternate can be dropped once it has been checked.** A download over a copy already in the saved-video store keeps both and flags the other copy (`source-media.alt-<h>p-<stamp>.<ext>`, listed by `pnpm ops get saved-alternates`), but nothing could remove one alternate after the check: the only deleter took the whole video. `pnpm ops drop-saved-alternate --json '{"slug": "<slug>", "id": "<video>", "file": "<alternate>"}'` now deletes that one copy from the store and its entry from `saved-video.json`, leaving the rest of the pointer as it was (`alternates` goes when it empties); `"dryRun": true` says what it would free and changes nothing. The active copy, a name the pointer does not list and any path are refused, and so is a store being moved; an alternate already gone from disk is cleaned from the pointer. The video page's Source video card now lists a saved video's alternates, each with **Drop this alternate** (and a confirm). No undo. Needs a restart of the editor.
- **umtool: a take's windowed preview shows the seconds you asked for, with its chrome, in its own file.** `umtool take <p> --id <t> --preview --at 440 --dur 170` timed the window over the project's draft rather than the take, so on a take with its own timeline it rendered a different stretch (92 s of early clips), its timeline and counters started from zero, and it was written over the take's full preview. `--at`/`--dur` with `--preview` are now seconds of the take's own cut, timed by its last preview's or render's schedule (or, with neither, its entries' own lengths, said as estimates); an `--at` past the end is refused. The whole take is built, reusing its segments, and only the window is laid and encoded, with the deck at its state at that second (build-video's new `--cut-window <at> <dur>`). The file is `takes/<t>/out/<slug>.preview.<at>-<to>.mp4`, built in `out/window/`; the full preview is never touched. `--preview` without `--at`, and a take's own window, render as before.
- **umtool: the quote check can judge a take.** `umtool quote-check` only judged the project's draft, so a take with clips of its own was never checked (on 12 Nov, 25 rows blocked the draft and the take went unjudged), and a take's render was gated by the draft's rows alone. `umtool quote-check <p> --take <t>` now judges the take's clips as it renders them and keeps the rows in `takes/<t>/quote-check.json`; the project's `quote-check.json` is not touched. A take's render, the new `umtool check <p> --take <t>` and `umtool window <p> <clip> --take <t> --align` read the take's rows first; a clip the take has not been checked for keeps the project's row, as before. `--status --take <t>` lists the take's rows and says which came from the project.
+- **umtool: editing a take from a terminal no longer says it is deprecated.** `umtool window … --take`, `timeline <p> --take <t> <verb>`, `posts <verb> … --in-take` and `take --id <t> --import-item` printed "deprecated — edits land in the draft now; open the take there first (umtool takes open …)" on stderr. They are the supported way to edit a take without touching the draft (as `set --take` and `look --take` already were): they write only the take's patch, with an undo point. The advice was the problem, since `takes open` writes the take over the draft. The line is gone; what the commands do, their stdout and `--json` are unchanged. The old take walk's route (`/api/report/takes/timeline`) still says it.
## [0.12.0] - 2026-10-28
- **An X post's screenshot is of the post, not of a page in the middle of laying itself out.** On 2026-10-27 a forced capture of TheQuartering's post 2114859155022389342 came out shifted about 100 px: its left edge cut off, X's menu laid over its words and the gap beside the column showing; another post once came out as a strip of the post above it. The shot was a full-page capture, which resizes the page for the moment of the capture — in the X session profile the page saw its window go to 1×1 — and X laid itself out again for that size while it was being captured, so the shot was cut from a different layout than the one measured. A post is now shot from the window as it stands: scrolled into it, the window made taller first when the post is taller than it, so nothing is resized under the shot; and the post is measured again after the shot and shot again if it moved. An X Article's shot is taken the same way. Posts taller than the tallest window (16,384 px) are still shot from a full-page capture. Needs a restart of the editor.
diff --git a/umtool/bin/umtool.mjs b/umtool/bin/umtool.mjs
@@ -1190,7 +1190,7 @@ async function cmdWindow() {
// same rules, an undo point first -- never into the project's manifest.
const take = val("--take");
if (take !== undefined) {
- (await import("../lib/report/takeDeprecation.mjs")).warnTakeEdit("window --take", { project: p.id, take });
+ // A supported path, said nothing about (12 Nov; takeDeprecation.mjs): the take's patch, never the draft.
try {
const { updateTakeClip } = await import("../lib/report/takeEdit.mjs");
const res = await updateTakeClip(p.dir, take, clipId, patch);
diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md
@@ -77,7 +77,7 @@ Inbox cannot disagree about what is wrong with one.
| `take <project> --id <id> --draft --from <take> [--label L] [--patch F \| --patch-json J \| --set p=v …]` | a **draft made from another take**: that take's style and patch (a `--patch` merged over it), its label "<that label> (from <take>)" unless `--label`, nothing rendered; its timeline is its own from then on, and its render's `--from` (segments reused) is a separate flag of the render ([take-scoped edits](#edit-a-take-not-the-project-items-from-other-projects-and-take-scoped-edits)) |
| `take <project> --id <id> --preview [--from <take>] [--at S --dur S \| --full] [--priority] [--json]` | the take's **preview**: the take as stored (a draft too, from its walked patch) composed exactly as its render is -- the same 1920×1080 layout, segments, chrome frames and sound -- with only its final picture encoded smaller and faster (`render.preview`: 1280×720, x264 veryfast, crf 26) into `takes/<id>/out/<slug>.preview.mp4`; its build, schedule and record (`render.json`, `render.log`) in `takes/<id>/out/preview/`. The full render (`preview.mp4`, `out/<slug>.mp4`, `out/sourced/`, `take.json`, `render.json`) is never touched. `--at S --dur S`: cut seconds of the take's own cut (its schedule), the chrome at its state then, into its own `takes/<id>/out/<slug>.preview.<S>-<S+dur>.mp4` (build in `out/window/`), never over the full preview. Reuses this take's own full render, and `--from`'s full render and preview ([report-video.md](report-video.md#fast-feedback-preview-and-changes-renders), [knobs.md](knobs.md#fast-feedback-a-preview-and-a-reel-of-the-changes)) |
| `take <project> --id <id> --changes [--from <take>] [--pad 3] [--no-preview] [--priority] [--json]` | the take's **changes reel**: only what changed against `--from` (default: the take's own `from`, or the take a draft was made from) -- each added, re-read, re-picked, re-voiced, trimmed, held, fx'd, … item with a neighbour either side, rendered in one build (`takes/<id>/out/changes/`), cut to the item ± `--pad` s, a label burned in (`21:19 · p-2116831815466193102 · re-voiced`: its time in the FULL cut), joined into `takes/<id>/out/<slug>.changes.mp4`; a removed item shows as the join it leaves. `takes/<id>/changes.json` lists the pieces with their full-cut times and how exact they are (`times.basis`: `measured` -- the base's measured schedule plus the changed items' measured lengths -- or `estimate`). Preview quality unless `--no-preview`. Nothing changed: no reel, and the list says so |
-| `take <project> --id <id> --import-item <project>:<item>[,<item>…] [--import-item …] [--after <entry> \| --before <entry>] [--as <id>] [--dry-run] [--json]` | **items of another project into a take** -- deprecated, saying so in one line on stderr: edits land in the draft, so open the take there and use `timeline <p> import-item` (`takeImport.mjs`): each entry CLONED from the source's manifest as it is now (its card, context, knobs, narration with its takes and its pick) into the take's timeline -- one write, an undo point of the take's (`timeline <p> --take <id> undo`); the files it names (narration takes and their `take-<n>.*` sidecars, the parts' cache files, attachments, a context post's media, the picture of each author it draws that the take lacks, added to the take's `postAvatars`) **hard-linked** into this project's dir at the same path, so the render and the lint find them (copied across filesystems; the same file already there is left; ANOTHER file at the path: linked under `imports/<source>/<path>` and the clone names that). The source project and this project's manifest are only read. **Placed** `--after`/`--before` an entry of the take (several items in the order named, one after another), else by the post's date when the take's posts are in date order, else at the end. **Again**: updated in place from the source (moved only with `--after`/`--before`), `unchanged` with no write when nothing differs. `--as`: one item under another id (a second copy). `--dry-run`: the plan and the placement, nothing linked or written. `--json`: `items[] {id, action added\|updated\|unchanged\|moved, at {index, after, before}, narration {takes, pick, file}, files[], avatars[]}`, `revision`. Refused while the take renders. **Exit 0 · 1 refused (no such item, take or entry; a link out of the project) · 2 usage** |
+| `take <project> --id <id> --import-item <project>:<item>[,<item>…] [--import-item …] [--after <entry> \| --before <entry>] [--as <id>] [--dry-run] [--json]` | **items of another project into a take** -- into the take's patch, the draft untouched (`timeline <p> import-item` is the draft's twin; `takeImport.mjs`): each entry CLONED from the source's manifest as it is now (its card, context, knobs, narration with its takes and its pick) into the take's timeline -- one write, an undo point of the take's (`timeline <p> --take <id> undo`); the files it names (narration takes and their `take-<n>.*` sidecars, the parts' cache files, attachments, a context post's media, the picture of each author it draws that the take lacks, added to the take's `postAvatars`) **hard-linked** into this project's dir at the same path, so the render and the lint find them (copied across filesystems; the same file already there is left; ANOTHER file at the path: linked under `imports/<source>/<path>` and the clone names that). The source project and this project's manifest are only read. **Placed** `--after`/`--before` an entry of the take (several items in the order named, one after another), else by the post's date when the take's posts are in date order, else at the end. **Again**: updated in place from the source (moved only with `--after`/`--before`), `unchanged` with no write when nothing differs. `--as`: one item under another id (a second copy). `--dry-run`: the plan and the placement, nothing linked or written. `--json`: `items[] {id, action added\|updated\|unchanged\|moved, at {index, after, before}, narration {takes, pick, file}, files[], avatars[]}`, `revision`. Refused while the take renders. **Exit 0 · 1 refused (no such item, take or entry; a link out of the project) · 2 usage** |
| `take … --priority` · `takes make … --priority` · `render-mode on [--for 90m] [--note T] [--json \| --print-token]` · `render-mode on [--for 90m] [--note T] [--print-token] -- <cmd …>` · `render-mode off [--force] [--json]` · `render-mode status [--json]` | **render mode**: a render the operator waits for gets the machine. `--priority` turns it on for the take's (or the batch's) lifetime — on at the start, off at the end, on a failure and on a signal; the Takes page's **Give renders the machine** is the same flag. While it is on, every other heavy job (e2e suites, `next build`s, the publish stages, other renders) waits at the heavy slot's door (`queue-lock: held for a render (…) — waiting`), the render runs on the floor 4000 MB and the cap 10240 MB, and the editor's transcription, download and Speakers lanes are held through its ops (`lane`; only the ones not already held, and only those are released at off). `render-mode on` is a window (default 2h) for a chain of renders: every `umtool take` started in it renders in it, another command joins with the `RENDER_PRIORITY_TOKEN` it prints (`--print-token`: the token alone on stdout, the rest on stderr). **`on … -- <cmd …>` is the form for a script**: the command is spawned with the token in its environment, the hold is the command's pid, and it is released when the command exits — done, failed, or umtool signalled (the signal is passed on); umtool exits with the command's code, and inside a manual window the command joins it. A bare `on` in a script leaves the window behind (the chain trap). `off` ends it (a running take's hold only with `--force`, else it ends with the take); `status` says what holds it and releases a stale hold's lanes. A hold whose process is gone or whose window is over is no hold. Needs WORKER_TOKEN and the editor at ARCHILYZER_EDITOR_URL for the lanes; without them it still holds the door. **Exit 1** when it is already on, or a lane could not be released ([report-video.md](report-video.md#render-mode-giving-a-render-the-machine); WORKTREES.md, "Render mode") |
| `take status <project> [--id <take>] [--json] [--log] [--tail N]` | a take's **render record** (`takes/<take>/render.json`, written by every render whoever started it — a terminal, the Takes page, the queue): `state` (`running`, `waiting` at the heavy slot, `done`, `failed`, `cancelled`; `queued` or `blocked` while a queue step waits to render it), `stage` and a rough `percent`, the `error` (the first error line, not a bare "exited 1") and the log's last 40 lines (`tail`), on done the `mp4` and its measured `seconds`; `--log` prints the FULL `takes/<take>/render.log`. A "running" whose process is gone reads **failed** ("the render process is gone"); a done whose mp4 is missing or 0 bytes reads **failed**. **Exit 0 done · 3 queued, waiting or running · 1 failed, cancelled, blocked or none.** Without `--id`: every take with a record, the newest's exit ([queue and poll](#queue-and-poll-instead-of-scripting)); and its fast-feedback renders beside it, `preview` and `changes` (each one's state, mp4, seconds, log; a changes reel's piece count, its base and its list), a queued `--preview`/`--changes` step said as such -- never as the take's own render |
| `queue add [--after <qid>\|last] [--label T] [--timeout <minutes>] [--json] -- <umtool subcommand argv…>` | a **step** of the durable queue: the argv of a umtool command, one word per argument (no shell), stored under `<reports root>/.umtool-queue/` and run by the **umtool app** (its systemd unit), one step at a time, in order — so it survives the session that queued it, an app restart and a ship. Prints the qid (`q<N>`) alone on stdout. `--after` waits for that step to be **done**; when it fails or is cancelled this one is **blocked** (and so is whatever waits on it). `--timeout`: the step's limit (default 720 minutes). A step does not start while the app's own job runner is busy (a Takes-page job), and a heavy step still takes the machine's heavy slot and render mode by itself |
diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md
@@ -724,6 +724,12 @@ expected the cut). A take is a **saved version** — FROZEN:
- **Old addresses.** The take walk (`/projects/<p>/takes/<t>/walk`) and a take's bench (`…/takes/<t>/clip/<id>`) are
the Open in draft page now — then the draft's bench. The take-scoped CLI (`--in-take`, `umtool timeline <p> --take`,
`umtool window --take`, `/api/report/takes/timeline`) stays for agents.
+- **Editing a take from a terminal is supported, and leaves the draft alone.** `umtool set|look|window <p> … --take
+ <t>`, `umtool timeline <p> --take <t> <verb>`, `umtool posts <verb> … --in-take <t>` and `umtool take <p> --id <t>
+ --import-item …` write `takes/<t>/take.json`'s patch, an undo point first (`umtool timeline <p> --take <t> undo`),
+ and never the project's manifest. They say nothing on stderr (from 9 to 12 Nov they printed "deprecated — edits
+ land in the draft now; open the take there first", whose advice — `takes open` — is the one path that writes the
+ version over the draft). Only the old take walk's route, `/api/report/takes/timeline`, still says it.
## The workspace (one screen per report video)
diff --git a/umtool/lib/cli/groups.mjs b/umtool/lib/cli/groups.mjs
@@ -595,7 +595,7 @@ export const GROUPS = [
["`take <project> --id <id> --changes [--from <take>] [--pad 3] [--no-preview] [--priority] [--json]`",
"the take's **changes reel**: only what changed against `--from` (default: the take's own `from`, or the take a draft was made from) -- each added, re-read, re-picked, re-voiced, trimmed, held, fx'd, … item with a neighbour either side, rendered in one build (`takes/<id>/out/changes/`), cut to the item ± `--pad` s, a label burned in (`21:19 · p-2116831815466193102 · re-voiced`: its time in the FULL cut), joined into `takes/<id>/out/<slug>.changes.mp4`; a removed item shows as the join it leaves. `takes/<id>/changes.json` lists the pieces with their full-cut times and how exact they are (`times.basis`: `measured` -- the base's measured schedule plus the changed items' measured lengths -- or `estimate`). Preview quality unless `--no-preview`. Nothing changed: no reel, and the list says so"],
["`take <project> --id <id> --import-item <project>:<item>[,<item>…] [--import-item …] [--after <entry> \\| --before <entry>] [--as <id>] [--dry-run] [--json]`",
- "**items of another project into a take** -- deprecated, saying so in one line on stderr: edits land in the draft, so open the take there and use `timeline <p> import-item` (`takeImport.mjs`): each entry CLONED from the source's manifest as it is now (its card, context, knobs, narration with its takes and its pick) into the take's timeline -- one write, an undo point of the take's (`timeline <p> --take <id> undo`); the files it names (narration takes and their `take-<n>.*` sidecars, the parts' cache files, attachments, a context post's media, the picture of each author it draws that the take lacks, added to the take's `postAvatars`) **hard-linked** into this project's dir at the same path, so the render and the lint find them (copied across filesystems; the same file already there is left; ANOTHER file at the path: linked under `imports/<source>/<path>` and the clone names that). The source project and this project's manifest are only read. **Placed** `--after`/`--before` an entry of the take (several items in the order named, one after another), else by the post's date when the take's posts are in date order, else at the end. **Again**: updated in place from the source (moved only with `--after`/`--before`), `unchanged` with no write when nothing differs. `--as`: one item under another id (a second copy). `--dry-run`: the plan and the placement, nothing linked or written. `--json`: `items[] {id, action added\\|updated\\|unchanged\\|moved, at {index, after, before}, narration {takes, pick, file}, files[], avatars[]}`, `revision`. Refused while the take renders. **Exit 0 · 1 refused (no such item, take or entry; a link out of the project) · 2 usage**"],
+ "**items of another project into a take** -- into the take's patch, the draft untouched (`timeline <p> import-item` is the draft's twin; `takeImport.mjs`): each entry CLONED from the source's manifest as it is now (its card, context, knobs, narration with its takes and its pick) into the take's timeline -- one write, an undo point of the take's (`timeline <p> --take <id> undo`); the files it names (narration takes and their `take-<n>.*` sidecars, the parts' cache files, attachments, a context post's media, the picture of each author it draws that the take lacks, added to the take's `postAvatars`) **hard-linked** into this project's dir at the same path, so the render and the lint find them (copied across filesystems; the same file already there is left; ANOTHER file at the path: linked under `imports/<source>/<path>` and the clone names that). The source project and this project's manifest are only read. **Placed** `--after`/`--before` an entry of the take (several items in the order named, one after another), else by the post's date when the take's posts are in date order, else at the end. **Again**: updated in place from the source (moved only with `--after`/`--before`), `unchanged` with no write when nothing differs. `--as`: one item under another id (a second copy). `--dry-run`: the plan and the placement, nothing linked or written. `--json`: `items[] {id, action added\\|updated\\|unchanged\\|moved, at {index, after, before}, narration {takes, pick, file}, files[], avatars[]}`, `revision`. Refused while the take renders. **Exit 0 · 1 refused (no such item, take or entry; a link out of the project) · 2 usage**"],
["`take … --priority` · `takes make … --priority` · `render-mode on [--for 90m] [--note T] [--json \\| --print-token]` · `render-mode on [--for 90m] [--note T] [--print-token] -- <cmd …>` · `render-mode off [--force] [--json]` · `render-mode status [--json]`",
"**render mode**: a render the operator waits for gets the machine. `--priority` turns it on for the take's (or the batch's) lifetime — on at the start, off at the end, on a failure and on a signal; the Takes page's **Give renders the machine** is the same flag. While it is on, every other heavy job (e2e suites, `next build`s, the publish stages, other renders) waits at the heavy slot's door (`queue-lock: held for a render (…) — waiting`), the render runs on the floor 4000 MB and the cap 10240 MB, and the editor's transcription, download and Speakers lanes are held through its ops (`lane`; only the ones not already held, and only those are released at off). `render-mode on` is a window (default 2h) for a chain of renders: every `umtool take` started in it renders in it, another command joins with the `RENDER_PRIORITY_TOKEN` it prints (`--print-token`: the token alone on stdout, the rest on stderr). **`on … -- <cmd …>` is the form for a script**: the command is spawned with the token in its environment, the hold is the command's pid, and it is released when the command exits — done, failed, or umtool signalled (the signal is passed on); umtool exits with the command's code, and inside a manual window the command joins it. A bare `on` in a script leaves the window behind (the chain trap). `off` ends it (a running take's hold only with `--force`, else it ends with the take); `status` says what holds it and releases a stale hold's lanes. A hold whose process is gone or whose window is over is no hold. Needs WORKER_TOKEN and the editor at ARCHILYZER_EDITOR_URL for the lanes; without them it still holds the door. **Exit 1** when it is already on, or a lane could not be released ([report-video.md](report-video.md#render-mode-giving-a-render-the-machine); WORKTREES.md, \"Render mode\")"],
["`take status <project> [--id <take>] [--json] [--log] [--tail N]`",
diff --git a/umtool/lib/report/postsCli.mjs b/umtool/lib/report/postsCli.mjs
@@ -793,8 +793,7 @@ async function inTakeCommand({ verb, take, rest }, { root, out, err }) {
}
if (!words[1]) throw new CliError(`which project? umtool posts ${verb} <project> … --in-take ${take}`);
const project = await projectOf(words[1], root);
- // Deprecated (L3 S6): it still lands, and says so in one line naming the project as parsed.
- err((await import("./takeDeprecation.mjs")).takeEditDeprecation(`posts ${verb} --in-take`, { project: project.id, take }));
+ // A supported path (12 Nov; takeDeprecation.mjs): the take's patch, never the draft.
const { isTakeId, takesDirOf, TAKE_FILE } = await import("./takes.mjs");
if (!isTakeId(take)) throw new CliError(`"${take}" is not a take id (lower-case letters, digits, dashes)`);
if (!(await stat(path.join(takesDirOf(project.dir), take, TAKE_FILE)).catch(() => null))) {
diff --git a/umtool/lib/report/takeCli.mjs b/umtool/lib/report/takeCli.mjs
@@ -292,9 +292,8 @@ export async function takeCommand(args, { reportsRoot = REPORTS_ROOT, log = cons
if (!id) throw new CliError("--id <id>: the take's directory name (lower-case letters, digits, dashes)");
if (p.has("--promote")) return await promote(project, id, p, log, err);
if (p.has("--import-item")) {
- // A write into the take's patch (takeDeprecation.mjs): the draft's twin is `timeline <p> import-item`.
- const { takeEditDeprecation } = await import("./takeDeprecation.mjs");
- err(takeEditDeprecation("take --import-item", { project: project.id, take: id, instead: `umtool timeline ${project.id} import-item <src>:<item>[,<item>…]` }));
+ // A write into the take's patch, a supported path (12 Nov; takeDeprecation.mjs); the draft's twin is
+ // `timeline <p> import-item`.
return await importItems(project, id, p, { reportsRoot, log, err });
}
if (p.has("--preview") || p.has("--changes")) return await fastRender(project, id, p, out, { args, log, deps, renderMode });
diff --git a/umtool/lib/report/takeDeprecation.mjs b/umtool/lib/report/takeDeprecation.mjs
@@ -1,8 +1,11 @@
-// THE TAKE-PATCH EDITS, DEPRECATED (umtool redesign L3, S6). Every edit lands in the working draft now; a saved
-// version is frozen and is edited by opening it in the draft (`umtool takes open <p> <v>`). The CLI paths that
-// still write a take's patch -- `--in-take`, `timeline --take`, `window --take`, `take --import-item` -- and the route behind the
-// old take walk (/api/report/takes/timeline) keep working for now, each saying so in ONE line on stderr, so a
-// script that leans on them hears it before they go.
+// THE TAKE-PATCH EDITS (umtool redesign L3, S6; 12 Nov 2026). Every edit IN THE APP lands in the working draft;
+// a saved version is frozen and is edited in the app by opening it in the draft (`umtool takes open <p> <v>`,
+// which writes the version over the draft -- the draft saved first). The CLI's take-patch writes -- `set --take`,
+// `look --take`, `window --take`, `timeline <verb> --take`, `posts … --in-take`, `take --import-item` -- are the
+// SUPPORTED way to edit a take without touching the draft (knobs.md: "the take-scoped CLI stays for agents"): each
+// writes takes/<t>/take.json's patch with an undo point of its own, and says nothing on stderr. They said this
+// line from 9 Nov to 12 Nov, and its advice (open the take in the draft) is the one path that writes the draft.
+// Only the old take walk's route (/api/report/takes/timeline, the app's) still says it, with its Deprecation header.
//
// Plain ESM: the CLI and the route both read it.
diff --git a/umtool/lib/report/takeEdit.test.mjs b/umtool/lib/report/takeEdit.test.mjs
@@ -303,8 +303,8 @@ test("the CLI twins: umtool walk --take, umtool timeline --take, umtool take --p
out.length = 0;
assert.equal(await timelineCommand(["proj", "--take", "tight", "move", "t03a", "--to", "0"], io), 0, err.join("\n"));
assert.match(out.join("\n"), /take tight: moved t03a: 3 -> 0/);
- // Deprecated (L3 S6): one line on stderr for a write, and it still works; `ls` (a read) says nothing.
- assert.deepEqual(err, ["umtool: timeline move --take is deprecated -- edits land in the draft now; open the take there first (umtool takes open proj tight) and edit without it"]);
+ // A supported path (12 Nov): a write says nothing on stderr -- no deprecation line pointing at `takes open`.
+ assert.deepEqual(err, []);
err.length = 0;
assert.equal(await timelineCommand(["proj", "--take", "tight", "undo"], io), 0, err.join("\n"));
// "Add to this take only" (lane/ui-simplify): a clip into the take's timeline, never the project's.
diff --git a/umtool/lib/report/takeEditFirstClass.test.mjs b/umtool/lib/report/takeEditFirstClass.test.mjs
@@ -0,0 +1,45 @@
+// Editing a take with --take is a supported path (12 Nov 2026): `window --take`, `set --take`, `timeline --take`,
+// `posts … --in-take` write the take's patch with an undo point of its own and never the project's manifest (the
+// operator's draft). They said "deprecated -- edits land in the draft now; open the take there first (umtool takes
+// open …)", and that advice is the one path here that writes over the draft. They now say nothing on stderr.
+import assert from "node:assert/strict";
+import { spawnSync } from "node:child_process";
+import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import path from "node:path";
+import test from "node:test";
+import { fileURLToPath } from "node:url";
+import { draftTake } from "./takeMaker.mjs";
+
+const CLI = fileURLToPath(new URL("../../bin/umtool.mjs", import.meta.url));
+
+test("window --take and set --take: the take's patch written, the draft byte for byte the same, no deprecation line", async () => {
+ const root = await mkdtemp(path.join(tmpdir(), "umtool-take-edit-"));
+ try {
+ const dir = path.join(root, "proj");
+ await mkdir(dir, { recursive: true });
+ const manifest = { schemaVersion: 1, slug: "proj", timeline: [{ type: "clip", id: "e1", channel: "ch", video: "v1", start: 10, end: 20 }, { type: "clip", id: "e2", channel: "ch", video: "v2", start: 30, end: 40 }] };
+ await writeFile(path.join(dir, "video.manifest.json"), `${JSON.stringify(manifest, null, 2)}\n`);
+ await draftTake(dir, { id: "t1", label: "T1", patch: { timeline: manifest.timeline } });
+ const draftBefore = await readFile(path.join(dir, "video.manifest.json"), "utf8");
+ const run = (...args) => spawnSync(process.execPath, [CLI, ...args], { cwd: root, env: { ...process.env, REPORTS_DIR: root }, encoding: "utf8" });
+
+ let r = run("window", dir, "e1", "--take", "t1", "--start", "11", "--end", "21");
+ assert.equal(r.status, 0, r.stderr);
+ assert.match(r.stdout, /e1 \(take t1\): 10–20 -> 11–21/);
+ assert.match(r.stdout, /undo point: takes\/t1\//);
+ assert.doesNotMatch(r.stderr, /deprecated/);
+ assert.equal(r.stderr.trim(), "");
+
+ r = run("set", dir, "e2", "audio.gain=3", "--take", "t1");
+ assert.equal(r.status, 0, r.stderr);
+ assert.doesNotMatch(r.stderr, /deprecated/);
+
+ const take = JSON.parse(await readFile(path.join(dir, "takes", "t1", "take.json"), "utf8"));
+ assert.equal(take.patch.timeline.find((e) => e.id === "e1").start, 11);
+ assert.equal(take.patch.timeline.find((e) => e.id === "e2").audio?.gain, 3);
+ assert.equal(await readFile(path.join(dir, "video.manifest.json"), "utf8"), draftBefore, "the operator's draft is never written");
+ } finally {
+ await rm(root, { recursive: true, force: true });
+ }
+});
diff --git a/umtool/lib/report/takeScope.test.mjs b/umtool/lib/report/takeScope.test.mjs
@@ -108,8 +108,8 @@ test("--in-take: set-item, narrate --pick, roles --set and fx land in the take's
assert.match(r.out, /on take t1 \(its patch; scope-a's manifest untouched\): 1 edit\(s\), undo point takes\/t1\/revisions\/.*-auto-before-post-item\.take\.json -- umtool timeline scope-a --take t1 undo/);
assert.equal(await text(a), before, "the project's manifest is never written");
assert.equal((await takeDoc(a, "t1")).patch.timeline.find((e) => e.id === "p-1").hold, 4);
- // Deprecated (L3 S6): it still lands, and says so in one line on stderr.
- assert.equal(r.err, "umtool: posts set-item --in-take is deprecated -- edits land in the draft now; open the take there first (umtool takes open scope-a t1) and edit without it");
+ // A supported path (12 Nov): it lands, and says nothing on stderr.
+ assert.equal(r.err, "");
// The alias: set-item's --take <t> is --in-take <t>; --json is the command's own object with the take.
r = await posts("set-item", "scope-a", "p-1", "thread.group=g1", "--take", "t1", "--json");
assert.equal(r.code, 0, r.err);
@@ -235,8 +235,8 @@ test("--import-item: an item of another project cloned into the take with its na
assert.deepEqual(doc.items[0].avatars, ["neighbour_one"]);
r = await take("imp-dst", "--id", "t1", "--import-item", "imp-src:12", "--before", "p-3");
assert.equal(r.code, 0, r.err);
- // A take-patch write, deprecated in one line on stderr that names the draft's verb.
- assert.match(r.err, /^umtool: take --import-item is deprecated -- .*umtool takes open imp-dst t1\) and use umtool timeline imp-dst import-item <src>:<item>/m);
+ // A take-patch write, a supported path (12 Nov): no deprecation line.
+ assert.doesNotMatch(r.err, /deprecated/);
assert.match(r.out, /p-12: added from imp-src:12 at 4, after p-2, before p-3/);
const m = (await resolveTakeManifest(dst.dir, "t1")).manifest;
assert.deepEqual(m.timeline.map((e) => e.id), ["p-1", "p-11", "p-10", "p-2", "p-12", "p-3"]);
diff --git a/umtool/lib/report/timelineCli.mjs b/umtool/lib/report/timelineCli.mjs
@@ -570,8 +570,7 @@ export async function timelineCommand(args, { root = REPORTS_ROOT, out = (s) =>
// A video entry (video-entry.mjs), into the cut or a take's timeline.
if (verb === "add-video" || verb === "set-video") return await videoVerb(project, verb, rest, flags, { out, json });
if (flags.has("--take")) {
- // `ls` only reads; a write into a take's patch is the deprecated path (L3 S6).
- if (verb !== "ls") err((await import("./takeDeprecation.mjs")).takeEditDeprecation(`timeline ${verb} --take`, { project: project.id, take: String(flags.get("--take")) }));
+ // A write into a take's patch: a supported path (12 Nov; takeDeprecation.mjs) -- never the draft.
return await takeTimeline(project, String(flags.get("--take")), verb, rest, flags, { out, json });
}
const manifest = await readManifest(project.dir);