commit 6111ff288ff4c7c7186026d1590c4c4fddf13df7
parent 256461523cfa46ff92c3502adbd5ae2247b9e5b0
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 6 Nov 2026 20:42:29 -0500
umtool: a bound that agrees with the weight in force leaves it; an unresolved row or another speaker's counts in no tally
Two rulings (operator, 6 Nov):
"If a range is provided (e.g. 'over 300') and we already match with a
specific number (e.g. 342), don't change the current weight." A qualified
reading (">300", "<300", "≈390", a range) that the specific weight in force
satisfies is no new figure (measure-totals.mjs boundAgrees): the slice's
current weight -- the dial's needle and number, NET -- and the panel's WEIGHT
cell keep the specific one; the event stays (its claim ghost, the trail's
point). One that contradicts it (">300" at 291) is new information and moves
them, as any reading does. With nothing specific in force a bound reads as
before. On the weight video: w107 ">300" at 9:00 now leaves the needle on
w102's 320.
Rows marked scopeConfidence "unresolved" (a joke -- w44, "only way I'm
losing 100 lbs is by amputation" -- or a line that is not his) count in no
tally: goals set, the goal and the goal board, diets, promises, the odometer,
"under 300" (measure-slice.mjs isUsable; a pinned one is still an event,
marked `unresolved`, and a reading still reads). The scoreboard's tallies
(measureTotals' `settled`) skip another speaker's rows as well. The weight
video's goals set: 36 -> 35.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
7 files changed, 170 insertions(+), 20 deletions(-)
diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md
@@ -483,7 +483,12 @@ do, `due` when he gave a day) is checked by his later `promise_check` rows namin
another party's `promise_claim` rows (`speaker`, e.g. `madamsavvy`; `paidOn`; a `citeUrl`), and ended by a
`promise_outcome` (`outcome`: `kept` · `refunded` · `withdrawn`); `kept: true` on the promise or a check, or an
outcome `kept`, keeps it. A row with a `speaker` is someone else's: it moves none of his numbers (current, lost, net,
-goals, diet, the totals) and only feeds the promises (`state.promises[].claims`, `.outcome`).
+goals, diet, the totals) and only feeds the promises (`state.promises[].claims`, `.outcome`). A row whose
+`scopeConfidence` is `unresolved` (not a usable claim: a joke, a line that is not his) counts in NO tally -- goals set,
+the goal and the goal board, diets, pledges, promises, the odometer, "under 300" -- pinned or not (pinned, it is
+still on screen, and a reading still reads); the scoreboard's tallies skip another speaker's rows the same way. A
+qualified reading (`>300`, `<300`, `≈390`, a range) that agrees with the specific weight in force does not replace
+it -- not on the dial, not in the panel's WEIGHT cell (`boundAgrees`); one that contradicts it does.
Rows are written through `umtool ledger` only; `umtool measure` prints the slice:
@@ -1829,7 +1834,7 @@ A card per thread in the side panel beside the footage, lit as its clips play; a
### Scale dial
-A bathroom-scale face at the top of the instruments' column (the right of the frame; the clip moves to the left -- `instrumentsGeometry`, 1248×702 footage beside a 600 px column at 1920×1080). It reads the schedule's `measure` (the measure ledger's slice): the red needle swings to each STATED weight at its event's `t` (the spoken word) with a spring (`back.out`, 0.9 s) and rests there -- a frame at rest is reused, not captured again; a qualifier draws a wedge in pounds (≈ 3 under to 1 over, `>` 10 up, `<` 10 down); every REMEMBERED weight is a grey tick, the latest a long ghost needle with its as-of date. GOALS (measure-goals.mjs `goalBoard`): every goal in force at the playhead is a mark on the bezel at its weight -- in force from the moment the cut shows it until he meets it in time, a newer goal of the same HORIZON replaces it (the same deadline day, the same deadline words, or both undated), or the record's date passes its day. The HEADLINE is the CLOSEST of them -- the least still to lose from his latest stated weight (a range to its top), ties to the soonest deadline -- the full amber tick, its words under the digits (`GOAL 320 · BY APR 2026`); the others a thin amber tick, no words; a range an amber band too. A goal whose day passes with his latest weight over it is MISSED: struck in the needle's red with a red flash, the line under the digits `MISSED 320 · BY APR 2026` for 6 s (`MISS_HOLD`), then gone; a day passing with his weight under it (a reading after the day) leaves quietly. A goal's day: the ledger's `due`, else his `deadline` words read ("by Christmas", "by the end of 2026"), else the row's `asOf`. Any page that shows a goal reads the same board: `goalBoard(schedule.measure)` -> `[{ t, active, headline, missed, cur }]`, `goalsAt(board, t)`. It comes and goes with the deck (a card, the finale). With any instrument on, the posts stay in the footage box (`posts.shift` does not apply), and the side panel (`threads`, `flips`) and the posts feed are refused.
+A bathroom-scale face at the top of the instruments' column (the right of the frame; the clip moves to the left -- `instrumentsGeometry`, 1248×702 footage beside a 600 px column at 1920×1080). It reads the schedule's `measure` (the measure ledger's slice): the red needle swings to each STATED weight at its event's `t` (the spoken word) with a spring (`back.out`, 0.9 s) and rests there -- a frame at rest is reused, not captured again; a BOUND that agrees with the specific weight in force (">300" while he is at 342, "≈390" at 388, "330-340" at 337) is no new figure and moves neither the needle nor the number (measure-totals.mjs `boundAgrees`; it still leaves its claim ghost), while one that contradicts it (">300" at 291) moves them as any reading does; a qualifier draws a wedge in pounds (≈ 3 under to 1 over, `>` 10 up, `<` 10 down); every REMEMBERED weight is a grey tick, the latest a long ghost needle with its as-of date. GOALS (measure-goals.mjs `goalBoard`): every goal in force at the playhead is a mark on the bezel at its weight -- in force from the moment the cut shows it until he meets it in time, a newer goal of the same HORIZON replaces it (the same deadline day, the same deadline words, or both undated), or the record's date passes its day. The HEADLINE is the CLOSEST of them -- the least still to lose from his latest stated weight (a range to its top), ties to the soonest deadline -- the full amber tick, its words under the digits (`GOAL 320 · BY APR 2026`); the others a thin amber tick, no words; a range an amber band too. A goal whose day passes with his latest weight over it is MISSED: struck in the needle's red with a red flash, the line under the digits `MISSED 320 · BY APR 2026` for 6 s (`MISS_HOLD`), then gone; a day passing with his weight under it (a reading after the day) leaves quietly. A goal's day: the ledger's `due`, else his `deadline` words read ("by Christmas", "by the end of 2026"), else the row's `asOf`. Any page that shows a goal reads the same board: `goalBoard(schedule.measure)` -> `[{ t, active, headline, missed, cur }]`, `goalsAt(board, t)`. It comes and goes with the deck (a card, the finale). With any instrument on, the posts stay in the footage box (`posts.shift` does not apply), and the side panel (`threads`, `flips`) and the posts feed are refused.
| Knob | Range · default | From a terminal |
|---|---|---|
diff --git a/umtool/report-to-video/measure-goals.mjs b/umtool/report-to-video/measure-goals.mjs
@@ -5,7 +5,8 @@
// the CLOSEST of them as the headline, and each one whose deadline passed
// unmet, held a moment as MISSED.
//
-// active every goal (`goal`, `goal_loss`) of his the cut has shown, not
+// active every goal (`goal`, `goal_loss`) of his the cut has shown (an
+// `unresolved` row -- a joke -- is no goal), not
// yet met, replaced or past its deadline -- in the order set.
// A newer goal with the same HORIZON replaces the older one: the
// same deadline day, else the same deadline words, else both
@@ -108,7 +109,7 @@ export function goalBoard(measure, { hold = MISS_HOLD } = {}) {
const states = Array.isArray(measure?.state) ? measure.state : [];
const steps = events
.map((e, i) => ({ e, s: states[i + 1] ?? states[states.length - 1] ?? null, i }))
- .filter(({ e }) => Number.isFinite(e?.t) && own(e))
+ .filter(({ e }) => Number.isFinite(e?.t) && own(e) && e.unresolved !== true)
.sort((a, b) => a.e.t - b.e.t || a.i - b.i);
let active = [];
let cur = null;
diff --git a/umtool/report-to-video/measure-slice.mjs b/umtool/report-to-video/measure-slice.mjs
@@ -21,7 +21,7 @@
//
// The odometer rule (ruled 5 Nov 2026, "go by his words"): see lossRuns.
import { chronological, dateKey, daysBetween } from "./ledger-shared.mjs";
-import { PROMISE_FORMS, measureDisplay, measureQualifier, measureSchema, measureTotals, plotDate } from "./measure-totals.mjs";
+import { PROMISE_FORMS, boundAgrees, displayRange, measureDisplay, measureQualifier, measureSchema, measureTotals, plotDate } from "./measure-totals.mjs";
import { goalCell, nextRegime, offOf } from "./panel-model.mjs";
import { offsetIn } from "./gaps.mjs";
import { validateGhosts } from "./measure-ghosts.mjs";
@@ -211,11 +211,7 @@ const entrySource = (entry) => (entry?.type === "clip" ? "clip" : entry?.type ==
* as a range -- a wedge, "330–340" -- never the middle alone.
*/
export function rangeOf(row) {
- const m = /(\d+(?:\.\d+)?)\s*[-–]\s*(\d+(?:\.\d+)?)/.exec(String(row?.display ?? ""));
- if (!m) return null;
- const lo = Number(m[1]);
- const hi = Number(m[2]);
- return Number.isFinite(lo) && Number.isFinite(hi) && hi > lo ? [lo, hi] : null;
+ return displayRange(row?.display);
}
function eventOf(row, schema, runOf) {
@@ -243,6 +239,8 @@ function eventOf(row, schema, runOf) {
run: kind === "lost" && runOf.has(row.id) ? runOf.get(row.id) : null,
speaker: speakerOf(row),
outcome: row.population === "promise_outcome" && typeof row.outcome === "string" ? row.outcome : null,
+ // Not a usable claim (a joke, a misattributed line): on screen when pinned, in no tally (isUsable).
+ ...(row.scopeConfidence === "unresolved" ? { unresolved: true } : {}),
};
}
@@ -254,6 +252,15 @@ function eventOf(row, schema, runOf) {
*/
export const speakerOf = (row) => (typeof row?.speaker === "string" && row.speaker.trim() ? row.speaker.trim() : null);
+/**
+ * Does the row COUNT -- in a tally (goals set, diets, pledges, the odometer,
+ * "under 300", the goal ladder)? Not when its scope is `unresolved`: the
+ * ledger's word for "not a usable claim" (a joke -- w44, "only way I'm losing
+ * 100 lbs is by amputation" -- or a line that is not his). Such a row is still
+ * a row: pinned, it is on screen, and a reading still reads (operator, 6 Nov).
+ */
+export const isUsable = (row) => row?.scopeConfidence !== "unresolved" && row?.unresolved !== true;
+
// ---------------------------------------------------------------------------
// When a row lands: the spoken number in the clip's words
// ---------------------------------------------------------------------------
@@ -396,7 +403,9 @@ export function measureSlice(manifest, schedule, opts = {}) {
const byId = new Map(rows.map((r) => [r.id, r]));
// HIS rows: every number the instruments draw is the subject's own.
const own = rows.filter((r) => speakerOf(r) === null);
- const { runs, runOf, claims: lossClaims, total } = lossRuns(own, s);
+ // What counts in a tally: his own usable rows.
+ const counted = own.filter(isUsable);
+ const { runs, runOf, claims: lossClaims, total } = lossRuns(counted, s);
const runById = new Map(runs.map((r) => [r.run, r]));
// ---- events: each pinned row at the cut second it lands -------------------
@@ -538,7 +547,12 @@ export function measureSlice(manifest, schedule, opts = {}) {
const row = byId.get(ev.row);
// Another speaker's row feeds the promises and nothing else.
if (ev.speaker !== null && ev.kind !== "promiseClaim" && ev.kind !== "promiseOutcome") { state.push(snapshot(ev.t)); continue; }
- if (ev.kind === "stated" && ev.value !== null) current = { value: ev.value, qualifier: ev.qualifier, row: ev.row, date: ev.date, asOf: ev.asOf, ...(ev.range ? { range: [...ev.range] } : {}) };
+ // An unresolved row is no claim to count: it moves a reading (it is on screen), never a goal, a diet, a promise.
+ if (ev.unresolved && ev.kind !== "stated" && ev.kind !== "remembered") { state.push(snapshot(ev.t)); continue; }
+ // A bound that agrees with the specific weight in force (">300" while he is at 342) is no new figure: the needle
+ // and the number stay (boundAgrees). One that contradicts it (">300" at 291) moves them, as any reading does.
+ if (ev.kind === "stated" && ev.value !== null && boundAgrees(ev, current)) { /* the current weight stands */ }
+ else if (ev.kind === "stated" && ev.value !== null) current = { value: ev.value, qualifier: ev.qualifier, row: ev.row, date: ev.date, asOf: ev.asOf, ...(ev.range ? { range: [...ev.range] } : {}) };
else if (ev.kind === "remembered" && ev.value !== null) remembered.push({ value: ev.value, asOf: ev.asOf, row: ev.row, date: ev.date, ...(ev.qualifier ? { qualifier: ev.qualifier } : {}), ...(ev.range ? { range: [...ev.range] } : {}) });
else if (ev.kind === "goal" || ev.kind === "goalLoss") { goal = goalOf(row); goals.push(ev.row); }
else if (ev.kind === "lost" && ev.run !== null) {
@@ -572,7 +586,8 @@ export function measureSlice(manifest, schedule, opts = {}) {
// ---- totals over the whole record in scope --------------------------------
const all = chronological(own);
const lastStated = [...readings].filter((r) => r.population === "current").pop() ?? null;
- const goalRows = all.filter((r) => r.population === "goal" || r.population === "goal_loss");
+ const tallied = all.filter(isUsable);
+ const goalRows = tallied.filter((r) => r.population === "goal" || r.population === "goal_loss");
const repeats = {};
for (const r of goalRows) { const d = measureDisplay(r, s); repeats[d] = (repeats[d] ?? 0) + 1; }
const goalRepeats = Object.fromEntries(Object.entries(repeats).filter(([, n]) => n > 1).sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])));
@@ -586,18 +601,18 @@ export function measureSlice(manifest, schedule, opts = {}) {
const peakDrift = [...new Set(readings.filter((r) => r.population === "past" && r.asOf && firstStated && dateKey(r.asOf) >= firstStated && Number(r.value) > maxStated).map((r) => Number(r.value)))].sort((a, b) => a - b);
// UNDER 300: a weight he stated below it, or "under 300" itself -- never a
// bound the other way ("over 240" is not a weight under 300).
- const under = stated.filter((r) => {
+ const under = stated.filter(isUsable).filter((r) => {
const q = measureQualifier(r, s);
return q !== ">" && (Number(r.value) < 300 || (Number(r.value) === 300 && q === "<"));
});
const dates = all.map((r) => plotDate(r)).filter(Boolean).map(dateKey).sort();
- const promiseRows = all.filter((r) => r.population === "promise");
+ const promiseRows = tallied.filter((r) => r.population === "promise");
const checksOf = (id) => all.filter((r) => r.population === "promise_check" && r.promise === id);
const outcomeRowOf = (id) => chronological(rows).filter((r) => r.population === "promise_outcome" && r.promise === id && typeof r.outcome === "string").pop() ?? null;
const claimsOf = (id) => chronological(rows).filter((r) => r.population === "promise_claim" && r.promise === id).map(claimOf);
let diets = 0;
try {
- diets = measureTotals(own, s, { strict: false }).switches;
+ diets = measureTotals(counted, s, { strict: false }).switches;
} catch {
diets = 0;
}
diff --git a/umtool/report-to-video/measure-slice.test.mjs b/umtool/report-to-video/measure-slice.test.mjs
@@ -5,12 +5,15 @@ import assert from "node:assert/strict";
import test from "node:test";
import {
- isRealtimeLoss, kindOf, lossRuns, measureOn, measureSettingsProblems, measureSlice, pinnedRows, spokenAt, spokenNumbers,
+ isRealtimeLoss, isUsable, kindOf, lossRuns, measureOn, measureSettingsProblems, measureSlice, pinnedRows, spokenAt, spokenNumbers,
validateMeasureSettings,
} from "./measure-slice.mjs";
import { estimateSchedule, validateChrome } from "./deck.mjs";
import { scheduleSlices } from "./modules/index.mjs";
import { validateClaims } from "./factcheck.mjs";
+import { goalBoard } from "./measure-goals.mjs";
+import { boundAgrees, measureScoreboard, measureTotals } from "./measure-totals.mjs";
+import { nextReading } from "./panel-model.mjs";
const SCHEMA = {
kind: "measure",
@@ -276,3 +279,90 @@ test("a promise's outcome: how it ended, and \"kept\" keeps it -- the totals unt
assert.equal(kept.totals.promises[0].kept, true);
assert.equal(plain.state.at(-1).promises[0].outcome, null);
});
+
+// ---------------------------------------------------------------------------
+// The operator's rulings of 6 Nov: a bound that agrees with the weight in force does not move it; an unresolved
+// row and another speaker's count in no tally.
+// ---------------------------------------------------------------------------
+
+test("boundAgrees: a bound the specific weight satisfies agrees; one it contradicts, or a bound in force, does not", () => {
+ const at = (value, extra = {}) => ({ value, qualifier: null, ...extra });
+ assert.equal(boundAgrees({ value: 300, qualifier: ">" }, at(342)), true);
+ assert.equal(boundAgrees({ value: 300, qualifier: ">" }, at(291)), false, "contradicts: new information");
+ assert.equal(boundAgrees({ value: 300, qualifier: ">" }, at(300)), false, "300 is not over 300");
+ assert.equal(boundAgrees({ value: 300, qualifier: "<" }, at(291)), true);
+ assert.equal(boundAgrees({ value: 300, qualifier: "<" }, at(305)), false);
+ assert.equal(boundAgrees({ value: 390, qualifier: "≈" }, at(388)), true);
+ assert.equal(boundAgrees({ value: 390, qualifier: "≈" }, at(380)), false);
+ assert.equal(boundAgrees({ value: 335, range: [330, 340] }, at(337)), true);
+ assert.equal(boundAgrees({ value: 335, range: [330, 340] }, at(342)), false);
+ assert.equal(boundAgrees({ value: 342 }, at(300)), false, "a specific reading always moves it");
+ assert.equal(boundAgrees({ value: 300, qualifier: ">" }, null), false, "nothing in force: as today");
+ assert.equal(boundAgrees({ value: 300, qualifier: ">" }, at(320, { qualifier: ">" })), false, "a bound in force is replaced as today");
+});
+
+test("a bound that agrees with the weight in force leaves the needle and the number; one that contradicts moves them", () => {
+ const rows = (...extra) => [
+ row({ id: "a1", date: "2025-05-01", population: "current", value: 342, display: "342 lb", entryId: "c3" }),
+ ...extra,
+ ];
+ const sliceOf = (ledger) => measureSlice({ ...manifest(), ledger }, { segments: SEGMENTS }, { words: WORDS, clock: CLOCK, asOf: "2025-07-10" });
+ const currentAfter = (sl, id) => sl.state[sl.events.findIndex((e) => e.row === id) + 1].current;
+ // ">300" at 342: the 342 stands -- its event is still there (its ghost tick, the trail's point).
+ const agree = sliceOf(rows(row({ id: "a2", date: "2025-05-10", population: "current", value: 300, qualifier: ">", display: ">300 lb", entryId: "c4" })));
+ assert.equal(currentAfter(agree, "a2").row, "a1");
+ assert.equal(currentAfter(agree, "a2").value, 342);
+ assert.ok(agree.events.some((e) => e.row === "a2" && e.kind === "stated"));
+ // "<300" at 342 contradicts it: new information, the needle moves.
+ const contra = sliceOf(rows(row({ id: "a2", date: "2025-05-10", population: "current", value: 300, qualifier: "<", display: "<300 lb", entryId: "c4" })));
+ assert.deepEqual([currentAfter(contra, "a2").row, currentAfter(contra, "a2").qualifier], ["a2", "<"]);
+ // A bound with nothing specific in force behaves as it did: it is the reading.
+ const first = sliceOf([row({ id: "a2", date: "2025-05-10", population: "current", value: 300, qualifier: ">", display: ">300 lb", entryId: "c4" })]);
+ assert.equal(currentAfter(first, "a2").row, "a2");
+ // The panel's reading cell keeps the same rule.
+ const prev = nextReading(null, row({ id: "a1", date: "2025-05-01", population: "current", value: 342, display: "342 lb" }), SCHEMA);
+ assert.equal(nextReading(prev, row({ id: "a2", date: "2025-05-10", population: "current", value: 300, qualifier: ">", display: ">300 lb" }), SCHEMA).row, "a1");
+ assert.equal(nextReading(prev, row({ id: "a3", date: "2025-05-10", population: "current", value: 300, qualifier: "<", display: "<300 lb" }), SCHEMA).row, "a3");
+});
+
+test("an unresolved row (a joke) counts in no tally -- goals set, the goal, diets, promises, the odometer, under 300 -- pinned or not", () => {
+ const sliceOf = (ledger) => measureSlice({ ...manifest(), ledger }, { segments: SEGMENTS }, { words: WORDS, clock: CLOCK, asOf: "2025-07-10" });
+ const plain = sliceOf(LEDGER);
+ const joke = { scopeConfidence: "unresolved" };
+ const extra = [
+ // w44's shape: "only way I'm losing 100 lbs is by amputation" -- unpinned, and a pinned one besides.
+ row({ id: "j1", date: "2025-06-07", population: "goal_loss", value: -100, display: "lose 100", ...joke }),
+ row({ id: "j2", date: "2025-06-07", population: "goal", value: 200, display: "200", entryId: "c5", ...joke }),
+ row({ id: "j3", date: "2025-06-07", scope: "regime", population: "status", value: "glp1", event: "start", display: "glp1", entryId: "c5", ...joke }),
+ row({ id: "j4", date: "2025-06-07", population: "delta", value: -150, display: "-150", entryId: "c5", ...joke }),
+ row({ id: "j5", date: "2025-06-07", population: "promise", value: null, display: "a joke promise", entryId: "c5", ...joke }),
+ ];
+ const sl = sliceOf([...LEDGER, ...extra]);
+ for (const k of ["goals", "goalRepeats", "diets", "lost", "runs", "under300"]) assert.deepEqual(sl.totals[k], plain.totals[k], k);
+ assert.deepEqual(sl.totals.promises.map((p) => p.row), plain.totals.promises.map((p) => p.row));
+ const last = sl.state.at(-1), was = plain.state.at(-1);
+ for (const k of ["goal", "goals", "diet", "lost", "current"]) assert.deepEqual(last[k], was[k], k);
+ // Pinned, it is still an event (on screen), marked; the goal board passes over it.
+ assert.equal(sl.events.find((e) => e.row === "j2").unresolved, true);
+ assert.equal(plain.events.find((e) => e.row === "w11").unresolved, undefined, "a usable row's event is as it was");
+ assert.ok(!goalBoard(sl).some((b) => b.active.some((g) => g.row === "j2")));
+ assert.equal(isUsable({ scopeConfidence: "unresolved" }), false);
+ assert.equal(isUsable({ scopeConfidence: "read" }), true);
+});
+
+test("the scoreboard's tallies (goals set, diets, pledges) count neither an unresolved row nor another speaker's", () => {
+ const base = [
+ row({ id: "g1", date: "2025-01-01", population: "goal", value: 250, display: "250" }),
+ row({ id: "r1", date: "2025-01-02", scope: "regime", population: "status", value: "keto", event: "start", display: "keto" }),
+ ];
+ const noise = [
+ row({ id: "g2", date: "2025-02-01", population: "goal_loss", value: -100, display: "lose 100", scopeConfidence: "unresolved" }),
+ row({ id: "g3", date: "2025-02-02", population: "goal", value: 200, display: "200", speaker: "madamsavvy" }),
+ row({ id: "r2", date: "2025-02-03", scope: "regime", population: "status", value: "carnivore", event: "start", display: "carnivore", speaker: "madamsavvy" }),
+ row({ id: "r3", date: "2025-02-04", scope: "regime", population: "status", value: "glp1", event: "start", display: "glp1", scopeConfidence: "unresolved" }),
+ ];
+ const board = (ledger) => measureScoreboard(measureTotals(ledger, SCHEMA, { strict: false })).final;
+ const a = board(base), b = board([...base, ...noise]);
+ assert.deepEqual([b.goals.count, b.diets.count, b.pledges.count], [a.goals.count, a.diets.count, a.pledges.count]);
+ assert.equal(b.goals.last.id, "g1");
+});
diff --git a/umtool/report-to-video/measure-totals.mjs b/umtool/report-to-video/measure-totals.mjs
@@ -1056,7 +1056,9 @@ export function measureTotals(ledger, schema, { strict = true } = {}) {
for (const e of all) {
const gaps = measureGaps(e, s);
const ruled = gaps.length === 0;
- const settled = ruled && e.scopeConfidence !== "unresolved";
+ // Counted only when it is a usable claim of HIS: an `unresolved` scope (a joke, a misattributed line) and another
+ // speaker's row (`speaker`) are in the record and on screen, never in a tally (operator, 6 Nov).
+ const settled = ruled && e.scopeConfidence !== "unresolved" && !(typeof e.speaker === "string" && e.speaker.trim());
const tr = trackOf(s, e.scope);
const at = plotDate(e);
const flags = [];
@@ -1610,6 +1612,41 @@ export function freshestReading(claim, at, prev) {
return !prev || dateKey(at) > dateKey(prev.at);
}
+/** A range his words give ("330-340", "220–240 lb"), as `[lo, hi]`, or null. */
+export function displayRange(display) {
+ const m = /(\d+(?:\.\d+)?)\s*[-–]\s*(\d+(?:\.\d+)?)/.exec(String(display ?? ""));
+ if (!m) return null;
+ const lo = Number(m[1]);
+ const hi = Number(m[2]);
+ return Number.isFinite(lo) && Number.isFinite(hi) && hi > lo ? [lo, hi] : null;
+}
+
+/**
+ * Does a QUALIFIED reading agree with the SPECIFIC one in force -- so it is no
+ * new figure and the current weight stays (operator, 6 Nov: "If a range is
+ * provided (e.g. 'over 300') and we already match with a specific number
+ * (e.g. 342), don't change the current weight")? `bound` and `specific` are
+ * `{ value, qualifier?, range? }`. Agrees when `specific` is a plain number (no
+ * qualifier, no range) and `bound` is a qualified one it satisfies: ">300"
+ * by anything over 300, "<300" by anything under, "≈390" by 387 to 391 (the
+ * dial's wedge), a range by anything inside it. A bound that CONTRADICTS the
+ * specific reading (">300" against 291) is new information: it does not agree,
+ * and it moves the reading as any other does.
+ */
+export function boundAgrees(bound, specific) {
+ if (!bound || !specific) return false;
+ const c = Number(specific.value);
+ if (!Number.isFinite(c) || specific.qualifier || Array.isArray(specific.range)) return false;
+ const v = Number(bound.value);
+ const r = Array.isArray(bound.range) && bound.range.length === 2 ? bound.range : null;
+ if (r) return c >= r[0] && c <= r[1];
+ if (!Number.isFinite(v)) return false;
+ if (bound.qualifier === ">") return c > v;
+ if (bound.qualifier === "<") return c < v;
+ if (bound.qualifier === "≈") return c >= v - 3 && c <= v + 1;
+ return false;
+}
+
/**
* A goal as a weight, when it can be one.
*
diff --git a/umtool/report-to-video/modules/dial.mjs b/umtool/report-to-video/modules/dial.mjs
@@ -44,7 +44,7 @@ export default defineModule({
],
docs: {
heading: "Scale dial",
- intro: "A bathroom-scale face at the top of the instruments' column (the right of the frame; the clip moves to the left -- `instrumentsGeometry`, 1248×702 footage beside a 600 px column at 1920×1080). It reads the schedule's `measure` (the measure ledger's slice): the red needle swings to each STATED weight at its event's `t` (the spoken word) with a spring (`back.out`, 0.9 s) and rests there -- a frame at rest is reused, not captured again; a qualifier draws a wedge in pounds (≈ 3 under to 1 over, `>` 10 up, `<` 10 down); every REMEMBERED weight is a grey tick, the latest a long ghost needle with its as-of date. GOALS (measure-goals.mjs `goalBoard`): every goal in force at the playhead is a mark on the bezel at its weight -- in force from the moment the cut shows it until he meets it in time, a newer goal of the same HORIZON replaces it (the same deadline day, the same deadline words, or both undated), or the record's date passes its day. The HEADLINE is the CLOSEST of them -- the least still to lose from his latest stated weight (a range to its top), ties to the soonest deadline -- the full amber tick, its words under the digits (`GOAL 320 · BY APR 2026`); the others a thin amber tick, no words; a range an amber band too. A goal whose day passes with his latest weight over it is MISSED: struck in the needle's red with a red flash, the line under the digits `MISSED 320 · BY APR 2026` for 6 s (`MISS_HOLD`), then gone; a day passing with his weight under it (a reading after the day) leaves quietly. A goal's day: the ledger's `due`, else his `deadline` words read (\"by Christmas\", \"by the end of 2026\"), else the row's `asOf`. Any page that shows a goal reads the same board: `goalBoard(schedule.measure)` -> `[{ t, active, headline, missed, cur }]`, `goalsAt(board, t)`. It comes and goes with the deck (a card, the finale). With any instrument on, the posts stay in the footage box (`posts.shift` does not apply), and the side panel (`threads`, `flips`) and the posts feed are refused.",
+ intro: "A bathroom-scale face at the top of the instruments' column (the right of the frame; the clip moves to the left -- `instrumentsGeometry`, 1248×702 footage beside a 600 px column at 1920×1080). It reads the schedule's `measure` (the measure ledger's slice): the red needle swings to each STATED weight at its event's `t` (the spoken word) with a spring (`back.out`, 0.9 s) and rests there -- a frame at rest is reused, not captured again; a BOUND that agrees with the specific weight in force (\">300\" while he is at 342, \"≈390\" at 388, \"330-340\" at 337) is no new figure and moves neither the needle nor the number (measure-totals.mjs `boundAgrees`; it still leaves its claim ghost), while one that contradicts it (\">300\" at 291) moves them as any reading does; a qualifier draws a wedge in pounds (≈ 3 under to 1 over, `>` 10 up, `<` 10 down); every REMEMBERED weight is a grey tick, the latest a long ghost needle with its as-of date. GOALS (measure-goals.mjs `goalBoard`): every goal in force at the playhead is a mark on the bezel at its weight -- in force from the moment the cut shows it until he meets it in time, a newer goal of the same HORIZON replaces it (the same deadline day, the same deadline words, or both undated), or the record's date passes its day. The HEADLINE is the CLOSEST of them -- the least still to lose from his latest stated weight (a range to its top), ties to the soonest deadline -- the full amber tick, its words under the digits (`GOAL 320 · BY APR 2026`); the others a thin amber tick, no words; a range an amber band too. A goal whose day passes with his latest weight over it is MISSED: struck in the needle's red with a red flash, the line under the digits `MISSED 320 · BY APR 2026` for 6 s (`MISS_HOLD`), then gone; a day passing with his weight under it (a reading after the day) leaves quietly. A goal's day: the ledger's `due`, else his `deadline` words read (\"by Christmas\", \"by the end of 2026\"), else the row's `asOf`. Any page that shows a goal reads the same board: `goalBoard(schedule.measure)` -> `[{ t, active, headline, missed, cur }]`, `goalsAt(board, t)`. It comes and goes with the deck (a card, the finale). With any instrument on, the posts stay in the footage box (`posts.shift` does not apply), and the side panel (`threads`, `flips`) and the posts feed are refused.",
rows: [
["`deck.dial`", "`true` · an object of the knobs below · `false` off · absent: ON when the cut draws a measure (`deck.measure` set), else off", "`umtool look <p> deck.dial=false`"],
["`deck.dial.mark`", "a weight, or `null` · default `300` (its tick and label in the accent)", "`umtool look <p> deck.dial.mark=300`"],
diff --git a/umtool/report-to-video/panel-model.mjs b/umtool/report-to-video/panel-model.mjs
@@ -19,7 +19,7 @@
// cell to THIS track's off regime, and only when it names what is
// open (offCloses: "off GLP-1" said three weeks into keto leaves
// Keto in the cell; the off-scope fix, eff32c8d).
-import { freshestReading, goalAbsolute, measureDisplay, measureQualifier, measureSchema, offCloses, plotDate } from "./measure-totals.mjs";
+import { boundAgrees, displayRange, freshestReading, goalAbsolute, measureDisplay, measureQualifier, measureSchema, offCloses, plotDate } from "./measure-totals.mjs";
/** The events that OPEN or sustain a regime segment, against those that close. */
export const OPENING = new Set(["start", "on"]);
@@ -47,6 +47,8 @@ export function offOf(schema, trackKey) {
export function nextReading(prev, row, schema) {
const at = plotDate(row);
if (!freshestReading(row, at, prev)) return prev;
+ // A bound the reading in force already satisfies (">300" at 342) leaves it as it is (boundAgrees).
+ if (row.population === "current" && boundAgrees({ value: row.value, qualifier: measureQualifier(row, schema), range: displayRange(row.display) }, prev && { ...prev, range: displayRange(prev.display) })) return prev;
return {
value: Number(row.value),
at,