Skip to content

Commit 3ca08a3

Browse files
TMHSDigitalclaude
andcommitted
fix: published falsifier commands carry their catalog row's base args
run_catalog.py runs a falsifier as the row's args plus its own, and some checks only exist on that path: swatch-grid's --same-base reaches the pixel check (exit 6) only with --output, so the gallery page, the skill section and examples/index.json showed a command that exits 3. The index now publishes base + falsifier args ( dropped to a relative path), and the gallery and skill sections render from it. Closes #517 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LpkeXRvikhJZSVGBFM91Dv Signed-off-by: TM Hospitality Strategies <TMHospitalityStrategies@gmail.com>
1 parent 1c9caa0 commit 3ca08a3

4 files changed

Lines changed: 41 additions & 3 deletions

File tree

‎docs/gallery/swatch-grid/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>Swatch Grid</h1>
6262
</div>
6363
<p class="taglist"><span class="tag">falsify it</span> Breaks the contract on purpose and must exit 6</p>
6464
<div class="runline falsify">
65-
<pre id="falsifyCmd" tabindex="0">blender --background --python examples/swatch-grid/swatch_grid.py -- --same-base</pre>
65+
<pre id="falsifyCmd" tabindex="0">blender --background --python examples/swatch-grid/swatch_grid.py -- --output swatch.png --engine cycles --samples 8 --width 640 --same-base</pre>
6666
<button class="copy-btn" id="copyFalsify" type="button">Copy</button>
6767
</div>
6868
<nav class="jumpnav" aria-label="On this page"><span class="tag">jump to</span> <a href="#run">Run</a> <a href="#exit-codes">Exit codes</a> <a href="#source">Source</a> <a href="#related">Related</a></nav>

‎examples/index.json‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,18 +2035,42 @@
20352035
"falsifiers": [
20362036
{
20372037
"args": [
2038+
"--output",
2039+
"swatch.png",
2040+
"--engine",
2041+
"cycles",
2042+
"--samples",
2043+
"8",
2044+
"--width",
2045+
"640",
20382046
"--same-base"
20392047
],
20402048
"expect_exit": 6
20412049
},
20422050
{
20432051
"args": [
2052+
"--output",
2053+
"swatch.png",
2054+
"--engine",
2055+
"cycles",
2056+
"--samples",
2057+
"8",
2058+
"--width",
2059+
"640",
20442060
"--invert-engine-id"
20452061
],
20462062
"expect_exit": 5
20472063
},
20482064
{
20492065
"args": [
2066+
"--output",
2067+
"swatch.png",
2068+
"--engine",
2069+
"cycles",
2070+
"--samples",
2071+
"8",
2072+
"--width",
2073+
"640",
20502074
"--no-specular-shim"
20512075
],
20522076
"expect_exit": 7
@@ -2475,6 +2499,15 @@
24752499
"--swap-inputs"
24762500
],
24772501
"expect_exit": 7
2502+
},
2503+
{
2504+
"args": [
2505+
"--check-pixels",
2506+
"--engine",
2507+
"cycles",
2508+
"--swap-inputs"
2509+
],
2510+
"expect_exit": 7
24782511
}
24792512
],
24802513
"exit_codes": {

‎scripts/build_examples_index.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,13 @@ def build_index() -> tuple[list[dict], list[str]]:
111111
readme = readme_path.read_text(encoding="utf-8") if readme_path.is_file() else ""
112112
falsifiers = []
113113
for r in rows:
114+
# run_catalog.py runs a falsifier as the row's args + its own, and
115+
# some checks only exist on that path (swatch-grid's --same-base
116+
# needs --output): publish the full command or it exits a different
117+
# code than documented (#517). $OUT is the runner's scratch dir.
118+
base = [a.replace("$OUT/", "") for a in r.get("args") or []]
114119
for f in r.get("falsifiers", []):
115-
entry = {"args": f["args"]}
120+
entry = {"args": base + f["args"]}
116121
if "expect_exit" in f:
117122
entry["expect_exit"] = f["expect_exit"]
118123
if f.get("expect_sidecar_fail"):

‎skills/procedural-materials-and-shaders/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ Each example runs headless, asserts the contract, and exits non-zero when it bre
264264
- [`light-link-studio`](https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/light-link-studio): One key, one hero: a light linked to a receiver collection lights only the hero, proven by two pixel renders in one pass. Falsify: `--skip-link` (exit 6).
265265
- [`shader-node-group`](https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/shader-node-group): One reusable shader group declared via tree.interface.new_socket, instanced in five materials with different Tint values — one dipped-glaze group, five stoneware mugs, five colors. Falsify: `--same-tint` (exit 8).
266266
- [`sky-texture-sun-elevation`](https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/sky-texture-sun-elevation): World ShaderNodeTexSky driving Background Color — the sky contract across 4.5 LTS and 5.1. Falsify: `--unlink-sky` (exit 7).
267-
- [`swatch-grid`](https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/swatch-grid): Procedural Principled materials — metal and dielectric, the emission pattern, and the cross-version set_specular shim. Falsify: `--same-base` (exit 6).
267+
- [`swatch-grid`](https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/swatch-grid): Procedural Principled materials — metal and dielectric, the emission pattern, and the cross-version set_specular shim. Falsify: `--output swatch.png --engine cycles --samples 8 --width 640 --same-base` (exit 6).
268268

269269
<!-- examples:end -->
270270

0 commit comments

Comments
 (0)