Skip to content

Add CLI read-field discovery and bounded local output formats - #197

Merged
LIghtJUNction merged 2 commits into
mainfrom
work/cli-read-output-20260930
Sep 30, 2026
Merged

LIghtJUNction merged 2 commits into
mainfrom
work/cli-read-output-20260930

Conversation

@LIghtJUNction

@LIghtJUNction LIghtJUNction commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Refs #82. Adds a coherent read-output slice on main cd81710, including the merged #196 through a history-preserving merge.

msg call gains 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.

@LIghtJUNction
LIghtJUNction marked this pull request as ready for review September 30, 2026 13:28
Copilot AI balanced review requested due to automatic review settings September 30, 2026 13:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-30T13:41:33.044229Z e8e3ec0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@LIghtJUNction
LIghtJUNction merged commit 817cdec into main Sep 30, 2026
21 checks passed

Copy link
Copy Markdown
Contributor Author

最终验证已收齐。当前 main 817cdec687fe05974c11b762f65ed7fd1638bfe1 的 tree 7b1f45a5d6879943fa9a8d4f513349abd2c7ef5f 与本 PR 最终候选完全一致。

  • PR head e8e3ec06:12 个适用工作流全部 success;完整回归 36721271572 的 8 个 shards 和最终 contracts 均通过。
  • 独立 main push:7 个适用工作流全部 success;完整回归 36721920259、质量 36721920206、安装包隔离演练 36721920237 分别有独立运行证据。
  • 两次完整运行的 16 份 shard ZIP 均下载并核对 SHA-256。逐一核验 manifest/JUnit 精确 node ID:各为 2699 core + 8 conformance,完整互斥并集,零 failure/error/skipped。不是仅比较总数。
  • 新增 CLI 的 37 个用例两次均通过;真实签名 HTTP/PostgreSQL 字段发现、字段下推、jq/template、cursor 续读及全表零写入用例在两次 shard 3 中分别用时 6.144s / 5.911s,已读取 JUnit 确认。

本 PR 的字段选择和有限本地输出切片已在主线。其他快捷命令的通用输出、自动分页及 #82 的其余条款仍开放;没有把隔离 CI 描述为生产部署。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants