Commit Graph
5342 Commits
Author SHA1 Message Date
DottaandPaperclip 6cfdcbb659 Start viewer lifetime after bounded computer preparation
Keep a separate starting reservation for Connect, propagate its preparation deadline, and atomically recheck the exact live owner before publishing credentials and the viewer idle deadline.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 09:28:17 -05:00
DottaandPaperclip 7fa25f6b8c Preserve empty directories during persistent home seeding
Stage directory entries under the existing exact upload token and no-follow directory handles before atomic publication. Preserve adoption of existing homes and bounded file streaming.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 09:28:04 -05:00
DottaandPaperclip f6f42a8df0 Record reviewed idle fixes and integrated build proof
Keep full package live qualification separate from the passing control and regression checks.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 09:12:35 -05:00
DottaandPaperclip e077c3fbb7 Integrate frozen computer recovery policy
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit '249097811f95d4578e6dd2457035ebae46c9a0b8':
  Preserve frozen computer warmth during native finalization recovery
2026-10-11 09:09:13 -05:00
249097811f Preserve frozen computer warmth during native finalization recovery
Leave persistent computer cleanup with its active executor and recover inactive release disposition from the exact frozen execution binding and lifecycle policy. Keep sandbox copy-back handoff and conservative invalid-state cleanup unchanged.

Co-authored-by: Codex <noreply@openai.com>
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 09:08:49 -05:00
DottaandPaperclip fb92e12c22 Merge qualified provider-pack layout prerequisite
Preserve retained provider-pack authority, package verification, and native shutdown ordering while integrating immutable independent-file layout validation.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 09:03:08 -05:00
DottaandPaperclip 74e0ed1211 Integrate independent runner packs and ordered warm retirement
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit 'f647f2101c80795005d7a55f95f03f669a26538f':
  Checkpoint warm native sessions before stopping their computer owners
  Materialize independent files in new provider packs
  Report bounded metadata for module link-count rejections
2026-10-11 09:01:57 -05:00
DottaandPaperclip dfba3e80a5 Record verified Boat independent-file control
Preserve the same-session archive/resume result, tool-output digest verification, natural cleanup, and remaining full-package qualification boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 09:01:47 -05:00
Dotta f647f2101c Merge qualified provider-pack layout prerequisite
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit 'b64d6309693e7c10ee783dbd3313ae3a007cf5c1':
  Materialize independent files in new provider packs
  Report bounded metadata for module link-count rejections

# Conflicts:
#	server/src/services/native-runtime/native-session-executor.ts
2026-10-11 08:58:32 -05:00
DottaandCodex e5b70f39c4 Checkpoint warm native sessions before stopping their computer owners
Close the exact run for stop-and-retain and default stopping paths, retain failed explicit cleanup fences, and settle Stop requests arriving during or after warm retention. Prevent stale warm returns from overwriting a released or rebound lease.

Co-authored-by: Codex <noreply@openai.com>
2026-10-11 08:56:36 -05:00
DottaandPaperclip b64d630969 Materialize independent files in new provider packs
Bind the new layout policy into provider-pack identity and verify it on controller and guest while preserving legacy immutable packs and approved image root aliases.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 08:34:25 -05:00
DottaandCodex 7d377bb93a Record reproduced Boat package link transition
Publish bounded tool-output, controller topology, and cleanup evidence. Preserve the original Claude failure and the pending independent-file control. Record source-bound workspace checks and the reviewed computer route correction.

Co-authored-by: Codex <noreply@openai.com>
2026-10-11 08:24:16 -05:00
DottaandCodex 869a304c62 Integrate computer route execution-policy correction
Preserve the prerequisite and core ancestry while bringing the reviewed
Kubernetes selection guard into the combined Boat feature branch.

Co-authored-by: Codex <noreply@openai.com>
2026-10-11 08:22:43 -05:00
DottaandCodex 3223e57b74 Respect forced Kubernetes policy in computer routes
Use the same execution-policy guard as heartbeat before exposing Boat
connection, presence or preview actions. Keep exact-owner disconnect
available after the policy changes.

Cover agent and instance defaults with present or absent managed Kubernetes
configuration, including a historical Boat lease and cleanup access.

