Skip to content

fix(cli): count JSON records in enrichment dry runs - #177

Open
vaibhavmashal wants to merge 2 commits into
parallel-web:mainfrom
vaibhavmashal:fix/json-dry-run-row-count
Open

vaibhavmashal wants to merge 2 commits into
parallel-web:mainfrom
vaibhavmashal:fix/json-dry-run-row-count

Conversation

@vaibhavmashal

Copy link
Copy Markdown

enrich run --dry-run counts every source as CSV lines minus a header. A two-record JSON array therefore reports 0 rows when compact and 7 when pretty-printed. Count parsed JSON array entries for JSON sources so both formats report 2.

Adds regression cases for compact, pretty-printed and empty JSON arrays, CSV, and both text and JSON output. The tests also assert that dry run does not start enrichment.

Validation on Windows / Python 3.11:

  • New regression cases before the fix: 4 failed, 4 passed.
  • pytest -q tests/test_cli.py -p no:tach: 221 passed, including normal enrichment without --dry-run.
  • python scripts/cli_smoke.py --case 'enrich run': passed against the loopback API.
  • Ruff lint/format, Tach architecture checks and ty type checks: passed with the versions in uv.lock.
  • Full suite: 894 passed, 42 failed. The failures are outside the CLI tests (Windows permissions/symlinks and event-loop socket setup, missing PySpark, and DuckDB/pandas fixtures); the same failing cases were checked against the unchanged upstream CLI source.

AI assistance: implemented and tested with OpenAI Codex.

Fixes #171

Signed-off-by: vaibhavmashal <vaibhavmashal098@gmail.com>
@vaibhavmashal
vaibhavmashal requested review from a team and a balanced review from Copilot November 25, 2026 17:37

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 insufficient remaining quota. Try requesting a review at a lower effort level.

…ion/pr-177

Signed-off-by: vaibhavmashal <vaibhavmashal098@gmail.com>

This branch has not been deployed

No deployments
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.

enrich run --dry-run reports a wrong row count for JSON sources

2 participants