fix: merge worker restore into develop host lifecycle
Integrate integration/worker-restore without reviving removed Worker socket/discovery paths. Keep restore candidate allocation and canonical effects deferred until activation, with registry reclamation and observer publication fences on the in-process controller. Preserve develop BackendJob/provenance, immutable Journal body capture and erasure, and Workdir diagnostics. Adapt obsolete socket fault tests to in-process publication and registry drift boundaries. Validation: root cargo check; ordinary worker, worker-runtime and standalone package tests; Server restore (43) and Journal (49) filters; mcp/server-api/runtime-api/session-store tests; optional Runtime feature check; OpenAPI and six generated TypeScript checks; Web restore unit tests (15); runner tests (21); fmt, naming and diff checks. Full workspace/Server suites, E2E, live/model and fixture generation not run.
This commit is contained in:
@@ -194,6 +194,21 @@ impl WorkerSessionStore {
|
||||
Ok(store)
|
||||
}
|
||||
|
||||
/// Open a current retained Session without creating or migrating anything.
|
||||
/// The live constraint is checked here and again by every later publication;
|
||||
/// attaching the control store itself does not acquire publication authority.
|
||||
pub fn open_existing_with_retention(
|
||||
root: impl Into<PathBuf>,
|
||||
retention: crate::retention::SessionRetentionStore,
|
||||
) -> Result<Self, StoreError> {
|
||||
let mut store = Self::open_read_only(root)?;
|
||||
if let Some(session) = *store.session_id.lock().unwrap() {
|
||||
retention.ensure_live(session)?;
|
||||
}
|
||||
store.retention = Some(retention);
|
||||
Ok(store)
|
||||
}
|
||||
|
||||
fn lock_publication(
|
||||
&self,
|
||||
session: SessionId,
|
||||
|
||||
Reference in New Issue
Block a user