Repository navigation
docs(architecture): describe the commands that exist, mark the ones that don't - #582
Merged
Merged
Conversation
…hat don't Section 5 was the reference for the Tauri command surface, and ten of the commands it documented had never been written. Nine appear nowhere in the tree; ai_status matches only test function names. Someone reading the document and calling export_data, refresh_schema or get_users gets a runtime "command not found" from a source that reads as authoritative. Section 5.5 now describes what import and export are actually built from: export_results formats a fetched result set, pick_file/pick_save_file open the native dialogs, and read_file_contents/write_file_contents move the bytes. Parsing and preview happen in the renderer because the file is already in memory there. The prose says plainly that there is no transaction around an import and could not usefully be one — a dump's DDL commits as it runs — and that streaming is not implemented. The remaining ten are marked NOT IMPLEMENTED rather than deleted: they are a plan worth keeping, just not a surface to call. scripts/check-documented-commands.sh compares the async fn names in section 5 against the commands registered in lib.rs and fails on any that are neither registered nor marked, so the section cannot drift back. CI runs it when docs, src-tauri or the scripts change. Closes #363 Co-Authored-By: Claude Opus 5 <[email protected]>
EVWorth
added a commit
that referenced
this pull request
Sep 10, 2026
…s of it (#606) Section 5 declared the Tauri commands but omitted 32 of the 63 registered, so a reader could not tell whether a command existed by looking. #582 fixed the other direction — commands documented but never written — and this is the half that was left (#457). Added: the two connection commands, kill_query and get_own_thread_ids, the four view and DDL commands, the four AI commands that exist, and three sections that had no place to live at all — history (§5.6), SQLite (§5.7) and platform (§5.8). Each says why the command is shaped as it is rather than restating its signature, since the signature is generated into bindings.ts and does not need a second copy. The check script only matched `async fn`, so a documented *sync* command was invisible to it. Widening the pattern immediately found `format_sql` — documented, never implemented, and undetectable by the tool written to catch exactly that. It is now marked NOT IMPLEMENTED and not planned: formatting is the frontend's, via the sql-formatter npm package, and a round trip to Rust to reformat text as the user types would buy nothing. Widening it also broke the name extraction, because a one-line signature ends in its return type rather than the function name. Fixed, and verified the check still fails on a reintroduced break before trusting the pass. Closes #457 Co-authored-by: Claude Opus 5 <[email protected]>
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.
Section 5 documented ten Tauri commands that were never written. Nine appear nowhere in the tree;
ai_statusmatches only test function names inmas-ai/tests/data_layer.rs. A reader following the document and callingexport_data,refresh_schemaorget_usersgets a runtime "command not found" from a source that reads as authoritative.§5.5 rewritten to describe the real import/export surface:
export_resultsformats a fetched result set,pick_file/pick_save_fileopen the native dialogs,read_file_contents/write_file_contentsmove the bytes. Parsing and preview are frontend-side because the file is already in memory there. The prose now states that there is no transaction around an import and could not usefully be one — a dump's DDL commits as it runs — and that streaming is not implemented.The other ten are marked
NOT IMPLEMENTEDrather than deleted. They are a plan worth keeping, just not a surface to call.scripts/check-documented-commands.shcompares theasync fnnames in §5 against the commands registered inlib.rs. Documented-but-unregistered fails unless marked; registered-but-undocumented is reported as information only. Verified it fails on an unmarked phantom (exit 1) before trusting the pass.CI runs it when
docs/**,src-tauri/**orscripts/**change.Closes #363