Conversation
Final cleanup for ADR 0012. Post-session audit caught two
#[tauri::command] functions that slipped through every prior
migration PR:
- get_allow_unverified_local_models (Result<bool, String>)
- set_allow_unverified_local_models (Result<(), String>)
Both live in commands/mod.rs and are registered via registry.rs:66
and :76 respectively. They escaped the earlier domain-by-domain
passes because they don't fit any domain — they're the unverified-
model settings flag.
Changes:
- get_allow_unverified_local_models: bridges the still-String
internal helper allow_unverified_local_models via
.map_err(AppError::internal). The helper stays on String because
it's also consumed by an unregistered dead-code wrapper
(load_custom_model in mod.rs, shadow of
model_commands::load_custom_model) that would cascade otherwise.
- set_allow_unverified_local_models: full migration with
db_lock_failed / db_not_initialized / db_query_failed.
Verified every #[tauri::command] across the commands/ tree with:
awk '/^#\[tauri::command\]/ { flag=1 } flag && /^pub (async )?fn/ {
... check Result<_, String> ... flag=0 }'
and confirmed zero String-returning Tauri commands remain.
Verified:
- cargo check --all-targets clean
- cargo test --lib: 311 pass, 1 ignored
- cargo test --test command_contracts: 8 pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final cleanup for ADR 0012. A post-session audit caught two
#[tauri::command]functions that slipped through every prior migration PR because they don't fit any domain file:get_allow_unverified_local_models(wasResult<bool, String>)set_allow_unverified_local_models(wasResult<(), String>)Both live in
commands/mod.rsdirectly and are registered viaregistry.rs:66/:76. The unverified-model settings flag they control is a global security toggle, not a domain concern — which is why they weren't bundled with any of the domain migrations.Changes
get_allow_unverified_local_modelsbridges its still-String internal helperallow_unverified_local_modelsvia.map_err(AppError::internal). The helper stays on String because it's also called by an unregistered dead-codeload_custom_modelwrapper inmod.rs(shadow ofmodel_commands::load_custom_model) that would cascade otherwise.set_allow_unverified_local_models: full migration →db_lock_failed/db_not_initialized/db_query_failed.Verification
Ran across
src-tauri/src/commands/*.rs:Zero String-returning
#[tauri::command]functions remain. ADR 0012 is now truly complete.Test plan
cargo check --all-targets— cleancargo test --lib— 311 pass, 1 ignoredcargo test --test command_contracts— 8 pass🤖 Generated with Claude Code