Skip to content

Batch 39 · R2c binding preference documents and legacy conversion

2026-10-26, dev-0.9.0-bootloader. Verified against starting HEAD 1aa02f14; implementation committed separately as a173274d at the owner's standing request. Three C# files plus three metadata files. Documentation/evidence is committed separately. No push or player build.

Concrete change and boundary

InputBindingProfiles accepts a full config JSON string and an authored action definition, validates or imports a versioned inputBindings section, and returns an immutable supported candidate plus status/original JSON. LegacyInputProfileImport owns revision-1 preset translation. See the application wrapper contract for actual fields, supported controls and failure behavior, and the input contract for unchanged production controls and action IDs.

Six preference profiles keep P1's WASD and arrow layouts independently, plus a gamepad profile for each of four slots. They are preferences, not joined players, persistent hardware identities or device assignments. Import chooses the P1 keyboard layout from P1_Keyboard, retains inactive P2 keyboard data, and preserves all legacy records and unknown fields. Both audited joystick presets share roles and differ in enumeration; that number is not adopted as device ownership. The physical numeric-button→semantic-pad mapping remains unverified.

WithBinding prepares a new candidate and validates IDs/groups/slot policy, composite-part identity, supported required controls and conflicts before returning it. Rejected edits leave the source unchanged. Unsupported schema/definition revisions and malformed data retain original JSON without a writable document. Unknown string dates/fields survive supported edits; numbers that would be rounded by the decimal representation are refused. Export preserves supported token values, not original whitespace/formatting. CreateActions returns a caller-owned disabled SDK copy, without changing live sessions or creating users/devices.

This is in-memory data ownership. No normal loader/writer, existing config schema class, PlayerInputSession, actor, menu, scene, package or gameplay behavior changed. The old typed GameConfig writer is verified to discard inputBindings, so production persistence remains blocked until the full document/writer adapter preserves it. Capture/cancel/reset/defaults UI, live profile application, safe file replacement and actual remap persistence are not implemented by this batch. PS-03 stays open.

Executed evidence

Required Unity 6000.2.8f1, pinned Input System 1.17.0, direct -batchmode -nographics -executeMethod TinyChaos.EditorTools.InputProfileChecks.RunBatch39 with project/private-log paths and no immediate -quit. The synchronous Editor entry owns exit. One run, authoritative exit0, summary 9 passed / 0 failed. This is Edit Mode, without scene loads, Play Mode, normal game-data IO or synthetic/physical device creation.

Group Actual result
D01 PASS: missing input creates six isolated preference defaults, supported round trip, P1-only keyboard and no hardware enumeration.
D02 PASS: imported legacy assets retain audited roles/IDs; all 16 combinations of the four preset choices import, retaining legacy and non-input data.
D03 PASS: three reloads are idempotent; unknown legacy records and inactive P2 keyboard survive; existing versioned input is never silently reimported.
D04 PASS: malformed JSON, duplicate properties, incomplete/duplicate/invalid legacy entries and unsupported preset indices have no writable fallback.
D05 PASS: independent keyboard/P2-pad edits, P3 defaults unaffected, stable action/binding IDs through actual SDK save/load override JSON, and directional composite editing. All action copies stay disabled and are destroyed.
D06 PASS: conflicts, wrong family/group, unknown IDs, duplicate identities/slot schemes, invalid keyboard slot, wildcard/empty paths, unsupported interactions/processors and wrong composite parts are rejected without changing the source.
D07 PASS: unknown root/section/profile/override fields, string dates and exact decimal values survive edits; inexact high-precision/underflow values are refused with original JSON retained; quoted numeric text is not misread.
D08 PASS: future schema and changed action-definition revisions retain original data and return no writable candidate.
D09 PASS: old JsonUtility reader retains its known audio/locale/graphics/preset values; its typed Newtonsoft writer drops the new section, confirming the production-write gate.

