Skip to content

Re-pin the Insert quick-key source guard to the callback bucket - #238

Merged
papi-ux merged 1 commit into
masterfrom
fix/quick-keys-source-guard-repin
Aug 15, 2026
Merged

Re-pin the Insert quick-key source guard to the callback bucket#238
papi-ux merged 1 commit into
masterfrom
fix/quick-keys-source-guard-repin

Conversation

@papi-ux

@papi-ux papi-ux commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Ctrl+1 / Ctrl+2 to Quick Keys and More Keys #237 added Ctrl+1 and Ctrl+2 to the Command Center quick keys, which appended two ids to the fall-through group in NovaQuickMenuCallbacks.perform(). The NovaComposeSourceGuardTest Insert guard asserted on the literal NovaQuickMenuActionId.QUICK_CTRL_V -> onQuickKey(action.id), a string that only existed while Ctrl+V happened to be the last id in that group, so the arm moving onto QUICK_CTRL_2 turned master red even though Insert still routes exactly as the guard intends.
  • The guard now asserts the invariant it actually carries: Insert sits inside the bucket whose arm calls onQuickKey. It slices between the QUICK_ESC entry and the onQuickKey arm and looks for Insert in the slice. Both substring calls pass an empty missing-delimiter value, so losing either anchor empties the slice and fails the assertion rather than silently matching the rest of the file. Adding a further quick key no longer requires a guard edit.
  • Test-only change. No production source or behavior touched.

Verification

  • ./gradlew -PnovaAbis=x86_64 testNonRoot_gameDebugUnitTest green on pc-papi: 1318 tests across 161 classes, 0 failures.
  • Red first, on merged master at ee946de before this commit: NovaComposeSourceGuardTest 80 tests, 1 failure, commandCenterExposesInsertThroughExistingSpecialKeyTranslator, message "Insert quick key should route through the same Command Center quick-key callback bucket as the other special keys". Same class is 80 tests, 0 failures with the re-pin.
  • ./gradlew -PnovaAbis=x86_64 -PlintFailOnError=true lintNonRoot_gameDebug green.
  • python3 -m unittest tools.test_nova_retroid_smoke tools.test_native_submodule_preflight green, 51 tests.

…ck bucket

The source guard asserted on the literal "NovaQuickMenuActionId.QUICK_CTRL_V -> onQuickKey(action.id)", which only held while Ctrl+V happened to be the last id in the fall-through group. Adding Ctrl+1 and Ctrl+2 in #237 moved the arm onto QUICK_CTRL_2, so the assertion went red on master even though Insert still routes exactly as the guard intends.

The invariant the guard carries is that Insert sits inside the group whose arm calls onQuickKey, so assert that directly. Slice the bucket between the QUICK_ESC entry and the onQuickKey arm, then look for Insert inside the slice. Both substring calls pass an empty missing-delimiter value, so losing either anchor empties the slice and fails the assertion instead of silently passing on the whole file. Appending a further quick key no longer needs a guard edit.
@papi-ux
papi-ux merged commit 134445e into master Aug 15, 2026
6 checks passed
papi-ux added a commit that referenced this pull request Aug 15, 2026
…ck bucket (#238)

The source guard asserted on the literal "NovaQuickMenuActionId.QUICK_CTRL_V -> onQuickKey(action.id)", which only held while Ctrl+V happened to be the last id in the fall-through group. Adding Ctrl+1 and Ctrl+2 in #237 moved the arm onto QUICK_CTRL_2, so the assertion went red on master even though Insert still routes exactly as the guard intends.

The invariant the guard carries is that Insert sits inside the group whose arm calls onQuickKey, so assert that directly. Slice the bucket between the QUICK_ESC entry and the onQuickKey arm, then look for Insert inside the slice. Both substring calls pass an empty missing-delimiter value, so losing either anchor empties the slice and fails the assertion instead of silently passing on the whole file. Appending a further quick key no longer needs a guard edit.
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