Co-authored-by: Codex <noreply@openai.com>
2026-10-11 08:20:46 -05:00
DottaandCodex bcd94e340a Repair archived Boat evidence links
Co-authored-by: Codex <noreply@openai.com>
2026-10-11 08:05:40 -05:00
DottaandPaperclip f5a393dd60 Report bounded metadata for module link-count rejections
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 08:05:26 -05:00
DottaandCodex c32920f512 Align current Boat verification source references
Co-authored-by: Codex <noreply@openai.com>
2026-10-11 08:02:10 -05:00
DottaandCodex 630e739d24 Record staging link-count rejection and reviewed stack fixes
Co-authored-by: Codex <noreply@openai.com>
2026-10-11 08:01:45 -05:00
DottaandCodex 4479d24130 Integrate reviewed Boat credentials and workspace fixes
Co-authored-by: Codex <noreply@openai.com>

* codex/boat-environment-core:
  Carry explicit existing-branch intent in workspace realization
  Preserve Boat credentials and explicit workspace strategies
  Carry explicit existing-branch intent in workspace realization
  Fix runtime prerequisite home, workspace, and integrity boundaries
2026-10-11 08:01:02 -05:00
DottaandCodex 51db2ab62f Integrate reviewed runtime and workspace prerequisites
Co-authored-by: Codex <noreply@openai.com>

* commit 'ab1e8acc68':
  Carry explicit existing-branch intent in workspace realization
  Fix runtime prerequisite home, workspace, and integrity boundaries
2026-10-11 08:00:31 -05:00
DottaandPaperclip ab1e8acc68 Carry explicit existing-branch intent in workspace realization
Keep requested branch attachment separate from ownership established by realization, and round-trip the optional intent through the shared request contract.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 08:00:21 -05:00
DottaandPaperclip c9ae885fd9 Preserve Boat credentials and explicit workspace strategies
Keep candidate config, credential bindings, computer attachment and activation in one transaction so a rejected key preserves committed authority. Honor configured worktree bases and attach exact existing branches without creating, resetting or replacing dirty work.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:59:37 -05:00
DottaandPaperclip 6ce1d17e96 Carry explicit existing-branch intent in workspace realization
Keep requested branch attachment separate from ownership established by realization, and round-trip the optional intent through the shared request contract.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:59:23 -05:00
DottaandPaperclip 96db062487 Fix runtime prerequisite home, workspace, and integrity boundaries
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:49:03 -05:00
DottaandCodex 9eacca2c53 Record prerequisite qualification and staging Claude cold success
Co-authored-by: Codex <noreply@openai.com>
2026-10-11 07:41:33 -05:00
DottaandCodex 6e5411ce47 Integrate Boat lifecycle fixture qualification
Co-authored-by: Codex <noreply@openai.com>

* codex/boat-environment-core:
  Complete computer lifecycle in warm identity fixtures
2026-10-11 07:40:01 -05:00
DottaandPaperclip 7634c65d22 Complete computer lifecycle in warm identity fixtures
Give the shared target identity regressions a typed computer target and validate retention and retirement when integrated with Boat lifecycle handling.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:39:31 -05:00
DottaandPaperclip 9e7abda1d0 Integrate reviewed Boat prerequisite stack
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* codex/boat-environment-core:
  Harden persistent runner transports and provider restoration
  Stabilize task lifecycle browser fixtures
