Test remote plugin archive verification end to end (#63527)

## Why

Verifier unit tests exercise the signing checks in isolation. Integration
tests cover how callers handle verification failures, including whether
they preserve an existing cache or write checkout files.

## What changed

Reuse the signed archive fixture with a mock backend to cover these paths:

- `plugin/install` accepts an unsigned archive without fetching signing keys.
- `plugin/reconcile` caches unsigned and valid signed releases, reuses a
  cached version without downloading it again, and preserves that version
  when a newer archive fails verification or signing keys are unavailable.
- `plugin/share/checkout` writes the checkout and local metadata after
  successful verification and leaves them absent for a tampered archive.
- The measurement reference cache rejects a tampered archive and accepts
  valid bytes on retry for the same plugin version.

Wire the tests into Bazel and give the new RPC suite the existing app-server
integration test concurrency limits in nextest.

GitOrigin-RevId: bfac72216ccee6c5a33fe08ef0081fad48ac842d
This commit is contained in:
Alex Ionescu
2026-11-24 03:55:44 +00:00
committed by copyberry
parent 94772d9fb6
commit 4e5cd2f07d
7 changed files with 618 additions and 2 deletions
+2 -2
View File
@@ -72,13 +72,13 @@ test-group = 'app_server_protocol_codegen'
[[profile.default.overrides]]
# These integration tests spawn a fresh app-server subprocess per case.
# Keep the library unit tests parallel.
filter = 'package(codex-app-server) & kind(test)'
filter = '(package(codex-app-server) | (package(=codex-plugin-archive-verification) & binary(=app_server))) & kind(test)'
test-group = 'app_server_integration'
[[profile.local.overrides]]
# Use up to four app-server subprocesses locally. The global nextest pool still
# limits this to the machine's logical CPU count.
filter = 'package(codex-app-server) & kind(test)'
filter = '(package(codex-app-server) | (package(=codex-plugin-archive-verification) & binary(=app_server))) & kind(test)'
test-group = 'app_server_integration_local'
[[profile.default.overrides]]