[OneDev #32] axon: resolve awaken.file path relative to profile dir, not cwd #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from OneDev issue #32 (id 35555)
Original project: internal-joseph
Original state: Closed
Original submitterId: 5
Original submitDate: 2026-05-05T19:19:33.037+00:00
Original lastActivity: {'date': '2026-05-05T21:27:25.835+00:00', 'description': "changed state to 'Closed'", 'userId': 5}
Original fields:
Issue
G915XDriver.configure()storesawaken.fileas a literal string from YAML andawaken()opens it viaPath(writes_file).read_text()— which resolves relative to the current working directory at runtime, not the profile file's location.If axon is launched from anywhere other than
~/git/axon/(e.g. autostart, scheduled task, system service),replay_hid_writeswill silently fail withFileNotFoundErrorand the daemon will crash before opening the device.Fix
In
axon/cli.pyoraxon/profile.py, resolve anyfile:paths insideDeviceConfig.extraagainstprofile_path.parentat load time, so the value passed toreplay_hid_writesis already absolute.Alternative: pass
profile_path.parentintoDaemon.__init__()and have it inject the base path intodriver.configure(cfg.extra, base_path). Cleaner architecturally.Why this matters
Issue internal-joseph#30 (productize as autostart service) will run from a different cwd. This needs to be fixed before that lands.
Related
internal-joseph/docs/2026-05-05-inputd-core.mdTask 5axon/drivers/g915x.py:46-55Imported from OneDev comment id 552 on issue #32
Original userId: 5
Original date: 2026-05-05T21:27:24.835+00:00
Resolved in axon commit
bba3d21.load_profile()now resolvesfile:keys insideDeviceConfig.extraagainst the profile path's parent dir at load time. The Frida writes file is bundled atprofiles/g915x_open_writes_frida.txtanddefault.yamlreferences it as a bare filename. Test added:test_awaken_file_path_resolved_against_profile_dir. axon is now self-contained —axon --profile profiles/default.yamlactivates the keyboard from cold without requiring a separategopenstep.