test(evals): pin native credential delivery and worker receipt fixes (#19042)

## Thinking Path

> - Paperclip must deliver agent work through ordinary human controls.
> - The latest three-case run retained three failed originals.
> - The personal value was saved, but the native OpenCode child did not
receive the configured task environment.
> - A worker proof also relied on legacy process identity fields outside
that environment contract.
> - Timeline and credential checks had independent review defects that
could reject truthful outcomes or miss unsafe instructions.
> - This PR pins the reviewed fixes together and keeps all prior grades
unchanged.
> - A new AWS measurement must still prove the real outcome.

## Linked Issues or Issue Description

Refs #18963, #18967, #18968, #18971, #18972, #18977, #19027, #19031.
Follows merged #18995. This is the next infrastructure pin, not another
core implementation PR.

The latest launch 2657 retained FAILED originals for timeline,
approved-tool replay and personal secret. The personal journey reached
secure UI save and a worker wake, but the worker reported no credential
and made no endpoint call. These are failed attempts, not new passes.
Six of the selected ten cases have independent passes across prior
attempts. The uniform final ten and the full catalog remain unqualified.
No old result was regraded.

## What Changed

- Pin immutable candidate `c6cc59282a45ed3c79880a220f7f60aa3ac1d6a4` on
`codex/chat-credential-destination-contract-candidate-20261104`.
- Retain the frozen candidate baseline. Add the accepted failed-action
completion feedback hint, canonical configured environment delivery to
OpenCode, actual native worker output receipt checks, timeline
attribution controls, and credential clause safety checks. The feedback
change leaves the existing acceptance gate in place.
- Declare exactly seven oracle-version changes: timeline v5 to v6;
personal v5 to v6; company v4 to v5; secure API key, least-scope
delivery, secret proposal and vault reference each external v1 to v2.
The four external cases have explicit overrides; the shared default is
unchanged.
- Sync the manifest rows, explicit changed-field records, descriptor
snapshot and expected target. Preserve all 244 identities, original
queries, human/native counts, clocks, model, profile, launcher bytes,
privacy limits and the existing 196/244 qualification gate.
- Include the reviewed retry cancellation readiness fixture repair from
`815d47e4b5d7756367d2c5e2da656b640273eac2` in this infrastructure PR
only. It awaits the first scheduled batch before polling its state. Its
production behavior and assertions are unchanged. This test repair is
absent from the model candidate.
- Keep the core PRs, including #19027 and #19031, unmerged. A normal
merge of this pin does not merge those PRs.

## Verification

- Pin-local checks: all 189 existing manifest, TestOps API, adapter,
reconciliation and streaming controls passed. The reviewed 815 fixture
repair passed its owning real-PG control (one selected test). A
temporary delayed-first-batch control failed with the old observer and
passed with the new observer. Batch limits, assertions, drain wait and
overall budget are unchanged. The original CI cause remains unknown.
- Final candidate: 89 credential/receipt consumer controls passed. The
exact Runner TypeScript build, 68 driver controls and one owning
failed-action PG control passed before the later helper-only changes.
Their runtime inputs remain byte-identical; those results are reused
explicitly, not claimed as new executions on every source commit.
- Real pinned OpenCode 1.18.34 executed a canned local-provider bash
call. Synthetic `PUBLISHING_API_KEY` reached its child in a 2.89-second
passing control with zero paid provider calls. This proves
server-to-bash inheritance; driver spawn controls cover the preceding
projection boundary. Actual AWS secure-entry, worker delivery and
privacy acceptance remain pending.
- **The latest local candidate declaration loader is NOT GREEN.** It
exceeded its unchanged 30-second limit in both a combined run and an
isolated run. Five other declaration/contract checks passed. Both
failures remain recorded. No timeout was widened and no further retry
occurred. Descriptor and definition modules match the earlier passing
5aa source; only the transitive credential helper changed. Prior
242-declaration evidence supports unchanged definitions only, not a
claim that these failed executions passed.
- The snapshot matches the candidate and exactly seven oracle-version
leaves differ from source 249. All 244 identities, queries, run/human
counts, clocks, model, profile, launcher and privacy limits remain
unchanged. The SDK guard reports 506 unchanged inputs, unchanged runtime
pins and registry
`efa70621e9fb42aa185f7ee616a1a726aa3eccb367e67e28817cedf26ef2ade8`. The
driver is outside those SDK roots. No SDK renewal occurred.
Reporting-lock and whitespace checks passed.
- Genuine exact-head reviews: source 19e3 is 5/5 with no unresolved
threads; current pin 988 is 5/5 with no unresolved threads. The prior
pin 4/5 and resolved P1 remain historical. Current exact-head normal CI
41917215227 completed successfully: 48 successful jobs and one selector
skip, including final verify job 126888275415. Windows 41917215440
succeeded. The full PR rollup is 56 successes and three intentional
skips, with no pending or failed checks. Older green heads do not
qualify this head. Paperclip has only an earlier-head 5/5 assessment,
which is stale for this head and receives no current assessment credit.
- Six of ten cases have independent passes across prior attempts. Launch
2657 retains three FAILED originals; no grade was changed. The next
measurement is the exact uniform ten, cap eight and zero automatic
retries. No uniform-ten or full-catalog acceptance is claimed.
- The local-tests checkbox below covers only the 189 pin controls and
owning fixture control. It does not claim all candidate or repository
tests are green. Full local repository checks were not repeated for this
infrastructure diff. Core PRs remain unmerged. No model call, eval
dispatch, private archive read, fleet change or merge occurred for this
update.

## Risks

Environment delivery crosses a real provider process boundary, so secret
isolation remains part of the next actual AWS acceptance. A worker
receipt must match an actual successful native run and key-authenticated
endpoint call; a copied boolean does not qualify. Oracle safety and
attribution changes can alter acceptance, so balanced negatives remain
required. No current uniform-ten pass is claimed. Normal CI and genuine
exact-head review must finish before protected infrastructure merge.
Root owns the next TestOps Submit, with the original model, limits, zero
automatic retries and maximum eight concurrent case chains.

## Model Used

OpenAI `gpt-6.1-sol` through Codex. Capabilities used: source analysis,
mechanical integration, local code execution and PR preparation. The
host does not expose the context-window limit. The evaluated model
remains OpenCode/OpenRouter `deepseek/deepseek-v4.1-flash-1017`.

## 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>
This commit is contained in:
DottaandPaperclip authored and GitHub committed 2026-11-04 15:52:12 -06:00
1 parent c6cb7e2a2d
commit 52b4b3ccd7
4 files changed
+97 -28

No files matched your search

@@ -579,7 +579,10 @@ describeEmbeddedPostgres("issue scheduled retry routes", () => {
const states = () => db.select({ companyId: heartbeatRuns.companyId, status: heartbeatRuns.status }).from(heartbeatRuns)
.where(inArray(heartbeatRuns.id, work.map(row => row.id)));
clock();
const coordinator = createDeliveryWorkCoordinator({ owner: db, canRun: () => true, onError: error => { throw error; } });
let completeFirstPass!: (result: { error: unknown } | undefined) => void;
const firstPassCompleted = new Promise<{ error: unknown } | undefined>(resolve => { completeFirstPass = resolve; });
const coordinator = createDeliveryWorkCoordinator({ owner: db, canRun: () => true,
onError: error => { completeFirstPass({ error }); throw error; } });
const register = coordinator.register.bind(coordinator);
let initial: Awaited<ReturnType<typeof states>> | undefined;
let releaseFirstPass!: () => void;
@@ -592,6 +595,7 @@ describeEmbeddedPostgres("issue scheduled retry routes", () => {
const cancelled = (await states()).filter(row => row.status === "cancelled");
if (cancelled.length === 0) return result;
initial = cancelled;
completeFirstPass(undefined);
await firstPassHeld;
return result;
},
@@ -603,7 +607,8 @@ describeEmbeddedPostgres("issue scheduled retry routes", () => {
work.push({ id: earlierId });
await writeIntent({ companyId: a.companyId, retryRunId: earlierId });
await vi.advanceTimersByTimeAsync(1000);
await expect.poll(() => initial).toBeDefined();
const firstPass = await firstPassCompleted;
if (firstPass) throw firstPass.error;
expect(initial).toHaveLength(20);
expect(new Set(initial!.map(row => row.companyId)).size).toBe(2);
releaseFirstPass();
@@ -1,6 +1,6 @@
{
"schema": "paperclip.chat-full-catalog-testops-manifest/v1",
"targetSha": "249b487a2d2451763913038cc009f7090580d1f1",
"targetSha": "c6cc59282a45ed3c79880a220f7f60aa3ac1d6a4",
"metadataSourceSha": "de0941835cc8f0d01c982574ee258e110babdbeb",
"profile": "runner-opencode",
"model": "openrouter/deepseek/deepseek-v4.1-flash-1017",
@@ -172,7 +172,7 @@
"baseTargetSha": "3b66c3c144360ddf32714a0742fd774b8ceafb16",
"previousTargetSha": "ab2019e976076ec0eb60b026844f3d9211cb0208",
"definitionSourceSha": "de0941835cc8f0d01c982574ee258e110babdbeb",
"candidateDescriptorSha256": "e9c59dade7aeffd5b23c05b66bf52ed11988a897d8a160e75d0435052733abf6",
"candidateDescriptorSha256": "f83a36c8aff7c933dd6b2d9f9613c1c5778e9bf742a1098c1e1abe5d9a3349b4",
"changedDefinitionFiles": [
{
"path": "tests/runner-e2e/chat-scenarios/companies.yaml",
@@ -232,7 +232,7 @@
"key": "activity.work-timeline",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.internal.v1",
"current": "paperclip.chat-catalog.work-timeline.v5"
"current": "paperclip.chat-catalog.work-timeline.v6"
},
{
"key": "activity.work-timeline",
@@ -635,7 +635,7 @@
"key": "secrets.configure-company-secret",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.company-secret-controller-baseline.v4"
"current": "paperclip.chat-catalog.company-secret-controller-baseline.v5"
},
{
"key": "secrets.personal-secret",
@@ -694,7 +694,7 @@
"key": "secrets.personal-secret",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.personal-secret.v5"
"current": "paperclip.chat-catalog.personal-secret.v6"
},
{
"key": "skills.author-skill",
@@ -899,6 +899,30 @@
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.team-configure.v2"
},
{
"key": "connection-setup.secure-api-key",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.external.v2"
},
{
"key": "secrets.least-scope-delivery",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.external.v2"
},
{
"key": "secrets.secret-proposal",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.external.v2"
},
{
"key": "secrets.vault-reference",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.external.v2"
}
],
"candidateDescriptorSnapshot": "fixtures/chat-repair-candidate-descriptors.json",
@@ -938,7 +962,7 @@
"key": "activity.work-timeline",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.internal.v1",
"current": "paperclip.chat-catalog.work-timeline.v5"
"current": "paperclip.chat-catalog.work-timeline.v6"
},
{
"key": "agents.choose-primary",
@@ -1311,7 +1335,7 @@
"key": "secrets.configure-company-secret",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.company-secret-controller-baseline.v4"
"current": "paperclip.chat-catalog.company-secret-controller-baseline.v5"
},
{
"key": "secrets.personal-secret",
@@ -1381,7 +1405,7 @@
"key": "secrets.personal-secret",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.personal-secret.v5"
"current": "paperclip.chat-catalog.personal-secret.v6"
},
{
"key": "skills.author-skill",
@@ -1630,6 +1654,30 @@
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.team-configure.v2"
},
{
"key": "connection-setup.secure-api-key",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.external.v2"
},
{
"key": "secrets.least-scope-delivery",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.external.v2"
},
{
"key": "secrets.secret-proposal",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.external.v2"
},
{
"key": "secrets.vault-reference",
"field": "oracleVersion",
"previous": "paperclip.chat-catalog.external.v1",
"current": "paperclip.chat-catalog.external.v2"
}
],
"runtimeConditions": {
@@ -1745,7 +1793,7 @@
},
"candidateLauncherSnapshot": {
"path": "fixtures/chat-repair-candidate-launcher.txt",
"targetSha": "249b487a2d2451763913038cc009f7090580d1f1",
"targetSha": "c6cc59282a45ed3c79880a220f7f60aa3ac1d6a4",
"sourcePath": "tests/runner-e2e/launch.ts",
"gitBlobOid": "dba1467e211611f37937e9e1fc4c0c5be4329cbc"
}
@@ -2288,7 +2336,7 @@
"activity/timeline"
],
"checks": null,
"oracleVersion": "paperclip.chat-catalog.work-timeline.v5",
"oracleVersion": "paperclip.chat-catalog.work-timeline.v6",
"sourceFiles": [
"chat-catalog-domains/internal-definition.ts",
"chat-catalog-domains/internal-support.ts",
@@ -6510,7 +6558,7 @@
"connection-setup/credentials"
],
"checks": null,
"oracleVersion": "paperclip.chat-catalog.external.v1",
"oracleVersion": "paperclip.chat-catalog.external.v2",
"sourceFiles": [
"chat-catalog-domains/external-secure-key.ts",
"chat-query-attachments.ts",
@@ -11080,7 +11128,7 @@
"connection-setup/credentials"
],
"checks": null,
"oracleVersion": "paperclip.chat-catalog.company-secret-controller-baseline.v4",
"oracleVersion": "paperclip.chat-catalog.company-secret-controller-baseline.v5",
"sourceFiles": [
"chat-catalog-domains/external-company-secret.ts",
"chat-catalog-domains/external-secret-question.ts",
@@ -11132,7 +11180,7 @@
"secrets/runtime-delivery"
],
"checks": null,
"oracleVersion": "paperclip.chat-catalog.external.v1",
"oracleVersion": "paperclip.chat-catalog.external.v2",
"sourceFiles": [
"chat-catalog-domains/external-secret-delivery.ts",
"chat-catalog-domains/external-secret-endpoint.ts",
@@ -11196,7 +11244,7 @@
"secrets/user-secrets"
],
"checks": null,
"oracleVersion": "paperclip.chat-catalog.personal-secret.v5",
"oracleVersion": "paperclip.chat-catalog.personal-secret.v6",
"sourceFiles": [
"chat-catalog-domains/external-personal-secret.ts",
"chat-catalog-domains/external-secret-question.ts",
@@ -11257,7 +11305,7 @@
"secrets/proposals"
],
"checks": null,
"oracleVersion": "paperclip.chat-catalog.external.v1",
"oracleVersion": "paperclip.chat-catalog.external.v2",
"sourceFiles": [
"chat-catalog-domains/external-secret-proposal.ts",
"chat-catalog-domains/external-secret-scan.ts",
@@ -11320,7 +11368,7 @@
"secrets/vault-import"
],
"checks": null,
"oracleVersion": "paperclip.chat-catalog.external.v1",
"oracleVersion": "paperclip.chat-catalog.external.v2",
"sourceFiles": [
"chat-catalog-domains/external-vault-reference.ts",
"chat-catalog-domains/external-fixtures.ts",
@@ -103,7 +103,7 @@ test('repair source metadata binds the corrected candidate and explicit changed
const repair = manifest.source.repairMetadata;
assert.equal(repair.baseTargetSha, '3b66c3c144360ddf32714a0742fd774b8ceafb16');
assert.equal(repair.previousTargetSha, 'ab2019e976076ec0eb60b026844f3d9211cb0208');
assert.equal(manifest.targetSha, '249b487a2d2451763913038cc009f7090580d1f1');
assert.equal(manifest.targetSha, 'c6cc59282a45ed3c79880a220f7f60aa3ac1d6a4');
assert.equal(repair.definitionSourceSha, manifest.metadataSourceSha);
assert.equal(repair.candidateDescriptorSnapshot, 'fixtures/chat-repair-candidate-descriptors.json');
const descriptorBytes = readFileSync(new URL(repair.candidateDescriptorSnapshot, import.meta.url));
@@ -295,14 +295,30 @@ test('repair source metadata binds the corrected candidate and explicit changed
[
"teams.configure-team",
"oracleVersion"
],
[
"connection-setup.secure-api-key",
"oracleVersion"
],
[
"secrets.least-scope-delivery",
"oracleVersion"
],
[
"secrets.secret-proposal",
"oracleVersion"
],
[
"secrets.vault-reference",
"oracleVersion"
]
]);
for (const change of repair.changedFields) {
assert.deepEqual(row(change.key)[change.field], change.current);
assert.notDeepEqual(change.current, change.previous);
}
assert.equal(repair.descriptorChanges.length, 44);
assert.equal(new Set(repair.descriptorChanges.map(change => change.key)).size, 28);
assert.equal(repair.descriptorChanges.length, 48);
assert.equal(new Set(repair.descriptorChanges.map(change => change.key)).size, 32);
assert.deepEqual([...new Set(repair.descriptorChanges.map(change => change.field))].sort(), ['expectedRunCount', 'minimumRunCount', 'oracleVersion', 'setupPolicy', 'sourceFiles']);
for (const change of repair.descriptorChanges) {
assert.notDeepEqual(change.current, change.previous);
@@ -258,7 +258,7 @@
"../../server/src/services/native-runtime/status-decision-committer.ts",
"../../server/src/services/work-timeline.ts"
],
"oracleVersion": "paperclip.chat-catalog.work-timeline.v5",
"oracleVersion": "paperclip.chat-catalog.work-timeline.v6",
"coverageGaps": [],
"expectedRunCount": 3,
"minimumRunCount": 3,
@@ -2599,7 +2599,7 @@
"chat-catalog-domains/identity-support.ts",
"chat-scenarios/connection-setup.yaml"
],
"oracleVersion": "paperclip.chat-catalog.external.v1",
"oracleVersion": "paperclip.chat-catalog.external.v2",
"expectedRunCount": 1,
"turnTimeoutMs": 120000,
"attemptTimeoutMs": 420000,
@@ -4905,7 +4905,7 @@
"chat-flow.ts",
"chat-scenarios/secrets.yaml"
],
"oracleVersion": "paperclip.chat-catalog.company-secret-controller-baseline.v4",
"oracleVersion": "paperclip.chat-catalog.company-secret-controller-baseline.v5",
"expectedRunCount": 2,
"expectedHumanMessageCount": 2,
"turnTimeoutMs": 120000,
@@ -4944,7 +4944,7 @@
"../../packages/plugins/sdk/dist/index.js",
"chat-scenarios/secrets.yaml"
],
"oracleVersion": "paperclip.chat-catalog.external.v1",
"oracleVersion": "paperclip.chat-catalog.external.v2",
"expectedRunCount": 3,
"expectedHumanMessageCount": 1,
"minimumRunCount": 3,
@@ -4981,7 +4981,7 @@
"../../ui/src/pages/secrets/SetMyUserSecretDialog.tsx",
"chat-scenarios/secrets.yaml"
],
"oracleVersion": "paperclip.chat-catalog.personal-secret.v5",
"oracleVersion": "paperclip.chat-catalog.personal-secret.v6",
"expectedRunCount": 3,
"expectedHumanMessageCount": 2,
"minimumRunCount": 3,
@@ -5013,7 +5013,7 @@
"../../server/src/services/secret-proposal-notifications.ts",
"chat-scenarios/secrets.yaml"
],
"oracleVersion": "paperclip.chat-catalog.external.v1",
"oracleVersion": "paperclip.chat-catalog.external.v2",
"expectedRunCount": 4,
"expectedHumanMessageCount": 4,
"minimumRunCount": 4,
@@ -5061,7 +5061,7 @@
"../../ui/src/pages/secrets/ImportFromVaultDialog.tsx",
"chat-scenarios/secrets.yaml"
],
"oracleVersion": "paperclip.chat-catalog.external.v1",
"oracleVersion": "paperclip.chat-catalog.external.v2",
"expectedRunCount": 3,
"expectedHumanMessageCount": 2,
"minimumRunCount": 2,