mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-29 15:52:36 +01:00
fix(antigravity): a refused /swarm waits for the user instead of retrying
Live proof found a refused swarm (after the automatic attempt cap) failing as adapter_failed, so transient retry and continuation recovery started a new run every minute or two, each refusing again. A swarm refusal now settles with its own non-retryable code, antigravity_swarm_unavailable, which bounded retry, continuation recovery and the issue-comment policy all leave for the user (send /swarm again, or Retry). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ba292200a6
commit
53b9d7440d
8 files changed
+58
-1
No files matched your search
@@ -406,6 +406,31 @@ describe("a Google Antigravity session saved by the pending candidate", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("a Google Antigravity swarm and the task's ordinary session", () => {
|
||||
// A swarm runs on the Antigravity CLI in a fresh session every time; the
|
||||
// ordinary route cannot reopen the CLI's conversation, nor the CLI the
|
||||
// ordinary one. Neither direction resumes: the next run starts fresh in the same workspace.
|
||||
const antigravity = (runId: string, swarmRequest?: string) => buildNativeExecutionInput({
|
||||
companyId, runId,
|
||||
issue: { id: issueId, identifier: "DOT-2", title: "Test", description: null, workMode: "standard" },
|
||||
taskPrompt: "Only the current turn", agentId,
|
||||
workspace: { id: runId, cwd: "/workspace", repoUrl: null, repoRef: null, branchName: null },
|
||||
normalizedSessionId, provider: "acpx", acpxAgent: "antigravity", model: "gemini-3.8-flash-low",
|
||||
acpxPermissionMode: "approve-all", completionContract: execution(runId).completionContract,
|
||||
runtimeContext: nativeRuntimeContextFixture(),
|
||||
...(swarmRequest === undefined ? {} : { antigravitySwarmRequest: swarmRequest }),
|
||||
});
|
||||
const savedBy = (saved: ReturnType<typeof antigravity>) =>
|
||||
({ ...previousRun(), runnerProfileJson: { ...previousRun().runnerProfileJson, nativeExecutionInput: saved } });
|
||||
|
||||
it("starts a swarm in a fresh session after an ordinary run, and an ordinary run fresh after a swarm", () => {
|
||||
expect(rebindNativeSessionCheckpoint({ previousRun: savedBy(antigravity(previousRunId)), currentExecution: antigravity(currentRunId) })).not.toBeNull();
|
||||
expect(rebindNativeSessionCheckpoint({ previousRun: savedBy(antigravity(previousRunId)), currentExecution: antigravity(currentRunId, "write a.txt") })).toBeNull();
|
||||
expect(rebindNativeSessionCheckpoint({ previousRun: savedBy(antigravity(previousRunId, "write a.txt")), currentExecution: antigravity(currentRunId) })).toBeNull();
|
||||
expect(rebindNativeSessionCheckpoint({ previousRun: savedBy(antigravity(previousRunId, "write a.txt")), currentExecution: antigravity(currentRunId, "write b.txt") })).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("a source whose provider state was not saved after its result was accepted", () => {
|
||||
const unsaved = { [NATIVE_PROVIDER_STATE_UNSAVED_KEY]: { code: NATIVE_PROVIDER_STATE_INCOMPATIBLE,
|
||||
reason: "harness_backup_not_saved", recordedAt: "2026-11-11T00:00:00.000Z" } };
|
||||
|
||||
Reference in new issue
Block a user