2026-10-11 07:34:20 -05:00
DottaandPaperclip 8ecad0f359 Merge shared runtime prerequisites into Boat integration
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:33:39 -05:00
DottaandPaperclip 1525c4ef27 Harden persistent runner transports and provider restoration
Assemble the shared runtime prerequisite from the frozen Boat implementation, including its owning tests and the minimal computer target identity dependency.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:32:05 -05:00
DottaandPaperclip e7fdba2b4b docs: link preserved historical Boat evidence from bounded acceptance report
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:18:10 -05:00
DottaandPaperclip e318850909 Stabilize task lifecycle browser fixtures
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:17:23 -05:00
DottaandPaperclip 5909bfac9f docs: preserve upstream integration verification and submission gaps
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:13:44 -05:00
Dotta add1bea3ad Merge branch 'codex/boat-environment-core' into codex/boat-environment
* codex/boat-environment-core:
  perf(chat): stop polling provider action and session sync queues (#15822)
  refactor(heartbeat): extract environment selection (#15825)
  perf(runner): compile the TypeScript surface once per build (#15853)
2026-10-11 07:12:45 -05:00
DottaandPaperclip 0eac0a26e9 Merge pinned upstream environment selection into Boat feature
Integrate e733bddc45 while preserving Boat admission deferral and ownership fences. Verify agent and instance Boat selection without acquiring a lease.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 07:12:16 -05:00
DottaandPaperclip f782ae12d5 docs: record verified ACPX diagnostic correction
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 06:58:13 -05:00
Dotta da6d50f26d Merge branch 'codex/boat-environment-core' into codex/boat-environment
* codex/boat-environment-core:
  Preserve module fence diagnostics through ACPX stderr summaries
2026-10-11 06:57:51 -05:00
DottaandPaperclip 1f66cac0f8 Preserve module fence diagnostics through ACPX stderr summaries
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 06:57:22 -05:00
DottaandPaperclip 7b6cef9e6b docs: record local Boat lifecycle pass and staging resume failure
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-11 06:55:24 -05:00
DottaandPaperclip e733bddc45 perf(chat): stop polling provider action and session sync queues (#15822)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Chat stores pending provider actions in durable database rows.
> - Three action queues still scan every second when empty.
> - These scans keep idle databases active.
> - This pull request wakes those queues after a commit or at their next
deadline.
> - Empty queues stop querying while existing recovery rules remain in
place.

## Linked Issues or Issue Description

Refs #15808, #15802, #15625. Related sleep work: #15750, #15757.

**What existing behavior does this improve?**

Provider messages and notices, accepted GitHub webhook receipts, and
Slack session status synchronization.

**Current behavior**

Chat maintenance scans these three queues every second. It also rechecks
paused Slack sync rows every 30 seconds.

**Proposed behavior**

Reuse the transaction-aware action workers and existing chat_actions
rows. Wake after commits. Restore unfinished work on startup. Use stored
retry and stale-claim deadlines. Stop scanning when empty. Park paused
Slack sync rows until an endpoint change.

## What Changed

- Add three topics to the existing action worker registration. No
tables, migrations, triggers, or external services.
- Signal producers, claims, retry updates, terminal settlements, and
operator resolution inside their owning transaction. Provider I/O
remains outside transactions.
- Share pending-state and deadline predicates between dispatch and
scheduling. Exclude terminal history and uncertain provider sends.
- Preserve GitHub receipt attempt fences and provider-send quarantine.
Preserve Slack's 30-minute refresh while a session is processing.
- Remove these workers from periodic app maintenance. Update the sleep
inventory and add regression coverage.

## Verification

- Passed: 13 focused tests across scheduler, app wiring, and real
PostgreSQL integration. Covers actual commit wakes with deferred fast
paths disabled, GitHub retries and startup recovery, stale-send
quarantine, Slack publication-to-sync delivery, paused deadlines, and
idle queues.
- Passed: pnpm typecheck.
- Passed: full chat integration and related coordinator suites, **1,274
tests across five files**.
- Passed: pnpm build.
- Greptile: **5/5**, no actionable findings, completed on
`dc284cd275e5f6df624d60b27954421f2bcdbee2`.
- Hosted CI: **54 checks passed**, two intentionally skipped Storybook
checks, no failures or pending checks on
`dc284cd275e5f6df624d60b27954421f2bcdbee2`.

Provider responses are simulated. PostgreSQL, transactions, service
dispatch, and scheduling are real. No live Slack or GitHub App was used.

## Risks

- Writers must emit the existing process-local transaction signal.
Independent database clients and direct SQL still need explicit
integration or startup recovery.
- Accepted GitHub receipts are covered. Finding callbacks GitHub never
delivered still uses the separate provider recovery lane.
- Other chat maintenance and persistent transports still run. This does
not establish whole-instance sleep.
- Existing claim, revision, credential, and authorization checks remain
authoritative during concurrent foreground and scheduled dispatch.

## Model Used

OpenAI Codex (GPT-6), with repository inspection, code execution, and
automated tests.

## 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>
canary/v2026.1011.0-canary.7
2026-10-11 06:08:05 -05:00
DottaandPaperclip 30e338fba6 refactor(heartbeat): extract environment selection (#15825)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Heartbeat execution selects an environment before it prepares a
workspace and starts an agent.
> - Workspace preparation now has its own module, but its selection
policy still occupies the executor.
> - Environment defaults, recovery bindings, chat isolation, and
workspace contention must retain their order.
> - This pull request moves that selection phase behind one typed
function.
> - The executor keeps dispatch gates and lease cleanup. Tests cover the
public path and the new boundary.

## Linked Issues or Issue Description

Refs #15807. This continues the heartbeat extraction series after
workspace preparation.

**Current behavior**

The 5,599-line heartbeat service contains a 301-line environment
selection phase inside run execution.

**Proposed behavior**

Move that phase to `heartbeat/environment-selection.ts`. Keep the same
policy, statement order, errors, and public exports.

**Reason and benefit**

Readers can find selection policy in one module and follow the
executor's phases without reading each policy branch.

## What Changed

- Add `selectHeartbeatEnvironment` with typed run, task, policy,
configuration, and service inputs. Return the values needed by
configuration and workspace preparation.
- Preserve native recovery bindings, environment precedence, managed
sandbox enforcement, Kubernetes provisioning, native chat isolation, and
shared workspace contention.
- Reduce `heartbeat.ts` from 5,599 lines / 234,599 bytes to 5,314 lines
/ 220,784 bytes. The new module is 402 lines / 18,215 bytes.
- Add six public-path characterization cases before moving production
code and six boundary cases. Repair plugin-test teardown to drain active
execution and call the database cleanup helper.
- Assert the selected local environment in the browser fixture's real
worker and document the new boundary.

## Verification

- Before the move: 71 tests passed, including all six new public-path
cases. Three plugin tests skipped when the host could not start their
database probe.
- After the move: all 112 focused tests passed across eight files, with
no skips. These cover environment policy, local and plugin execution,
contention, recovery bindings, workspace preparation, chat isolation,
and low-trust directories.
- Passed `pnpm -r typecheck` and `pnpm build`.
- A normalized TypeScript AST comparison confirms the 301 moved lines
and remaining executor statements are unchanged, apart from the new call
and imports.
- Browser acceptance: the task UI recovered automatically and the worker
verified its selected local environment, preserved uncommitted files,
and completed the task. The persistent-failure case passed in isolation:
three total runs, then a blocked task that remained blocked after
reload.
- The first persistent-failure browser attempt missed the retry banner
within five seconds, despite a persisted scheduled retry. Its unchanged
isolated rerun passed. The trace is retained; the intermittent UI
failure is not yet attributed to a root cause. No assertion or timeout
was relaxed.
- Greptile reviewed `20953dd164decb565bc8d85081aad31a23fd33e5`: 5/5, no
actionable findings.
- Hosted CI passed on `20953dd164decb565bc8d85081aad31a23fd33e5`: 52
successful checks and two intentionally skipped Storybook checks, with
no pending or failing checks. This includes all general and serialized
test groups, Runner verification, eight browser shards, typecheck, and
build.
- The duplicate local `pnpm test:run` was interrupted after hosted CI
completed. It is not reported as a local full-suite pass. Local
completed checks are the 112 focused tests, typecheck, build, and
browser cases described above.

## Risks

- This selection phase enforces execution restrictions. A wrong input or
import could select the wrong environment or change retry behavior.
Public-path tests cover refusal, redirect, contention, and dispatch;
boundary tests cover recovery and isolation.
- The helper can provision a managed environment row and add concurrency
notes to the supplied task context. It acquires no execution lease. The
executor retains its catch/finally boundaries and resource ownership.
- Kubernetes selection is tested with real database state and bootstrap
settings. These checks do not claim execution against a live Kubernetes
cluster or hosted sandbox provider.
- No schema, migration, API contract, or intended behavior change.

## Model Used

OpenAI Codex (GPT-6), with repository inspection, code editing, compiler
checks, database integration tests, and browser automation. The exact
serving model ID 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>
canary/v2026.1011.0-canary.6
2026-10-11 06:04:31 -05:00
Dotta 4d2a2394bc docs: record staging module rejection and diagnostic qualification 2026-10-11 06:01:48 -05:00
Dotta dbec6e9f7b Merge branch 'codex/boat-environment-core' into codex/boat-environment
* codex/boat-environment-core:
  diagnostics: identify closed provider module rejection fences
2026-10-11 06:00:29 -05:00
Dotta 8f62eef8f1 diagnostics: identify closed provider module rejection fences 2026-10-11 06:00:00 -05:00
Dotta 03ffe0a02a docs: record Boat local lifecycle and staging qualification results 2026-10-11 05:57:05 -05:00
Dotta dc6ac92f7e Record concurrent Boat admission and embedded desktop acceptance 2026-10-11 04:54:31 -05:00
Dotta 4809c1b724 Surface computer disconnect failures after closing the panel 2026-10-11 04:53:11 -05:00
Dotta 9eb1424f4e docs: record reviewed loader continuity fix and current acceptance boundary 2026-10-11 04:34:08 -05:00
Dotta 17b0910b80 Merge reviewed dependency read continuity correction
* codex/boat-environment-core:
  fix: verify dependency read continuity after ctime hydration
2026-10-11 04:32:20 -05:00
Dotta 034311fe11 docs: record settled Boat lifecycle failures and viewer evidence 2026-10-11 04:32:20 -05:00