Skip to content

feat(harmonia-host): acquisition startup wiring (P101)#100

Merged
forkwright merged 1 commit intomainfrom
feat/acquisition-startup
Mar 16, 2026
Merged

feat(harmonia-host): acquisition startup wiring (P101)#100
forkwright merged 1 commit intomainfrom
feat/acquisition-startup

Conversation

@forkwright
Copy link
Owner

Summary

  • Wire Phase 3A acquisition crates (zetesis, ergasia, syntaxis, syndesmos, prostheke) into harmonia-host serve startup/shutdown with correct layer ordering (0→1→2→4)
  • Extend AppState with Arc<dyn DynXxx> handles for each subsystem via new placeholder traits in paroche
  • Add HostError variants, validate_download_dir() hard check, and graceful reverse-order shutdown

Layer ordering

Layer Crate Role
0 zetesis Search/indexer
1 ergasia Download engine (SessionEngine adapter)
2 syntaxis Download queue + event listener
3 episkope Skipped — crate missing from workspace
4 syndesmos External integrations (Plex, LastFM, Tidal)
4 prostheke Subtitle service

Observations

  • Episkope (Layer 3) does not exist in the workspace — skipped entirely. Future prompt should scaffold it.
  • librqbit DurationWithHumanReadable has a private inner Duration field — ETA computation dropped from progress adapter, returns None.
  • Aitesis wired into AppState but not started in serve (no background task — request service is purely reactive).
  • StubImportService used for syntaxis import pipeline — real import wiring deferred to follow-up prompt.

Blast radius

5 files changed, 389 insertions, 3 deletions:

  • crates/harmonia-host/Cargo.toml — new deps
  • crates/harmonia-host/src/error.rs — new error variants
  • crates/harmonia-host/src/serve.rs — startup/shutdown wiring + adapters
  • crates/paroche/src/state.rs — dyn traits + AppState fields
  • Cargo.lock — lockfile update

No changes to Phase 3A crate internals, no route additions, no test additions.

Validation gate

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (all pass, 0 failures)

Test plan

  • Verify cargo build succeeds on CI
  • Verify all existing tests pass (no regressions)
  • Manual: cargo run -- serve with valid config starts acquisition subsystems in log order
  • Manual: Ctrl-C triggers graceful shutdown with reverse-order teardown

🤖 Generated with Claude Code

…n (P101)

Add Phase 3A acquisition crate startup wiring to the serve command:

- Layer 0: Zetesis (search/indexer)
- Layer 1: Ergasia (download engine via SessionEngine adapter)
- Layer 2: Syntaxis (download queue with event listener)
- Layer 4: Syndesmos (external integrations with event handler)
- Layer 4: Prostheke (subtitle service)

Extend AppState with dyn-compatible trait handles for each subsystem.
Add HostError variants for acquisition crate errors.
Validate download_dir exists and is writable before acquisition startup.
Graceful shutdown cancels subsystems in reverse layer order.

Observations:
- Episkope crate (Layer 3, monitoring) does not exist in workspace — skipped
- librqbit DurationWithHumanReadable has private inner field — ETA dropped

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@forkwright forkwright merged commit e82418b into main Mar 16, 2026
13 checks passed
@forkwright forkwright deleted the feat/acquisition-startup branch March 16, 2026 14:27
This was referenced Mar 18, 2026
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