Skip to content

Commit a2db75f

Browse files
dkackmanclaude
andcommitted
docs(proposal): #801 - per-entry singer on music-video needs an optional item: field
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent e36604f commit a2db75f

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# #801: per-entry `references` on `music-video`, falling back to `singer_reference`
2+
3+
Scope (Don's ruling on #801): item 3 only. Items 1 and 2 are #805.
4+
5+
## Why this is a proposal, not a template edit
6+
7+
The engine has no optional `item:` field. `dw/for_each.py::_item` raises
8+
`names no field of entry ...` when an entry lacks the field, and nothing
9+
substitutes a default. So "an entry may carry `references`, otherwise
10+
`singer_reference`" cannot be written in the template today:
11+
12+
- `"references": "item:references"` (the `dialogue-short` pattern) makes the field
13+
required on every entry. A caller's existing `shots` lists, and the ones in
14+
skills and docs, would all fail validation: a breaking change.
15+
- Keeping `["variable:singer_reference", <slice>]` in the step and adding an
16+
`item:` extra has the same problem, since the extra must exist.
17+
18+
Also, inside an `item:` the slice reference is not auto-paired
19+
(`WORKFLOW_GUIDE.md`, *Authoring*), so a per-entry list has to spell
20+
`slice@<name>` itself. An entry that overrides the picture has to restate the
21+
audio reference too.
22+
23+
## Options
24+
25+
A. **Optional item field (engine).** A way to read an entry field with a
26+
fallback, e.g. `{"item": "singer", "default": "variable:singer_reference"}`,
27+
resolved in `_item`, with the field-list warning
28+
(`entry_field_warnings`) and the UI twin (`ui/src/lib/flow.ts`) told that the
29+
field is optional. Smallest change that gives the requested behaviour; adds
30+
one concept consumers learn. Narrow scope: the entry field would be
31+
`singer` (the image reference only), the template keeps building the list
32+
`[<picture>, <slice audio>]`, so the audio pairing is not restated.
33+
34+
B. **Required field, no engine change.** Entries carry `references` (as
35+
`dialogue-short`). Breaking for every existing `shots` list; no fallback.
36+
Not recommended.
37+
38+
Recommendation: A, with the entry field `singer` (not `references`), because
39+
the audio slice is not the entry's to restate.
40+
41+
## Tests if approved
42+
43+
- `tests/test_for_each.py`: field present, field absent with default, absent
44+
with no default (still the current error).
45+
- `tests/test_elision.py`: `draw_singer` stays elided when every entry
46+
overrides and `singer_reference` is supplied; kept when an entry falls back.
47+
- `ui/src/lib/flow.test.ts` + `tests/test_ui_twins.py` case for the new form.

0 commit comments

Comments
 (0)