Reckless UI features#8630
Conversation
f8b783e to
71a569a
Compare
b2ccfc0 to
7ab612f
Compare
7ab612f to
0fec93b
Compare
|
Rebased and updated reckless rpc to handle single argument reckless commands (the new |
There was a problem hiding this comment.
Hi @endothermicdev, thanks for the PR! I am excited to start integrating reckless with these cool new options into the UI soon. In the meantime, here are the results from my testing of reckless.
1. install "backup" Crashes Lightning Node
After running lightning-cli reckless install "backup", it installs the backup plugin but crashes without any error log:
2025-11-14T05:35:08.692Z DEBUG plugin-recklessrpc: calling: reckless -v --json -l /home/.lightning --network regtest install backup (null)
Restart keeps repeatedly crashing the CLN node:
2025-11-14T05:36:51.578Z DEBUG plugin-manager: started(798730) /home/.lightning/reckless/backup/backup.py
2025-11-14T05:36:51.752Z INFO plugin-backup.py: Could not find backup.lock in the lightning-dir
2025-11-14T05:36:52.757Z INFO plugin-backup.py: Killing process lightningd (798649)
2. install 1ff0ee6 "clnrod" Ignored the Requested Commit
The plugin installed, but the requested commit 1ff0ee6 was not honored.
3. Installing From GitHub URLs Fails
Reckless is unable to detect the plugin from the provided URL.
Examples:
lightning-cli reckless install "https://github.com/nettijoe96/c-lightning-graphql"
lightning-cli reckless install "https://github.com/nettijoe96/c-lightning-graphql/tree/12888f124bbdf9ffe1fbbd3d7cf0286c66184e8e"
4. listinstalled Reckless Plugin Vs RPC Output
The RPC returns only a string array of plugin names, while the standalone reckless plugin returns full metadata (enabled, entrypoint, installed commit, etc.).It would be useful for the RPC to return the richer JSON structure.
5. Improve listavailable Output Format
Currently it returns a simple text array of plugins. But I would suggest switching to JSON objects so manifest metadata can be also added once available (eg. description, entrypoint, default commit, last updated, language, etc.).
6. Should .remote_sources Be Deleted After listavailable?
7. Plugin Search Priority Is Unclear
Proposed priority:
- Installed plugins (enabled/disabled)
- Source URL
- .remote_sources directory
Step to reproduce:
- Install "summary" plugin
- Call
listavailablewhich will create.remote_sourcesdirectory - Call
search "summary"will list it from.remote_sources - Manually delete
.remote_sources - Call
search "summary", this time it will list it from the source urlhttps://github.com/lightningd/plugins
8. uninstall "<plugin>" Leaves disable-plugin in Config
The plugin directory is removed, but an entry remains in bitcoin-reckless.conf as disable-plugin=<plugin>, unsure if this is intentional. Though RPC still shows correct enabled/disabled state.
9. Invalid or Missing Subcommands Crash the Process
It should return a structured error instead of crashing.
Example failing commands: search, add, remove, source, source "xyz", update, update "summary"
$ lightning-cli reckless source
{
"code": -3,
"message": "the reckless process has crashed"
}
10. reckless help Output Is Not Formatted
11. reckless --version Returns CLN Version
It should return the reckless plugin version instead.
12. Missing Commands in Document Synopsis
The following commands are missing from the documentation synopsis:
search
update
help
listconfig
listavailable
listinstalled
13. Missing Documentation Descriptions
Descriptions are missing for these commands:
listavailable
listinstalled
listconfig
14. Clear Old Reckless Configurations
[UPDATE]: After reconsideration, this feels like a low-priority UI feature. Users should explicitly choose to clear one plugin at a time. A factory-reset-style option may be premature for the UI.
Please note that I haven’t reviewed the code yet. To save time and effort, I’ll begin the code review once these commands have matured and are working as expected.
|
@endothermicdev I am listing our last discussion point here too for posterity & completeness: 15. Lightning CLI Argument Parsing Conflicts With Reckless From Receiving Common Flagslightning-cli intercepts certain arguments before they can be passed to the reckless plugin, preventing users from accessing reckless-specific information. |
@endothermicdev This does not need to be available through RPC, since the goal is to provide a recovery mechanism only when the CLN node is unable to start normally. This is mainly a safety and recovery feature rather than a user-facing management option. For example, if I install the
|
ac83556 to
3d2cd8d
Compare
13766cc to
e0bb38a
Compare
b408409 to
dd9cae8
Compare
|
Hi @endothermicdev, Thanks for the updates. I tested reckless with your last commit Documentation:
Streaming & notifications
Install stability
Commit-specific installsCurrently, my all attempts to install a plugin with a commit sha failed. Like UX / consistency issues
Version mismatch:
|
524504e to
3d45626
Compare
Python dependencies are often used for the test framework. Checking other installers first means they're less likely to be misinterpretted as python plugins.
While the reckless utility provided usage hints, the rpc plugin
would simply exit with an unhelpful:
{
"code": -3,
"message": "the reckless process has crashed"
}
This captures the usage hint from the utility and reports it
from the plugin as well.
Changelog-Fixed: reckless-rpc plugin now raises incorrect usage from the reckless utility.
Trying to debug pytest teardown under the github CI runner.
so that reckless-rpc will use the correct executable.
The change allows `uv run --script` shebangs through to the shebang installer, while still rejecting plain `bin/python`, `env python`, and project-mode uv run (without --script) shebangs that need a separate installer to manage dependencies.
…n the first time reckless tries to install it without the option, but instead warns the user and asks for manual insertion, then resumes installation attempt.
bbe2a1f to
99f02b3
Compare
Removes log_conn_init, log_read_more, log_conn_finish, log_notify, and get_line. These were defined but never reachable, and started failing the build under -Werror=unused-function. Background, for whoever revisits this: These functions were the read side of a utility-log-streaming feature introduced by endothermicdev in late January 2026. The intent was to stream logs from the reckless Python utility into lightningd as 'reckless_log' notifications. The feature was built bottom-up across several commits: 80b01c4 reckless: Add logging port to transmit log messages... (Python side: Logger class connects to 127.0.0.1:<port> and sendall()s every log line) 037f275 reckless-rpc: open socket for listening to streaming logs (C side: open_socket(), logfd/logbuf state, and the handler chain log_conn_init -> log_read_more -> log_conn_finish) 23f91ad reckless-rpc: publish reckless log notifications (registers the 'reckless_log' notification topic and adds log_notify() to publish lines as notifications) f6ecb79 reckless: close log socket before stdout (close-ordering "fix"; see note below) The dispatch step was never added. The stdout/stderr connections in reckless_call() are wired via io_new_conn(), but no equivalent io_new_conn(..., log_conn_init, ...) (or io_new_listener on the listening fd) was ever introduced, so the handler chain has been unreachable since it was first committed. The bug went unnoticed because: - The Python side's connect() succeeds even without accept(): the kernel holds the connection in the listen backlog (size 64). - sendall() initially succeeds because data goes into the kernel socket buffer, which is never drained on the C side. - GCC -Wunused-function only fires once analysis reports the top of the chain as unused; with the functions referencing each other, this depended on build configuration and only surfaced under certain configure flags. The "close log socket before stdout" commit (f6ecb79) is most likely a symptom of this same bug: once the kernel send buffer fills, the Python utility blocks in sendall() and won't exit cleanly. Closing the listen fd early causes EPIPE on the Python side, which Logger swallows, and the utility exits. That patched the symptom without fixing the missing wiring. This commit does NOT remove the surrounding infrastructure (logfd, logbuf, logbytes_read, open_socket(), the close logic in reckless_conn_finish). The socket still opens and gets torn down cleanly; the Python side still connects and sends into a buffer that never gets read. No user-visible behavior change. If someone wants to actually finish this feature, reviving it requires more than reverting this commit: an accept step needs to be added on the listening fd, and accepted connections dispatched to log_conn_init via io_new_conn(). Co-Authored-By: Claude Opus 4.7
Important
25.12 FREEZE October 27th: Non-bugfix PRs not ready by this date will wait for 26.03.
RC1 is scheduled on November 10th
The final release is scheduled for December 1st.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
Addresses several issues raised in #8439. Still working on a few of them.