Skip to content

Wire batch flags into scrape/search/screenshot/codegen#27

Open
paulius-krutkis-dcd wants to merge 1 commit into
batch-outputfrom
wire-batch-flags
Open

Wire batch flags into scrape/search/screenshot/codegen#27
paulius-krutkis-dcd wants to merge 1 commit into
batch-outputfrom
wire-batch-flags

Conversation

@paulius-krutkis-dcd

Copy link
Copy Markdown
Collaborator

Part 4 of 4 for the batch-input feature. Builds on batch-output. Ties the previous layers into the actual commands.

  • Attaches --input-file, --input-column, --concurrency to every scrape-style command (scrape, search, screenshot, and all codegen targets).
  • createTargetAction detects batch mode, rejects --input-file combined with a positional input, and otherwise runs each input through the same body builder + SDK call with bounded concurrency.
  • Primary positional args are now optional, so the input can come from the file; a genuinely missing input raises a CliUsageError.
  • Binary targets (screenshot) write one file per item and require -o <dir>; non-binary targets stream ndjson by default or write per-item JSON files when -o <dir> is given.

Integration tests cover flag exposure and the usage-error paths; the orchestrator is unit-tested end to end without network calls.

Based on batch-output — review/merge part 3 first.

Stack: 1/4 batch-input-parsing → 2/4 batch-executor → 3/4 batch-output → 4/4 (this)

Attach --input-file, --input-column and --concurrency to every
scrape-style command and dispatch into the batch pipeline when
--input-file is present.

- createTargetAction detects batch mode, rejects --input-file combined
  with a positional input, and otherwise runs each input through the
  same body builder + SDK call with bounded concurrency.
- Primary positional args are now optional so the input can come from
  the file instead; a genuinely missing input raises a CliUsageError.
- Binary targets (screenshot) write one file per item and require -o
  <dir>; non-binary targets stream ndjson or write per-item JSON files.

Integration tests cover flag exposure and the usage-error paths; the
orchestrator is unit-tested end to end without network calls.
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