Harden Config Parsing / Validation - #268
Conversation
|
👋 Thanks for assigning @joostjager as a reviewer! |
a56ef0c to
36cc238
Compare
There was a problem hiding this comment.
When storage_dir(config) is Some, a failed read no longer falls back to the default data directory. Please update the function documentation and the CLI/MCP error messages accordingly. Currently, a missing key in configured storage tells the user to populate the default path, but doing so cannot resolve the error because that path is never checked.
36cc238 to
9d03f24
Compare
Stop API key resolution when a loaded configuration names an unsupported network. This prevents a malformed config from selecting the Bitcoin key. This commit was created with assistance from Codex.
Stop API key lookup after an explicit storage directory is selected. A missing instance key must not fall back to another node's credentials. This commit was created with assistance from Codex.
Return an error when the operator selects a config path that is missing or is not a file. This prevents silent fallback to the default node. This commit was created with assistance from Codex.
Return an error when an explicit MCP config path is missing or is not a file. This prevents the bridge from selecting the default node instead. This commit was created with assistance from Codex.
9d03f24 to
72341f0
Compare
joostjager
left a comment
There was a problem hiding this comment.
Seems something went wrong in the rebase? https://github.com/lightningdevkit/ldk-server/pull/268/changes#r3912262959 was addressed, but then reverted again in the second push.
Also it would be helpful for review to get a link with the diff that addresses the comments, excluding the rebase. I am not sure what happened.
Various issues by project loupe where we could silently fallback to a default config or file location in an unexpected way. Better to force the user to be explicit upfront to prevent potential issues.