Commit Graph
5087 Commits
Author SHA1 Message Date
DottaandPaperclip 18a1e89a08 Integrate scoped legacy runtime files and retirement recovery
Keep the adapter ownership acceptance tests in the stacked PR.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:56:32 -05:00
DottaandPaperclip 82880b10ac Keep legacy runtime acceptance coverage in stacked PR
The combined feature branch retains the complete execution-target tests; this runtime branch preserves the production fix with its existing baseline suite.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:54:42 -05:00
DottaandPaperclip e90fbf20a1 fix(adapters): isolate computer legacy runtime assets by owner
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:54:14 -05:00
DottaandPaperclip d6363b41d4 fix(runtime): verify retired computer owners after warm expiry
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:53:10 -05:00
DottaandPaperclip 564e65ab1a fix(runtime): verify retired computer owners after warm expiry
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:52:52 -05:00
DottaandPaperclip 38fee2e4f1 Reconcile superseded Boat stop operations
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit 'ff26b3af9':
  Reconcile superseded Boat stop operations
2026-10-10 10:51:43 -05:00
DottaandPaperclip ff26b3af9b Reconcile superseded Boat stop operations
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:50:20 -05:00
DottaandPaperclip 41cb4b8d95 Integrate Boat desktop readiness and exact retirement proof
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit '03962e718':
  Expose exact read-only computer retirement proof
  Restore Boat desktop input before computer access
2026-10-10 10:50:20 -05:00
DottaandPaperclip e8dd4ed574 Record real Boat hot reload and idle lifecycle evidence
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:50:20 -05:00
DottaandPaperclip 03962e7189 Expose exact read-only computer retirement proof
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:48:33 -05:00
DottaandPaperclip 3308a116d4 Restore Boat desktop input before computer access
Probe IBus without replacing a healthy daemon. Rebind a failed restored socket to the same user private runtime directory before viewer access or Cua MCP startup; headless execution stays independent.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:47:31 -05:00
DottaandPaperclip 6f6ad90e0f Show failed computer lookup with a retry action
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:43:56 -05:00
DottaandPaperclip 4896a4304c Merge upstream workspace preparation into Boat qualification
Preserve the Boat route acceptance suite in the stacked UI PR.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:42:54 -05:00
DottaandPaperclip 6e4bd77b58 Merge upstream workspace preparation extraction into Boat runtime
Preserve Boat workspace and credential policies in prepareHeartbeatWorkspace. Move computer route acceptance coverage to the stacked UI PR without dropping coverage from the full feature tree.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:39:19 -05:00
DottaandPaperclip 3911109230 Synchronize Boat resumed-owner cleanup and acceptance fixtures
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* codex/boat-environment-core:
  test(runtime): preserve policy fields in legacy workspace checkpoint
  Reap retired command spools before resuming computer work
