Repository navigation
fix(bin): guard unbound $raw variable in fm_pending_reply_new_id on openssl-less hosts - #5184
RyzeNGrind wants to merge 4 commits into
Conversation
…penssl-less hosts
In fm_pending_reply_new_id, when openssl is unavailable or fails, the $raw
variable remains unbound. The check [ -z "$raw" ] crashes under set -u with
"unbound variable" error on hosts without openssl, breaking all reply-bearing
secondmate steers including --resolve-key sends.
Fix: use "${raw:-}" to safely access the variable, which expands to empty
if unbound, preventing the crash. Add regression test to verify the fallback
path generates valid IDs without openssl.
Co-Authored-By: Claude Haiku 4.5 <[email protected]>
…gression The previous test didn't trigger the fallback path because it put a fake openssl first on PATH, but command -v still found the real openssl in /usr/local/bin. Use minimal PATH="/usr/bin:/bin:/usr/sbin:/sbin" which excludes /usr/local/bin to ensure command -v openssl returns non-zero and triggers the true fallback path under set -u. Co-Authored-By: Claude Haiku 4.5 <[email protected]>
On NixOS systems, standard tools (awk, date, shasum, etc.) are in /run/current-system/sw/bin, not /usr/bin. Update the test PATH to include this directory so the fallback path has access to all needed tools while still excluding /usr/local/bin where openssl is located. Co-Authored-By: Claude Haiku 4.5 <[email protected]>
…test truly excludes openssl
Physical device wake-lock lifecycle validation (partial)Device: Launcher R5CY62JEFXX, DEV account, DEV test room (pushback-384207cd...). Leave: the channel audio session partial lock ( Logout: clean - returned to a "Not in a channel" state with no new stray locks beyond the pre-existing AudioMix lock above. Quick leave+rejoin: inconclusive. Firing the room-join action twice within a few seconds right after the logout/re-login cycle produced no visible connect/health-transition progression in the logs the second time - the request was received but didn't appear to proceed to a live connection. No crash and no new stray lock resulted, but I could not confirm a successful rapid rejoin in the time available, so this is reported as unverified rather than pass or fail. Not covered: the 60-second screen-off-while-in-room test (listed as a gap per guidance, not reattempted this round). Install and launch were clean on all three Group B devices with no crashes throughout. |
5184 lock-lifecycle A/B re-check (main vs 5184)Device: Launcher R5CY62JEV9J, DEV account, DEV test channel. AudioMix lock - confirmed pre-existing, NOT introduced by 5184.
Conclusion: this is a pre-existing battery/audio-routing issue that predates PR 5184, not a regression it introduces. Recommend filing it as its own item for the audio/platform layer rather than blocking this PR on it. Quick rejoin: Leave then immediately rejoin on the 5184 build succeeded cleanly - Screen-off 60s in room: Connection stayed All three required checks are clean or explained per the above. |
|
Speaking as Kun's firstmate: thank you @RyzeNGrind, and sorry this one waited so long for a first look. It's a real bug, and the fix is right.
Once that's in and CI is green, this can land as a restore. |
|
Cross-reference from #7610: we independently hit this defect while running live remote-steer validation on an openssl-less host and fixed it a slightly different way at |
|
Speaking as Kun's firstmate: thank you @RyzeNGrind, and thanks @kesslerio for the cross-reference from #7610. A quick correction to my 10-21 note first. I asked you to rebase, and I shouldn't have. The merge conflict is ours to resolve when this is ready to merge, so please ignore that part. I re-checked main Where it stands: waiting on you. One thing is needed:
Optional, your call: @kesslerio's form, |
Summary
bin/fm-pending-reply-lib.sh:fm_pending_reply_new_idevaluated[ -z "$raw" ]underset -uon the openssl-absent fallback path, causing every reply-bearing secondmate steer to crash withraw: unbound variable${raw:-}insteadtests/fm-pending-reply.test.shthat simulates openssl absence via PATH isolation (symlink directory containing only non-openssl tools) and confirms the function returns a well-formed 16-character lowercase hex ID without crashingTest plan
tests/fm-pending-reply.test.shpasses on hosts with and without openssl--resolve-keysends on openssl-less hosts