Eliminate the structural duplication between SyncRunResult and OrchestratorResult. They share 6 of 8 fields (downloaded_count, skipped_count, failed_count, failed_books, skipped_books, interrupted). SyncRunResult adds only fatal_error. Two nearly-identical frozen dataclasses will drift out of sync if anyone adds a field to one and forgets the other.
Options to explore:
Composition: SyncRunResult holds an orchestrator_result: OrchestratorResult field plus fatal_error
None technically, but deferred per PRD-003 Decision — low priority, no current drift. Do this when either type needs modification for other reasons.
Deferred per PRD-003 Decision: Low-friction duplication; both types serve different layers. Deferring until either type needs modification for other reasons.
## Parent
#36 — PRD-003: Deepen Codebase Architecture
## What to build
Eliminate the structural duplication between `SyncRunResult` and `OrchestratorResult`. They share 6 of 8 fields (downloaded_count, skipped_count, failed_count, failed_books, skipped_books, interrupted). SyncRunResult adds only `fatal_error`. Two nearly-identical frozen dataclasses will drift out of sync if anyone adds a field to one and forgets the other.
Options to explore:
- **Composition:** SyncRunResult holds an `orchestrator_result: OrchestratorResult` field plus `fatal_error`
- **Inheritance:** SyncRunResult extends OrchestratorResult
- **Accept and document:** Both types serve different layers; duplication is stable and intentional
## Acceptance criteria
- [ ] A single source of truth for download-count fields exists
- [ ] No copy-paste drift risk between the two result types
- [ ] All call sites updated (cli.py reads SyncRunResult; orchestrator.py returns OrchestratorResult; sync_run.py assembles both)
- [ ] Full test suite passes
## Blocked by
None technically, but **deferred per PRD-003 Decision** — low priority, no current drift. Do this when either type needs modification for other reasons.
> **Deferred per PRD-003 Decision:** Low-friction duplication; both types serve different layers. Deferring until either type needs modification for other reasons.
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
#36 — PRD-003: Deepen Codebase Architecture
What to build
Eliminate the structural duplication between
SyncRunResultandOrchestratorResult. They share 6 of 8 fields (downloaded_count, skipped_count, failed_count, failed_books, skipped_books, interrupted). SyncRunResult adds onlyfatal_error. Two nearly-identical frozen dataclasses will drift out of sync if anyone adds a field to one and forgets the other.Options to explore:
orchestrator_result: OrchestratorResultfield plusfatal_errorAcceptance criteria
Blocked by
None technically, but deferred per PRD-003 Decision — low priority, no current drift. Do this when either type needs modification for other reasons.
Composed
SyncRunResultaroundOrchestratorResult— 6 delegating properties, bridge copy code eliminated, all 4 AC met. 172/172 tests pass.