No compiler error or unexpected runtime exception occurred. Existing-category CS8785 generator and CS0252 StabilizationChecks warnings remain; this is not a warning-free project. No performance, physical controls, Linux player, Windows/IL2CPP, scene playthrough or safe file-write/replacement evidence is claimed. Private log /tmp/tinychaos-batch39-editor.log and redirected stdout remain outside Git; retained checks reproduce the cases.

Preservation and exact implementation manifest

Pre-run capture /tmp/tinychaos-batch39-preserve-51862f4550/ stores 2,857 project file bytes/hashes, 8,172 Unity/profile hashes and recoverable preference bytes. After review, all 2,857 prior project files match, including all 40 batch-35–38 implementation paths. Of the original 608 gameplay-source pins, 606 still match and only batch 37's two intentional package additions differ. The two unresolved audio deletions and untracked Addressables Linux metadata remain excluded.

Unity automatically inserted only com.unity.toolchain.linux-x86_64 in manifest/lock. JSON comparison proved that sole addition; generated versions were archived and exact captured package bytes restored, retaining Input System 1.17.0. Shared engine prefs changed only unity.editor_sessionid/count; those two automatic keys were archived/restored from captured bytes. Normal game profile coverage is one prefs file, byte-unchanged throughout; no new profile/save/config file appeared. Five external licensing/package/metrics bookkeeping files changed and remain, so the entire Unity profile tree is not claimed unchanged.

Only three new metadata files had empty-field trailing whitespace normalized, preserving their unique GUIDs. Existing production assets/source do not reference the new types by GUID. Inventory appends three reviewed scripts (246 total) without changing the earlier 243 rows; gates append nine groups (76 total), preserving the earlier 67 and all 27 open follow-ups. The 22-row legacy input consumer map is unchanged. ARCH-01 remains active.

Path Kind SHA-256
Assets/Script/Game/GameSystem/Input/InputBindingProfiles.cs input preference data/legacy conversion d77c83c8520b5454f0626a09818b94449e13bb4a061baadec512046ee50ce7f7
Assets/Script/Game/GameSystem/Input/InputBindingProfiles.cs.meta metadata e68af7486e9e3f181db3421f21295a102ab5e110e491940a160cad01327a7a6d
Assets/Script/Game/GameSystem/Input/LegacyInputProfileImport.cs input preference data/legacy conversion 80403518ae283e9835d39e82b446bdba8013a9b0df65169a00ee8e1c85ed23f1
Assets/Script/Game/GameSystem/Input/LegacyInputProfileImport.cs.meta metadata 7bcfe071d43b8a01eff4da03c782a3d0c6f6c7fd7f33202bf9e836efc31466fc
Assets/Script/External/Editor/InputProfileChecks.cs Editor checks 70b95b3c9aa9d145205a56a12c5e198f087db2556d810313a348134227b90bde
Assets/Script/External/Editor/InputProfileChecks.cs.meta metadata 5ae9d5e8f016379022af8dc13b2f5da7c6419e252afeb5f93d93ebf43cc8dddd

Final static checks pass: 748 local documentation links resolve, whitespace passes, 246 inventory paths match project scripts, all 53 issue IDs route once, and all earlier CSV rows remain byte-preserved. Implementation commit contains exactly the six reviewed paths and their verified hashes; no documentation or unrelated file is included.

Next and commit boundaries

Next is blocked-session profile application with reversible in-memory binding drafts: retain player/InputUser ownership, validate before applying, restore prior bindings on failure/cancel and verify fresh-press behavior through retry. Interactive capture/prompts, setup/recovery UI and safe production persistence follow their owning slices. The old writer must preserve the whole document before normal remap writes; file-failure/backup/replacement checks remain required. Legacy-feel comparisons precede actor/UI migration. GAME-01 and Tutorial remain deferred.

Implementation is one six-path commit, with this evidence/status/contract/inventory work in a separate documentation commit. No push. The overall rebuild and full-game playability are not complete.