Move the film to Effect in the descriptor that is actually read

An earlier commit claimed to move `film_sim` from `[tone, colour]` to
`[effect]` and did not. It edited `ops/film_sim.yaml`, where `attributes:` is
read, validated against the vocabulary, and then dropped: a `rust:` node
publishes its own descriptor, and the type still said tone and colour. The
stock went on appearing in the Light group beside exposure and again in Colour
beside white balance, exactly as before, and every test passed.

Nothing caught it because nothing could. The declaration parsed, the parity
tests compare ids rather than attributes, and an operation filed under the
wrong groups renders perfectly. It surfaced only on screen, as a missing
Effects tab — which is indistinguishable from a category that genuinely has
nothing in it, and is precisely how `Optics` looked for as long as it was
empty.

So three changes rather than one:

`FilmSim`'s descriptor declares `Attribute::Effect`, which is the move the
earlier commit described.

`attributes:` joins the keys a `rust:` node may not carry, beside `params`,
`uniforms`, `wgsl`, `helpers`, `define` and `label`. The rule was already
written — "its descriptor comes from the type" — and attributes were the one
field that slipped past it. A key that is silently ignored is worse than one
that is rejected, because it reads as though it worked; the eight hand-written
declarations lose a line that never did anything.

And a test asserts that every attribute the chain carries reaches the tab
strip. That is the property that was actually broken, and its failure mode is
invisible from every direction: the controls exist, they are in the shader,
and there is no way to filter to them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-05 18:28:59 +02:00
co-authored by Claude Opus 5
parent 6a97fdf6f9
commit e235e99cce
12 changed files with 87 additions and 32 deletions
+19 -2
View File
@@ -494,11 +494,28 @@ pub fn read_node(text: &str, ctx: &str, shared: &BTreeSet<&str>) -> Result<Node,
if let Some(ty) = root.get("rust") {
let ty = as_str(ty, "rust")?.to_string();
check_type_name(&ty)?;
for key in ["params", "uniforms", "wgsl", "helpers", "define", "label"] {
// `attributes` is in this list, and was not until a declaration that
// said `[effect]` sat above a type that said `[tone, colour]` for a
// whole commit without anything noticing. The line parsed, validated
// against the vocabulary, and was then dropped on the floor — so the
// file read as though it had moved the operation and the panel went on
// filing it under two groups it did not belong to. A key that is
// *ignored* is worse than one that is rejected, because it looks like
// it worked.
for key in [
"params",
"uniforms",
"wgsl",
"helpers",
"define",
"label",
"attributes",
] {
if root.contains_key(key) {
return Err(format!(
"`{key}` is meaningless on a `rust:` node — {ty} publishes \
its own descriptor. Remove one or the other."
its own descriptor, and this file would be ignored. Say it \
in the type instead."
));
}
}
+11 -1
View File
@@ -78,7 +78,17 @@ static DESCRIPTOR: LazyLock<Arc<OpDescriptor>> = LazyLock::new(|| {
Arc::new(OpDescriptor {
// Tone and colour both, and not `Effect`: a stock is not something applied
// on top of a photograph, it is what the photograph was made on.
attributes: vec![Attribute::Tone, Attribute::Colour],
// Effect, not tone-and-colour. **This is the descriptor a `rust:` node
// is actually read from** — the `attributes:` line in `ops/*.yaml`
// describes a *declared* node and is inert here, which is how an
// earlier attempt to make this move changed nothing at all.
//
// A stock is `Effect`'s own definition: applied rather than corrected,
// a look and not a fix. Declaring tone and colour put "Kodachrome" in
// the Light group beside exposure and again in Colour beside white
// balance — two places, neither of which is where anyone looks for it.
// That it moves tone and colour is true of every look.
attributes: vec![Attribute::Effect],
id: ID,
label: LocalizedKey("op.film_sim"),
params: vec![