Skip to content

command: add searchable actions with persistent runtime keybindings - #4907

Merged
jakildev merged 2 commits into
masterfrom
claude/4897-command-actions-keymap
Nov 6, 2026
Merged

jakildev merged 2 commits into
masterfrom
claude/4897-command-actions-keymap

Conversation

@jakildev

@jakildev jakildev commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Action catalog (engine/command/include/irreden/command/action_registry.hpp, IRCommand::actions()): each operation has a stable namespaced id, label, section, context and availability, plus one invoke_ that keys, widget clicks, Lua and IRCommand::invokeAction all call. An action can have no chord, several chords, or a hold (release_).
  • Dispatch reuse: each chord owns ordinary CommandManager rows. Rebinding moves them in place and unbinding parks them (inactive rows are skipped), so text capture, modifier specificity and start/end pairing apply unchanged. No CommandId is invalidated. Chord masks are exact.
    • A hold ends through latch-release rows, one per chord, and before any binding change, so a rebind during a held press balances its release exactly once. The hold records which chord slots it admitted: a second chord pressed mid-hold joins it, the hold ends on the last admitted release, and a release from a slot it never admitted is ignored.
    • replaceChord onto a chord the action already holds drops the replaced chord rather than duplicating the target.
    • adoptNamedCommands(prefix) turns a creation's named createCommand bindings into actions without touching their call sites. Each adopted chord keeps its body and blocked mask; start/end pairs stay plain.
  • Conflicts: scoped by context (a global action overlaps every context). Policy is REJECT or REPLACE. A plain command row that would fire alongside the chord cannot be displaced.
  • Persistence (keymap_store.hpp, IRCommand::keymap()): versioned per-creation overrides live at <IR_PREFS_DIR or userDataDir>/keymaps/<creation>.keymap, separate from documents.
    • Writes go through atomic rename. Ids with no registered action are kept on round trip.
    • A malformed or newer-version file is neither applied nor overwritten. A failed write keeps both the session's bindings and the previous file.
    • A scripted run touches the keymap only under IR_PREFS_DIR.
  • Widgets and window (engine/prefabs/irreden/render/):
    • Widget::bindAction gives a control a keyless hotkey whose Alt badge is the resolved chord; WIDGET_SYNC_ACTION_HINTS refreshes it. registerFocusAction / registerStepAction cover value fields.
    • The Actions window (actions_window.hpp, System<ACTIONS_WINDOW>) searches by name or key, runs, assigns, adds, removes and resets chords, and settles a conflict with REPLACE / CANCEL.
  • Lua: IRCommand.registerAction{...}, invokeAction, add/replace/remove/clearActionKey(s) returning ok, IRCommand.BindStatus, conflicts, restoreActionDefaults, actionKeys, findAction, searchActions, findActionConflicts, setActionContextActive, and IRGui.bindAction / actionHint.
  • Second creation: lua_widgets registers lua_widgets.pulse from Lua with key J and binds a PULSE button. The key and the click run the same function, and the badge reads J.
  • Design: docs/design/command-actions-keymap.md; contract summary in engine/command/CLAUDE.md §"Actions and keymaps".

The voxel editor's adoption (key commands as actions, toolbar/workspace/part-size controls, Actions window, actions_workflow + actions_restart GUI replay) is the stacked PR #4908, which closes the issue.

Test plan

  • fleet-build --target IrredenEngineTest / IRVoxelEditor / IRLuaWidgetsDemo on this branch alone: clean.
  • fleet-run IrredenEngineTest (full suite, head 62f650d58): [ PASSED ] 3617 tests. (3620 run; 3 platform skips: BinaryIO.CloseReportsBufferedOutputFailure, RigFormat.SaveReportsBufferedWriteFailureBeforeEmittingSummary, FogCrossSectionTest.SkippedOnNonOpenGLBackend)
  • Review regressions fail on the pre-fix action_registry.cpp (negative control) and pass with the fix: ReplaceOntoAnotherBoundChordKeepsOneCopy, SecondChordPressedMidHoldJoinsIt, ReleaseOfAChordTheHoldNeverAdmittedIsIgnored.
  • python3 scripts/gui-verify.py IRLuaWidgetsDemo: 37/37 assertions passed (new LUA_ACTION key_runs_lua_action PASS pulses=1 badge=J, click_runs_same_action PASS pulses=2 badge=J; hints_visible now counts 4 glyphs with the PULSE badge).
  • python3 scripts/gui-verify.py IRVoxelEditor (standing table, editor unchanged here): 42/42 assertions passed.
  • cmake -P cmake/run_header_checks_standalone.cmake clean (save inventory 207/207); python3 scripts/lint_comment_refs.py clean; python3 scripts/lint_instruction_size.py --against origin/master adds no offender (engine/command/CLAUDE.md at 200/200, the other touched instruction files keep their line counts).

