Skip to content

Help/example patch generation + cross-backend output verification & binding fixes#137

Merged
jcelerier merged 8 commits into
mainfrom
combined/help-patches-and-td-verification
Jul 2, 2026
Merged

Help/example patch generation + cross-backend output verification & binding fixes#137
jcelerier merged 8 commits into
mainfrom
combined/help-patches-and-td-verification

Conversation

@jcelerier

Copy link
Copy Markdown
Member

Combines all the outstanding work into one PR (supersedes #126, #130, #131, #132, #133, #134, #135, #136). #127/#128/#129 already merged.

1. Help / example patch generation (the original goal) — #126

A JSON-dump-driven generate_patches <backend> <dump.json> <out> [hint] tool (examples/Demos/GeneratePatches.cpp) with per-backend emitters, wired into the build + packaging so every object gets a help/example patch, overridable per-object (HELP_PD/HELP_MAX/EXAMPLE_GODOT/EXAMPLE_TD/EXAMPLE_PY):

  • Pd -help.pd, Max .maxhelp, Godot .tscn, TouchDesigner builder script, Python example.
  • Rich output (header/badge, description, labelled inlets/outlets/args, live demo) with scaffold fallback.
  • GUI-verified: Pd 0.56 + plugdata, Max 8, Godot 4.7 (render + instantiate). Native TD .tox synthesis deferred.

2. Output-verification infrastructure — #133, #134 (incl. #131)

  • Golden generator (include/avnd/binding/golden/, cmake/avendish.golden.cmake): runs each object offline through the same wrappers the bindings use, feeds deterministic input, writes golden/<c_name>.json (inputs+outputs) — the oracle. 109/110 objects produce output.
  • TD differential harness (tooling/td/): unattended sweep — stages plugins, drives a .toe, auto-dismisses dialogs, feeds golden inputs, captures outputs, diffs against the oracle. Crash-resilient (relaunches past a crasher).

3. Binding fixes found by the sweeps + differential

Differential result on TD: 51/109 objects match the raw-C++ oracle; remaining diffs are documented harness/golden-model limits (unnamed ports, multi-bus layout, uninitialised-golden, generator sample-count), not binding bugs.

Merges cleanly (one trivial avendish.cmake include-line conflict, resolved); cmake configures.

🤖 Generated with Claude Code

jcelerier added 7 commits July 2, 2026 08:30
generate_patches (examples/Demos/GeneratePatches.cpp) emits per-object help/
example patches for Pd (-help.pd), Max (.maxhelp), Godot (.tscn), TouchDesigner
(builder script) and Python, from the dump JSON. Wired into packaging with
per-object overrides (HELP_PD/HELP_MAX/EXAMPLE_GODOT/EXAMPLE_TD/EXAMPLE_PY),
falling back to the rich auto-generated patch. Includes the Pd help-text layout
fix. See HELP_PATCH_GENERATION_PLAN.md.
@jcelerier jcelerier force-pushed the combined/help-patches-and-td-verification branch from 1e725b3 to 3a64008 Compare July 2, 2026 12:30
add_custom_target(... DEPENDS <target>) does not reliably force build ordering
(VS generator + parallel MSBuild): the _help step could run generate_patches
before the tool or the dump JSON existed, failing with exit code 3. Force it
with an explicit add_dependencies on both generate_patches and the source
(dump-producing) target, and invoke the tool via $<TARGET_FILE:...>.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011s7huWR2wFsLFiMJPjx1z2
@jcelerier jcelerier merged commit 82c034b into main Jul 2, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant