Commit Graph
6613 Commits
Author SHA1 Message Date
Dotta 7fb1b10dea Bind note negation to the referenced design instruction 2026-10-27 01:50:48 -05:00
Dotta 2545a5d534 Require affirmative saved note bound to the actual design link 2026-10-27 01:48:28 -05:00
Dotta 15ce55696e test(evals): author human vault import and native reference use 2026-10-27 01:47:56 -05:00
Dotta 5280ce12fb Author genuine retained workspace repair chat evaluation 2026-10-27 01:45:57 -05:00
Dotta 2e6a5dbe27 Keep broken-link prerequisite descriptions factual 2026-10-27 01:43:45 -05:00
Dotta 32b472dfa5 Refresh reviewed MCP SDK dynamic source binding 2026-10-27 01:42:10 -05:00
Dotta 8f98db3d21 test(evals): author task repository preparation and explicit grant gap 2026-10-27 01:40:36 -05:00
Dotta 4afcd710e2 Bind selected public sign-in worker and actual auth UI source 2026-10-27 01:36:24 -05:00
Dotta ea6dc42d2b Add finite owned public HTTPS origin handoff for chat evals 2026-10-27 01:31:43 -05:00
Dotta a0c5ad9805 test(evals): scope vault AWS credentials to selected server 2026-10-27 01:31:00 -05:00
Dotta 717974e7f7 test(evals): add finite private public-origin sign-in operation 2026-10-27 01:19:25 -05:00
Dotta 7813e24256 Permit one recorded revalidation after qualifying identity invalidation 2026-10-27 01:15:48 -05:00
Dotta 589c90df67 Bind computer tests to saved Morgan runtime and preserve configuration 2026-10-27 01:15:21 -05:00
Dotta 522c5f1bec test(evals): author actual Slack file transfer and size phases 2026-10-27 01:15:20 -05:00
Dotta 9aa09b51c7 Author actual operator computer qualification journeys 2026-10-27 01:09:33 -05:00
Dotta 19510abe5e test(evals): retain missing Grok HTTPS harness binding gap 2026-10-27 01:04:45 -05:00
Dotta 28abc602be test(evals): require genuine existing Bot authorization and challenge 2026-10-27 01:01:36 -05:00
Dotta 1bb90f12cf test(evals): add finite protected Grok routine form entry 2026-10-27 01:01:18 -05:00
Dotta 0af670575d test(evals): calibrate review negation and format new cases 2026-10-27 01:01:18 -05:00
Dotta eeef850419 test(evals): close scoped tool review outcome branches 2026-10-27 00:55:31 -05:00
Dotta 7c77384469 test(evals): require real owned cloud choices before hire 2026-10-27 00:51:51 -05:00
Dotta 325af67e3d Qualify exact Docker Desktop private bind translation 2026-10-27 00:43:54 -05:00
Dotta c1d36080ac test(evals): require genuine saved target authentication failure 2026-10-27 00:43:18 -05:00
Dotta 5c40b00e04 test(evals): author least-scope native secret delivery 2026-10-27 00:42:43 -05:00
Dotta 2f2ecc8269 test(evals): author real human Claude runner conversion 2026-10-27 00:37:21 -05:00
Dotta 772c29dad9 Add explicit owned Docker PostgreSQL E2E lane 2026-10-27 00:35:32 -05:00
Dotta a7373c02dd test(evals): author own personal credential delivery 2026-10-27 00:32:20 -05:00
Dotta 7244c70f11 test(evals): reconcile real account setup requests before resuming 2026-10-27 00:28:33 -05:00
Dotta 3e75b69e05 test(evals): return verified gateway prerequisite receipt 2026-10-27 00:25:11 -05:00
Dotta 41ebbb1272 test(evals): author scoped gateway error diagnosis 2026-10-27 00:24:29 -05:00
Dotta b81b95b36e test(evals): author missing Claude account and real hire resumption 2026-10-27 00:20:51 -05:00
Dotta 7986c118ef test(evals): independently verify secret proposal denial and approval 2026-10-27 00:15:49 -05:00
Dotta a097298ed8 test(evals): bind Claude target to actual Environment contract 2026-10-27 00:10:30 -05:00
Dotta 0d0a7defbe Bind partial archive replies to confirmed outcome counts 2026-10-27 00:04:02 -05:00
Dotta 270035738e test(evals): author real Claude hire and private qualification 2026-10-27 00:03:22 -05:00
Dotta 84e807f546 test(evals): preserve delegated work across personal grant revocation 2026-10-27 00:02:01 -05:00
Dotta 6d9865068a Reconcile archive transport and 210 authored catalog cases 2026-10-26 23:58:56 -05:00
Dotta 4043cf8984 Add owned native archive fault transport lifecycle 2026-10-26 23:54:28 -05:00
Dotta caff11daf6 test(evals): release post-stop gate only after cleanup proof 2026-10-26 23:50:53 -05:00
Dotta 22064ecbd5 test(evals): enforce actual addressed connection resolver identity 2026-10-26 23:50:08 -05:00
Dotta 83d06d6f6b test(evals): author same-source post-stop native continuation 2026-10-26 23:47:29 -05:00
Dotta b117aabd21 test(evals): independently render retrieved Slack launch artifacts 2026-10-26 23:45:59 -05:00
Dotta 8c1cbee398 test(evals): author real Slack thread handoff and isolation case 2026-10-26 23:41:13 -05:00
Dotta eb10c18bee test(evals): guard real native Stop canonical boundary 2026-10-26 23:40:30 -05:00
Dotta 819c1622d1 Reconcile campaign metadata and preserve startup diagnosis 2026-10-26 23:35:32 -05:00
Dotta 05b29a381c test(evals): bind one genuine Slack distractor setup exchange 2026-10-26 23:35:15 -05:00
Devin FoleyandPaperclip 0cb3fc7db5 fix(runner): retain ACPX transport failure details (#17837)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Paperclip Runner reports provider failures to the execution and
recovery services.
> - Those services read the terminal event's structured `error` field.
> - The ACPX transport-failure path wrote its code and message only at
the top level.
> - The session facade therefore replaced that cause with `error: null`
and the generic message "Provider turn failed".
> - This pull request uses the existing structured error contract while
retaining the old fields.
> - Recovery can retain the actual redacted cause without reopening the
failed provider or assuming a retry is safe.

## Linked Issues or Issue Description

**What happened?**

A native ACPX run can lose its failure details between runnerd and the
session facade. The transport-failure producer emits a failed turn with
top-level `code` and `message`. The facade reads `error`. The server
receives a generic provider failure and cannot use the original cause to
explain or classify recovery.

**Expected behavior**

Retain the transport code and redacted cause in the structured terminal
error. Keep failed sessions closed, provider termination unproven, and
automatic replay disabled.

**Steps to reproduce**

1. Open a native ACPX session and start a turn.
2. Send malformed activity from the sidecar after it acknowledges the
turn.
3. Poll the native provider events.
4. Observe that `turn.failed.error` is absent even though the producer
has a transport code and cause.

Refs: #16366, #17543. Those changes cover legacy process-session
diagnostics and session-ensure errors. This change repairs the native
ACPX polling terminal contract.

## What Changed

- Add the existing transport code and redacted message to the terminal
event's structured `error` field.
- Mark that error as non-recoverable. Keep the previous top-level fields
for existing readers.
- Add a real sidecar fault fixture and a native-provider regression. It
checks one failed terminal, retained error details, a closed session,
and no provider reopening.
- Document the failure contract and verification scope in execution
semantics and the recovery map.

## Verification

- Red: the new fault test failed because the structured transport error
code was null on the original code.
- Green: all 26 native-provider integration tests pass with the fix.
- Three session-facade terminal tests and three native-runtime
provider-failure classification tests pass.
- `pnpm -r typecheck` and `pnpm build` pass.
- Hosted test partitions, native Runner checks, typecheck, build,
browser shards and canary passed. Two final aggregate jobs received no
runner for several minutes. The first CI attempt was cancelled after
saving its status, and only those two cancelled jobs were resubmitted.
Both aggregate jobs passed on attempt 2. The current head has 55
successful checks, four expected skips and successful Snyk status.
- `git diff --check`, `node scripts/check-module-boundaries.mjs`, and
`node scripts/check-maps.mjs` pass.
- The full local Vitest suite is not run for this patch. The local
filesystem fell below 500 MiB free during verification. The preceding
full-suite attempt crashed embedded PostgreSQL; focused checks and CI
are used without claiming that attempt passed.
- Live incident: verified the exact predecessor sandbox was destroyed
and workspace recovery completed. An audited user retry through the
normal task-retry service started one new native run. That attempt
preserved the original question but failed before provider startup with
a missing workspace-sync descriptor binding. The startup race is fixed
separately in #17838. A later audited retry completed successfully,
saved its useful answer and restored its workspace. The agent API
handoff failed; an audited operator repair through the normal issue
service completed the required user assignment in Review without
repeating the comment or provider work. This verifies recovery admission
on the existing deployment; the new Runner change is not deployed yet.
- Evidence limit: the historical terminal had `error: null` and its raw
sidecar frame was not retained. Fault injection proves this producer
defect and the same loss of diagnostics. It does not establish which
transport fault caused the historical turn to end.

## Risks

- Recovery now receives a specific transport failure code. The error
remains non-recoverable and `providerTerminalObserved` remains false.
Stop proof, effect reconciliation, workspace preservation, retry limits,
and normal execution authority still govern any successor.
- This change preserves diagnostics. It does not make a malformed or
lost provider connection healthy.
- No schema migration, credentials, provider selection, or model
settings change.

## Model Used

OpenAI Codex, GPT-6 family, with reasoning, source inspection, tool use,
and code execution. The runtime does not expose the exact model ID or
context window size.

## 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-10-26 21:34:29 -07:00
Devin FoleyandPaperclip 94819b6ded fix(recovery): preserve live heartbeat preparation ownership (#17838)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Heartbeat prepares each run before it starts the native provider.
> - Startup recovery can run while that preparation is still active.
> - The native input and coordinator exist before workspace
synchronization saves its descriptor.
> - Recovery checked the later native executor registry but missed the
earlier heartbeat execution registry.
> - It could claim the live run and dispatch a second executor against
incomplete workspace state.
> - This change gives the recovery claim the existing live heartbeat
registry and checks it before changing ownership.

## Linked Issues or Issue Description

**What happened?**

Startup recovery can claim a native run that the same server is still
preparing. The second execution reads the admitted native input before
workspace synchronization has saved its descriptor. It fails with
`native_workspace_sync_descriptor_binding_missing`. The original
preparation then finds a failed run and cannot start the provider.

**Expected behavior**

Leave live preparation with its current executor. Do not change its
native coordinator or dispatch another executor. An inactive run must
still pass the existing recovery checks.

**Steps to reproduce**

1. Start heartbeat runtime selection for a remote sandbox.
2. Hold workspace synchronization after native input and coordinator
persistence.
3. Run native startup recovery with the heartbeat execution still
active.
4. Observe an unintended `bootstrap_incomplete` claim and a second
execution.

Refs #17439 for broader remote controller recovery. This change repairs
the current heartbeat startup race. It does not add checkpoint storage
or remote adoption. A separate diagnostics correction is in #17837.

## What Changed

- Pass the existing heartbeat live execution registry to native recovery
claims.
- Check the current registry after locking the run and before any
takeover or coordinator change.
- Return the existing waiting disposition for live preparation. Keep
workspace descriptor validation unchanged.
- Add a PostgreSQL regression at the real runtime-selection boundary and
an assembled heartbeat recovery regression with the real claim service.
- Document the preparation interval and its recovery behavior.

## Verification

- Red: the new runtime-selection test observed an unintended bootstrap
claim on the original code. The heartbeat regression also failed because
recovery dispatched the live run.
- Green on current head `88bec51f10d61eb851eec849e82a80bb198555c7`: all
144 runtime-selection, heartbeat recovery, workspace-preparation and
restart-policy tests pass.
- These cases check an unchanged coordinator, no duplicate recovery
dispatch, a running source run, and normal recovery after the execution
leaves the registry.
- The full native restart integration file passes all 22 available
cases. Nine real-runner process cases are skipped because local Runner
test binaries were removed to recover disk space. The passing cases
include remote startup, old preparation fencing, ownership conflicts,
Stop, and concurrent recovery.
- Direct full server TypeScript check passes: `pnpm exec tsc --noEmit -p
server/tsconfig.json`. Hosted CI passes on this head, including full
test partitions, typecheck, build, native Runner checks, serialized
suites, browser shards, canary and both aggregates. Apex is 5/5 with no
actionable findings. The current head has 54 successful checks, two
expected skips and successful Snyk status.
- `git diff --check`, module boundary checks, and map checks pass.
- A wider local safety run stopped with PostgreSQL error 53100 and
ENOSPC after 64 tests passed. Recursive typecheck also stopped with
ENOSPC. These attempts did not pass. Generated files in this worktree
were removed to free space. The full local test suite and build have not
been run for this change; hosted CI must supply those results.
- Live evidence: a production startup recovery claimed a new run during
outward workspace staging. The second preparation failed before provider
startup. Its exact sandbox was later destroyed with successful cleanup.
The patch is not deployed. A later audited retry on the existing
deployment completed successfully and saved the requested answer once.
An audited operator repair through the normal issue service completed
the final user assignment in Review after the agent API handoff failed.
This acceptance verifies recovered work, not deployment of the new
guard.

## Risks

- A live heartbeat remains responsible for its own completion and
cleanup. Recovery must not compete with it. The registry is
process-local; existing durable ownership checks still govern other
controllers.
- An executor that is still active remains protected until its cleanup
removes its registry entry. This adds no timer, polling loop, schema or
credential change.
- Missing or corrupt workspace descriptors still fail closed. This
change does not authorize replay of unknown provider actions.

## Model Used

OpenAI Codex, GPT-6 family, with reasoning, source inspection, tool use
and code execution. The runtime does not expose the exact serving model
ID or context window size.

## 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-10-26 21:34:15 -07:00
Dotta 9d850991d9 test(evals): prepare owned real Slack endpoint fixtures 2026-10-26 23:32:28 -05:00
Dotta e4b62f48aa test(evals): author remaining internal catalog journeys 2026-10-26 23:30:48 -05:00