Skip to content

Tighten CLI logging and jq option validation#72

Merged
apstndb merged 4 commits into
mainfrom
fix/cli-safety-docs
Jul 4, 2026
Merged

Tighten CLI logging and jq option validation#72
apstndb merged 4 commits into
mainfrom
fix/cli-safety-docs

Conversation

@apstndb

@apstndb apstndb commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Change --log-grpc to an explicit off|metadata|payload mode so payload logging requires an intentional opt-in.
  • Reject jq/raw/compact options on output paths that do not use them, and avoid compiling jq filters for CSV and partition-query checks.
  • Add focused routing and validation tests for comment-prefixed DML, timestamp bounds, gRPC logging modes, and unsupported flag combinations.
  • Refresh README help text, jq lazy-mode memory wording, partition-query timestamp guidance, gRPC payload caveats, Makefile targets, and Go workflow setup.

Closes #58.
Closes #59.
Closes #60.
Closes #61.
Closes #62.
Closes #63.

Validation

  • git diff --check
  • go test ./params/... ./jqresult/... ./resultset/...
  • go test .
  • make build
  • make lint
  • make test

@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors command-line flag validation, introduces configurable gRPC logging modes (off, metadata, payload), and adds unit tests for flag validation and query mode detection. Feedback on the changes includes handling potential errors from zapDevelopmentConfig.Build to prevent nil pointer panics, and adding client-side validation to ensure --try-partition-query and --read-timestamp are not used with DML statements.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread main.go Outdated
Comment thread main.go Outdated
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@apstndb

apstndb commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors flag validation and introduces configurable gRPC logging options (off, metadata, payload) to replace the previous boolean flag. It extracts validation logic into dedicated helper functions, adds a comprehensive test suite in flags_validation_test.go, and updates the Makefile and README.md. The reviewer feedback suggests minor code simplifications, including removing a redundant zap.Fields() call when building the logger and omitting struct tags in anonymous struct initializations within the test suite to improve readability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread main.go Outdated
Comment thread flags_validation_test.go Outdated
Comment thread flags_validation_test.go Outdated
Comment thread flags_validation_test.go Outdated
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@apstndb

apstndb commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces configurable gRPC logging modes (off, metadata, payload), refactors flag validation logic into dedicated helper functions, and adds comprehensive unit tests in flags_validation_test.go. The Makefile and README.md have also been updated to reflect these changes. The review feedback suggests validating the --strong flag against DML statements, reordering the validation checks in validateJqOutputOptions to produce more specific error messages, and updating the corresponding test cases to match.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread main.go Outdated
Comment thread main.go
Comment thread flags_validation_test.go
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@apstndb

apstndb commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors command-line flag validation and introduces configurable gRPC logging modes (off, metadata, payload) to replace the previous boolean flag. It extracts validation logic for execution and JQ output options, query mode detection, and timestamp parsing into dedicated helper functions. Additionally, a comprehensive test suite has been added in flags_validation_test.go, and both the Makefile and README.md have been updated to reflect these changes. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@apstndb apstndb merged commit 3361faa into main Jul 4, 2026
2 checks passed
@apstndb apstndb deleted the fix/cli-safety-docs branch July 4, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant