Skip to content

Batch 41 · R2e assigned-device binding capture

2026-10-26, dev-0.9.0-bootloader, starting HEAD 224ef2d9. Capture implementation 70a99ce1 is followed by opening-event fix 1254c178; documentation/evidence follows separately. The fix was appended when a final remote refresh failed DNS lookup; history was not amended. The earlier successful remote check found 224ef2d9. Three existing input sources amended; two C# files/two metadata files added. No push or player build.

Change and ownership

InputBindingDraft.BeginCapture creates one InputBindingCapture for a selected leaf binding on the existing draft's assigned device. It creates no pairing/user/action owner. PlayerInputSession changes only to pass that same device reference into its draft. InputBindingProfiles supplies validated target/group rules and canonical supported paths, without saving device names/IDs or changing authored bindings. See the capture contract.

An initial input-update fence discards opening events and resamples committed device state. Capture registered inside an input callback can miss that event; the fence must observe its now-held opening button anyway. Supported held controls must release before Listening. Only assigned-device StateEvent/DeltaStateEvent samples are considered; omitted partial-state controls retain their held state. Supported canonical paths must satisfy the target's button/directional rules, then the draft's existing conflict validation. Sampling uses SDK button press/release thresholds. Small analog noise cannot act as a press in the tested traces. Other devices and pointers cannot acquire capture.

Events collect candidates; preview runs after the input update commits state, so the session sees a held completion button and retains its release barrier. Multiple candidates in one event/update are rejected as ambiguous, and conflicts leave the document/session unchanged. An explicit optional same-device cancel button outranks candidates in that update; null reserves no key. No new global Escape/Enter/Back/Reroll shortcut is added. External Cancel or Dispose ends capture. Capture cancellation leaves the draft unchanged/open; completion leaves a validated preview but still requires separate draft acceptance and context admission.

While capture owns the draft, direct edit/reset/accept/another capture cannot bypass it. Cancel first to reset/retry. Draft cancel, device loss/reassignment, run teardown and disposal close capture and unsubscribe its event/update hooks. Unexpected after-update/preview exceptions expose Failed/Failure; expected teardown yields Cancelled. Mutation/cancellation requires the owning thread. No production prompt/view, normal writer, actor, scene or gameplay rule is migrated by this batch.

Executed evidence

Required Unity 6000.2.8f1, Input System 1.17.0, direct batchmode/nographics execution without immediate -quit. Each retained runner handles domain-reload resumption, watchdog, cleanup, scene restoration and exit.

  • TinyChaos.EditorTools.BindingCaptureChecks.RunBatch41: 10/10 new simulated-device Play Mode groups, process exit0.
  • Unchanged TinyChaos.EditorTools.BindingDraftChecks.RunBatch40: 9/9 prior groups, process exit0, retaining blocked application, preview/cancel/defaults, held edges, device loss, controlled SDK interruption/rollback, actual retries/reload and disposal.

The initial capture suite passed 10/10. Review then expanded F01 to start capture inside onEvent, before state commits; this reproduced a real missed-opening-press gap (9/10, exit1). Resampling committed held controls at the first update fence fixes the same expanded case; final expanded suite passes 10/10, exit0. The prior draft 9/9 run is reused: only the new capture component/fixture changed after it, without changing those draft paths. Earlier session/profile suites were not rerun: their relevant samplers, Read/WithBinding bodies and action asset remain unchanged, while the changed capture/draft surface is covered here and by the full draft regression.

New group Actual final result
F01 PASS: capture opened inside the opening event still detects held Submit, neutral release arms listening, fresh key completes on the same owner/collection, and held completion cannot become Dash/reward confirmation until release/new press.
F02 PASS: P2 capture ignores keyboard, two other assigned pads and pointer input; only its reserved pad supplies a canonical button path; user retained and remap works after release.
F03 PASS: opening held cancel ignored; fresh cancel outranks a candidate queued earlier in the same update, leaves the draft unchanged/open; with no reserved cancel, Escape itself can be captured deliberately.
F04 PASS: Stats/Dash conflict leaves document/overrides unchanged and capture listening; a fresh valid key recovers; SDK key casing becomes the supported canonical path.
F05 PASS: two keys in one state event or two queued events in one update are ambiguous, with no first-candidate/order choice; release/new press recovers.
F06 PASS: a trigger-only delta cannot erase an omitted held shoulder; low trigger/stick values are not presses; trigger delta and matching dpad direction can be captured, while a generic button cannot replace a directional part.
F07 PASS: four cancel/reset/retry cycles; second capture/direct edit/reset/accept blocked while capturing; cancelled captures cannot react to later keys; a new directional target works with immediate held movement.
F08 PASS: explicit pad cancel preserves the draft, disable/re-enable cancels both owners, reassignment cannot transfer capture, user retained and replacement input cannot complete the old capture.
F09 PASS: accepted captured key survives three runs and actual shared-scene reload; stop cancels pending capture/draft while preserving accepted overrides and player/user identity.
F10 PASS: unknown/composite/wrong-group targets and foreign/wildcard cancel paths reject before listening; worker access fails without changing ownership; session disposal closes capture/draft and detaches only its action collection.

