fix(runner): completely remove destructive git clean -fd rollback block
This commit is contained in:
12
vibn-agent-runner/dist/agent-session-runner.js
vendored
12
vibn-agent-runner/dist/agent-session-runner.js
vendored
@@ -619,18 +619,8 @@ async function runSessionAgent(config, task, ctx, opts) {
|
||||
await emit({
|
||||
ts: now(),
|
||||
type: "error",
|
||||
text: `❌ [Orchestrator] Bailed out! Task execution failed on: "${currentTask.text}". Rolling back modifications for this task to keep the repository green...`,
|
||||
text: `❌ [Orchestrator] Bailed out! Task execution failed on: "${currentTask.text}".`,
|
||||
});
|
||||
try {
|
||||
const { execSync } = require("child_process");
|
||||
execSync("git checkout -- . && git clean -fd", {
|
||||
cwd: repoRoot,
|
||||
stdio: "pipe",
|
||||
});
|
||||
}
|
||||
catch (rollbackErr) {
|
||||
console.error("Rollback failed:", rollbackErr.message || rollbackErr);
|
||||
}
|
||||
await patchSession(opts, {
|
||||
status: "failed",
|
||||
error: `Delegation loop halted at task: "${currentTask.text}"`,
|
||||
|
||||
@@ -770,19 +770,9 @@ export async function runSessionAgent(
|
||||
await emit({
|
||||
ts: now(),
|
||||
type: "error",
|
||||
text: `❌ [Orchestrator] Bailed out! Task execution failed on: "${currentTask.text}". Rolling back modifications for this task to keep the repository green...`,
|
||||
text: `❌ [Orchestrator] Bailed out! Task execution failed on: "${currentTask.text}".`,
|
||||
});
|
||||
|
||||
try {
|
||||
const { execSync } = require("child_process");
|
||||
execSync("git checkout -- . && git clean -fd", {
|
||||
cwd: repoRoot,
|
||||
stdio: "pipe",
|
||||
});
|
||||
} catch (rollbackErr: any) {
|
||||
console.error("Rollback failed:", rollbackErr.message || rollbackErr);
|
||||
}
|
||||
|
||||
await patchSession(opts, {
|
||||
status: "failed",
|
||||
error: `Delegation loop halted at task: "${currentTask.text}"`,
|
||||
|
||||
Reference in New Issue
Block a user