Marketplace: sync projects into their containers on start

Waits for the entrypoint, uploads the payload and the sync script, runs it
as claude and stores its report (payload skips merged in). The start hook
spawns the sync in the background; a per-project lock serialises syncs of
one project (pre-flight F11b).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 09:30:58 -07:00
co-authored by Claude Opus 5.5
parent 1168a0c56b
commit 310d55eb37
4 changed files with 442 additions and 6 deletions
@@ -1449,6 +1449,16 @@ async fn start_project_container_locked(
log::warn!("Failed to sync AWS credentials for project {}: {}", project.id, e);
}
// Marketplace items sync in the background — see `spawn_project_sync`
// for why the start never waits on it or fails because of it.
crate::marketplace::spawn_project_sync(
app_handle.clone(),
state.marketplace.clone(),
state.settings_store.get(),
project.clone(),
container_id.clone(),
);
Ok(container_id)
}.await;