Skip to content

M4: typed FX host envelope hardening compatible with Harmonice presets and O1/O2 - #569

Merged
masarray merged 1 commit into
mainfrom
guard/m4-fx-control-envelope-compat-20261111
Nov 11, 2026
Merged

masarray merged 1 commit into
mainfrom
guard/m4-fx-control-envelope-compat-20261111

Conversation

@masarray

Copy link
Copy Markdown
Owner

#527 — Shared host contract, cross-thread compatible

Live reconciliation: main@b5b03669c616ac55a5d935023e0402ec7a99f7be; Harmonice #529 head bc580cdfa851d5cb281e72b6f2e171f294171a03 uses the byte-identical src/NativeFxControlRequest.h (257a7a0eb0a8aa045c090ae87be05112aaa5a014) to validate editor and new My Presets commands. O1/O2 #563 is still running on a baseline before this header existed; its graph/device/GUI changes do not touch either modified file here. Other open #521/#512 also do not touch these files. Do not merge their unqualified DSP/ASIO branches into this PR.

Concrete defect / improvement

All existing native built-in editors shared a CONTROL-thread request parser, but its static_cast<int>(args.slot) silently coerced JS strings, fractional doubles and booleans; requestId.toString() converted non-string IDs, and workspaceToken.toString() could turn a numeric token into an apparent logical authority. The same parser now serves Harmonice's editor/preset lifecycle—these ambiguous host identities are unsafe and harder to maintain.

  • src/NativeFxControlRequest.h: reject non-object envelopes, non-integer slot types, non-string requestId, non-string workspace token, invalid max slot bounds. Retain all valid payload strings and integer slot semantics. No change to FX DSP, lease lifetime or graph publication.
  • tests/native_fx_registry_extension_test.cpp: typed, malformed, bool, float, int64 slots; requestId and workspace token coercion; exact uint64 identity; LOGICAL_ONLY epoch 0 still supports offline FX sequence without admitting LIVE PCM; Harmonice's new hpres- preset ID remains a valid target without accidentally becoming a DSP harm- mailbox.

Qualification

One fast native path and one exact HEAD Windows MSVC/full CTest after green fast checks. No Chromium—only CONTROL C++ parsing and C++ test changed; no FAT ZIP or manual ASIO listening claimed. One authoritative /preview/, one JUCE callback, real ChannelId/lease authority preserved. Test evidence and potential merge conflicts with Harmony/O branches must be checked before merge.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native 798f315

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 798f315
Status: ✅  Deploy successful!
Preview URL: https://9fa0c2a2.arsonmix.pages.dev
Branch Preview URL: https://guard-m4-fx-control-envelope.arsonmix.pages.dev

View logs

@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-11T06:24:47.166336Z 798f315 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