Acceptance evidence

Criterion Check run Observed
1. Build IrredenEngineTest. Extend command registry/dispatch tests to verify direct invocation, rebind, unbind, secondary assignment, conflict rejection/replacement and default restore. Prove an old chord stops firing, the assigned chord fires once, and rebind during a held input balances its release. fleet-run IrredenEngineTest --gtest_filter='ActionRegistry*:HeldAction*' IdAndKeyRunTheSameOperation, ReassignMovesDispatchAndIntrospection ("the old chord must stop firing", "fires exactly once", registration rows move), ClearSecondChordAndRestoreDefaults, ConflictRejectsThenReplaces, PlainCommandRowCannotBeDisplaced, RebindDuringHoldBalancesTheRelease (one end on rebind, none on the old key's release), ReplaceOntoAnotherBoundChordKeepsOneCopy ([K,J,L] K→L is [J,L], L fires once), SecondChordPressedMidHoldJoinsIt, ReleaseOfAChordTheHoldNeverAdmittedIsIgnored: all PASS
2. Add keymap round-trip tests using a temporary preferences directory. Reorder registration, disable then restore an extension, and simulate a malformed file and failed write. Check effective bindings and previous file contents. fleet-run IrredenEngineTest --gtest_filter='KeymapStore*' (each case under its own IR_PREFS_DIR temp dir) RoundTripsAcrossReorderedRegistrationAndRestart, MissingExtensionActionSurvivesARoundTrip, MalformedFileKeepsWorkingBindingsAndIsNotOverwritten, NewerVersionIsNotAppliedOrOverwritten, FailedWriteKeepsTheSessionBindings, FailedWriteLeavesThePreviousFile (file bytes unchanged, no .tmp left): 9/9 PASS
3. Run a native IRVoxelEditor GUI replay with layout checks. Search by name and by assigned key, run an unbound action, configure an editor control, invoke its new chord, and capture a matching corner badge. Relaunch against the same temporary preferences and verify dispatch survives. stacked PR on claude/4897-editor-actions-adoption not in this PR. The engine surface it drives (window, capture, badge sync) is covered headlessly by WidgetActionsTest.WindowSearchesRunsAndSettlesAConflict / CaptureEscapeCancelsAndRemoveAndResetEditKeys / BadgeFollowsTheResolvedChord: PASS
4. Use the Lua command tests and a second tracked creation to register and invoke a named action. Re-run existing keyboard capture, default-manifest and widget-hotkey tests, including text entry and context-specific duplicate chords. fleet-run IrredenEngineTest --gtest_filter='LuaCommand*:LuaWidgetValues*:KeyboardDispatch*:DefaultBinding*:*Hotkey*:WidgetKeyboard*:ActionRegistryTest.ContextsScopeConflictsAndDispatch:ActionRegistryTest.KeyboardCaptureSuppressesActions'; gui-verify IRLuaWidgetsDemo LuaActionRunsFromIdAndFromCpp, LuaActionKeyMutatorsReportConflicts, LuaActionAvailabilityAndContexts, BindActionShowsTheActionKeyAsTheBadge PASS; full suite 3617 passed, 3 skipped; lua_widgets_action_key / _click PASS pulses=1/2 badge=J

Notes for reviewer

  • fleet-pr-overlap --base master → VERDICT: overlap. The only non-clean rows are the codex editor stack's own conflicts with master:
    #4883..#4903 test/CMakeLists.txt base-conflict (conflicts with master 89b210770 alone)
    #4888..#4903 engine/world/include/irreden/world/save_component_inventory.hpp base-conflict (conflicts with master 89b210770 alone)
    
  • Behaviour change: getRegistrationGeneration() now also bumps when an action chord changes, not only on append. The help overlay is its only in-tree consumer and only compares it for change.
  • Dispatch cost: two flag reads per row. A creation that adopts its commands keeps one parked row per adopted binding (it is skipped after one flag read).
  • ActionRegistry::adoptNamedCommands keeps an adopted chord's original blocked mask, so adopted keys behave exactly as before until the user reassigns them. A user-assigned chord uses an exact mask.
  • Deferred simplify findings: toLower / containsLower / splitWords have no shared string-utility home in the tree. writeFileAtomic overlaps FieldChunkDiskPersistence::saveRegion's inline temp+rename; a shared engine/utility helper would serve both.

Refs #4897

🤖 Generated with Claude Code

Actions give each operation a stable namespaced id, label, section,
context and one invoke callable that keys, widget clicks, Lua and
invokeAction all share. An action may have no key, several chords,
or a hold. The registry lives in CommandManager and gives each chord
ordinary dispatch rows that it rebinds in place or parks, so text
capture, modifier specificity and start/end pairing behave as for
createCommand, and existing CommandIds keep firing.

KeymapStore persists per-creation overrides to a versioned text file
under IR_PREFS_DIR or the user data dir, written by atomic rename. It
keeps unknown ids across round trips and never overwrites a file it
could not parse. Scripted runs touch it only under IR_PREFS_DIR.

The Actions window searches by name or key, runs, assigns, adds,
removes and resets chords, and resolves conflicts by replace or
cancel. bindAction gives a control a badge that follows its resolved
chord. lua_widgets registers an action from Lua and binds a button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jakildev jakildev added fleet:wip Work in progress — not ready for review fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend labels Nov 5, 2026
@jakildev
jakildev added this pull request to stack #4909 November 5, 2026 05:24
@jakildev jakildev removed the fleet:wip Work in progress — not ready for review label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Perf gate

Head host slug: linux-x86_64-epyc-7763-64-unknown

perf comparison: 0dd14fe → 108f715-ci

baseline: /home/runner/work/_temp/perf-baseline/history/linux-x86_64-epyc-7763-64-unknown/0dd14fe5f843e1e3b9fd93008c70a16a044d0968
head: /home/runner/work/IrredenEngine/IrredenEngine/save_files/perf/108f715e5-ci

host calibration

  • host: linux-x86_64-epyc-7763-64-unknown (matches baseline)
  • ref_ms: head 103.49 vs baseline 103.59 (load_factor 1.00×)
  • calibration target: 50.00 ms (informational)
  • baseline capture: perf-baseline@0dd14fe5f (branch tip); master b79eee32d, finished 2026-11-05T03:09:47Z, 0.1 d before the head run, ref_ms 103.59
  • weighting: raw (class-matched capture; load_factor 1.00×; no calibration-scaling entry)
  • attribution: no measured master improvement between capture master b79eee32d and merge base 89b210770 (3 commits)

thresholds: regress ≥ 10%, improve ≥ 5%

voxel cull effectiveness

cell ratio (base→head) avg visible total avg feeder
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 262144 → 262144 0 → 0
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.788 → 0.788 (+0.0pp) 156630 → 156630 262144 → 262144 50080 → 50080 (1.000×)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 262144 → 262144 0 → 0
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.990 → 0.990 (+0.0pp) 255592 → 255592 262144 → 262144 3862 → 3862 (1.000×)

frame timing (ms)

cell avg p99
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 499.40 → 480.72 (-3.7%) 1760.90 → 1912.26 (+8.6%)
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 1287.90 → 1281.56 (-0.5%) 2594.09 → 2628.01 (+1.3%)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 659.37 → 686.74 (+4.2%) 12389.98 → 13522.48 (+9.1%)
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1740.47 → 1741.40 (+0.1%) 3053.93 → 3088.45 (+1.1%)

GPU frame timing (ms; separate from stage samples)

cell envelope (base→head) buffer spans (base→head) coverage (base→head)
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable

GPU stage timing (avg ms per sampled invocation)

cell canvasClear voxelCompact voxelStage1 voxelCardinalElect voxelStage2 voxelSunFaces textToTrixel buildLightOcclusionGrid computeVoxelAO bakeSunShadowMap computeSunShadow computeLightVolume lightingToTrixel fogToTrixel trixelToFb resolvePerAxisScreenDepth fbToScreen
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 68.13→64.24 ↓ 66.88→64.16 59.05→56.68 0.98→1.29 ⚠ 55.28→52.54 5.76→5.62 — 0.00→0.00 2.85→2.66 ↓ 15.82→14.96 ↓ 11.85→11.30 22.81→21.52 ↓ 4.05→3.79 ↓ 1.30→1.26 0.20→0.22 — 8.07→7.84
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 111.21→109.68 415.85→415.32 263.75→262.35 4.06→4.08 234.79→234.03 5.07→4.99 — 0.00→0.00 2.43→2.42 28.85→28.28 10.35→10.46 19.23→19.60 8.56→8.20 1.74→1.61 ↓ 0.19→0.20 — 7.57→7.54
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 58.83→59.52 81.20→83.91 66.44→67.07 12.84→13.76 47.94→48.75 8.96→9.13 1.13→1.14 0.00→0.00 0.91→1.07 ⚠ 62.49→64.28 10.48→11.21 57.33→61.17 7.95→8.36 1.81→1.87 0.17→0.23 ⚠ 0.00→0.00 9.05→9.45
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 119.72→119.83 539.05→533.51 427.26→428.77 6.38→6.39 366.88→369.50 5.73→5.85 1.14→1.11 0.00→0.00 0.78→0.76 25.19→25.30 10.49→10.54 19.40→19.67 6.55→6.77 1.57→1.57 0.18→0.20 ⚠ 0.00→0.00 7.46→7.66

top CPU systems by avg ms (head)

target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 258.205 → 247.160 (-4.3%)
RENDER ComputeLightVolume 34.149 → 32.305 (-5.4%) ↓
RENDER CanvasToFramebuffer 17.800 → 17.025 (-4.4%)
RENDER BakeSunShadowMap 10.418 → 9.575 (-8.1%) ↓
RENDER ComputeSunShadow 8.107 → 7.959 (-1.8%)
UPDATE PropagateTransform 4.805 → 4.687 (-2.5%)
UPDATE FogRevealEval 4.286 → 4.229 (-1.3%)
RENDER ComputeVoxelAO 4.093 → 4.044 (-1.2%)

target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1032.022 → 1028.212 (-0.4%)
RENDER ComputeLightVolume 29.065 → 29.555 (+1.7%)
RENDER ComputeSunShadow 22.141 → 21.858 (-1.3%)
RENDER CanvasToFramebuffer 16.550 → 16.298 (-1.5%)
RENDER ComputeVoxelAO 9.643 → 9.512 (-1.4%)
RENDER BakeSunShadowMap 9.093 → 8.784 (-3.4%)
RENDER LightingToTrixel 8.765 → 8.395 (-4.2%)
UPDATE PropagateTransform 4.763 → 4.798 (+0.7%)

target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 289.372 → 303.432 (+4.9%)
RENDER ComputeSunShadow 55.321 → 56.651 (+2.4%)
RENDER LightingToTrixel 36.045 → 39.654 (+10.0%) ⚠
RENDER ComputeLightVolume 32.823 → 33.764 (+2.9%)
RENDER BakeSunShadowMap 22.611 → 23.705 (+4.8%)
RENDER CanvasToFramebuffer 17.555 → 18.020 (+2.6%)
RENDER FogToTrixel 7.071 → 7.429 (+5.1%)
UPDATE PropagateTransform 6.047 → 6.406 (+5.9%)

target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1464.334 → 1463.141 (-0.1%)
RENDER ComputeLightVolume 29.522 → 29.716 (+0.7%)
RENDER ComputeSunShadow 18.700 → 18.740 (+0.2%)
RENDER CanvasToFramebuffer 16.419 → 16.482 (+0.4%)
RENDER BakeSunShadowMap 8.826 → 8.993 (+1.9%)
RENDER ComputeVoxelAO 7.817 → 7.858 (+0.5%)
RENDER LightingToTrixel 6.778 → 6.938 (+2.4%)
UPDATE PropagateTransform 6.172 → 6.272 (+1.6%)

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — command: add searchable actions with persistent runtime keybindings

Verdict: needs-fix

The registry, keymap, Lua, and widget surfaces are coherently split, and the tests cover the main rebind/persistence flow well. Two multi-chord state transitions can still make one physical input produce the wrong action lifetime, so this should come back after those cases are pinned and fixed.

Needs-fix

  • engine/command/src/action_registry.cpp:562 — replacing a chord with another chord already present on the same action can leave duplicate rows. For example, [K, J, L] with replaceChord(K, L) becomes [L, J, L]; std::unique only removes adjacent duplicates, and the same action is excluded from findConflicts. The Actions window exposes this directly through ASSIGN, after which pressing L invokes the operation twice and the duplicate is persisted. Detect an already-bound target or erase duplicates across the full vector, and add a regression with a non-adjacent existing target.
  • engine/command/src/action_registry.cpp:299 — a hold with multiple chords has one action-wide holding_ bit but one latch-release row per chord. If K starts the hold, then J is pressed and released while K remains down, the J press is ignored but its release calls endHold, prematurely ending the hold started by K. Track which chord(s) admitted the hold (or otherwise define/ref-count multi-chord hold ownership), and cover the overlapping press/release sequence.

Praise

  • Reusing parked command rows preserves CommandId stability and existing capture/specificity behavior without adding a per-frame registry lookup.
  • The persistence tests explicitly cover reordered registration, missing extensions, protected malformed/newer files, and failed writes.

Validation

  • CI at review time: all completed checks passed, including fleet-tests and perf-gate; linux-build was still in progress.
  • Local fleet-build --target IrredenEngineTest: passed (fleet-jobs: 20261105T052935Z-build-81536d succeeded exit=0).
  • Local fleet-run IrredenEngineTest --gtest_filter='ActionRegistry*:HeldAction*:KeymapStore*': 30/30 passed; neither reported edge case is present in that set.

Test plan the author should run before merge

  • Add and run focused action-registry regressions for replacement onto a non-adjacent existing chord and overlapping presses of two chords on one hold action.
  • Re-run fleet-run IrredenEngineTest --gtest_filter='ActionRegistry*:HeldAction*' and the full IrredenEngineTest suite.

🤖 Reviewed by Codex gpt-5.6-sol (review-pr skill)

Opus recheck not required (reviewed at opus class).

@jakildev jakildev added fleet:needs-fix Fleet reviewer found issues — author must address and removed fleet:reviewing-mac-pool-6 labels Nov 5, 2026
@jakildev jakildev removed the fleet:needs-fix Fleet reviewer found issues — author must address label Nov 5, 2026
replaceChord onto a chord the action already holds now drops the replaced
chord instead of leaving a non-adjacent duplicate ([K,J,L] K->L is [J,L],
not [L,J,L]), so one press no longer fires the operation twice.

A hold now records the chord slots whose press it admitted. A second chord
pressed mid-hold joins it, the hold ends on the last admitted release, and
a release from a slot the hold never admitted (a press swallowed by
capture) no longer ends a hold another chord started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jakildev jakildev added fleet:changes-made Agent addressed human feedback — ready for human re-review and removed fleet:amending-mac-pool-1 labels Nov 5, 2026
@jakildev

jakildev commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Addressed feedback (head 62f650d58):

  • action_registry.cpp:562 duplicate on replace. replaceChord now checks whether the target chord is already bound on the action. If it is, the replaced chord is erased instead of overwritten, so [K, J, L] with replaceChord(K, L) becomes [J, L]. The adjacent-only std::unique is gone. Regression ActionRegistryTest.ReplaceOntoAnotherBoundChordKeepsOneCopy checks the chord list, that one L press fires once, that K is dead, and that the persisted override is [J, L].
  • action_registry.cpp:299 multi-chord hold ownership. The action-wide holding_ bit is replaced by heldSlots_, the chord slots whose press the live hold admitted. Each latch-release row now carries its slot.
    • A second chord pressed mid-hold joins the hold without restarting it.
    • The hold ends once, on the last admitted release.
    • A release from a slot the hold never admitted is ignored.
    • Binding changes still end the hold first and clear the set.
    • Regressions: HeldActionTest.SecondChordPressedMidHoldJoinsIt covers both release orders (K→J→J↑→K↑ and K→J→K↑→J↑, one start and one end each). HeldActionTest.ReleaseOfAChordTheHoldNeverAdmittedIsIgnored covers J starting the hold and K's press being swallowed by capture: K's release does not end J's hold.
  • Contract text updated in the ActionSpec::release_ / replaceChord doc comments, engine/command/CLAUDE.md (still 200 lines), and docs/design/command-actions-keymap.md.

Validation:

  • Negative control: all 3 new tests FAIL on the pre-fix action_registry.cpp.
  • With the fix, ActionRegistry*:HeldAction*:KeymapStore*:WidgetAction*:LuaCommand* 68/68 pass. Full IrredenEngineTest: 3617 passed, 3 platform skips, 0 failed.
  • light-verify --if-changed: all PASS.
  • lint_instruction_size --against origin/master: no new offender.

Stacked child #4908 picks this up via the native stack. — worker (pool-1)

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — command: add searchable actions with persistent runtime keybindings

Verdict: approve

Prior-review resolution

  • ✅ engine/command/src/action_registry.cpp::replaceChord — replacing onto a non-adjacent chord already bound to the same action now erases the replaced chord, preserves one target binding, and persists the deduplicated list; verified at 62f650d58 by ActionRegistryTest.ReplaceOntoAnotherBoundChordKeepsOneCopy.
  • ✅ engine/command/src/action_registry.cpp::onPress / onRelease — a hold now records the chord slots whose presses it admitted, remains live until the last admitted release, and ignores releases from slots whose presses capture suppressed; verified at 62f650d58 by both release orders in HeldActionTest.SecondChordPressedMidHoldJoinsIt and by HeldActionTest.ReleaseOfAChordTheHoldNeverAdmittedIsIgnored.

The follow-up commit is limited to those two fixes, their public contract text, and focused regressions. I found no new substantive issue in the delta.

Validation

  • Local fleet-build --target IrredenEngineTest: passed (fleet-jobs: 20261105T061545Z-build-26ff42 succeeded exit=0).
  • Local focused run: all 3 review regressions passed.
  • CI at re-review time: completed format, header, instruction-size, comment-reference, whitespace, and closes checks passed; linux-build, fleet-tests, and perf-gate were still pending and are not claimed green here.

Praise

  • The regressions cover both release orders and the captured-press edge, which pins the hold-ownership contract rather than only the original failing sequence.

🤖 Reviewed by Codex gpt-5.6-sol (review-pr skill; runtime codex)

Opus recheck not required (reviewed at opus class).

@jakildev jakildev added fleet:approved Fleet reviewer approved — ready for human merge fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation and removed fleet:changes-made Agent addressed human feedback — ready for human re-review fleet:reviewing-mac-pool-1 labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Perf gate

Head host slug: linux-x86_64-epyc-7763-64-unknown

perf comparison: fae9b65 → f3b274a-ci

baseline: /home/runner/work/_temp/perf-baseline/history/linux-x86_64-epyc-7763-64-unknown/fae9b6589371402312b6944f22c6b20b6f174a76
head: /home/runner/work/IrredenEngine/IrredenEngine/save_files/perf/f3b274a12-ci

host calibration

  • host: linux-x86_64-epyc-7763-64-unknown (matches baseline)
  • ref_ms: head 106.36 vs baseline 104.48 (load_factor 1.02×)
  • calibration target: 50.00 ms (informational)
  • baseline capture: perf-baseline@fae9b6589 (branch tip); master f77113dc0, finished 2026-11-05T05:44:41Z, 0.0 d before the head run, ref_ms 104.48
  • weighting: raw (class-matched capture; load_factor 1.02×; no calibration-scaling entry)
  • attribution: no measured master improvement between capture master f77113dc0 and merge base f77113dc0 (0 commits)

thresholds: regress ≥ 10%, improve ≥ 5%

voxel cull effectiveness

cell ratio (base→head) avg visible total avg feeder
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 262144 → 262144 0 → 0
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.788 → 0.788 (+0.0pp) 156630 → 156630 262144 → 262144 50080 → 50080 (1.000×)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 262144 → 262144 0 → 0
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.990 → 0.990 (+0.0pp) 255592 → 255592 262144 → 262144 3862 → 3862 (1.000×)

frame timing (ms)

cell avg p99
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 495.75 → 497.59 (+0.4%) 1733.03 → 1771.31 (+2.2%)
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 1280.43 → 1280.78 (+0.0%) 2564.36 → 2551.09 (-0.5%)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 676.06 → 675.77 (-0.0%) 13290.72 → 13010.86 (-2.1%)
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1740.16 → 1738.98 (-0.1%) 2996.81 → 3059.83 (+2.1%)

GPU frame timing (ms; separate from stage samples)

cell envelope (base→head) buffer spans (base→head) coverage (base→head)
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable

GPU stage timing (avg ms per sampled invocation)

cell canvasClear voxelCompact voxelStage1 voxelCardinalElect voxelStage2 voxelSunFaces textToTrixel buildLightOcclusionGrid computeVoxelAO bakeSunShadowMap computeSunShadow computeLightVolume lightingToTrixel fogToTrixel trixelToFb resolvePerAxisScreenDepth fbToScreen
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 67.53→67.14 66.29→66.12 59.19→58.83 0.97→1.00 55.38→55.26 5.79→5.71 — 0.00→0.00 2.71→2.80 15.78→15.84 12.40→12.07 23.21→23.55 3.83→4.03 1.27→1.39 0.19→0.22 ⚠ — 8.00→8.22
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 110.36→110.16 417.46→416.35 263.18→262.37 4.05→4.12 232.52→233.75 4.98→4.96 — 0.00→0.00 2.41→2.40 28.57→28.43 10.46→10.41 19.46→19.51 8.26→8.33 1.75→1.69 0.18→0.18 — 7.47→7.55
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 59.76→59.95 83.07→81.60 67.49→66.66 14.02→13.60 47.97→48.60 9.06→8.72 1.11→1.15 0.00→0.00 1.04→0.98 ↓ 67.53→65.68 10.54→10.67 59.67→59.18 8.28→8.25 1.85→1.84 0.20→0.20 0.00→0.00 9.18→9.28
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 121.00→119.88 534.65→534.23 427.47→427.53 6.37→6.38 367.77→367.10 5.75→5.63 1.16→1.15 0.00→0.00 0.81→0.78 25.75→25.69 10.64→10.40 19.84→19.34 6.83→6.71 1.76→1.69 0.20→0.18 ↓ 0.00→0.00 7.66→7.58

top CPU systems by avg ms (head)

target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 257.459 → 256.217 (-0.5%)
RENDER ComputeLightVolume 35.123 → 35.071 (-0.1%)
RENDER CanvasToFramebuffer 17.567 → 18.218 (+3.7%)
RENDER BakeSunShadowMap 10.266 → 10.492 (+2.2%)
RENDER ComputeSunShadow 8.088 → 8.016 (-0.9%)
UPDATE PropagateTransform 4.778 → 4.845 (+1.4%)
UPDATE FogRevealEval 4.235 → 4.241 (+0.1%)
RENDER LightingToTrixel 3.965 → 4.191 (+5.7%)

target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1030.235 → 1029.234 (-0.1%)
RENDER ComputeLightVolume 29.441 → 29.434 (-0.0%)
RENDER ComputeSunShadow 21.962 → 22.007 (+0.2%)
RENDER CanvasToFramebuffer 16.233 → 16.511 (+1.7%)
RENDER ComputeVoxelAO 9.406 → 9.456 (+0.5%)
RENDER BakeSunShadowMap 8.992 → 8.766 (-2.5%)
RENDER LightingToTrixel 8.465 → 8.534 (+0.8%)
UPDATE PropagateTransform 4.339 → 4.567 (+5.3%)

target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 299.030 → 296.391 (-0.9%)
RENDER ComputeSunShadow 60.014 → 58.280 (-2.9%)
RENDER LightingToTrixel 38.631 → 37.833 (-2.1%)
RENDER ComputeLightVolume 32.634 → 33.089 (+1.4%)
RENDER BakeSunShadowMap 23.692 → 23.290 (-1.7%)
RENDER CanvasToFramebuffer 17.726 → 17.878 (+0.9%)
RENDER FogToTrixel 7.366 → 7.329 (-0.5%)
UPDATE PropagateTransform 6.200 → 6.145 (-0.9%)

target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1462.392 → 1460.085 (-0.2%)
RENDER ComputeLightVolume 30.012 → 29.257 (-2.5%)
RENDER ComputeSunShadow 18.963 → 19.087 (+0.7%)
RENDER CanvasToFramebuffer 16.640 → 16.383 (-1.5%)
RENDER BakeSunShadowMap 9.165 → 8.870 (-3.2%)
RENDER ComputeVoxelAO 7.862 → 7.695 (-2.1%)
RENDER LightingToTrixel 7.002 → 6.902 (-1.4%)
UPDATE PropagateTransform 6.182 → 6.368 (+3.0%)

@jakildev jakildev added fleet:verified-windows Cross-host smoke passed on windows-debug and removed fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation labels Nov 6, 2026
@jakildev

jakildev commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Cross-host smoke OK on windows (fresh checkout + IRShapeDebug --auto-screenshot 10 — build clean, exit 0, no log warnings).

@jakildev
jakildev merged commit a73cc05 into master Nov 6, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet:approved Fleet reviewer approved — ready for human merge fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend fleet:verified-windows Cross-host smoke passed on windows-debug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant