Add CLI read-field discovery and bounded local output formats - #197
Merged
Merged
Conversation
LIghtJUNction
marked this pull request as ready for review
September 30, 2026 13:28
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
最终验证已收齐。当前 main
本 PR 的字段选择和有限本地输出切片已在主线。其他快捷命令的通用输出、自动分页及 #82 的其余条款仍开放;没有把隔离 CI 描述为生产部署。 |
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.
Refs #82. Adds a coherent read-output slice on main cd81710, including the merged #196 through a history-preserving merge.
msg callgains explicit --contract-version (default 1 preserved) and --json [FIELDS]. Bare --json lists selectable fields from the exact server Registry input schema without executing the business query. Explicit fields become signed server-side arguments; cursor/duplicate projection conflicts and non-read contracts refuse before business execution. No guessed field vocabulary or client-side full-result truncation.Optional --jq uses installed jq through fixed argv/no shell, empty environment and temporary module directory, conservative module refusal, streamed 1 MiB output bound and 2-second timeout with child cleanup. --template supports only JSON-pointer placeholders with JSON-escaped substitutions, no expression evaluation or attribute access. Both require explicit nonempty --json. Query/template input limits and failure codes are documented in docs/CLI_FIELD_SELECTION.md. jq intermediate memory follows host process limits; these I/O/time limits are not a general resource sandbox.
Validation: 12 initial field-selection regressions failed before implementation; 12 initial formatting regressions likewise failed before implementation. Final 36 pure tests and 61 existing related client/TUI tests pass locally with Python 3.15. Full Ruff/608-file format/warnings-as-error compile, pinned uv 0.12.20 wheel+sdist and package-content verification pass. Independent code review found no concrete blocker and verified overflow/cancellation cleanup. New real signed HTTP/PostgreSQL test covers field discovery, projection, jq/template output, cursor continuation and all-row zero-write checks; local execution is blocked by the environment's PostgreSQL socket restriction, so this and full contracts/deployment gates must pass in CI.
Only 5 files change; final tree 7b1f45a5d6879943fa9a8d4f513349abd2c7ef5f at head e8e3ec0. No merge/deployment request. No global shortcut formatting or automatic pagination is claimed, and #82 stays open. Existing authentication, signatures, mutations and default JSON output remain unchanged. Both original CLI and #196 histories are preserved; no force update was used. Final-tree CI is required.