fix: preserve engine activity and host state through 1.14 upgrades

This commit is contained in:
Agent Workbench Dev
2026-10-31 06:48:36 +08:00
parent 482acdeff1
commit 53e196af59
45 changed files with 17761 additions and 55 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ export class WorkerManager {
return record ? { ...record, usage: workerUsage(this.store, record), sessionStatus: this.store.session(record.sessionId).status } : { ...child, status: 'unprepared', usage: null };
}) })), worker: workerForProject(this.store, session.projectId) };
}
childActive(id) { return this.runtime.active.has(id) || !!this.runtime.checks?.isActive(id) || !!this.runtime.changeSets?.isActive(id) || !!this.workspaces?.isActive(id); }
childActive(id) { return this.runtime.active.has(id) || !!this.runtime.controlledEngines?.isActive(id) || !!this.runtime.checks?.isActive(id) || !!this.runtime.changeSets?.isActive(id) || !!this.workspaces?.isActive(id); }
isActive(sessionId) { return [...this.active.values()].some(value => value.sessionId === sessionId)
|| [...this.store.core.collaboration.values()].some(group => group.sessionId === sessionId && !COLLABORATION_CLOSED.has(group.status) && group.children.some(child => this.childActive(child.sessionId))); }
projectActive(projectId, excludeGroupId = null) {
@@ -529,7 +529,7 @@ export class WorkerManager {
const report = this.store.owned('artifact', delivery.reportArtifactId, session.id); this.store.artifactStore.read(report);
for (const child of group.children) await this.verifiedResult(group, child);
group.delivery = { jobId: delivery.id, commit: delivery.commit, checkJobId: check.id, reportArtifactId: report.id, reportSha256: report.sha256 };
group.status = 'completed'; group.finishedAt = at(); group.summary = '两个隔离子成果已审查合并,父工程重新检查通过并完成本地Git交付。';
group.status = 'completed'; group.finishedAt = at(); group.summary = group.children.length + ' 个隔离子成果已审查合并,父工程重新检查通过并完成本地Git交付。';
session.status = 'completed'; this.save(session, group, 'completed'); return group;
}
async observe(group) {