Devices are SDK-created keyboard/gamepads and a scoped pointer; focus settings are cloned/restored. This does not certify physical controllers, OS shortcuts, native UI dispatch, glyph presentation, player builds or normal write behavior. Existing-category CS8785 generator and CS0252 StabilizationChecks warnings remain; neither passing log has compiler errors or unexpected runtime exceptions. No measured optimization or complete-game playability claim.

Private logs /tmp/tinychaos-batch41-editor.log (initial 10/10), /tmp/tinychaos-batch41-opening-trace.log (expanded 9/10), /tmp/tinychaos-batch41-editor-verified.log (final expanded 10/10) and /tmp/tinychaos-batch41-draft-regression.log (9/9), plus redirected stdout, stay outside Git. No raw preference values/profile contents or launch logs are committed. Retained checks reproduce the cases; temporary paths are not portable evidence archives.

Preservation and exact implementation scope

Pre-run capture /tmp/tinychaos-batch41-preserve-b5e39fe5b6/ contains 2,867 project file bytes/hashes, 8,172 Unity/profile hashes and recoverable preference bytes. Only PlayerInputSession, InputBindingDraft and InputBindingProfiles intentionally differ among those project files; the other 2,864 match. Of 50 prior unique implementation paths, 47 are unchanged and three receive the explicit amendments below. The original 608-source pin set retains 606 matches plus only batch 37's two documented package exceptions. The authored action asset/29 IDs, existing metadata, scenes/prefabs/build lists/settings remain unchanged.

Unity inserted only com.unity.toolchain.linux-x86_64 in manifest/lock; JSON comparison proved that addition and exact pre-run package bytes were restored, retaining Input System 1.17.0. Normal game prefs changed only four automatic player/connection-session keys; shared prefs changed three Editor/session keys. Generated copies were archived and captured preference bytes restored after key-level attribution. Normal game profile coverage is one prefs file; no new profile/save/config appeared. Five external package/licensing/metrics bookkeeping files changed and remain, so the entire Unity profile tree is not claimed unchanged.

Only two new metadata files had empty-field trailing whitespace trimmed, preserving unique GUIDs. Unresolved audio deletions and untracked Addressables Linux metadata remain untouched/outside commits. Inventory covers 250 scripts: three amended rows, 245 prior rows byte-preserved, two new rows. Ten new gates bring the register to 95, preserving the earlier 85 rows and all 27 open workstream follow-ups. The 22-row legacy input map is unchanged; ARCH-01 remains active.

Path Change SHA-256
Assets/Script/Game/GameSystem/Input/PlayerInputSession.cs modified b4f816687685c6a77ad8adedf8a0725e1e56d5ce1108a2d8d2c67847ba65750d
Assets/Script/Game/GameSystem/Input/InputBindingProfiles.cs modified 0280702b56cbbc5cd1a2f4d28272c222fd93a63d4e847adc62aaa92673986f52
Assets/Script/Game/GameSystem/Input/InputBindingDraft.cs modified 8147f24aedff329ad7ebc544f9eec3012534caa8a129088428b9d8d0cd778937
Assets/Script/Game/GameSystem/Input/InputBindingCapture.cs added dcc52a90ae4a8357c70f57e9127f8772456283e2884cd8b2162b38d18d4473f0
Assets/Script/Game/GameSystem/Input/InputBindingCapture.cs.meta added 3e180b3bfe195d4336ae76aeceb5b24146dd17c04623f260ac0a3f9f942a7d6a
Assets/Script/External/Editor/BindingCaptureChecks.cs added 152765ae17060fdb583e4499fa6f77f85f19c01ba6c0673901e8d6419f3aae19
Assets/Script/External/Editor/BindingCaptureChecks.cs.meta added 7405534743fff3685f32dfeb70700ea6adb494c0b0e92d548aef2592a71d968f

Final static review passes: 784 local documentation links resolve; all 53 issue IDs route once; 250 inventory paths match project scripts, with 245 old rows unchanged and three amended; all earlier 85 gate rows are preserved. The implementation and focused correction together contain exactly the seven reviewed paths and final tested source hashes, without documentation or unrelated files. Whitespace checks pass.

Next and checkpoint boundaries

Next is the minimum whole-config document/writer adapter with disposable-path round-trip/failure/backup/replacement checks. It must retain inputBindings and unknown data that the typed writer currently drops, without turning load/apply into a save or overwriting normal profiles to test failures. Record Linux results separately from untested Windows behavior. Settings/remap/setup/recovery UI then consumes the verified owners; it must choose explicit Cancel policy and suppress ordinary page input while capture owns dispatch. Physical/legacy-feel evidence precedes actor/UI migration. GAME-01 and Tutorial remain deferred.

The capture implementation and focused opening-event correction together touch seven implementation paths, including code checks. They are two separate commits because publication status could not be refreshed before a possible amendment; existing history was preserved. Evidence/contracts/status/inventory changes form a separate documentation commit. No push. R2/F1 and overall gameplay completion remain unfinished.