- Add lock_or_recover() helper in bridge.rs and server.rs to handle
poisoned mutexes gracefully instead of panicking
- Replace expect() in db::init() with proper error logging and early
return so DB init failures don't crash the process
- Replace Response::builder().unwrap() with tuple .into_response()
pattern in server.rs HTTP handlers
- Handle condvar poison in bridge::request_lua_exec_sync_wait
- All errors now logged via logging::log() for visibility in admin panel
- Remove unused `use body::Body` import
- Zero unwrap()/expect() remaining outside #[cfg(test)]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rename http_framework/ws_server.lua → rgl_framework.lua and update
all internal references (log path, script name, init message)
- Replace debug eprintln!() in bridge.rs with logging::log() calls
so bridge diagnostics go to log file and admin panel instead of stderr
- Add DEBUG logs: bridge requests/polls, WS connect/disconnect,
API timeout warnings, DB batch JSON parse errors
- Move log file from /sdcard/Download/ to getWorkingDirectory()/logs/
with auto-creation of logs/ directory in logging::init()
- Remove unused debug_pending_count() from bridge.rs
- Add project documentation: CLAUDE.md, docs/MODULE_GUIDE.md,
docs/LIB_REFERENCE.md, docs/TASKS.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>