Pass resolved worker count through to the download loop (for now, store it; slice 6 wires it to the orchestrator)
Acceptance criteria
Config.workers defaults to 3
workers: 5 in config.yaml produces Config(workers=5)
workers: 0 or workers: -1 in YAML raises InvalidWorkersError
--workers 8 on CLI resolves to 8 regardless of config.yaml value
No --workers flag uses config.yaml value; missing from both yields default 3
--workers 1 is accepted (sequential fallback)
3–4 new tests in test_config.py covering default, YAML parse, validation rejection, CLI resolution
Blocked by
None - can start immediately
## Parent
#11
## What to build
Add parallel download worker-count configuration through all three config layers (YAML → Config dataclass → CLI → resolution).
**Config changes:**
- Add `workers: int = 3` field to the frozen `Config` dataclass in `config.py`
- Add `InvalidWorkersError(ConfigError)` subclass for validation failures
- Validate `workers >= 1` in `load_config()`; reject 0 and negative values
- Parse `librofm.workers` from the merged YAML dict (same pattern as existing fields like `format`, `output_dir`)
**CLI changes:**
- Add `--workers` / `-w` argument to argparse in `cli.py` (`type=int`, `metavar="N"`, `default=0`)
- Document that default 0 means "use config value"
**Resolution in `run()`:**
- Three-layer priority: CLI flag (> 0?) → `config.workers` → hardcoded `3`
- Pass resolved worker count through to the download loop (for now, store it; slice 6 wires it to the orchestrator)
## Acceptance criteria
- [ ] `Config.workers` defaults to `3`
- [ ] `workers: 5` in config.yaml produces `Config(workers=5)`
- [ ] `workers: 0` or `workers: -1` in YAML raises `InvalidWorkersError`
- [ ] `--workers 8` on CLI resolves to 8 regardless of config.yaml value
- [ ] No `--workers` flag uses config.yaml value; missing from both yields default 3
- [ ] `--workers 1` is accepted (sequential fallback)
- [ ] 3–4 new tests in `test_config.py` covering default, YAML parse, validation rejection, CLI resolution
## Blocked by
None - can start immediately
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent
#11
What to build
Add parallel download worker-count configuration through all three config layers (YAML → Config dataclass → CLI → resolution).
Config changes:
workers: int = 3field to the frozenConfigdataclass inconfig.pyInvalidWorkersError(ConfigError)subclass for validation failuresworkers >= 1inload_config(); reject 0 and negative valueslibrofm.workersfrom the merged YAML dict (same pattern as existing fields likeformat,output_dir)CLI changes:
--workers/-wargument to argparse incli.py(type=int,metavar="N",default=0)Resolution in
run():config.workers→ hardcoded3Acceptance criteria
Config.workersdefaults to3workers: 5in config.yaml producesConfig(workers=5)workers: 0orworkers: -1in YAML raisesInvalidWorkersError--workers 8on CLI resolves to 8 regardless of config.yaml value--workersflag uses config.yaml value; missing from both yields default 3--workers 1is accepted (sequential fallback)test_config.pycovering default, YAML parse, validation rejection, CLI resolutionBlocked by
None - can start immediately
Closed via commit d0b8a5d on feature/parallel-downloads