Commit Graph
2728 Commits
Author SHA1 Message Date
DottaandPaperclip 87379ca1b4 Merge bounded gateway credential cleanup into sleep-05-approved-tool-recovery
Propagate bounded gateway credential cleanup and notification coalescing while preserving saved deadlines and each PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-27 00:31:47 -05:00
DottaandPaperclip caa28499c1 Merge bounded gateway credential cleanup into sleep-04-tool-review-expiry
Propagate bounded gateway credential cleanup and notification coalescing while preserving saved deadlines and each PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-27 00:31:47 -05:00
DottaandPaperclip 7436d29cc9 fix(server): bound credential expiry cleanup and write notifications
Coalesce credential changes within the former cleanup cadence while preserving loaded deadlines and authentication expiry. Limit session deletion to 500 rows and prove sequential writes, backlog recovery, and early deadlines with real PostgreSQL.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-27 00:31:39 -05:00
DottaandPaperclip f50921371c Merge historical cleanup fixture repair into sleep-05-approved-tool-recovery
Propagate the verified historical cleanup deadline observation correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 22:14:16 -05:00
DottaandPaperclip fde5e42f02 Merge historical cleanup fixture repair into sleep-04-tool-review-expiry
Propagate the verified historical cleanup deadline observation correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 22:14:16 -05:00
DottaandPaperclip 390bbf1102 Merge historical cleanup fixture repair into sleep-03-gateway-credential-expiry
Propagate the verified historical cleanup deadline observation correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 22:14:16 -05:00
DottaandPaperclip 1160da1702 Merge historical cleanup fixture repair into sleep-02-secret-proposal-expiry
Propagate the verified historical cleanup deadline observation correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 22:14:15 -05:00
DottaandPaperclip d945965c4a Wait for historical cleanup retry discovery in its regression test
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 22:13:28 -05:00
DottaandPaperclip b01729cb19 Merge recovery fixture settlement repairs into sleep-05-approved-tool-recovery
Propagate the verified foreground recovery and login cleanup fixture corrections while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 21:10:07 -05:00
DottaandPaperclip 79c9d5c0f0 Merge recovery fixture settlement repairs into sleep-04-tool-review-expiry
Propagate the verified foreground recovery and login cleanup fixture corrections while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 21:10:07 -05:00
DottaandPaperclip 7e8dffbcc7 Merge recovery fixture settlement repairs into sleep-03-gateway-credential-expiry
Propagate the verified foreground recovery and login cleanup fixture corrections while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 21:10:06 -05:00
DottaandPaperclip bd023a8997 Merge recovery fixture settlement repairs into sleep-02-secret-proposal-expiry
Propagate the verified foreground recovery and login cleanup fixture corrections while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 21:10:06 -05:00
DottaandPaperclip 6b9874f9b8 Carry login cleanup fixture settlement through the whole stack
Backport the existing deadline-aware settlement helper so earlier PRs no longer leave fake-time cleanup work paused beyond their initial clock jump. All sixteen login lifecycle cases pass.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 21:10:06 -05:00
DottaandPaperclip 280dad5e39 Preserve agent approvals across preparation failures
Share the undispatched claim-release and dispatch ownership boundary with Test-tab actions. Keep provider execution and uncertain outcomes outside preparation retry; verify real PostgreSQL timeout, competing claim, and no-replay behavior.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 20:09:34 -05:00
DottaandPaperclip 86d82f1e17 Retain approved tool actions after pre-dispatch dependency failures
Release only the owned, undispatched Test-tab claim and leave provider outcomes outside the preparation retry boundary. Prove PostgreSQL read-timeout recovery, claim fencing, transaction rollback and no replay with real persisted state.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:50:08 -05:00
DottaandPaperclip c5c6ecac74 Merge workspace recovery fix into sleep-05-approved-tool-recovery
Propagate the tested retained-workspace slot correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:32:46 -05:00
DottaandPaperclip 72d5d563f1 Merge workspace recovery fix into sleep-04-tool-review-expiry
Propagate the tested retained-workspace slot correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:32:45 -05:00
DottaandPaperclip bdb8ce40f2 Merge workspace recovery fix into sleep-03-gateway-credential-expiry
Propagate the tested retained-workspace slot correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:32:45 -05:00
DottaandPaperclip 171681888b Merge workspace recovery fix into sleep-02-secret-proposal-expiry
Propagate the tested retained-workspace slot correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:32:45 -05:00
DottaandPaperclip 2c0387d0be Preserve UUID literal type in workspace fairness fixture
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:32:44 -05:00
DottaandPaperclip e7c2f2cbe4 Merge workspace recovery fix into sleep-05-approved-tool-recovery
Propagate the tested retained-workspace slot correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:28:03 -05:00
DottaandPaperclip 39a562c28d Merge workspace recovery fix into sleep-04-tool-review-expiry
Propagate the tested retained-workspace slot correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:28:03 -05:00
DottaandPaperclip 0e13585a5b Merge workspace recovery fix into sleep-03-gateway-credential-expiry
Propagate the tested retained-workspace slot correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:28:02 -05:00
DottaandPaperclip 7863913ff0 Merge workspace recovery fix into sleep-02-secret-proposal-expiry
Propagate the tested retained-workspace slot correction while preserving this PR boundary.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:28:02 -05:00
DottaandPaperclip 5ff99c2e0e Fix retained workspace candidate starvation behind active exports
Exclude locally owned exports before cursor pagination so a free slot discovers earlier candidates in the same pass. Make the CI regression deterministic without increasing its timeout.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 19:27:40 -05:00
DottaandPaperclip e937d89aa0 Merge updated parent into sleep-05-approved-tool-recovery
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 18:38:04 -05:00
DottaandPaperclip 1ff4b95644 Merge updated parent into sleep-04-tool-review-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 18:38:04 -05:00
DottaandPaperclip f5f5a157d2 Merge updated parent into sleep-03-gateway-credential-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 18:38:04 -05:00
DottaandPaperclip b754e72720 test(server): prove secret expiry startup loads scoped deadlines
Record registration failures instead of discarding their evidence; use the current expiry service contract and assert successful deadline reconstruction.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 18:38:03 -05:00
DottaandPaperclip b04548e345 fix(server): scope approved review recovery to affected companies
Keep startup reconstruction and paginated recovery in the existing owner. Preserve per-company retry deadlines across notifications and let healthy companies progress independently.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 18:20:18 -05:00
DottaandPaperclip 069eb3ca4a Merge company-scoped review notifications into approval recovery
Keep rate admission, locked history reconciliation, and formal approval parking while carrying company identity through every approval producer.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 18:12:32 -05:00
DottaandPaperclip b1bb59e286 fix(server): scope pending tool review expiry to company changes
Require company hints at existing review-write boundaries, refresh saved company deadlines, and drain bounded due batches without scanning unrelated companies.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 18:11:01 -05:00
DottaandPaperclip 35a912b1bb Merge updated parent into sleep-05-approved-tool-recovery
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 17:40:35 -05:00
DottaandPaperclip a9f26387f5 Merge updated parent into sleep-03-gateway-credential-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 17:40:34 -05:00
DottaandPaperclip bad22d99b1 fix(server): scope secret expiry to committed company changes
Preserve saved deadlines, bounded company expiry, independent retry backoffs, and deletion invalidation. Move shared deadline dispatch earlier in the stack so expiry and later workers use one owner.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 17:40:34 -05:00
DottaandPaperclip ea99a4fe0f Merge updated parent into sleep-04-tool-review-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 17:40:34 -05:00
DottaandPaperclip cd516fdc2b Settle invalid approved reviews and park pending formal decisions
Reconcile durable invocation history under the claim locks before dispatch, retain retries for configuration and dependency failures, and wake formal approval waits only from committed decisions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 16:54:57 -05:00
DottaandPaperclip fb7e906a27 Retain admitted rate slots while tool actions await approval
Reuse the durable admission only for the same bound invocation and unchanged rate rule. Keep approval, current permissions, policy changes, and execution claims with their existing owners. Cover agent and Test-tab foreground/recovery paths, approval-policy preservation, and invalid invocation states. All 139 gateway/policy cases and server typechecking pass.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 16:41:07 -05:00
DottaandPaperclip fd331d99f3 Merge updated parent into sleep-03-gateway-credential-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 16:12:32 -05:00
DottaandPaperclip 3962c5cbaa Merge updated parent into sleep-04-tool-review-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 16:12:32 -05:00
DottaandPaperclip d8ae842246 Merge updated parent into sleep-05-approved-tool-recovery
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 16:12:32 -05:00
DottaandPaperclip a5be42b19f Merge deadline precision repair into shared expiry scheduling
Keep the shared deadline owner introduced here and apply the parent fix to it. Custom-image, secret-proposal, and startup regression suites pass: 122 tests.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 16:12:31 -05:00
DottaandPaperclip 27548b33b7 Honor saved custom-image deadlines inside the retry window
Clear retry gating after successfully reading a future deadline or an empty queue. Preserve backoff for failed and still-overdue work. Verify startup precision, earlier notifications, failure spacing, and real committed expiry.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 16:11:30 -05:00
DottaandPaperclip 7a4920dd12 Merge updated parent into sleep-05-approved-tool-recovery
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 15:17:45 -05:00
DottaandPaperclip 2ef7f2e848 Merge updated parent into sleep-04-tool-review-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 15:17:44 -05:00
DottaandPaperclip 13cfb36d8a Merge updated parent into sleep-03-gateway-credential-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 15:17:43 -05:00
DottaandPaperclip 969f5ce24d Merge updated parent into sleep-02-secret-proposal-expiry
Preserve the existing PR boundary while integrating master through the sleep migration stack.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 15:17:42 -05:00
DottaandPaperclip 120cffc00f Merge master into sleep migration stack
Preserve both custom-image cleanup scheduling and the workspace recovery registration added on master.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 15:17:16 -05:00
DottaandPaperclip 9ae4c25e7e perf(runner): reuse compatible protected provider packs (#17749)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Native Runner starts provider runtimes in remote execution
environments.
> - Sandbox images already contain qualified provider packs.
> - Startup required the image pack to match the entire current app
release manifest.
> - An unrelated app commit could therefore cause pack verification,
transfer, and installation again.
> - This pull request selects protected packs by their provider
interface and platform.
> - The benefit is no extra pack probe, directory scan, version command,
link, or upload on the compatible image path.

## Linked Issues or Issue Description

**What happened?**

Starting a remote task can reject a compatible image pack because its
source revision or unrelated provider differs from the controller. Pack
replacement added about 16 seconds in the investigated startup. Startup
also repeated full content checks.

**Expected behavior**

Use an already qualified, protected pack when its selected provider
interface and target platform are compatible. Keep the selected artifact
identity for process launch and recovery.

**Steps to reproduce**

1. Install a qualified provider pack in a sandbox image.
2. Start a controller built from another app commit.
3. Start a remote OpenCode task. The old complete-manifest comparison
rejects the image pack even when the provider interface still works.

Related repairs: #16493 reduced transfer cost. #17512 retained exact
artifact authority during reattachment. This change preserves that
recovery rule and changes fresh-launch pack selection.

## What Changed

- Add explicit OpenCode and ACPX interface revisions to produced pack
manifests. App Git SHAs and dependency pins remain provenance.
- Read bounded protected-installation metadata in the existing final
runner metadata query. Accept only root-owned paths that the execution
user cannot write, including ancestors and manifest. Reject writable
aliases.
- Select and prepare the pack in server-owned environment setup before
constructing the existing transport. Bind provider launch paths and
digests from the selected installation. Save that identity for exact
reattachment.
- Keep full content verification for uploads, writable installations,
and legacy packs. Reuse successful verification within one startup. Keep
older attached runners compatible with the optional metadata request.
- Seal image packs and document the one-time image refresh that enables
reuse across later compatible releases. Keep selected ACPX agent
qualification checks.

## Verification

- Red/green regression: the old code rejects a protected pack from
another app revision with `manifest mismatch`; the fixed path selects it
without executing verification commands.
- Native startup regression: select the installed pack's own Node digest
with one existing runner metadata request and no pack verification or
version commands.
- Targeted pack, artifact, recovery, execution-driver, and Rust metadata
tests pass. Incompatible interfaces/platforms, malformed identities,
writable roots, path aliases, and exact reattachment are covered.
- Final revision `91dc1676ff67bdbe5866c8586daac10240530cca`: workspace
typecheck and build pass. All 53 current-head checks are successful,
with no pending or failed checks. Greptile is 5/5 with no open findings.
- The broad local `pnpm test:run` attempt reported a workspace-runtime
conflict test failure; its isolated rerun passed. The broad run was
stopped after that failure. Full CI now passes, including the server
test shards. This is not a claim that the full local run passed.
- Linux filesystem evidence: the production metadata functions read a
real root-owned preinstalled pack as a non-root user in 16 microseconds
median and 20 microseconds p95 across 100 warm reads. This measures
metadata admission, not model or hosted response latency.
- All 910 affected server tests and 57 Copilot attestation tests pass
locally on the final implementation. Full CI covers the unchanged Runner
transport. No provider qualification hash was refreshed.
- Built the actual Linux daemon at
`416e7ec7425d0d3565b4a5e1808002d650a60414` and ran its metadata command
as UID 65534. The protected installation returned its real manifest with
`immutable: true`; writable alias and missing-pack cases returned
`immutable: false`. This is metadata/permission evidence, not provider
execution.
- Hosted rollout and a hosted end-to-end latency measurement have not
run.

## Risks

- Existing images need one rebuild to publish the compatibility
declaration. Packs without it keep the legacy content-verification path.
- Fast admission relies on image publication producing a qualified
protected tree. Root execution and task-writable installations retain
full verification.
- Bump an interface revision when required runner/pack behavior changes
incompatibly. Deploy a new image to roll out compatible runtime fixes or
upgrades.
- This removes provider-pack preparation delay. Other runner startup,
context, model, and finalization costs remain separate.

## Model Used

OpenAI Codex, configured model `gpt-6.1-sol`, reasoning effort `xhigh`,
with tool use and code execution. The context-window size is 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-26 14:43:12 -05:00
DottaandPaperclip 8c702d59db feat(evals): package a portable Runner controller runtime (#17506)
Package a verified portable Runner eval controller with complete bounded file receipts, copied dependency closure, private evidence replay and symlink-safe CLI entrypoints. Preserve fail-closed cost holds, native trace receipts and all parent security repairs.

Verified head: 1c892ff464.
Validation: 72 synthetic source/portable tests pass after current-master sync. Full current-head CI passed (40386180906); Greptile reviewed this exact head at5/5, with zero unresolved findings.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-26 14:32:46 -05:00