refactor: move daemon startup ownership
This commit is contained in:
parent
7c0399b2ef
commit
d5a91c2396
4 changed files with 169 additions and 141 deletions
|
|
@ -6,6 +6,13 @@ the shared Iroh endpoint, resource registry, module routing, and local control
|
|||
socket. Control commands connect to the Unix socket and send typed JSONL
|
||||
requests.
|
||||
|
||||
Within `geth-node`, daemon lifecycle code is separated from feature handlers:
|
||||
`daemon.rs` owns `geth daemon run` startup, local socket binding, shutdown
|
||||
signal handling, Iroh endpoint startup, the Iroh accept loop, and background
|
||||
live-sync task spawning. Runtime registries for pubsub, pipes, and overlays live
|
||||
behind narrow mutex-protected structs in `runtime.rs`. Local control and
|
||||
protected peer-control feature dispatch remain separate refactor targets.
|
||||
|
||||
The local metadata store is SQLite product state. `geth-store` tracks a numeric
|
||||
`schema_version` in the `meta` table and applies ordered migrations up to the
|
||||
crate's current schema version when the store opens. Fresh database creation and
|
||||
|
|
|
|||
|
|
@ -35,15 +35,15 @@ Goal: make the documented local quality gate pass before deeper refactors.
|
|||
Goal: split `geth-node` into reviewable daemon subsystems without changing
|
||||
behavior.
|
||||
|
||||
- `[~]` Extract daemon startup and runtime ownership.
|
||||
- `[x]` Extract daemon startup and runtime ownership.
|
||||
Acceptance criteria:
|
||||
- `[ ]` Daemon startup, shutdown, signal handling, socket setup, and Iroh
|
||||
- `[x]` Daemon startup, shutdown, signal handling, socket setup, and Iroh
|
||||
endpoint ownership live outside the main feature handler module.
|
||||
- `[x]` Iroh accept-loop and background live-sync task spawning live outside
|
||||
the main feature handler module.
|
||||
- `[x]` Runtime state is represented by narrow structs with documented
|
||||
ownership and locking rules.
|
||||
- `[ ]` Existing daemon startup and status tests pass unchanged.
|
||||
- `[x]` Existing daemon startup and status tests pass unchanged.
|
||||
|
||||
- `[ ]` Extract local control routing.
|
||||
Acceptance criteria:
|
||||
|
|
|
|||
Loading…
Reference in a new issue