Skip to content

M5: reject malformed native FX lease snapshots without corrupting accepted GUI state - #561

Merged
masarray merged 4 commits into
mainfrom
fix/m5-native-fx-instance-snapshot-guard-20261111
Nov 11, 2026
Merged

masarray merged 4 commits into
mainfrom
fix/m5-native-fx-instance-snapshot-guard-20261111

Conversation

@masarray

Copy link
Copy Markdown
Owner

Problem (reviewed against actual native projection)

normalizeSnapshot checked that channel inserts was an array, but did not validate each insert or global instance-token uniqueness. Native FX MOVE/REMOVE/readback/editor paths dereference insert.id and assume one instance identity across all channels. A malformed native snapshot could become accepted and cause JS exceptions or duplicate lease attribution.

Fix — two files, no DSP/ASIO/UI restyle

  • Validate each inserted FX entry's nonempty stable instance id, nonempty catalogId, optional typed name/bypassed, max eight slots/channel, and unique token across channels before admitting installed PCM snapshot.
  • Exposed pure readbackProvesIntent now returns false for null/unadmitted snapshot or malformed pending input rather than dereferencing it.
  • Regression exercises null/empty/duplicated FX entries, forged bypass string, overflow rack, same and cross-channel duplicate tokens; confirms last native graph remains accepted, status publishes INVALID_NATIVE_SNAPSHOT, no fake native command, and an existing fader intent can still finish only after valid ACK plus later readback.

Source authority: one approved /preview/ renderer, one native producer, same controller; no new subscriptions, processor construction, audio callback, or browser-simulated DSP.

Qualification: fast native+UI contracts, then exactly one UI full Chromium qualification at exact PR SHA; no Windows JUCE job necessary because only JS adapter & its test changed. Do not merge until green. M3b #560 and M4 #553 already merged into main; issue #527 stays open.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: b143e59
Status: ✅  Deploy successful!
Preview URL: https://a7117643.arsonmix.pages.dev
Branch Preview URL: https://fix-m5-native-fx-instance-sn.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui b143e59

@masarray
masarray marked this pull request as ready for review November 11, 2026 02:00
@masarray
masarray merged commit 577c00b into main Nov 11, 2026
15 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T02:02:25.091565Z b143e59 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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