Re-pin the Insert quick-key source guard to the callback bucket - #238
Merged
Conversation
…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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NovaQuickMenuCallbacks.perform(). TheNovaComposeSourceGuardTestInsert guard asserted on the literalNovaQuickMenuActionId.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 ontoQUICK_CTRL_2turned master red even though Insert still routes exactly as the guard intends.onQuickKey. It slices between theQUICK_ESCentry and theonQuickKeyarm 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.Verification
./gradlew -PnovaAbis=x86_64 testNonRoot_gameDebugUnitTestgreen on pc-papi: 1318 tests across 161 classes, 0 failures.NovaComposeSourceGuardTest80 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_gameDebuggreen.python3 -m unittest tools.test_nova_retroid_smoke tools.test_native_submodule_preflightgreen, 51 tests.