Skip to content

Commit web JS codegen outputs in src/, verified by check-c-api - #953

Merged
bwhitman merged 1 commit into
mainfrom
committed-js-codegen
Jul 20, 2026
Merged

Commit web JS codegen outputs in src/, verified by check-c-api#953
bwhitman merged 1 commit into
mainfrom
committed-js-codegen

Conversation

@bwhitman

Copy link
Copy Markdown
Collaborator

Why

amy_api.generated.js and patches.generated.js were generated into the gitignored build/ by make web, so consumers that commit copies (tulipcc's amyboardweb static/) could silently drift from their pinned amy — that's exactly what happened in shorepine/tulipcc#1208 after #943 removed voices.

What

  • Move gen_amy_js_api.py and gen_patches_js.py outputs to committed src/amy_api.generated.js / src/patches.generated.js (alongside amy_c_api.generated.js from Table-driven cross-platform C API binding codegen #942), and give both scripts a --check mode.
  • New scripts/gen_pcm_presets_js.py → committed src/pcm_presets.generated.js: the web editor's wave-preset table (window.AMY_WAVE_PRESETS) from pcm_tiny.h. This file previously existed only as a one-off committed in tulipcc with no generator anywhere; output is byte-identical to it apart from the header comment.
  • make c-api runs all the generators; make check-c-api (already run by CI on every PR) now fails if any of the three JS outputs is stale.
  • web/deploy-web use the committed files; the build/ rules are gone.

Testing

  • make check-c-api passes; make test passes (117 tests).
  • tulipcc side (PR to follow): amyboardweb stops committing static/*.generated.js copies and copies these from src/ at build time, so a bare pin bump can never drift them again.

🤖 Generated with Claude Code

amy_api.generated.js and patches.generated.js used to be generated into the
gitignored build/ by 'make web', which meant downstream copies (tulipcc's
amyboardweb static/) could silently drift from the pin — see tulipcc#1208.
Move both outputs to committed src/ alongside amy_c_api.generated.js, give
both generators a --check mode, and add a new gen_pcm_presets_js.py that
generates the web editor's wave-preset table (window.AMY_WAVE_PRESETS) from
pcm_tiny.h — previously a one-off committed in tulipcc with no generator at
all. All three run under 'make c-api' and are enforced fresh in CI by
'make check-c-api'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🎛️ AMY HW CI (AMYboard bench)

Flashed this PR's AMY (LoadTestChord: 6-voice Juno patch=1, one held note every 2 s) onto the physical AMYboard and measured the smoothed render load as the chord grows — back-to-back with the same sketch built at the PR's merge base, so Δ is this PR's own cost.

PASS — the bench ran the test to completion.

notes held main @ 85bfc77 this PR Δ
1 1386 1386 +0
2 1546 1552 +6
3 2136 2139 +3
4 2327 2328 +1
5 2974 2972 -2
6 3169 3169 +0

Full chord settled render μs: 3170 (was 3171, Δ -0.0%) (peak 3181, 39 samples)

⬇️ Artifacts: serial log · load trace · report

Self-hosted bench (amyboardci). FAIL means only that the test could not run — the load values are informational, with no threshold and no audio compare. See tools/arduino_loadsweep/.

@bwhitman

Copy link
Copy Markdown
Collaborator Author

⛓️ tulipcc integration PR opened

This merge was pinned into tulipcc for full-system CI: shorepine/tulipcc#1212

Test it there and merge that PR to move tulipcc onto this AMY.

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