Skip to content

M4: unify native FX host request identity and mailbox sequence across all built-in editors - #567

Merged
masarray merged 1 commit into
mainfrom
refactor/m4-native-fx-host-control-request-20261111
Nov 11, 2026
Merged

masarray merged 1 commit into
mainfrom
refactor/m4-native-fx-host-control-request-20261111

Conversation

@masarray

Copy link
Copy Markdown
Owner

#527 — M4 maintainability / one verified built-in FX control ingress

Problem: the four live built-in handlers (EQ, Compressor, Harmonice, Vocal Throw) each duplicated a 14-line ChannelId/device epoch/graph revision/insert token/slot/requestId validator and an additional independent ad-hoc mailbox sequence parser. A future effect would require copy-pasting these security and stale-state rules inside the 6,800-line Main.cpp, risking mismatched VST3 editor identity or accidental JS numeric coercion.

Implementation: src/NativeFxControlRequest.h becomes the one CONTROL-only parsed request identity, using the existing canonical approvedNativeId rules. sequence(prefix) replaces all four exception-based std::stoull parsers with an exactly-prefixed, bounded, deterministic ASCII decimal parser. src/Main.cpp reuses this one policy in four existing editor routes; plugin-specialized DSP parameter validation, queue, GUI editor, native/LOGICAL_ONLY processing, ACK events and realtime callback are unchanged.

Regression: tests/native_fx_registry_extension_test.cpp now exercises large ChannelIds, valid/stale/malformed identity fields, duplicate host request prefixes, offline workspace indication, bounded/nondecimal/leading-zero sequence and max 19-digit integer. Existing FX registration fixture and native host/PCM CTest remain.

Safety: no new graph, device manager, audio callback, VST instance, GUI renderer, external interface or DSP processing logic. This is M4 common host plumbing, not an experimental Harmony algorithm change. Current main baseline c63e6ab42dfc00d002f0aeea44b8b20a7dc6b9f3 includes #565 exact token uniqueness. Keep separate concurrent Harmony #529, #521, routing #563 and recovery #512 untouched.

Validation: fast native contracts first, then one exact-SHA Windows MSVC + 88/88 CTest lane; no Chromium because neither HTML nor bridge changes, no redundant FAT ZIP. Physical ASIO/VST3 listening remains PENDING.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native 556eb2c

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 556eb2c
Status: ✅  Deploy successful!
Preview URL: https://dbf5405b.arsonmix.pages.dev
Branch Preview URL: https://refactor-m4-native-fx-host-c.arsonmix.pages.dev

View logs

@masarray
masarray marked this pull request as ready for review November 11, 2026 03:59
@masarray
masarray merged commit b5b0366 into main Nov 11, 2026
6 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-11T04:00:38.854727Z 556eb2c 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