Files
PaperClipAI/tests/runner-e2e/EVERYDAY-WORKFLOWS.md
T
cceeb0aa66 test(runner): add everyday workflow evaluation harness (#13474)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - The native runner must support project work, delegation, hiring, and
service access.
> - Browser tests exposed lost connection access, rejected helper
events, and stalled recovery.
> - Some eval failures also came from incorrect fixtures and decision
controls.
> - This pull request fixes those paths and adds eight everyday workflow
stories.
> - The tests retain observed failures and verify delivered files
independently.
> - The benefit is repeatable evidence for common user tasks and their
remaining gaps.

## Linked Issues or Issue Description

Related work: #13404 contains earlier workflow fixes. #13300 and #13470
changed the CI contracts used by the harness security tests. Merged
companion:
[paperclip-evals#22](https://github.com/paperclipai/paperclip-evals/pull/22).

**What happened?**

Native ACPX sessions did not receive the assigned connection gateway.
Codex helper events could arrive before their spawn receipt and fail
thread validation. A parent continuation could take a shared workspace
before its child retried. A failed native continuation could leave the
task status without a clear recovery blocker. The eval harness also
confused tool approvals with new connection requests and could reject a
valid delegated download.

**Expected behavior**

Keep assigned gateway access and its approval checks. Verify helper
lineage before accepting helper progress. Let a waiting child proceed
before automatic parent recovery. Preserve a failed task's recovery
ownership. Grade the actual requested workflow and its delivered files.

**Steps to reproduce**

Run the everyday workflow suite with the native Codex and Claude
profiles. Exercise service approval, connection refusal, delegated
project work, and teammate reuse. The commands and case requirements are
in `tests/runner-e2e/EVERYDAY-WORKFLOWS.md`. Use `pnpm
test:runner-recovery` for controlled crash and replacement cases.

## What Changed

- Pass the scoped connection gateway binding through the native ACPX
host and sidecar.
- Recognize Codex helper lineage from parent metadata and spawn
receipts. Verify early helper events with `thread/read`. Keep helper
events separate from root completion authority.
- Guide agents to use persistent hiring, child tasks, dependency
records, and a blocked handoff while waiting for a child.
- Defer automatic parent recovery while a child has an active execution
path in the same shared workspace. Allow parent recovery when the child
needs review.
- Record Blocked status and recovery evidence when a failed native
continuation needs reconciliation, including existing active or
escalated incidents. Preserve their owner and retry budget.
- Add eight browser-driven workflow cases. Use real decision controls,
explicit child feedback delivery, managed hiring credentials, and
independent ZIP checks inside a bounded Docker sandbox. Verify sandbox
availability before task creation. Record screenshot SHA-256 at capture.
- Keep runner crash probes in controlled recovery tests. Preserve the
original failure when cleanup also fails.
- Display missing accounting and replay revisions as unavailable. Align
harness security assertions with the approved CI changes.
- Make the channel-rejection browser fixture bind its file after the
send captures its payload. This prevents live refresh from removing the
file before the simulated race.

## Verification

- Full workspace `pnpm -r typecheck` passed after merging current
master.
- Runner E2E typecheck passed. Harness unit tests passed: 216/216.
- Wake-queue database tests passed: 55/55. The two added
existing-incident tests failed before the fix and pass after it.
- Docker artifact calibration passed: 12/12. Host-file and host-loopback
isolation tests failed before the fix and pass after it. Read-only
delivery and output limits are also verified.
- Full `pnpm build` passed. Targeted recovery tests passed: 83/83.
- The channel-rejection browser test passed five consecutive runs after
fixing the fixture race found in CI.
- Local general-server (12,351 tests), UI (6,250), CLI (485), and
workspace package groups passed. The monolithic run stopped at an
unchanged lock-heartbeat fixture race; the isolated workspace group
passed on rerun (shared: 747/747). A separate local serialized run
passed 97 files before two socket errors in the unchanged issue-list
route suite; that suite passed 15/15 on isolated rerun. These local full
commands did not finish uninterrupted; the complete CI matrix below
covers the remaining suites.
- Final head `0fb293733fe307be7e6667ae8f1364077d0c6455`: **34 successful
checks, 2 expected skips**, including every server/workspace shard,
browser shard, native runner verification, build, and typecheck. [Final
CI
run](https://github.com/paperclipai/paperclip/actions/runs/34989136700).
- Greptile reviewed this exact head at **5/5**; all review threads are
resolved. Both Superagent security checks are successful.
- ACPX credential-boundary tests passed: 118/118. Superagent accepted
the runner/sidecar versus provider-environment trace and cleared its
finding.
- The latest paid local campaign on source
`f6a2fdf7ac2af859826a2ae627ff4125a5478529` passed 22/24 cases: Sol 8/8,
Claude 7/8, Mini 7/8. These results predate the merge with current
master.
- The two remaining failures are in `hire-reuse`: Claude exceeded the
attempt deadline during final review; Mini made invalid deliverable tool
calls and remained Blocked.
- Six Daytona cases were not run because the matching immutable runner
image was unavailable. This PR does not claim new remote model results.

## Risks

The changes affect connection admission, helper identity, and recovery
scheduling. Assigned gateway grants and user approval still govern
service calls. The workspace admission gate still exists; the broader
folder-sync design is separate work. Provider behavior can still cause
the two recorded hiring failures. No database migration is required.
Paid cases are opt-in and have bounded attempt deadlines. Project
stories now require Docker and the documented pinned Python image on the
harness host.

## Model Used

OpenAI `gpt-6-astra` performed implementation, diagnosis, and
substantive review. OpenAI `gpt-5.6-luna` assisted with verification, PR
preparation, and review tracking. Both used repository tools and code
execution. Context-window sizes were not recorded.

## 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 (focused checks and
isolated reruns; full-run limitations are documented above)
- [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: OpenAI GPT-5.6 Luna <noreply@openai.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-15 11:04:16 -05:00

11 KiB

Everyday Paperclip workflow evals

This manual suite tests useful work through the production browser, public API, native runner, and normal agent instructions. It complements the tightly scripted runner contract fixtures. It does not add a scheduled or default paid run: --all and generic profile selectors exclude it. Select the suite or an exact execution ID explicitly.

Stories and assertions

Story Cases Required evidence
Build a small project and revise it build-revise Download both ZIPs through the UI; independently execute the delivered CLI and import its function; test the revision; retrieve the original bytes again.
Delegate and incorporate late feedback delegate-feedback One child assigned to Riley; send feedback while the child runs; find it in the child history and independently test --max-length in the delivered ZIP. The worker must not execute on the parent.
Hire a teammate and use them again hire-reuse One Morgan QA reporting to the lead, native runner and the same encrypted connection bindings, real child execution, then a second usable delivery from that same agent.
Decide on an installed service action service-approve, service-decline Assign an authenticated local MCP fixture with Ask first; match its tool action and connection ID; no provider call before approval; exactly one after approval and a verified document; none after decline.
Decline a new connection connection-decline Start without service connections; match a Notion connection intent; click Not now; verify the saved rejection, no new connection or repeated request, and an explanation followed by Done.
Continue work after a controller restart recover-controller Observe saved source, persist a user message, restart the isolated controller, and independently test the delivered result.
Stop work and change direction stop-redirect Click Stop, send one new request, reload, observe exactly one stored user message and the new answer, and reach Done.

For normal completion, all story tasks must reach Done, with no active run, pending completion confirmation, or scheduled recovery. Runs must prove native identity and native terminal contracts. A workspace-contention cancellation is not provider execution only when the persisted pre-dispatch record explicitly says providerWorkStarted: false and no process/session/runner identity exists. Other unexplained cancellations remain failures. Twelve total run records bound each story, including contention and recovery.

Arbitrary runner-process termination is not part of the model scorecard. The historical recover-runner, recover-runner-safe, and recover-runner-uncertain attempts remain available as diagnostics, with their original grades and costs. The first two did not establish a safe restart boundary, and the uncertainty case measures a deterministic safety rule. None supports ranking models. See controlled recovery tests.

Matrix and running

The local matrix has eight cases on native Codex gpt-5.6-sol, native ACPX Claude claude-sonnet-5, and native Codex gpt-5.4-mini: 24 cells. The two core profiles also declare build/revise, delegation, and controller-restart cases on Daytona: six cells. Remote runner-process killing is not supported. For remote controller restart, a verified first download supplies the persistence checkpoint; the controller is interrupted during a subsequent revision with another queued requirement.

pnpm test:e2e:runner -- --list --suite everyday-workflows
pnpm test:e2e:runner -- --suite everyday-workflows --environment local --max-parallel 2
pnpm test:e2e:runner -- --id everyday-workflows.runner-codex-mini.local.build-revise
pnpm test:e2e:runner -- --suite everyday-workflows --environment daytona --max-parallel 2

Before project stories or the Python calibration tests, start Docker on the harness host and fetch the pinned oracle image. This is required for local and Daytona stories; artifact checks run on the harness host.

docker pull python@sha256:9d2e5553305c7c7b0097999bb17187c69b921ccd6bc9d40e4bb5ebe652c00285
python3 tests/runner-e2e/everyday-artifact.py --preflight

The harness checks this prerequisite before it creates the task. It does not pull an image during a model attempt or fall back to host execution.

Use the credential and immutable Daytona image setup in README.md. Provider calls cost money. Each cell owns an isolated instance and project. There are no real third-party mutations in the service fixture; it exercises production connection, transport, tool approval, and document delivery paths.

Deterministic checks and calibration

pnpm test:e2e:runner:typecheck
pnpm test:e2e:runner:unit
python3 -m unittest discover -s tests/runner-e2e -p test_everyday_artifact.py

The independent oracle rejects wrong output, ignored late feedback, trailing separator bugs, invalid argument acceptance, duplicate source modules, archive path traversal, and symlinks. Passing agent-authored tests cannot override it. Lifecycle calibration rejects legacy execution, missing runner identity, unexpected crashes, workers on the parent, and answers left in review.

ZIP evaluation runs delivered Python in a Docker container with a read-only project mount and root filesystem, no network, a non-root user, no Linux capabilities, and bounded CPU, memory, process count, output, and duration. Only the extracted delivery enters the container. The container is removed after grading. Calibration includes attempts to read a host file and reach a host loopback service.

Evalbook evidence and qualification

Each packaged attempt retains snapshots/everyday-workflow.json, downloaded ZIPs, assertions, actual task comments and run records, timing, accounting, source provenance, and screenshots. The story records a digest of its harness sources. Infrastructure failures and failed attempts must remain inspectable.

Import packaged results with paperclip-evals/evals/everyday-workflows/import_results.py. It uses the canonical Runner Evalbook generator and the built Runner Lab viewer. It does not invent provider transcripts, tool counts, model observations, or cost estimates. The selected model is checked against persisted native execution inputs; that is distinct from provider-side model identity verification.

Initial live results are diagnostic. They are not a reliability estimate or a model ranking. Before promotion, freeze both source revisions and harness digest, run at least three independent local repetitions, qualify the six remote cells against a verified image, and review every failure. Keep model quality, lifecycle correctness, infrastructure availability, and latency separate.

Revised evaluation contract (14 September, second campaign)

That campaign used 32 cells: the original local stories plus two local Codex text-only safe-replacement probes, and the unchanged six remote cells. The old recover-runner results remain historical; recover-runner-uncertain is a new case that expects a visible Blocked safety stop, preserved source and queued input, and no unverified provider replay. Its Retry control is inspected, not claimed to restore work. Successful manual recovery remains unqualified.

recover-runner-safe interrupts a text-only Codex turn and queues new direction. A pass requires the server's durable verified_safe_replacement evidence and the new answer. No safety proof is injected or fabricated. If that premise cannot be verified in a live probe, report it as an unqualified recovery boundary, not an established product defect. Claude has no catalog cell for this Codex-specific replacement proof. Deterministic native-safe-replacement tests cover its proof and admission gates independently of model behavior.

Delegation now submits feedback through the existing child task composer and records the delivered comment ID. The child must consume the message and deliver the revised program. This does not require a lead to relay a parent comment. The separate issue-update-comment-wakeup route tests exercise exact supported mention routing, including access, dependency, identity, and duplicate-wake gates.

The approval case provisions an authenticated local service through the public API, with a random server-held credential that never enters the agent environment or browser trace. Approval/decline interactions still use the browser. Provider captures distinguish rejected unauthenticated requests from accepted calls. The old public-endpoint attempts remain boundary evidence, not an isolation promise.

Stop now waits for the owned runner to exit, records project file hashes, and checks them again after the new response. This proves stability over that interval, not indefinite monitoring. Hiring and declined-access policy changes are deferred by user decision; their old results must not be presented as new campaign runs.

Decline correction (14 September, third campaign)

That campaign used 35 cells (29 local, six remote). service-decline tests rejection of a protected action on an already installed service; its former "connection request" title was misleading. connection-decline separately tests Not now on new Notion setup. Both permit a brief explanation as the complete fallback, so Done is expected after that explanation. Neither test requires completion after refusing work that is still required.

The installed-service decline fixture now uses the same server-held credential as approval. The harness requires one pending interaction, validates its kind and connection/provider identity before clicking, and waits for the exact interaction's saved decision. Wrong interactions fail decision-request-matches-story with a screenshot; they are not evidence of an ignored decline. Both decline stories check a new explanation after the decision and reject repeated requests.

Historical attempts remain unchanged. This campaign resumes the previously deferred decline cases; hiring remains deferred. Notion setup is declined in the UI, so this test neither authenticates to nor reads real Notion data.

Decision screenshots are included in the evidence package. Before capturing the final screen, the harness waits for the thread and latest persisted agent comment to render, then scrolls that comment into view. A Done header alone is not proof that the final response was visible.

Recovery scope correction (14 September)

The current catalog has 30 cells: 24 local and six remote. Forced runner crash probes are retired from paid selection. Their original attempt IDs remain in Evalbook's Diagnostics history and Latest pages; they are excluded from the main matrix without changing grades or deleting evidence. Reported spend still includes all attempts.

recover-controller and stop-redirect retain concrete supported journeys: restart the controller while preserving the runner, or use Stop and submit a new direction. Their assertions verify pending input, saved work, and the next usable result. Neither claims recovery from an arbitrary provider-process crash.

A future user-facing crash-recovery case needs a reproducible recoverable fault, an identified supported recovery action, and evidence through the final usable result. A missing test premise must be reported as unexercised, not a model failure. Do not introduce a new paid case just to replace a retired row.