2026-10-10 10:35:17 -05:00
DottaandPaperclip 371a730768 Reap retired command spools before resuming computer work
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:35:17 -05:00
DottaandPaperclip 357d122705 test(runtime): preserve policy fields in legacy workspace checkpoint
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:34:38 -05:00
DottaandPaperclip 46ec1f81de Reap retired command spools before resuming computer work
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:34:38 -05:00
DottaandPaperclip 238643ab93 test(runtime): preserve policy fields in legacy workspace checkpoint
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:33:14 -05:00
DottaandPaperclip 07fee85eaf refactor(heartbeat): extract workspace preparation (#15807)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - The heartbeat service prepares the workspace and dispatches each
agent run.
> - After the runtime extraction, `heartbeat.ts` still had 6,417 lines.
> - Workspace setup occupied one contiguous 857-line block inside
`executeRun`.
> - This pull request moves that block into one workspace preparation
module.
> - The executor keeps dispatch gates and terminal cleanup. Reviewers
can inspect workspace setup as one phase.

## Linked Issues or Issue Description

Refs #15803 and #15578. This continues the heartbeat refactor series.
The search found no open duplicate workspace preparation extraction.

**What existing behavior does this improve?**

It makes heartbeat workspace preparation easier to maintain. It does not
change the workspace policy or execution behavior.

**Current behavior**

`executeRun` contains workspace resolution, freshness decisions,
provisioning, persistence, issue binding, environment acquisition, and
realization inline.

**Proposed behavior**

`prepareHeartbeatWorkspace` owns that sequence in
`server/src/services/heartbeat/workspace-preparation.ts`. `heartbeat.ts`
calls it at the same point and uses its returned workspace, lease,
target, and metadata.

**Reason and benefit**

The main file falls from 6,417 to 5,597 lines. The workspace phase has a
typed boundary and direct regression tests.

**Breaking changes**

None. There are no schema, API, feature-flag, or execution-policy
changes.

## What Changed

- Extract the 857-line workspace preparation block without changing its
operations or their order.
- Preserve native recovery bindings, workspace persistence failure
cleanup, issue rebinding after realization, and the cloned restore
lease.
- Keep environment selection, dispatch admission, terminalization, and
final lease release in `heartbeat.ts`.
- Add 12 boundary tests with disposable PostgreSQL, real Git
repositories, and real local environment leases.
- Make the existing Stop and plan-only recovery tests await executor
completion instead of short polling deadlines. Assert exactly one
continuation for the specific plan-only source run.
- Keep server-only Node preload hooks out of the deterministic process
adapter used by Stop browser acceptance.
- Refresh workspace recovery browser acceptance for the current task
composer, and give its disposable test-drive an explicit 10-second
snapshot deadline. Production snapshot settings stay unchanged.
- Document the workspace preparation boundary in `doc/DEVELOPING.md`.

## Verification

- AST comparison: all 857 moved lines match the original block. The
remaining module body differs only at the extraction call.
- `pnpm build`: passed.
- `pnpm -r typecheck`: passed.
- Focused regression coverage: 651 distinct cases across eight suites
passed across targeted runs, including all 12 new boundary tests. The
complete 400-test recovery suite passed together on the final commit.
- Workspace bootstrap browser acceptance: both journeys passed (4.2
minutes), including preserved source edits, ignored-file exclusion,
bounded retries, and persistence across reload.
- Stop/queue browser acceptance: both process and native runner journeys
passed (2.2 minutes), covering queueing, Stop, subtree pause/cancel,
resume, and unrelated-task isolation.
- [Full repository
CI](https://github.com/paperclipai/paperclip/actions/runs/38062408589):
all 47 jobs passed, including the general and serialized test suites,
eight browser shards, build, typecheck, native runner checks, and canary
dry run.
- The local `pnpm test:run` was interrupted to prioritize the recovery
regression; the complete repository suite was verified in CI.
- Greptile: 5/5 on `c28e698b885cf5fd12f36f7b4052e7a2e6f879d7`, with no
open review threads.

## Risks

- This code writes durable workspace bindings and acquires environment
leases. A changed operation order could break recovery or cleanup after
partial setup. The extraction preserves the original statements and
exception boundaries.
- The new tests cover creation, reuse, immutable recovery bindings,
persistence failure, acquisition and realization failure, controller
ownership loss, isolation, execution policy, and lease snapshot
independence.
- Browser acceptance uses real application services with deterministic
local workers and a fake Codex protocol provider. It does not qualify
live cloud providers.

## Model Used

OpenAI GPT-6 through Codex, with code editing, shell execution, and test
tools. The exact serving model identifier and context-window size are
not exposed in this session.

## 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-10 10:30:17 -05:00
DottaandPaperclip 4596df2b89 Synchronize verified Boat stdin and recovery fixes
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* codex/boat-environment-core:
  Keep owned stdin valid until command completion on Boat
  Use isolated computer storage paths during restart reattachment
2026-10-10 10:28:34 -05:00
DottaandPaperclip 2c477fa4ed Keep owned stdin valid until command completion on Boat
Boat invalidates descriptors for unlinked backing files, causing Node startup to abort. Retain the0600 stdin spool until normal cleanup, and reap abandoned command spools only after exact-owner retirement stops its cgroup.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:28:34 -05:00
DottaandPaperclip a9882c9dee Keep owned stdin valid until command completion on Boat
Boat invalidates descriptors for unlinked backing files, causing Node startup to abort. Retain the0600 stdin spool until normal cleanup, and reap abandoned command spools only after exact-owner retirement stops its cgroup.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:28:14 -05:00
DottaandPaperclip 61badce4a9 Use isolated computer storage paths during restart reattachment
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:24:18 -05:00
DottaandPaperclip af93abd90a Use isolated computer storage paths during restart reattachment
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:23:59 -05:00
DottaandPaperclip ada4a0d521 Synchronize isolated Boat runtime assets with backend review
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* codex/boat-environment-core:
  Isolate persistent computer runtime assets by agent session
2026-10-10 10:23:10 -05:00
DottaandPaperclip 8d0beb8c0b Isolate persistent computer runtime assets by agent session
Root runner binaries, harness installs, provider packs, and session state under the trusted persistent agent home and normalized session. Keep the shared project working directory unchanged and preserve existing sandbox paths.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:22:38 -05:00
DottaandPaperclip 5a16ef77c0 Isolate persistent computer runtime assets by agent session
Root runner binaries, harness installs, provider packs, and session state under the trusted persistent agent home and normalized session. Keep the shared project working directory unchanged and preserve existing sandbox paths.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:21:55 -05:00
DottaandPaperclip 9eb02247bb Keep Boat runtime and acceptance reviews in sync
Retain the complete acceptance coverage in the combined qualification branch while the core PR remains under its review file limit.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:19:11 -05:00
DottaandPaperclip 4d2113e188 fix(runtime): retain safe private Codex installation diagnostics
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:17:35 -05:00
DottaandPaperclip 180bfdcb0a Keep extended runner acceptance cases in the stacked feature PR
Preserve the original baseline suites on the backend branch while the full Boat feature branch retains all added runtime-context, transport, and SSH acceptance coverage.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:17:23 -05:00
DottaandPaperclip 00d1d4ea61 fix(runtime): bind persistent computer homes into Claude runtime context
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:17:23 -05:00
DottaandPaperclip 2cbe65e971 fix(runtime): retain safe private Codex installation diagnostics
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:17:02 -05:00
DottaandPaperclip 51e52d5849 fix(runtime): bind persistent computer homes into Claude runtime context
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:16:34 -05:00
DottaandPaperclip b52863e616 Authenticate Boat initial checkouts with run-scoped Git credentials
Pass the existing workspace credential provider through computer realization separately from durable metadata, and supply its URL-scoped helper only to the clone subprocess. Verify authenticated clone behavior and credential non-retention.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:16:34 -05:00
DottaandPaperclip ec80163f2f fix(computers): delete large agent files without downloading
Hash remote files through confined descriptors in bounded chunks before editor mutations. Preserve the remote compare-and-swap removal check and read-size cap; cover a real 17 MiB file, stale deletion, and path confinement.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:16:15 -05:00
DottaandPaperclip 03542b0845 Authenticate Boat initial checkouts with run-scoped Git credentials
Pass the existing workspace credential provider through computer realization separately from durable metadata, and supply its URL-scoped helper only to the clone subprocess. Verify authenticated clone behavior and credential non-retention.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:16:15 -05:00
DottaandPaperclip 7315159c3d fix(computers): delete large agent files without downloading
Hash remote files through confined descriptors in bounded chunks before editor mutations. Preserve the remote compare-and-swap removal check and read-size cap; cover a real 17 MiB file, stale deletion, and path confinement.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:15:51 -05:00
DottaandPaperclip 25c12848a2 fix(runtime): allow supervised identity reads within startup deadline
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:11:01 -05:00
DottaandPaperclip b43a695170 fix(runtime): allow supervised identity reads within startup deadline
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:10:36 -05:00
DottaandPaperclip fa9c3451a0 Preserve the backend split in the Boat qualification branch
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* codex/boat-environment-core:
  Add persistent Boat computer environments and runner ownership
2026-10-10 10:10:36 -05:00
DottaandPaperclip f6aade3bae Add persistent Boat computer environments and runner ownership
Introduce company-scoped computer attachments, bounded runner and viewer ownership, persistent files and worktrees, Boat ingress, and native and legacy runtime integration behind the experimental Boat flag. Keep desktop UI and extended acceptance cases in the stacked feature branch.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:07:51 -05:00
DottaandPaperclip 88750b687c test(runtime): type the complete computer bridge fixture
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 10:00:56 -05:00
DottaandPaperclip 3017b50a07 Preserve native runner shell arguments through systemd
Disable systemd environment expansion so the shell receives its identity marker variables and positional arguments unchanged.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 09:58:15 -05:00
Dotta 4cf9c56441 fix(runtime): retry inconclusive remote process observations 2026-10-10 09:55:57 -05:00
DottaandPaperclip b7806aed05 docs: record Boat qualification evidence and remaining checks
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 09:54:19 -05:00
DottaandPaperclip 8c1f3cb7e0 Explain when a task dev server is unavailable
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 09:52:21 -05:00
DottaandPaperclip 52a90ad969 Preserve requested Boat branches and bound remote file enumeration
Keep worktree branch creation separate from the starting ref. Return capped directory results with truncation, use exact metadata lookups for previews, and adopt existing personal homes without enumerating their contents.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 09:51:13 -05:00
Dotta e498b05159 fix(runtime): bound shared uploads and restrict computer tools to writable tasks 2026-10-10 09:50:16 -05:00
DottaandPaperclip 9ef482b1d0 Fence computer admission when task work mode changes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-10 09:50:16 -05:00