Files
PaperClipAI/server/src/__tests__
DottaandPaperclip c5107f12fe feat(runner): flip Google Antigravity ACPX profile to qualified (#22939)
## 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>
2026-11-25 09:02:06 -06:00
..
…

Server Tests

Server tests that need a real PostgreSQL process must use ./helpers/embedded-postgres.ts instead of constructing embedded-postgres directly.

The shared helper creates a throwaway data directory and a reserved-safe loopback port for each test database. This protects the live Paperclip control-plane Postgres from server vitest runs; see PAP-2033 for the incident that introduced this guard.