Skip to content

Phase 14 - Refactoring: Forgot to create the Config Actor#190

Open
lorenzoberts wants to merge 4 commits into
lorenzo/actor-refactor-phase-13from
lorenzo/actor-refactor-phase-14
Open

Phase 14 - Refactoring: Forgot to create the Config Actor#190
lorenzoberts wants to merge 4 commits into
lorenzo/actor-refactor-phase-13from
lorenzo/actor-refactor-phase-14

Conversation

@lorenzoberts

@lorenzoberts lorenzoberts commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Goal

Promote ConfigService from a synchronous service object to a proper actor with its own state, lifecycle, and typed message protocol — consistent with LoreApiActor, RenderActor, and the rest of the actor fleet.

What this PR does

Extracts bootstrap, directory setup, and update validation into reusable helpers, then introduces ConfigMessage, ConfigHandle, and ConfigActor for snapshot reads, validated updates, persistence, and shutdown. main.rs spawns ConfigActor at startup; AppServices holds ConfigHandle and edit-config saves go through the typed actor protocol instead of calling ConfigService directly.

Bootstrap still produces the initial ConfigSnapshot for logging, CLI handling, Lore setup, and App state. The legacy synchronous ConfigService API is removed once all runtime mutations go exclusively through ConfigHandle. Runtime behavior is unchanged.

This commit moves configuration bootstrap, directory setup, and update
validation into reusable helpers while keeping the existing synchronous
service API intact. The extraction prepares configuration state and
validation for actor ownership without changing runtime behavior.

This commit is part of the architecture's refactoring phase 14.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit introduces the configuration actor boundary with ConfigMessage,
ConfigHandle, and ConfigActor for snapshot reads, validated updates,
persistence, and shutdown. The actor is added in isolation from production
wiring so its lifecycle and request protocol can be tested independently.

This commit is part of the architecture's refactoring phase 14.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit wires ConfigActor into startup and passes ConfigHandle through
AppServices so edit-config saves use the typed actor protocol. Bootstrap
still produces the initial snapshot for logging, CLI handling, Lore setup,
and App state, preserving the existing startup path while moving mutations
behind the actor boundary.

This commit is part of the architecture's refactoring phase 14.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit removes the legacy ConfigService wrapper now that runtime
configuration updates go exclusively through ConfigHandle. Configuration
tests are updated to exercise the bootstrap helpers and actor-backed apply
path directly, leaving the config module aligned with the hybrid actor model.

This commit completes the architecture's refactoring phase 14.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
@lorenzoberts lorenzoberts marked this pull request as ready for review July 9, 2026 13:53
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