Skip to content

feat: 14 - dry run#16

Merged
joefrost01 merged 1 commit into
mainfrom
feat/14-dry-run
Apr 11, 2026
Merged

feat: 14 - dry run#16
joefrost01 merged 1 commit into
mainfrom
feat/14-dry-run

Conversation

@joefrost01
Copy link
Copy Markdown
Contributor

What problem are you trying to solve?

--dry-run only printed a one-line count summary and did not provide the execution plan details required by the spec (resolved files, format summary, SQL/config overview). It also errored for zero matched files, which made dry-run less useful as an informational planning mode.

What does this PR change?

This implements a detailed dry-run plan renderer in the query pipeline, including file list preview, format/schema/query/output summary, and key execution flags. It also adds dry-run-specific file resolution behavior for zero-file scenarios and --pipe data placeholder handling without consuming stdin payload.

Does this change align with DESIGN.md?

Yes. Dry run remains an early pipeline exit and still avoids DuckDB execution and downstream processing. The change only expands pre-execution reporting and keeps normal query behavior unchanged when --dry-run is not set.

What alternatives did you consider?

I considered extending the existing single-line dry-run message with ad-hoc fields, but that made testing and formatting brittle. Building a dedicated plan string generator made behavior explicit and testable, including truncation/mixed-format logic.

Does this PR contain multiple unrelated changes?

No. All changes are scoped to feature 14 dry-run behavior.

Existing PRs

  • I have reviewed all open AND closed PRs for duplicates or prior art
  • Related PRs: none found

Testing

  • cargo test passes
  • cargo clippy passes with no warnings
  • cargo fmt has been run
  • New tests added:
    • dry_run_plan_truncates_file_list_and_shows_summary_fields
    • dry_run_allows_zero_files_for_missing_glob
    • dry_run_pipe_data_uses_stdin_placeholder_without_reading_input

Evaluation

  • What was the specific scenario you tested?
    • Dry run with many resolved files (list truncation + summary fields)
    • Dry run with no glob matches (informational success)
    • Dry run with --pipe data and stdin format set (stdin placeholder plan path)
  • What was the output before and after the change?
    • Before: one-line dry-run summary only; zero-file dry-runs errored.
    • After: full multi-field dry-run plan to stderr with bounded file preview and zero-file informational output.
  • Did you test error cases (bad input, missing files, invalid SQL)?
    • Yes, existing suite continues to cover non-dry-run error paths; dry-run-specific zero-file and pipe-data cases are now covered by new tests.

Human review

  • A human has reviewed the COMPLETE proposed diff before submission

Copy link
Copy Markdown
Contributor Author

@joefrost01 joefrost01 left a comment

Choose a reason for hiding this comment

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

Claude review complete: LGTM on dry-run behavior, test coverage, and code quality; ready to merge once CI passes.

@joefrost01 joefrost01 merged commit cf845db into main Apr 11, 2026
6 checks passed
@joefrost01 joefrost01 deleted the feat/14-dry-run branch April 11, 2026 19:15
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.

1 participant