Ψ-W1-T3 review remediation: soften the double-fire claim to unspecified-by-SDK, mark the unload mirror [verify — DAW], fix stale comment, drop redundant assertions, dedupe hook-partitioning comments, drop what-comment; file the action_registry test-seam deferral.

This commit is contained in:
2026-08-01 20:13:13 -04:00
parent 72b870459c
commit d589b99705
6 changed files with 48 additions and 24 deletions
+2 -2
View File
@@ -230,8 +230,8 @@ static bool OnHookCommand(int command, int /*flag*/)
}
// "hookcommand" covers the main section only, so actions we published into another
// section arrive here instead. Claim ONLY those — every main-section id stays with
// OnHookCommand, so no command can be claimed by both hooks.
// section arrive here instead. Partitioning contract: root `CLAUDE.md` §"REAPER
// extension contract".
static bool OnHookCommand2(KbdSectionInfo* /*sec*/, int command, int /*val*/, int /*val2*/,
int /*relmode*/, HWND /*hwnd*/)
{
+3 -3
View File
@@ -479,7 +479,7 @@ void ingestRegisterActions(reaper_plugin_info_t* rec, ReaSamplerSession* session
g_customImportMediaExplorer.uniqueSectionId = kSectionMediaExplorer;
g_customImportMediaExplorer.idStr = g_idImportMxStr.c_str();
g_customImportMediaExplorer.name = g_labelImportStr.c_str();
g_customImportMediaExplorer.extra = nullptr; // reserved
g_customImportMediaExplorer.extra = nullptr;
g_cmdImportMediaExplorerMx =
rec->Register("custom_action", (void*)&g_customImportMediaExplorer);
if (!g_cmdImportMediaExplorerMx)
@@ -496,8 +496,8 @@ bool ingestHandleCommand(int command) {
bool ingestHandleSectionCommand(int command) {
if (command == 0 || !g_session) return false;
// ONLY the Media Explorer id. The Main entry has its own distinct id and is claimed by
// ingestHandleCommand off "hookcommand"; claiming it here too would double-fire it.
// ONLY the Media Explorer id — partitioning contract: root `CLAUDE.md`
// §"REAPER extension contract".
if (command == g_cmdImportMediaExplorerMx) { doImportFromMediaExplorer(); return true; }
return false;
}