Repository navigation
refactor(cli): isolate application and query execution - #1041
Closed
aaltshuler wants to merge 8 commits into
Closed
aaltshuler wants to merge 8 commits into
aaltshuler wants to merge 8 commits into
Conversation
5 tasks done
Contributor
Author
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.
What & why
CLI handlers currently terminate the process, the query family lives in the main dispatcher, and successful reads reload operator preferences after execution. This change makes the application callable without process exit, gives
query/mutate/aliastheir own argument and execution module, and captures read presentation with the configuration used for execution.The one intentional presentation change is that captured operator/alias JSON or JSONL defaults now apply to structured execution errors too. Explicit formats still win; errors before successful configuration/alias capture use argv preferences, mutations still require explicit
--json, and unstructured read transport errors stay on stderr. Query and mutation renderers use fallible writers, and output/flush failures retain the original mutation evidence.Backing issue / RFC
Checklist
Local verification
Cargo commands ran inside the checkout with the existing shared target directory. CLI integration tests used the matching prebuilt
omnigraph-serverthroughCARGO_BIN_EXE_omnigraph-server.cargo test -p omnigraph-cli --bin omnigraph --locked— 171 passed, 9 ignored; query/data integration selection — 120 passed.cargo test -p omnigraph-cli --locked— 181 library tests and 326 integration tests passed; 19 explicitly ignored. Environment-gated cloud/predecessor cases may return early when their prerequisites are absent; this is not live-cloud or release-upgrade qualification.cargo clippy -p omnigraph-cli --all-targets --locked -- -D warnings -W clippy::dbg_macro— passed.cargo fmt --all --check,python scripts/check-docs.py,bash scripts/check-agents-md.sh,typos,git diff --check— passed.Full workspace, cloud and GQT gates are left to CI. The GQT semantic corpus is unchanged; CLI and parity tests own this transport/presentation change. The existing macOS linker unwind-size warning appeared in baseline and final builds.
Notes for reviewers
This branch combines the still-open prerequisites #1037, #1038, #1039 and #1040, so the main-based diff currently includes them. They are followed by four commits for this change:
The extraction preserves source-loading/credential validation order, opaque forwarding of syntax the local parser cannot understand, omitted versus explicit temporal selectors, alias parameter precedence, destructive consent, and execution-owned CSV file opening. Managed acquisition remains with its existing owner. Streaming export/Blob output stays on its existing path.