apply_commit handles first-time spawns, request_spawn deprecated
This commit is contained in:
parent
6974634326
commit
66f1568e8f
6 changed files with 166 additions and 34 deletions
|
|
@ -561,10 +561,13 @@ async fn submit_apply_commit(
|
|||
);
|
||||
}
|
||||
if !applied_dir.join(".git").exists() {
|
||||
anyhow::bail!(
|
||||
"applied repo at {} is uninitialised — spawn the agent first",
|
||||
applied_dir.display()
|
||||
);
|
||||
// First deploy: seed the applied repo from proposed so we can plant
|
||||
// the proposal/<id> tag below. The applied repo starts at the
|
||||
// template commit (deployed/0); run_apply_commit will fast-forward
|
||||
// main to the manager's commit on approval and create the container.
|
||||
lifecycle::setup_applied(&applied_dir, Some(&proposed_dir), agent)
|
||||
.await
|
||||
.context("seed applied repo for first spawn")?;
|
||||
}
|
||||
let id = coord
|
||||
.approvals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue