fix: make Host updates simple and fast
GoodBuddy Agents / Validate Agent source (push) Canceled after 0s
GoodBuddy Agents / Build Linux arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build Linux x64 Agent (push) Canceled after 0s
GoodBuddy Agent Release / Authorize Agent release (push) Canceled after 0s
Cross-platform packages / Validate source (push) Canceled after 0s
GoodBuddy Agent Release / Build Linux arm64 compound package (push) Canceled after 0s
GoodBuddy Agent Release / Build Linux x64 compound package (push) Canceled after 0s
GoodBuddy Agent Release / Sign cumulative Agent catalog (push) Canceled after 0s
GoodBuddy Agent Release / Publish Agent to GitHub and OSS (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s

Host repair could fail while adopting the published OpenCode Runtime, then
repeat package and payload verification and carry durable metadata snapshots
for recovery. Host preparation now verifies each acquired compound archive
once, adopts signed Agent and Runtime metadata without rereading payload trees,
and retries failed work by cleaning staging and preparing fresh.

The desktop and Agent versions are advanced to 0.11.9 with the approved
bilingual release notes. Remote Projects remain a disabled-by-default technical
preview, Agent packages remain separate Linux x64/arm64 releases, and this
release has no LoongArch preview.

Release note: 修复 Host 更新采用失败,移除重复远端包体校验,并将中断恢复简化为清理暂存后重新准备。
This commit is contained in:
mesalogo
2026-08-29 22:31:39 +08:00
parent a99b90cc02
commit 85e14ca626
35 changed files with 1062 additions and 1951 deletions
+11 -26
View File
@@ -99,10 +99,6 @@ export interface AuthenticatedSshConnection {
candidate: SshRemotePackageCandidate,
options?: SshRemotePackageBootstrapOptions,
): Promise<SshRemotePackageBootstrapCommitResult>;
getRemotePackageBootstrapCommitStatus(
candidate: SshRemotePackageCandidate,
options?: SshRemotePackageBootstrapOptions,
): Promise<SshRemotePackageBootstrapCommitResult>;
cleanupRemotePackageBootstrap(
operationId: string,
options?: Pick<SshRemotePackageBootstrapOptions, "signal">,
@@ -134,7 +130,6 @@ export interface SshConnectionLease extends Omit<
| "dispose"
| "createRemotePackageUploadStaging"
| "prepareUploadedRemotePackageBootstrap"
| "getRemotePackageBootstrapCommitStatus"
> {
release(): void;
}
@@ -150,7 +145,6 @@ type InternalSshConnectionLease = SshConnectionLease &
AuthenticatedSshConnection,
| "createRemotePackageUploadStaging"
| "prepareUploadedRemotePackageBootstrap"
| "getRemotePackageBootstrapCommitStatus"
>;
type ClientLike = Pick<
@@ -290,6 +284,7 @@ function waitForSharedConnection(
export class Ssh2AuthenticatedConnection implements AuthenticatedSshConnection {
private usable = true;
private disposed = false;
private agentBootstrapProbe: AgentBootstrapProbeResult | undefined;
private constructor(
readonly identity: SshPoolConnectionIdentity,
@@ -298,6 +293,7 @@ export class Ssh2AuthenticatedConnection implements AuthenticatedSshConnection {
) {
const disconnected = (): void => {
this.usable = false;
this.agentBootstrapProbe = undefined;
};
this.client.on("close", disconnected);
this.client.on("end", disconnected);
@@ -423,6 +419,11 @@ export class Ssh2AuthenticatedConnection implements AuthenticatedSshConnection {
async runAgentBootstrapProbe(
signal?: AbortSignal,
): Promise<AgentBootstrapProbeResult> {
this.assertUsable();
signal?.throwIfAborted();
if (this.agentBootstrapProbe !== undefined) {
return this.agentBootstrapProbe;
}
const result = await this.runBoundedCommand(
AGENT_BOOTSTRAP_PROBE_COMMAND,
signal,
@@ -430,7 +431,9 @@ export class Ssh2AuthenticatedConnection implements AuthenticatedSshConnection {
if (result.exitCode !== 0 || result.stderr.length !== 0) {
throw new Error("Agent 启动探针执行失败");
}
return parseAgentBootstrapProbeOutput(result.stdout);
const probe = parseAgentBootstrapProbeOutput(result.stdout);
this.agentBootstrapProbe = probe;
return probe;
}
probeRemotePackageBootstrap(
@@ -471,13 +474,6 @@ export class Ssh2AuthenticatedConnection implements AuthenticatedSshConnection {
return this.remotePackageBootstrap().commit(candidate, options);
}
getRemotePackageBootstrapCommitStatus(
candidate: SshRemotePackageCandidate,
options?: SshRemotePackageBootstrapOptions,
): Promise<SshRemotePackageBootstrapCommitResult> {
return this.remotePackageBootstrap().commitStatus(candidate, options);
}
cleanupRemotePackageBootstrap(
operationId: string,
options?: Pick<SshRemotePackageBootstrapOptions, "signal">,
@@ -587,6 +583,7 @@ export class Ssh2AuthenticatedConnection implements AuthenticatedSshConnection {
}
this.disposed = true;
this.usable = false;
this.agentBootstrapProbe = undefined;
this.client.end();
this.client.destroy();
}
@@ -878,11 +875,6 @@ export class SshConnectionPool {
),
commit: (candidate, options) =>
lease.commitRemotePackageBootstrap(candidate, options),
commitStatus: (candidate, options) =>
bootstrapConnection.getRemotePackageBootstrapCommitStatus(
candidate,
options,
),
cleanup: (operationId, options) =>
lease.cleanupRemotePackageBootstrap(operationId, options),
release: () => lease.release(),
@@ -955,13 +947,6 @@ export class SshConnectionPool {
assertActive();
return connection.commitRemotePackageBootstrap(candidate, options);
},
getRemotePackageBootstrapCommitStatus: (candidate, options) => {
assertActive();
return connection.getRemotePackageBootstrapCommitStatus(
candidate,
options,
);
},
cleanupRemotePackageBootstrap: (operationId, options) => {
assertActive();
return connection.cleanupRemotePackageBootstrap(operationId, options);