commit d6aada3c3a32b734c53705545795eba86fad8c51
parent 1f07e90876ed6e921e959e39967d0a7a64029411
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 12 Nov 2026 02:01:17 -0500
report-to-video: a promise_outcome row's stampNote is the second line under the promise clock's stamp (the strip shows its first clause), the clock's own words without one; umtool ledger set <row> --stampNote; the lint warns when it is longer than the stamp's line holds
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
15 files changed, 177 insertions(+), 13 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
## [Unreleased]
+- **umtool: the words under the promise clock's REFUNDED stamp can be the record's own.** The stamp always read "by <date> · no video" under REFUNDED or WITHDRAWN, whatever the outcome row said. A `promise_outcome` row may now carry `stampNote` (`umtool ledger <p> set <row> --stampNote "by her account · no receipt"`, `--stampNote null` to take it off): it is the stamp's second line, and the one-line strip over a post's card shows its first clause. Without one the words are as before. `umtool lint` warns when a note is longer than the stamp's line holds (26 characters).
- **umtool: a loss goal no longer takes its base from a weight said years before.** A goal such as "lose 100" is shown against the latest weight he had given by then, however old: on the weight video that put "(FROM 368)" on a goal set eight years after he said 368. `deck.goals.baseMaxDays` (unset: as before) keeps a base only when its weight was said at most that many days before the goal; an older one is no base, so the note carries no "(FROM …)" and the dial draws no goal weight or tick from it. `umtool look <p> deck.goals.baseMaxDays=365`, and `umtool look` now takes `--take <t>` for the deck's keys, which sets them on that take alone.
- **umtool: the dial's finale no longer shows the callout's labels over its hub.** With `deck.dial.rememberedAs: "callout"` the finale's dial drew every remembered weight's label box and the ghost needle and never hid them, so the boxes sat on the hub for the whole finale (take rev9-a9). They are hidden there now; the rim's marker and flag for the last remembered weight stay.
- **umtool: record, filter and listen before anything is kept.** On the record page a recording became a take the moment its last part was in, and hearing it in the character's voice meant importing it on the Voices page and waiting for three takes (operator, 11 Nov: "run the filter and preview it seamlessly in the record UI"). With **Filter before keeping** (on by itself for a post whose character has a stock voice to convert to) the post now waits. **Filter** (`f`) runs the character's recorded preset as one job: clean, cut, convert. Its result is a preview in `narration/.record-preview/<postId>.<label>/`, not a take. The page shows the three stages and the time it has run, and a wait at the editor's queue or the machine's heavy slot reads "waiting for memory … the gate working, not an error". **▶ Raw** and **▶ Filtered** play at one loudness. **Keep** (`Enter`) makes the recorded, cleaned and converted takes from the preview's files, converts nothing again, picks the last and opens the next post not recorded; **Again** (`Backspace` or `r`) drops the preview and records the part again. Each part's waveform carries two **cut marks** at the auto trim's answer; drag one, or press the arrow keys on it, to cut a keyboard click off the start or the end. **Pitch** and **semitones** (a Seed-VC convert) default to the preset's and re-run the convert alone; **Save to character** writes them back, and a post read as the narrator or as nobody offers **Keep in this video only**. Above the record button: the character, its direction line and **▶ <voice> reads it** (its synthetic preset's voice), which plays the read kept from before when there is one and asks the editor only when pressed. Cancel stops the editor's job too. Opened over http from the LAN the page says the microphone is off (a browser opens it only on localhost or https); **Use a sound file…** takes a recording made elsewhere, and Filter, the preview and Keep work there. From a terminal: `umtool posts narrate <p> <item> --recording <file> --preview [--out <file>] [--trim-span 0.4-3.1]` prints the paths and makes no take, `--keep-preview` keeps it, `--discard-preview` drops it. A "start on speech" trigger was not built: it would lose the start of the first word, and the auto trim already cuts the silence before it. ([knobs.md](../umtool/docs/knobs.md#record-filter-preview-on-the-record-page))
diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md
@@ -91,7 +91,7 @@ Inbox cannot disagree about what is wrong with one.
| `trailer <project> --take <t> (--beats FILE \| --beats-json JSON) [--intro] [--finale S] [--xfade 0.3] [--no-snap] [--out NAME] [--dry-run] [--json]` | a **trailer cut from the take's finished master**: spans of the master's own frames (the deck shows the whole timeline), clip beats in source seconds mapped by the take's build records, each clip beat's end moved forward into the next pause (through its sentence when one ends within 1 s) and its start back into the one before, so the crossfade lands in quiet, each move said (`--no-snap`: the edges as written), crossfaded, the take's encode, in the heavy slot; writes `takes/<t>/out/<slug>.trailer.mp4` and `.trailer.json`; **exit 1** on a refusal ([report-video.md](report-video.md#trailer-from-the-master)) · `--reel <name> [--take <t>]`: a **beat reel** -- its own beats file (`promo/<name>-beats.json`), crossfade, intro (one rendered for the reel when the master has none, or the reel's own) and outro card (the title, the call to action, an image, the site's name; faded in from the last beat, held to the end), written to `<slug>.<name>.mp4`; no `--take`: its pinned take, else the one it was last cut from, else the latest finished master ([report-video.md](report-video.md#beat-reels)) |
| `trailer-beats <project> [ls] [--json]` · `add <clip> [<from>-<to>] [--at N] [--label L]` · `add-raw <at> <dur>` · `set <n> <from>-<to>` · `remove <n>` · `move <n> --to <m>` · `order` · `limit <s\|m:ss\|x\|instagram\|shorts\|tiktok>` · `xfade <s>` · `intro on\|off\|'<render.intro JSON>'` · `outro on\|off\|none\|'{title,text,image,seconds}'` · `candidates [--add]` · `verdict <n> confirmed\|note\|clear` · `title <text>\|none` · `take <t>\|none` · `undo` · `reels [--json]` · `new-reel <name> [--from <reel>] [--title T]` · `gap <n> add <from>-<to>\|remove <s>\|clear` · `status [--take <t>] [--json]` · `anchor [<n>…] --take <t>` · `clamp <n>` · `repoint <n> <clip>` · `history [--json]` · `--take <t>` on an edit · `--reel <name>` on any | **the trailer's beats** (`promo/trailer-beats.json`, the Trailer page's file, what `trailer --beats` reads) or another **beat reel's** (`--reel`: `promo/<name>-beats.json`): each beat's length, the running length against the platform limit (X 2:20 by default), beats outside their clip's window, the cut's order, the walk's ★ clips; the reel's own intro and its outro card (`ls`: `· outro 3.5 s`, counted in the length); every write an undo point and a history entry; a beat's gaps (two moments of one clip as one beat of jump cuts); each beat read against the take now -- what it was cut against, what changed (`status`), and the fixes ([knobs.md](knobs.md#the-trailers-beats), [reels track their source](knobs.md#reels-track-their-source)) |
| `tighten <project> [--json] [--all] [--no-measure]` · `tighten <project> --apply <clip>[,<clip>…]` | the Cut tab's **Propose tight windows**: each clip to its sentence (the sentences its cut touches, else the whole ones inside its window) and each edge into its pause (the build's measured silences and the gaps between the recording's timed words, ≤ 1 s, inside the cached window) — before → after with the seconds, the clips that would change (`--all`: every clip); prints only. `--apply` writes the named rows through the window writer (the token, the cite that follows the edge); a lock is kept (it is against `resolve-windows`, not a person) ([knobs.md](knobs.md#tighten-to-the-sentence-snap-to-a-pause)) |
-| `ledger <project> [ls] [--scope S] [--population P] [--json]` · `ledger <project> add <id> --date D --scope S --population P [--value V] --scopeBasis "…" [--<key> V …] [--row '{…}']` · `ledger <project> set <id> --<key> V … [--unset k,k]` · `ledger <project> rm <id>` | a **measure ledger's rows** (`ledgerSchema.kind "measure"`), the only writer of them: each row is checked against the schema -- a track, a form (and the promise forms `promise` / `promise_check`), a number in its unit or a declared regime with an event, the six adjudication fields (a new row defaults `scopeConfidence` read, `valueKind` uttered, `flags` []; `--scopeBasis` is never defaulted), the declared fields, and the instruments' own keys: `run` (a loss claim's run), `retro` (a loss told in the past with no `asOf`: off the odometer), `promise`, `kept`, `due`, `speaker` (another party's key: her rows move none of his numbers), `paidOn`, `outcome` (a `promise_outcome`'s: kept, refunded, withdrawn); the promise forms are `promise`, `promise_check`, `promise_claim`, `promise_outcome`. `rm` refuses a row an entry pins or another row names ([knobs.md](knobs.md#the-measure-slice-the-weight-instruments)) |
+| `ledger <project> [ls] [--scope S] [--population P] [--json]` · `ledger <project> add <id> --date D --scope S --population P [--value V] --scopeBasis "…" [--<key> V …] [--row '{…}']` · `ledger <project> set <id> --<key> V … [--unset k,k]` · `ledger <project> rm <id>` | a **measure ledger's rows** (`ledgerSchema.kind "measure"`), the only writer of them: each row is checked against the schema -- a track, a form (and the promise forms `promise` / `promise_check`), a number in its unit or a declared regime with an event, the six adjudication fields (a new row defaults `scopeConfidence` read, `valueKind` uttered, `flags` []; `--scopeBasis` is never defaulted), the declared fields, and the instruments' own keys: `run` (a loss claim's run), `retro` (a loss told in the past with no `asOf`: off the odometer), `promise`, `kept`, `due`, `speaker` (another party's key: her rows move none of his numbers), `paidOn`, `outcome` (a `promise_outcome`'s: kept, refunded, withdrawn), `stampNote` (a `promise_outcome`'s: the words under its stamp on the promise clock in place of "by <date> · no video" -- `ledger <p> set <row> --stampNote "…"`, `--stampNote null` for the clock's own words again; one line, the strip over a post's card shows its first clause, and `umtool lint` warns past 26 characters); the promise forms are `promise`, `promise_check`, `promise_claim`, `promise_outcome`. `rm` refuses a row an entry pins or another row names ([knobs.md](knobs.md#the-measure-slice-the-weight-instruments)) |
| `measure <project> [--take <t>] [--scopes a,b] [--scale MIN-MAX] [--as-of YYYY-MM-DD] [--json]` | the **measure slice** the instruments draw from (`render.chrome.deck.measure`; the flags override it): each row in scope the cut shows at the cut second its figure is said, the hidden rows, and the totals -- the odometer's runs, NET, the goals, the diets, the promises. The take's built `schedule.json` with `--take`, else an estimate; `--json` prints the slice. Reads only ([knobs.md](knobs.md#the-measure-slice-the-weight-instruments)) |
| `rulings <project> [--json]` · `rulings <project> import [--dry-run] [--json]` · `rulings <project> set <clip\|key> keep\|cut\|not-him\|read-aloud [--reason R] [--match M]` · `rulings <project> clear <clip\|key>` | a montage's **clip rulings** (`montage-rulings.json`, the clip deck's): each clip and its ruling and the next render's kept clips; the earlier rulings in the seed's `edits.json`, once; one ruling set or cleared. A render leaves out every clip ruled cut, not-him or read-aloud ([report-video.md](report-video.md#ruling-the-clips)) |
| `fetch <project> --body` · `fetch <project> --dry-run [--json]` · `fetch <project> [--wait] [--json]` · `fetch <project> --status [--json]` · `… [--reason R]` · `… --refetch <clipId>[,…]` · `… --refetch-video <slug>/<id>` · `… --take <take>` | **Fetch windows** (the Cut tab's and the clip deck's button): every clip's window asked of the editor as ONE fetch-windows batch — `--body` prints the body and asks nobody; `--dry-run` the editor's plan (groups per platform, cached, in flight, unresolved); no flag starts it (one paced job per platform queue), `--wait` follows the jobs to their end and names each window a job failed; `--status` follows the last run's jobs once. Clips the montage rulings leave out are not asked for. `--refetch <clipId>[,<clipId>…]` evicts the cached windows that OVERLAP those clips' fetch spans first (the editor's `evict-clips` `{slug, id, covering}`, one job per video, waited for), then fetches as usual — for windows known bad (cut from a corrupt saved video); `--refetch-video <slug>/<id>` does it for every window the project asks of that video; with `--dry-run` the eviction is a dry run too and names what it would remove. `--take <take>` asks for a TAKE's clips instead — its manifest as its walk reads it (the project's now with the take's patches; a draft's too, nothing rendered), so a clip only the take has is fetched; the run is recorded with `take`, and `--status --take` follows the take's last run (the cut's never reads a take's). Every run is recorded in `<project>/fetch-runs.json` (a refetch's evictions under `refetch`). Needs WORKER_TOKEN (else the editor's env files) and the editor at ARCHILYZER_EDITOR_URL. **Exit 1** when a job failed or the editor refused ([report-video.md](report-video.md#fetching-the-windows-and-stand-ins)) |
diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md
@@ -2695,6 +2695,7 @@ A days-since counter for a promise (`render.chrome.deck.promise`, measure-extras
| `deck.promise.position`, `.x`/`.y`, `.scale` | an anchor in the footage box · design px · 0.5–2 · default `top-center`, unset, 1 | `umtool look <p> deck.promise.position=bottom-center` |
| `deck.promise.hold`, `.finale` | 0 (stays up) or 2–600 s · `hide` `show` · default 0, `show` | `umtool look <p> deck.promise.finale=hide` |
| `deck.promise.label`, `.verb`, `.kept`, `.broken`, `.checks` | ≤40 each · `label` `quote` · default the row's display, "offered", "Posted", "None posted", `label` | `umtool look <p> deck.promise.label='scale video'` |
+| a `promise_outcome` row's `stampNote` | one line, 1–80 characters · unset (default): the clock's own words under the stamp, "by <date> · no video". The row's note is that second line instead (REFUNDED / "by her account · no receipt"); the strip over a post's card, which has one line for everything, shows its first clause (to its first `·`, `;`, `—`, `, ` or ` -- `: "refunded · by her account"). It is the ledger row's, so every take of the project reads it. `umtool lint` warns past 26 characters (the stamp's line is never wrapped: a longer one runs past its border) | `umtool ledger <p> set <row> --stampNote "by her account · no receipt"` · off again: `--stampNote null` |
| `deck.promise.speakers`, `.claimVerb`, `.claimColor` | `{<speaker>: {handle, color}}` · ≤40 · #hex · default `{}` (the postAvatars handle), "paid", #E37AB8 | `umtool look <p> deck.promise.speakers='{"madamsavvy":{"handle":"MadamSavvy"}}'` |
| `deck.promise.onPosts`, `.onChapters` | `dodge` `hide` `show` · default `dodge`: while a post item's card (its card, slot and strip as postLayout lays them: the schedule's `covers`) or a chapter band is up where it stands, it moves to a free anchor of the footage box -- a size down to half if it must, never onto another measure extra that is up -- and hides when none fits; `hide` hides, `show` stays over it | `umtool look <p> deck.promise.onPosts=hide` |
| a timeline entry's `hideModules` | `["promise", …]` on an entry hides it over that entry's span, with its own fade, whatever it would otherwise do there (text in the footage no dodge can know of) · any entry, a post item too | `umtool set <p> <entry> hideModules=promise` (`--take <t>` for a take) |
diff --git a/umtool/lib/cli/groups.mjs b/umtool/lib/cli/groups.mjs
@@ -726,7 +726,7 @@ export const GROUPS = [
],
docs: [
["`ledger <project> [ls] [--scope S] [--population P] [--json]` · `ledger <project> add <id> --date D --scope S --population P [--value V] --scopeBasis \"…\" [--<key> V …] [--row '{…}']` · `ledger <project> set <id> --<key> V … [--unset k,k]` · `ledger <project> rm <id>`",
- "a **measure ledger's rows** (`ledgerSchema.kind \"measure\"`), the only writer of them: each row is checked against the schema -- a track, a form (and the promise forms `promise` / `promise_check`), a number in its unit or a declared regime with an event, the six adjudication fields (a new row defaults `scopeConfidence` read, `valueKind` uttered, `flags` []; `--scopeBasis` is never defaulted), the declared fields, and the instruments' own keys: `run` (a loss claim's run), `retro` (a loss told in the past with no `asOf`: off the odometer), `promise`, `kept`, `due`, `speaker` (another party's key: her rows move none of his numbers), `paidOn`, `outcome` (a `promise_outcome`'s: kept, refunded, withdrawn); the promise forms are `promise`, `promise_check`, `promise_claim`, `promise_outcome`. `rm` refuses a row an entry pins or another row names ([knobs.md](knobs.md#the-measure-slice-the-weight-instruments))"],
+ "a **measure ledger's rows** (`ledgerSchema.kind \"measure\"`), the only writer of them: each row is checked against the schema -- a track, a form (and the promise forms `promise` / `promise_check`), a number in its unit or a declared regime with an event, the six adjudication fields (a new row defaults `scopeConfidence` read, `valueKind` uttered, `flags` []; `--scopeBasis` is never defaulted), the declared fields, and the instruments' own keys: `run` (a loss claim's run), `retro` (a loss told in the past with no `asOf`: off the odometer), `promise`, `kept`, `due`, `speaker` (another party's key: her rows move none of his numbers), `paidOn`, `outcome` (a `promise_outcome`'s: kept, refunded, withdrawn), `stampNote` (a `promise_outcome`'s: the words under its stamp on the promise clock in place of \"by <date> · no video\" -- `ledger <p> set <row> --stampNote \"…\"`, `--stampNote null` for the clock's own words again; one line, the strip over a post's card shows its first clause, and `umtool lint` warns past 26 characters); the promise forms are `promise`, `promise_check`, `promise_claim`, `promise_outcome`. `rm` refuses a row an entry pins or another row names ([knobs.md](knobs.md#the-measure-slice-the-weight-instruments))"],
],
},
{
diff --git a/umtool/lib/report/ledgerCli.mjs b/umtool/lib/report/ledgerCli.mjs
@@ -28,7 +28,9 @@ export const LEDGER_USAGE = [
"instruments' own: run (a loss claim's run, his words placing it), retro (a loss told in the past with no asOf:",
"off the odometer), promise (a promise_check's or promise_claim's promise), kept, due (YYYY-MM-DD), speaker (another",
"party's key: a promise_claim's -- her rows move none of his numbers), paidOn (YYYY-MM-DD), outcome (a",
- "promise_outcome's: kept, refunded, withdrawn)) or a declared field; `null`",
+ "promise_outcome's: kept, refunded, withdrawn), stampNote (a promise_outcome's: the words under its stamp on the",
+ "promise clock in place of \"by <date> · no video\" -- one line; the strip shows its first clause; `umtool lint` warns",
+ "past 26 characters)) or a declared field; `null`",
"clears a value. rm refuses a row a timeline entry pins or another row names.",
].join("\n");
diff --git a/umtool/lib/report/ledgerCli.test.mjs b/umtool/lib/report/ledgerCli.test.mjs
@@ -118,6 +118,15 @@ test("umtool ledger: add, set, unset, rm -- through the writers, on the file", a
assert.equal(await run(ledgerCommand, "weigh", "add", "o02", "--date", "2026-10-31", "--scope", "weight", "--population", "promise_outcome",
"--promise", "p01", "--outcome", "forgotten", "--scopeBasis", "x"), 1);
assert.match(lines.at(-1), /outcome kept, refunded, withdrawn/);
+ // The words under its stamp (`stampNote`): a promise_outcome's, one line; null takes them off again.
+ assert.equal(await run(ledgerCommand, "weigh", "set", "o01", "--stampNote", "by her account · no receipt"), 0, lines.join("\n"));
+ assert.equal((await manifestOf(dir)).ledger.find((r) => r.id === "o01").stampNote, "by her account · no receipt");
+ assert.equal(await run(ledgerCommand, "weigh", "set", "o01", "--stampNote", "x".repeat(81)), 1);
+ assert.match(lines.at(-1), /stampNote is one line of 1–80 characters/);
+ assert.equal(await run(ledgerCommand, "weigh", "set", "p01", "--stampNote", "nope"), 1);
+ assert.match(lines.at(-1), /stampNote is a promise_outcome's/);
+ assert.equal(await run(ledgerCommand, "weigh", "set", "o01", "--stampNote", "null"), 0, lines.join("\n"));
+ assert.equal((await manifestOf(dir)).ledger.find((r) => r.id === "o01").stampNote ?? null, null);
assert.equal(await run(ledgerCommand, "weigh", "rm", "o01"), 0);
assert.equal(await run(ledgerCommand, "weigh", "rm", "s01"), 0);
// A loss told in the past: off the odometer; then put back on it.
diff --git a/umtool/lib/report/ledgerRows.mjs b/umtool/lib/report/ledgerRows.mjs
@@ -18,7 +18,7 @@
// subject) is a lower-case key; another speaker's row moves none of his
// numbers (measure-slice.mjs).
import {
- EVENTS, LEDGER_BUILTIN_KEYS, PROMISE_FORMS, PROMISE_OUTCOMES, SCOPE_CONFIDENCE, VALUE_KINDS, measureDisplay, measureGaps, measureSchema, validateFields,
+ EVENTS, LEDGER_BUILTIN_KEYS, PROMISE_FORMS, PROMISE_OUTCOMES, SCOPE_CONFIDENCE, STAMP_NOTE, VALUE_KINDS, measureDisplay, measureGaps, measureSchema, validateFields,
} from "umtool-report-to-video/ledger-totals";
const isObj = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
@@ -35,7 +35,7 @@ export const LEDGER_KEY_TYPES = Object.freeze({
display: "text?", label: "text?", quote: "text?", deadline: "text?", src: "text?", channel: "text?", video: "text?",
cite: "seconds?", citeFrom: "text?", scopeBasis: "text", scopeConfidence: "text", valueKind: "text", flags: "list",
hedged: "bool?", unsourced: "bool?", plotted: "bool?", hidden: "bool?", entryId: "text?", authorNote: "text?",
- run: "run?", retro: "bool?", promise: "text?", kept: "bool?", due: "day?", speaker: "speaker?", paidOn: "day?", outcome: "text?",
+ run: "run?", retro: "bool?", promise: "text?", kept: "bool?", due: "day?", speaker: "speaker?", paidOn: "day?", outcome: "text?", stampNote: "text?",
});
/** Is this manifest's ledger a measure ledger (the one these writers write)? */
@@ -143,6 +143,13 @@ export function ledgerRowOf(manifest, base, patch, { unset = [] } = {}) {
if (row.population === "promise_outcome") {
if (!PROMISE_OUTCOMES.includes(row.outcome)) errors.push(`a promise_outcome says how it ended: outcome ${PROMISE_OUTCOMES.join(", ")}`);
} else if (row.outcome !== undefined && row.outcome !== null) errors.push("outcome is a promise_outcome's");
+ // The words under the outcome's stamp on the promise clock (measure-extras.mjs STAMP_NOTE): one line of text.
+ if (row.stampNote !== undefined && row.stampNote !== null) {
+ if (row.population !== "promise_outcome") errors.push("stampNote is a promise_outcome's (the words under its stamp)");
+ else if (typeof row.stampNote !== "string" || !row.stampNote.trim() || /[\n\r]/.test(row.stampNote) || row.stampNote.trim().length > STAMP_NOTE.max) {
+ errors.push(`stampNote is one line of 1–${STAMP_NOTE.max} characters (the stamp's second line; past ${STAMP_NOTE.fit} the lint warns it may not fit)`);
+ }
+ }
if (["promise_check", "promise_claim", "promise_outcome"].includes(row.population)) {
const p = ledger.find((r) => r?.id === row.promise);
if (!row.promise) errors.push(`a ${row.population} names its promise (--promise <row id>)`);
diff --git a/umtool/report-to-video/chrome-measure-extras.mjs b/umtool/report-to-video/chrome-measure-extras.mjs
@@ -17,7 +17,7 @@ import { rgba } from "./chrome-deck.mjs";
import { compileCues, cuePageHtml, esc, INSTANT, joinSpans, r4, spanEvents } from "./chrome-cues.mjs";
import {
daysBetween, daysLeftText, daysText, DIET_TAG, dietDays, dietStates, dietTagStep, goalStates, goalText, GOALS_SHELF, jitter, measureBox, measureExtraGeometry, measureOf, MEASURE_BOXES, promiseStripRect, promiseStripType,
- MEASURE_DODGE_MOVE, measurePlacements, monthYear, peakStates, promiseStates, shortDate, streakStates, upSpans, weightText,
+ MEASURE_DODGE_MOVE, measurePlacements, monthYear, peakStates, promiseStates, shortDate, stampNoteClause, stampNoteLine, streakStates, upSpans, weightText,
} from "./measure-extras.mjs";
import { dietTagWidth, MEASURE_RED, resolveMeasureExtra, SHELF_POSITION } from "./modules/measure-extras-settings.mjs";
import { dialFinaleGeometry, dialFinaleHandoff } from "./chrome-instruments.mjs";
@@ -643,7 +643,7 @@ function promiseStrip(states, place, cfg, render, opts, items) {
const claim = r.claim ? `<span class="sp">·</span><span>${esc(cfg.claimVerb)} ${esc(shortDate(r.claim.paidOn ?? r.claim.date))} by @${esc(handleOf(r.claim.speaker, cfg, opts))}</span>` : "";
const o = r.outcome;
const status = o && o.kind !== "kept"
- ? `<span class="no">${o.kind === "refunded" ? "refunded" : "withdrawn"} · no video</span>`
+ ? `<span class="no">${o.kind === "refunded" ? "refunded" : "withdrawn"} · ${esc(stampNoteClause(o))}</span>`
: r.kept ? `<span class="ok">${esc(cfg.kept)}</span>` : `<span class="no">${esc(cfg.broken)}</span>`;
const html = `<div class="sl" data-k="${k}"><span>${esc(r.what)} ${esc(cfg.verb)} ${esc(shortDate(r.said))}</span>${claim}<span class="sp">·</span><b>${esc(days)}</b><span class="sp">·</span>${status}</div>`;
items.push({ key: k, gate: [k, "autoAlpha"], html });
@@ -725,7 +725,7 @@ export function promiseHtml(schedule, render, opts = {}) {
const o = r.outcome;
if (o && o.kind !== "kept") {
const word = o.kind === "refunded" ? "Refunded" : "Withdrawn";
- status = `<div class="stamp ${esc(o.kind)}" data-k="${k}o"><div class="sw">${word}</div><div class="ss">${o.date ? `by ${esc(shortDate(o.date))} · ` : ""}no video</div></div>`;
+ status = `<div class="stamp ${esc(o.kind)}" data-k="${k}o"><div class="sw">${word}</div><div class="ss">${esc(stampNoteLine(o))}</div></div>`;
} else status = `<div class="pill">${esc(r.kept ? cfg.kept : cfg.broken)}</div>`;
let q;
if (r.word) {
diff --git a/umtool/report-to-video/ledger-shared.mjs b/umtool/report-to-video/ledger-shared.mjs
@@ -102,6 +102,16 @@ export const LEDGER_BUILTIN_KEYS = new Set([
// who said it, when it is not the subject (a promise_claim's counterparty;
// such a row never moves the subject's numbers), and the day she says she paid
"speaker", "paidOn",
- // how a promise ended (a promise_outcome's: kept, refunded, withdrawn)
- "outcome",
+ // how a promise ended (a promise_outcome's: kept, refunded, withdrawn), and the words under its stamp
+ // (`stampNote`: the promise clock's second line in place of "by <date> · no video")
+ "outcome", "stampNote",
]);
+
+/**
+ * THE WORDS UNDER AN OUTCOME'S STAMP (a promise_outcome row's `stampNote`, 12 Nov): the promise clock wrote
+ * "by <date> · no video" under REFUNDED whatever the record said. A row's own note is that line instead; the strip
+ * (one line over a post's card) has room for its first clause only. `fit`: the characters the stamp's line holds
+ * beside the count and the as-of at the card's design width -- the longest the clock's own words come to ("by 26 Oct
+ * 2025 · no video" is 25) -- past it the lint warns; `max`: what a row may carry at all.
+ */
+export const STAMP_NOTE = Object.freeze({ fit: 26, max: 80 });
diff --git a/umtool/report-to-video/ledger-totals.mjs b/umtool/report-to-video/ledger-totals.mjs
@@ -46,7 +46,7 @@ import {
// Re-exported rather than redefined: every consumer already imports these from
// here, and two files owning one vocabulary is the divergence this module was
// written to stop.
-export { LEDGER_BUILTIN_KEYS, SCOPE_CONFIDENCE, VALUE_KINDS, addDays, chronological, dateKey, dayOf, daysBetween } from "./ledger-shared.mjs";
+export { LEDGER_BUILTIN_KEYS, SCOPE_CONFIDENCE, STAMP_NOTE, VALUE_KINDS, addDays, chronological, dateKey, dayOf, daysBetween } from "./ledger-shared.mjs";
export {
EVENTS,
MEASURE_PREDICATES,
diff --git a/umtool/report-to-video/lint.mjs b/umtool/report-to-video/lint.mjs
@@ -53,6 +53,8 @@
// and validateTeasers refuses it.)
// - a QR under WARN_QR_PX_PER_MODULE_720P pixels per module at 720p: it
// scans on a good screen with a steady hand, not reliably.
+// - a promise outcome's `stampNote` (a ledger row's words under its stamp on the promise clock) longer than
+// the stamp's one line holds (measure-extras.mjs STAMP_NOTE.fit);
// - a tally label wider than its cell: drawn smaller, down to
// TALLY_LABEL_FLOOR, then cut with an ellipsis (factcheck.mjs
// fitTallyLabel) -- the chrome is never refused for it.
@@ -85,6 +87,7 @@ import {
validateChrome, validateCutEdits, validateDeckMarkers, validatePosts, validateTeasers, deckClaimNotes, validateDeckClaims,
} from "./deck.mjs";
import { tallyLabelNotes, validateClaims } from "./factcheck.mjs";
+import { stampNoteWarnings } from "./measure-extras.mjs";
import { validateClipAudioEntries } from "./clip-audio.mjs";
import { validateClipBlurEntries } from "./clip-blur.mjs";
import { validateGapEntries } from "./gaps.mjs";
@@ -457,6 +460,8 @@ export function lintManifest(manifest, {
// A tally label wider than its cell, drawn smaller or cut (factcheck.mjs fitTallyLabel): said, never refused.
if (!only) warnings.push(...tallyLabelNotes(render));
warnings.push(...stackedLintWarnings(manifest, { only }));
+ // A promise outcome's own stamp words (a ledger row's `stampNote`) longer than the stamp's line holds.
+ if (!only) warnings.push(...stampNoteWarnings(whole));
for (const { where, src } of imageSrcsOf(manifest, { only })) {
if (path.isAbsolute(src) || src.startsWith("~")) {
diff --git a/umtool/report-to-video/measure-extras.mjs b/umtool/report-to-video/measure-extras.mjs
@@ -28,6 +28,7 @@
import { deckGeometry, feedGeometry, instrumentsGeometry, overlayBox, pictureK } from "./deck.mjs";
import { chapterCover, chapterWindows } from "./chrome-story.mjs";
import { dietTagWidth, MEASURE_EXTRAS, MEASURE_POSITIONS, resolveMeasureExtra, SHELF_POSITION } from "./modules/measure-extras-settings.mjs";
+import { STAMP_NOTE } from "./ledger-shared.mjs";
import { resolveShelf } from "./modules/shelf-settings.mjs";
import { stackedOn, stackedStandDowns } from "./vertical-deck.mjs";
@@ -353,6 +354,38 @@ export const PROMISE_SETTLE = 4;
/** The count-up to the render date: a day a step, over at most this long. */
export const PROMISE_COUNT_UP = 1.2;
+export { STAMP_NOTE };
+
+/** The stamp's second line: the outcome's own note, else the clock's words ("by 26 Oct · no video"). */
+export function stampNoteLine(outcome) {
+ if (typeof outcome?.note === "string" && outcome.note.trim()) return outcome.note.trim();
+ return `${outcome?.date ? `by ${shortDate(outcome.date)} · ` : ""}no video`;
+}
+
+/** The strip's words after the outcome's: a note's first clause (to its first · , ; — or " -- "), else "no video". */
+export function stampNoteClause(outcome) {
+ const note = typeof outcome?.note === "string" ? outcome.note.trim() : "";
+ if (!note) return "no video";
+ return note.split(/\s+--\s+|\s*[·;—]\s*|,\s+/)[0].trim() || note;
+}
+
+/**
+ * The lint's warnings for the stamp notes (lint.mjs): a `stampNote` longer than the stamp's line holds -- it is one
+ * line, never wrapped, so it runs past the stamp's border and into the as-of beside it.
+ * @returns {string[]}
+ */
+export function stampNoteWarnings(manifest) {
+ const out = [];
+ for (const row of Array.isArray(manifest?.ledger) ? manifest.ledger : []) {
+ if (row?.population !== "promise_outcome" || typeof row.stampNote !== "string") continue;
+ const note = row.stampNote.trim();
+ if (note.length > STAMP_NOTE.fit) {
+ out.push(`ledger ${row.id}.stampNote "${note}" is ${note.length} characters: the promise clock's stamp holds about ${STAMP_NOTE.fit} on its second line (it is one line, never wrapped) -- it will run past the stamp; shorten it (umtool ledger <p> set ${row.id} --stampNote "…")`);
+ }
+ }
+ return out;
+}
+
/** The promise outcomes the clock draws (CONTRACT addendum 2): kept stops the count; refunded and withdrawn do not. */
export const PROMISE_OUTCOMES = Object.freeze(["kept", "refunded", "withdrawn"]);
@@ -387,7 +420,8 @@ export function promiseStates(schedule, render) {
const lastWord = new Map();
const outcomeOf = (p) => {
const o = isObj(p.outcome) && PROMISE_OUTCOMES.includes(p.outcome.kind) ? p.outcome : null;
- return o ? { kind: o.kind, date: o.date ?? null } : p.kept === true ? { kind: "kept", date: null } : null;
+ const note = typeof o?.note === "string" && o.note.trim() ? o.note.trim() : null;
+ return o ? { kind: o.kind, date: o.date ?? null, ...(note ? { note } : {}) } : p.kept === true ? { kind: "kept", date: null } : null;
};
const rowsAt = (s, freshRow) => (Array.isArray(s?.promises) ? s.promises : [])
.filter((p) => p && p.said)
diff --git a/umtool/report-to-video/measure-slice.mjs b/umtool/report-to-video/measure-slice.mjs
@@ -125,6 +125,9 @@ export function goalBaseMaxDays(manifest) {
return Number.isInteger(v) && v >= 0 ? v : null;
}
+/** A promise_outcome row's `stampNote` -- the words under its stamp on the promise clock -- trimmed, or null. */
+export const stampNoteOf = (row) => (typeof row?.stampNote === "string" && row.stampNote.trim() ? row.stampNote.trim() : null);
+
// ---------------------------------------------------------------------------
// The odometer
// ---------------------------------------------------------------------------
@@ -532,7 +535,7 @@ export function measureSlice(manifest, schedule, opts = {}) {
/** A promise_claim as a promise carries it: who, when said, the day she says she paid, his-or-her words. */
/** A promise_outcome as a promise carries it. */
- const outcomeOf = (row) => ({ kind: row.outcome, date: row.date ?? null, row: row.id });
+ const outcomeOf = (row) => ({ kind: row.outcome, date: row.date ?? null, row: row.id, ...(stampNoteOf(row) ? { note: stampNoteOf(row) } : {}) });
const claimOf = (row) => ({ row: row.id, speaker: speakerOf(row), date: row.date ?? null, paidOn: isIso(row.paidOn) ? row.paidOn : null, label: row.label ?? row.display ?? null });
// ---- the state after each event -------------------------------------------
diff --git a/umtool/report-to-video/modules/promise.mjs b/umtool/report-to-video/modules/promise.mjs
@@ -69,6 +69,7 @@ export default measureExtraModule({
["`deck.promise.position`, `.x`/`.y`, `.scale`", "an anchor in the footage box · design px · 0.5–2 · default `top-center`, unset, 1", "`umtool look <p> deck.promise.position=bottom-center`"],
["`deck.promise.hold`, `.finale`", "0 (stays up) or 2–600 s · `hide` `show` · default 0, `show`", "`umtool look <p> deck.promise.finale=hide`"],
["`deck.promise.label`, `.verb`, `.kept`, `.broken`, `.checks`", "≤40 each · `label` `quote` · default the row's display, \"offered\", \"Posted\", \"None posted\", `label`", "`umtool look <p> deck.promise.label='scale video'`"],
+ ["a `promise_outcome` row's `stampNote`", "one line, 1–80 characters · unset (default): the clock's own words under the stamp, \"by <date> · no video\". The row's note is that second line instead (REFUNDED / \"by her account · no receipt\"); the strip over a post's card, which has one line for everything, shows its first clause (to its first `·`, `;`, `—`, `, ` or ` -- `: \"refunded · by her account\"). It is the ledger row's, so every take of the project reads it. `umtool lint` warns past 26 characters (the stamp's line is never wrapped: a longer one runs past its border)", "`umtool ledger <p> set <row> --stampNote \"by her account · no receipt\"` · off again: `--stampNote null`"],
["`deck.promise.speakers`, `.claimVerb`, `.claimColor`", "`{<speaker>: {handle, color}}` · ≤40 · #hex · default `{}` (the postAvatars handle), \"paid\", #E37AB8", "`umtool look <p> deck.promise.speakers='{\"madamsavvy\":{\"handle\":\"MadamSavvy\"}}'`"],
],
},
diff --git a/umtool/report-to-video/stamp-note.test.mjs b/umtool/report-to-video/stamp-note.test.mjs
@@ -0,0 +1,91 @@
+// THE WORDS UNDER AN OUTCOME'S STAMP (a promise_outcome row's `stampNote`, 12 Nov): the promise clock wrote
+// "by <date> · no video" under REFUNDED whatever the record said. A row's own note is that line; the strip over a
+// post's card shows its first clause; with none, the clock's words as they were.
+import assert from "node:assert/strict";
+import { readFileSync } from "node:fs";
+import path from "node:path";
+import test from "node:test";
+import { fileURLToPath } from "node:url";
+
+import { promiseHtml } from "./chrome-measure-extras.mjs";
+import { estimateSchedule } from "./deck.mjs";
+import { lintManifest } from "./lint.mjs";
+import { promiseStates, STAMP_NOTE, stampNoteClause, stampNoteLine, stampNoteWarnings } from "./measure-extras.mjs";
+import { measureSlice } from "./measure-slice.mjs";
+
+const HERE = path.dirname(fileURLToPath(import.meta.url));
+const MEASURE = JSON.parse(readFileSync(path.join(HERE, "fixtures/measure-extras/measure.json"), "utf8"));
+const PAL = { bg: "#0F1312", fg: "#EDF0EC", muted: "#98A29B", accent: "#22AB83", amber: "#E8A33F" };
+const render = (deck = {}) => ({ width: 1920, height: 1080, fps: 30, transition: 0.4, palette: PAL, chrome: { engine: "hyperframes", layout: "deck", deck } });
+const schedule = (measure, extra = {}) => ({ kind: "deck", fps: 30, total: 740, transition: 0.4, segments: [{ id: "a", start: 0, duration: 740, end: 740 }], measure, ...extra });
+const clone = (v) => JSON.parse(JSON.stringify(v));
+const noted = (note) => {
+ const m = clone(MEASURE);
+ for (const s of m.state) for (const p of s.promises ?? []) if (p.outcome) p.outcome.note = note;
+ return m;
+};
+
+test("the words: the note when the row has one, the clock's own otherwise; the strip takes the first clause", () => {
+ assert.equal(stampNoteLine({ kind: "refunded", date: "2026-10-31" }), "by 31 Oct · no video");
+ assert.equal(stampNoteLine({ kind: "refunded", date: null }), "no video");
+ assert.equal(stampNoteLine({ kind: "refunded", date: "2026-10-31", note: " her word · no receipt " }), "her word · no receipt");
+ assert.equal(stampNoteClause({ kind: "refunded" }), "no video");
+ assert.equal(stampNoteClause({ note: "her word · no receipt" }), "her word");
+ assert.equal(stampNoteClause({ note: "by her account, 31 Oct" }), "by her account");
+ assert.equal(stampNoteClause({ note: "she says -- nothing shown" }), "she says");
+ assert.equal(stampNoteClause({ note: "partly; the rest owed" }), "partly");
+ assert.equal(stampNoteClause({ note: "one clause only" }), "one clause only");
+});
+
+test("the slice carries a promise_outcome row's stampNote on the promise's outcome; a row without one is as before", () => {
+ const schema = { kind: "measure", unit: "lb", yMin: 100, yMax: 400, bandGapDays: 60, tracks: [{ key: "weight", role: "value", label: "Weight" }], forms: ["current"] };
+ const row = (o) => ({ scope: "weight", scopeBasis: "x", scopeConfidence: "read", valueKind: "uttered", flags: [], asOf: null, ...o });
+ const ledger = (note) => [
+ row({ id: "p01", date: "2026-10-23", population: "promise", display: "scale video", entryId: "c1" }),
+ row({ id: "o01", date: "2026-10-31", population: "promise_outcome", promise: "p01", outcome: "refunded", speaker: "madamsavvy", entryId: "c2", ...(note === undefined ? {} : { stampNote: note }) }),
+ ];
+ const r = render({ measure: { scopes: ["weight"], asOf: "2026-11-12" } });
+ const timeline = Array.from({ length: 3 }, (_, i) => ({ type: "clip", id: `c${i + 1}`, video: "v", start: 10 * i, end: 10 * i + 8, cite: 1, section: 0, quote: "q", onscreen: { title: `Clip ${i + 1}` } }));
+ const slice = (note) => {
+ const manifest = { slug: "m", title: "M", provenance: {}, render: r, timeline, ledgerSchema: schema, ledger: ledger(note) };
+ return measureSlice(manifest, estimateSchedule(manifest), {});
+ };
+ assert.deepEqual(slice(" by her account ").state.at(-1).promises[0].outcome, { kind: "refunded", date: "2026-10-31", row: "o01", note: "by her account" });
+ assert.deepEqual(slice(undefined).state.at(-1).promises[0].outcome, { kind: "refunded", date: "2026-10-31", row: "o01" });
+ assert.deepEqual(slice(" ").state.at(-1).promises[0].outcome, { kind: "refunded", date: "2026-10-31", row: "o01" });
+ // ... and the clock's states keep it.
+ assert.equal(promiseStates(schedule(slice("by her account")), r).find((s) => s.rows[0].outcome)?.rows[0].outcome.note, "by her account");
+});
+
+test("the page: the stamp's second line is the note (escaped); the column's compact stamp too; the strip its first clause", () => {
+ const r = render({ promise: { speakers: { madamsavvy: { handle: "MadamSavvy" } } } });
+ assert.match(promiseHtml(schedule(MEASURE), r, { fonts: {} }).html, /<div class="sw">Refunded<\/div><div class="ss">by 31 Oct · no video<\/div>/);
+ const html = promiseHtml(schedule(noted("her word · <no> receipt")), r, { fonts: {} }).html;
+ assert.match(html, /<div class="sw">Refunded<\/div><div class="ss">her word · <no> receipt<\/div>/);
+ assert.doesNotMatch(html, /no video/);
+ // The column's compact form (beside the instruments) draws the same stamp.
+ const col = render({ dial: true, promise: { label: "scale video" } });
+ assert.match(promiseHtml(schedule(noted("her word · no receipt")), col, { fonts: {} }).html, /<div class="ss">her word · no receipt<\/div>/);
+ // The strip (the footage slot, a post's card over the clock): "refunded · <first clause>".
+ const f = render({ promise: { label: "scale video" } });
+ const covered = (m) => schedule(m, { covers: [{ segment: "p", from: 715, to: 739, rects: [{ x: 300, y: 100, width: 700, height: 600 }] }] });
+ assert.match(promiseHtml(covered(MEASURE), f, { fonts: {} }).html, /<span class="no">refunded · no video<\/span>/);
+ const strip = promiseHtml(covered(noted("her word · no receipt")), f, { fonts: {} }).html;
+ assert.match(strip, /<span class="no">refunded · her word<\/span>/);
+ assert.doesNotMatch(strip, /<span class="no">refunded · no video<\/span>/);
+});
+
+test("the lint warns when a note is longer than the stamp's line holds -- never refuses", () => {
+ const manifest = (note) => ({ slug: "m", title: "M", provenance: {}, render: render({}), timeline: [{ type: "clip", id: "c1", video: "v", start: 0, end: 8 }],
+ ledger: [{ id: "o01", population: "promise_outcome", outcome: "refunded", stampNote: note }, { id: "w1", population: "current", stampNote: "x".repeat(60) }] });
+ assert.deepEqual(stampNoteWarnings(manifest("by her account")), []);
+ assert.deepEqual(stampNoteWarnings(manifest("x".repeat(STAMP_NOTE.fit))), []);
+ const long = "refunded in full by her account on 31 Oct";
+ const w = stampNoteWarnings(manifest(long));
+ assert.equal(w.length, 1);
+ assert.match(w[0], new RegExp(`ledger o01\\.stampNote "${long}" is ${long.length} characters: the promise clock's stamp holds about ${STAMP_NOTE.fit}`));
+ const lint = lintManifest(manifest(long), { validators: false });
+ assert.ok(lint.warnings.some((x) => x.startsWith("ledger o01.stampNote")), lint.warnings.join("\n"));
+ assert.ok(!lint.errors.some((x) => /stampNote/.test(x)));
+ assert.ok(!lintManifest(manifest("short"), { validators: false }).warnings.some((x) => /stampNote/.test(x)));
+});