paperclip/tests/e2e
Dotta c9e3bb7ca4
fix: preserve queued work after native Stop and honor steering support (#13354)
## Thinking Path

> - Paperclip lets people manage AI agents and their tasks.
> - The runner owns execution, while the task keeps user instructions
and status.
> - Stop must stop the current response without losing instructions that
the user already sent.
> - The queue stored its original reason inside saved context. Recovery
checked the outer deferred reason and left the message waiting.
> - Claude also exposed Steer through a shared method even though its
driver did not support it. A rejected request could remove its own error
row.
> - This pull request keeps queued work until execution has stopped,
uses the driver's real capability, and preserves completion event order.
> - Users can continue work without repairing task state or repeating
messages.

## Linked Issues or Issue Description

Refs #13338. Related recovery work: #13353.

**What happened?**

A message sent during a native run stayed queued after Stop. Claude
exposed an unsupported Steer action. A steering failure could hide the
queued row and its error. A terminal event could also precede the final
provider result, and subtree Stop omitted the board actor.

**Expected behavior**

Stop ends the current execution. Once Paperclip proves that execution
has stopped, it delivers the saved instruction once through normal
admission. Pause and recovery holds still prevent dispatch. Unsupported
controls stay disabled, and a rejected action leaves an actionable error
visible. Final results precede terminal events.

**Steps to reproduce**

1. Start a Claude or Codex task that writes a file and then waits.
2. Send a follow-up instruction while it runs.
3. Press Stop. Check that the queued instruction runs once and preserves
the file.
4. Check Claude's Steer control and simulate a server rejection on the
only queued message.

## What Changed

- Recover saved native comments after acknowledged Stop using their
original wake reason.
- Require durable remote termination receipts or verified local process
termination before dispatch.
- Preserve actor identity, queued-message deduplication, Pause, and
recovery gates.
- Derive steering support from the driver descriptor and reject
unsupported calls.
- Keep the queue mounted until a steering request succeeds so its error
remains visible.
- Emit provider results before terminal events and pass the board actor
into subtree Stop.
- Document Stop and steering behavior.

## Verification

- Final-head continuation suite: 104 passed, after failing regressions
for saved wake reasons, cleanup proof, and deduplication of every queued
message. Steering UI: 121 passed. Driver capability: 26 passed. Runner
backend/transport: 205 passed; Rust library: 285 passed.
- Real Claude and Codex browser journeys both preserved the saved file,
delivered the queued instruction once after Stop, and reached Done with
exactly two total runs. The process Stop browser fixture also passed.
- Local full repository typecheck and build passed on `afaa35139`;
server typecheck and the affected 104-test suite passed after the final
queue changes. Token gates passed. Final-head CI verifies the complete
integrated source.
- Local aggregate evidence has explicit limits: the general-server
invocation overlapped the queue fixes and finished with 11,989 passed, 2
failed, and 80 skipped; both failures are covered by the final 104-test
pass. The UI and CLI then passed all 6,184 and 485 tests; the complete
145-file serialized rerun passed all 2470 tests. The shared-package lock
fixture passed unchanged on rerun, but the package phase subsequently
stopped at an embedded-Postgres bootstrap resource failure. No single
pristine green local full aggregate is claimed.
- Greptile reviewed `fa66e2bd5` at [5/5 with no unresolved
findings](https://github.com/paperclipai/paperclip/pull/13354#issuecomment-5650334242).
[Final-head CI completed
successfully](https://github.com/paperclipai/paperclip/actions/runs/34733781888/attempts/2):
33 successful checks, 2 conditional skips, including all server,
package, UI, browser, runner, typecheck, and build gates. The first
attempt hit a preview-readiness/port-collision fixture; its unchanged
local control passed 25 tests with 3 skips, and one supported unchanged
CI retry passed the affected shard and aggregate gates.

## Risks

- Queue recovery must never overlap an old execution. Unknown cleanup
state remains blocked.
- Driver descriptors are now authoritative for steering; a wrong
descriptor disables the action instead of attempting it.
- No schema migration or historical status reconciliation is included.

## Model Used

OpenAI GPT-6 through Codex, with reasoning, code execution, browser
testing, and tool use. The exact hosted model ID and context-window size
are not exposed in this task.

## 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
#` 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-09-12 22:29:54 -05:00
..
execution-recovery fix: make task recovery durable and preserve current requests (#13075) 2026-09-09 09:14:25 -05:00
fixtures feat: add experimental persistent agent chat (#13284) 2026-09-12 08:56:04 -05:00
helpers feat: reuse provider sign-in across AI connection workflows (#13248) 2026-09-12 16:51:26 -05:00
in-feed-native fix(runner): keep streaming after task completion tools (#13108) 2026-09-09 15:22:00 -05:00
acp-stop-continuation.spec.ts fix: preserve runner recovery, warm sessions, and task outcomes (#13338) 2026-09-12 19:41:15 -05:00
agent-chat.spec.ts feat: add experimental persistent agent chat (#13284) 2026-09-12 08:56:04 -05:00
agentmail.spec.ts feat(connections): add AgentMail inboxes and email tasks (#13256) 2026-09-11 16:56:38 -05:00
app-not-connected.spec.ts feat(apps): unify permissions and action testing (#12802) 2026-09-03 21:23:26 -05:00
application-delete-screenshot.spec.ts feat(apps): unify permissions and action testing (#12802) 2026-09-03 21:23:26 -05:00
applications-crud.spec.ts feat(apps): unify permissions and action testing (#12802) 2026-09-03 21:23:26 -05:00
apps-dark-mode-shots.spec.ts feat(apps): unify permissions and action testing (#12802) 2026-09-03 21:23:26 -05:00
apps-prosumer-mcp-flow.spec.ts Simplify app connections and enable managed Google access (#12728) 2026-09-02 14:05:53 -05:00
archived-company-url.spec.ts feat(ui): bounce cold arrivals off archived company URLs, add Unarchive (#11302) 2026-08-12 21:02:12 -07:00
board-attachment-receipts.spec.ts fix: preserve runner recovery, warm sessions, and task outcomes (#13338) 2026-09-12 19:41:15 -05:00
chat-adapters-ui.spec.ts fix: deliver saved user messages after recovery stops (#13327) 2026-09-12 18:08:04 -05:00
composer-stop.spec.ts fix: preserve queued work after native Stop and honor steering support (#13354) 2026-09-12 22:29:54 -05:00
conference-room-typing-intro.spec.ts feat: reuse provider sign-in across AI connection workflows (#13248) 2026-09-12 16:51:26 -05:00
connection-intents.spec.ts feat(apps): unify permissions and action testing (#12802) 2026-09-03 21:23:26 -05:00
connection-reviews-server.ts feat: review connection actions from tasks (#13063) 2026-09-08 19:37:13 -05:00
connection-reviews.config.ts feat: review connection actions from tasks (#13063) 2026-09-08 19:37:13 -05:00
connection-reviews.spec.ts feat: review connection actions from tasks (#13063) 2026-09-08 19:37:13 -05:00
fetch-allowed-port.ts feat(mcp) [split 8/8]: add e2e coverage and operator docs (#9563) 2026-07-14 15:48:57 -05:00
legacy-failure-continuation.spec.ts fix: preserve runner recovery, warm sessions, and task outcomes (#13338) 2026-09-12 19:41:15 -05:00
mcp-user-stories.catalog.ts feat(mcp) [split 8/8]: add e2e coverage and operator docs (#9563) 2026-07-14 15:48:57 -05:00
mcp-user-stories.spec.ts feat(apps): unify permissions and action testing (#12802) 2026-09-03 21:23:26 -05:00
multi-user-authenticated.spec.ts feat: add experimental persistent agent chat (#13284) 2026-09-12 08:56:04 -05:00
multi-user.spec.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
nux-phase4-screenshots.spec.ts feat(onboarding): first task opens as a chat with a chief of staff (#13068) 2026-09-08 20:19:14 -07:00
onboarding.spec.ts feat: reuse provider sign-in across AI connection workflows (#13248) 2026-09-12 16:51:26 -05:00
paused-composer.spec.ts fix(tasks): require resume before sending to paused tasks (#13232) 2026-09-11 10:28:00 -05:00
pipelines-tutorial-flow.spec.ts test: port pipelines tutorial e2e (#9149) 2026-07-07 05:54:26 -05:00
planning-mode-visual-verification.spec.ts feat: reuse provider sign-in across AI connection workflows (#13248) 2026-09-12 16:51:26 -05:00
playwright-composer-stop.config.ts feat(ui): add composer Stop and simplify task controls (#13104) 2026-09-09 12:18:56 -05:00
playwright-multiuser-authenticated.config.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
playwright-multiuser.config.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
playwright.config.ts feat: add experimental persistent agent chat (#13284) 2026-09-12 08:56:04 -05:00
project-repositories.spec.ts feat(projects): select multiple GitHub source repositories (#13010) 2026-09-08 08:21:28 -05:00
runner-e2e-dashboard.spec.ts feat(runner-e2e): improve matrix report browsing (#12889) 2026-09-05 07:46:05 -05:00
sidebar-takeover.spec.ts fix(ui): polish core navigation and task layout (#12793) 2026-09-03 15:35:39 -07:00
signoff-policy.spec.ts feat(issues): contain cross-issue agent side effects (#10837) 2026-08-04 13:17:49 -05:00
smoke-lab-browser-runner.mts feat(apps): unify permissions and action testing (#12802) 2026-09-03 21:23:26 -05:00
smoke-lab-p1-p4.spec.ts test(e2e): shorten and split Smoke Lab coverage (#12506) 2026-08-31 10:15:39 -05:00
smoke-lab-p5-p7.spec.ts test(e2e): shorten and split Smoke Lab coverage (#12506) 2026-08-31 10:15:39 -05:00
smoke-lab-routine-classifier.test.mts feat(mcp) [split 8/8]: add e2e coverage and operator docs (#9563) 2026-07-14 15:48:57 -05:00
smoke-lab-routine.mts feat(mcp) [split 8/8]: add e2e coverage and operator docs (#9563) 2026-07-14 15:48:57 -05:00
smoke-lab.catalog.ts feat(connections): add v3 schema core (#9958) 2026-07-21 15:16:26 -05:00
smoke-lab.shared.ts feat(apps): unify permissions and action testing (#12802) 2026-09-03 21:23:26 -05:00