mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-26 18:35:33 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Paperclip Runner executes native ACPX providers using release-verified profiles, capability declarations, and provider packs > - Google Antigravity is wired across Runner, server routes, UI pickers, and remote provider packs, but its ACPX profile remained `qualificationStatus: "pending"` behind operator candidate grants > - The owner waived the paid-key `runner-e2e-paid` gate on 2026-11-25 so Google Antigravity can ship to staging and be tested there live > - This pull request flips the Google Antigravity ACPX profile from `pending` to `qualified` (profile revision 2), updates its capability declaration while keeping `recovery: "unverified"`, enables ordinary server/UI/pack admission without candidate grants, and updates tests and qualification docs honestly > - The benefit is that Google Antigravity enters the default `linux-x64` remote provider pack and ordinary board setup/execution flows on staging, while candidate-era v1 saved sessions are cleanly rejected and unverified recovery/paid-key evidence remains honestly labeled ## Linked Issues or Issue Description Refs #22923 Refs #22935 (merge after #22935 `fix/per-turn-harness-on-warm-environment`) **What existing behavior does this improve?** Google Antigravity native ACPX profile qualification, remote provider-pack assembly, and Paperclip Runner agent setup/admission across `packages/paperclip-runner`, `packages/adapter-utils`, `packages/adapters/codex-local`, `server`, `ui`, and `tests/runner-e2e`. **Subsystem affected** Cross-cutting (multiple of the above) **Current behavior** `packages/paperclip-runner/acpx-profiles.json` declares `antigravity` at `agentProfileVersion: 1` with `qualificationStatus: "pending"`. `PAPERCLIP_RUNNER_ACPX_PROFILES` marks `antigravity.qualified = false`, remote `linux-x64` provider packs exclude Antigravity unless built with `--candidate-providers=antigravity`, and server/Runner admission requires a short-lived operator candidate grant. **Proposed behavior** Remove `qualificationStatus: "pending"` from `antigravity` and bump `agentProfileVersion` from `1` to `2` so candidate-era v1 saved state is refused permanently as `provider_state_incompatible`. Flip `PAPERCLIP_RUNNER_ACPX_PROFILES.antigravity.qualified` to `true`, mark `ACPX_CAPABILITY_PROFILES.antigravity` as `qualified` with `models: "explicit-provider-verified"` while keeping `recovery: "unverified"`, require an explicit provider model in config builders and server validation, and admit qualified Antigravity through the ordinary ACPX path without candidate grants. **Reason and benefit** Unblocks staging deployment and live testing of Google Antigravity under the 2026-11-25 owner waiver of `runner-e2e-paid`, including default `linux-x64` provider pack inclusion (local `darwin-arm64` continues to use `paperclipai runtime setup antigravity`). **Breaking changes** Any candidate-era v1 Google Antigravity saved session state is intentionally refused as `provider_state_incompatible` due to the `agentProfileVersion` bump (`1` -> `2`). ## What Changed - **Runner profile & generated contracts**: - `packages/paperclip-runner/acpx-profiles.json`: removed `qualificationStatus: "pending"` on `antigravity` and bumped `agentProfileVersion` from `1` to `2`. - Regenerated `packages/paperclip-runner/src/drivers/acpx/generated-profiles.ts` and `packages/paperclip-runner/runner/crates/runner-core/src/generated_acpx_profiles.rs` (`qualification_pending: false`). - `packages/paperclip-runner/src/drivers/acpx/capability-profiles.ts`: set `antigravity.qualification` to `"qualified"` and `models` to `"explicit-provider-verified"` when released; kept `recovery: "unverified"` (never claiming `session-load` without live proof). - **Adapter utils & config builder**: - `packages/adapter-utils/src/paperclip-runner-permissions.ts`: flipped `PAPERCLIP_RUNNER_ACPX_PROFILES.antigravity.qualified` to `true`. - `packages/adapters/codex-local/src/ui/build-config.ts`: added `"antigravity"` to the explicit-provider-model validation check. - **Server admission & routes**: - `server/src/services/native-runtime/provider-profile.ts`: added `antigravity: null` to `DEFAULT_ACPX_RUNNER_MODELS`, included `antigravity` in explicit-model-required and qualified ACPX checks. - `server/src/services/native-runtime/acpx-qualification.ts`: short-circuited `resolveAntigravityCandidateAdmission` to return `undefined` once `qualificationStatus !== "pending"`. - `server/src/routes/agents.ts`: allowed qualified `antigravity` without `experimental.enableNativeRunner` (matching Copilot and UI rules), preserved empty model on provisional setup draft transitions, and allowed `setupOnly` draft creation before model selection. - **Tests**: - Updated Runner TS/Rust tests (`profile-compatibility.test.ts`, `candidate-provider-pack.test.mjs`, `release-provider-pack.test.mjs`, `antigravity-provider-pack-smoke.test.mjs`, `candidate-admission*.test.ts`, `antigravity-models.test.ts`, `acpx-runtime-sidecar.test.ts`, `runner-core` Rust unit/integration tests). - Updated `@paperclipai/adapter-utils`, `@paperclipai/adapter-codex-local`, `@paperclipai/server`, `@paperclipai/ui`, and `tests/runner-e2e` (`catalog.test.ts`, `controller-rolling-deployment.test.ts`) tests for qualified Antigravity behavior. - **Documentation & maps**: - `doc/plans/2026-11-22-antigravity-qualification.md`, `doc/plans/2026-11-25-antigravity-cloud-rollout.md`, and `packages/paperclip-runner/README.md`: recorded the 2026-11-25 owner waiver of `runner-e2e-paid` for staging verification while keeping all `NOT RUN` paid-key rows honestly marked `NOT RUN` / deferred. - Minimal in-place accuracy updates in `maps/feature-map/instance-operations.md` and `maps/agent-access-map/instance-operations.md` (`node scripts/check-maps.mjs` passing). ## Verification - `pnpm --filter @paperclipai/paperclip-runner build` (TS + Rust release binary + `check:acpx-profiles`, `generate-antigravity-models --check`, `check:protocol-types`, capability/attestation/traceability/replay-golden checks) — passed. - `pnpm --filter @paperclipai/paperclip-runner test:typescript:prep` (468 tests) and focused Runner Vitest suites (`acpx-runtime-sidecar.test.ts` 127/127, `antigravity-models.test.ts` 22/22, `candidate-admission*.test.ts`, `profile-compatibility.test.ts`, `runnerd-codex-transport-antigravity-release.test.ts`, pack script tests) — passed. - Rust tests in `packages/paperclip-runner/runner`: `cargo fmt --all -- --check`, `paperclip_process_table` (3/3), `paperclip_runner_core --lib` (670/670, skipping macOS-incompatible `task_memory::tests::monitor_*`), `paperclip-runnerd` bin tests (11/11), and `acpx_provider_resolutions` (12/12) — passed. - `packages/adapter-utils` (`paperclip-runner-permissions.test.ts` 50/50) and `packages/adapters/codex-local` (`build-config.test.ts` 64/64) — passed. - `scripts/__tests__/prepare-runner-release-image.test.mjs`, `node scripts/check-maps.mjs`, and `node tests/runner-e2e/source-sdk-public-inputs.mjs <HEAD> --check` — passed. - Server suites: `adapter-routes.test.ts` (36/36), `registry.test.ts` (67/67), `agent-adapter-validation-routes.test.ts` (`Antigravity|YAML`), `antigravity-connection-probe.test.ts`, `antigravity-save-refusal.test.ts`, `antigravity-release.test.ts` (10/10), `acpx-qualification.test.ts` (39/39), `antigravity-candidate-admission.test.ts`, `remote-provider-pack.test.ts` (60/60), `native-session-executor.test.ts` (`Antigravity|provider pack`), `plugin-runner-credentials.test.ts`, `plugin-runner-credential-names.test.ts`, `antigravity-plugin-task-credential-writeback.test.ts` — passed. - CLI (`runtime.test.ts`, `runtime-setup.test.ts` 15/15), UI (6 Antigravity/setup suites 58/58 + `AgentConfigForm.render.test.tsx`), and `tests/runner-e2e` (`catalog.test.ts`, `controller-rolling-deployment.test.ts`, `antigravity-qualification.test.ts`, `eval-gateway-drain.test.ts`, and 690+ unit files) — passed. - Typechecks: `@paperclipai/adapter-utils`, `@paperclipai/adapter-codex-local`, `@paperclipai/paperclip-runner`, `@paperclipai/server` (all 7 layers), `@paperclipai/ui`, and `pnpm test:e2e:runner:typecheck` — all passed. - **Not run locally**: Live paid-key `runner-e2e` suites (`antigravity-qualification`, `antigravity-model-lineup`, `antigravity-agent-journey`) were waived by the owner on 2026-11-25 to enable staging testing and remain marked `NOT RUN` / deferred in the qualification docs. Rust `task_memory::tests::monitor_*` cgroup tests require Linux CI. ## Risks - **Merge sequencing**: Merge after #22935 (`fix/per-turn-harness-on-warm-environment`) so warm environments keep Antigravity on its per-turn lifecycle. - **Deferred live qualification**: Paid-key `antigravity-qualification` cells have not run in CI; `ACPX_CAPABILITY_PROFILES.antigravity.recovery` remains `"unverified"` until live multi-turn and restart continuity are verified on staging. - **Profile version reset**: Bumping `agentProfileVersion` from `1` to `2` intentionally rejects any candidate-era v1 saved sessions as `provider_state_incompatible`; new runs start a clean replacement conversation in the same workspace. - **Remote provider pack targets**: Remote provider packs intentionally target `linux-x64` (Core Docker images and Linux sandboxes); local `darwin-arm64` hosts continue to provision via `paperclipai runtime setup antigravity`. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - Google Gemini (Antigravity agent with tool use and code execution) ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
93 lines
6.2 KiB
TypeScript
93 lines
6.2 KiB
TypeScript
import { QUALIFIED_ACPX_PROFILES } from "../../packages/paperclip-runner/src/drivers/acpx/qualified-profiles.js";
|
|
import { describe, expect, it } from "vitest";
|
|
import { rollController, validControllerRollingDeploymentReceipt } from "./controller-rolling-deployment.js";
|
|
import { validControllerReplacementReceipt } from "./controller-replacement.js";
|
|
import { controllerOutageForExecution, validControllerOutageReceipt } from "./controller-outage.js";
|
|
import { parseRunnerSelectors, selectRunnerExecutions } from "./selectors.js";
|
|
import { runnerProfiles, extendedHarnessProfiles, kimiRunnerProfile, antigravityRunnerProfile, runnerSuites } from "./catalog.js";
|
|
|
|
function fixture() {
|
|
const order: string[] = [];
|
|
return { order, input: { requestId: "rolling-1", previousPid: 100,
|
|
start: async () => { order.push("start-B"); return { pid: 200 }; },
|
|
waitForReady: async () => { order.push("B-ready"); },
|
|
beforeHandoff: async () => { order.push("observe-A"); },
|
|
switchTraffic: () => { order.push("route-B"); },
|
|
stopPrevious: async () => { order.push("stop-A"); },
|
|
afterPreviousStopped: async () => { order.push("observe-A-stopped"); },
|
|
deletePreviousHome: async () => { order.push("delete-home-A"); },
|
|
afterHandoff: async () => { order.push("observe-recovery"); },
|
|
cancelled: () => false, record: async () => {},
|
|
} };
|
|
}
|
|
|
|
describe("rolling controller qualification", () => {
|
|
it("moves traffic only after readiness, then removes all predecessor state", async () => {
|
|
const f = fixture();
|
|
const receipt = await rollController(f.input);
|
|
expect(f.order).toEqual(["start-B", "B-ready", "observe-A", "route-B", "stop-A", "observe-A-stopped", "delete-home-A", "observe-recovery"]);
|
|
expect(validControllerRollingDeploymentReceipt(receipt)).toBe(false); // A process receipt alone is not availability proof.
|
|
receipt.probes = { reads: 10, writes: 3, verifiedWrites: 3, failures: [] };
|
|
expect(validControllerReplacementReceipt(receipt)).toBe(true);
|
|
expect(validControllerOutageReceipt(receipt)).toBe(false);
|
|
for (const changed of [
|
|
{ previousHomeRemoved: false }, { cacheDiscarded: false }, { replacementPid: 100 }, { gracefulShutdown: false },
|
|
{ trafficSwitchedAfterMs: -1 }, { readyAfterMs: receipt.stoppedAfterMs! + 1 },
|
|
{ probes: { reads: 10, writes: 3, verifiedWrites: 2, failures: [] } },
|
|
{ probes: { reads: 10, writes: 3, verifiedWrites: 3, failures: ["502"] } },
|
|
]) expect(validControllerReplacementReceipt({ ...receipt, ...changed })).toBe(false);
|
|
expect(validControllerRollingDeploymentReceipt(receipt, "other-request")).toBe(false);
|
|
});
|
|
it("keeps A serving when B never becomes ready", async () => {
|
|
const f = fixture(); f.input.waitForReady = async () => { throw new Error("B unready"); };
|
|
await expect(rollController(f.input)).rejects.toThrow("B unready");
|
|
expect(f.order).toEqual(["start-B"]);
|
|
});
|
|
it("rejects forced predecessor cleanup before deleting its home or observing recovery", async () => {
|
|
const f = fixture(); f.input.stopPrevious = async () => { throw new Error("forced shutdown"); };
|
|
await expect(rollController(f.input)).rejects.toThrow("forced shutdown");
|
|
expect(f.order).toEqual(["start-B", "B-ready", "observe-A", "route-B"]);
|
|
});
|
|
it("keeps the original outage contract separate from the explicit rolling cell", () => {
|
|
const [rolling] = selectRunnerExecutions(parseRunnerSelectors(["--suite", "rolling-web-deployment"]));
|
|
expect(rolling).toBeDefined();
|
|
expect(rolling!.suite.manualOnly).toBe(true);
|
|
expect(rolling!.suite.definitionMetadata?.retainedControllerContinuation).toBe(true);
|
|
expect(controllerOutageForExecution(rolling!, {})).toBeUndefined();
|
|
const [outage] = selectRunnerExecutions(parseRunnerSelectors(["--suite", "remote-workspace-storage"]));
|
|
expect(controllerOutageForExecution(outage!, {})).toEqual({ signal: "SIGKILL", holdMs: 300_000 });
|
|
});
|
|
it("covers every qualified native profile per turn and each supported warm profile", () => {
|
|
const executions = ["rolling-web-deployment", "rolling-web-deployment-warm"]
|
|
.flatMap(suite => selectRunnerExecutions(parseRunnerSelectors(["--suite", suite])));
|
|
const native = [...runnerProfiles, ...extendedHarnessProfiles, kimiRunnerProfile, antigravityRunnerProfile]
|
|
.filter(profile => profile.generation === "native" && profile.supportedEnvironments.includes("daytona")
|
|
&& (!profile.qualificationCandidate || QUALIFIED_ACPX_PROFILES[profile.qualificationCandidate].qualificationStatus !== "pending"));
|
|
const kind = (profile: (typeof native)[number]) => {
|
|
const provider = profile.expectedRuntimeMetadata.provider;
|
|
const harness = "acpxAgent" in profile ? profile.acpxAgent
|
|
: provider === "acpx" && profile.provider !== "acpx" ? profile.provider : "";
|
|
return `${provider}:${harness}`;
|
|
};
|
|
const registeredKinds = new Set(runnerSuites.flatMap(suite => suite.profiles)
|
|
.filter(profile => profile.generation === "native" && profile.supportedEnvironments.includes("daytona")
|
|
&& (!profile.qualificationCandidate || QUALIFIED_ACPX_PROFILES[profile.qualificationCandidate].qualificationStatus !== "pending"))
|
|
.map(kind));
|
|
expect(new Set(native.map(kind))).toEqual(registeredKinds);
|
|
const warmIds = new Set(["runner-codex", "runner-acpx-copilot"]);
|
|
expect(new Set(runnerSuites.find(suite => suite.id === "rolling-web-deployment-warm")!.profiles.map(profile => profile.id))).toEqual(warmIds);
|
|
for (const profile of native) {
|
|
const cells = executions.filter(execution => execution.profile.id === profile.id);
|
|
expect(cells.filter(cell => cell.suite.id === "rolling-web-deployment")).toHaveLength(1);
|
|
expect(cells).toHaveLength(warmIds.has(profile.id) ? 2 : 1);
|
|
expect(cells.every(cell => !cell.profile.qualificationCandidate)).toBe(true);
|
|
expect(new Set(cells.map(cell => cell.environment.configurationKey ?? "per_turn")))
|
|
.toEqual(new Set(warmIds.has(profile.id) ? ["per_turn", "warm-controller-outage-v1"] : ["per_turn"]));
|
|
}
|
|
expect(executions.every(execution => execution.suite.definitionMetadata?.retainedControllerContinuation === true)).toBe(true);
|
|
for (const execution of executions) {
|
|
expect(controllerOutageForExecution(execution, {})).toBeUndefined();
|
|
}
|
|
});
|
|
});
|