Commit Graph
6144 Commits
Author SHA1 Message Date
Dotta d5254137e1 merge: preserve scoped comment recovery in combined sleep work
Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit 'e3fff84b6f81448c730dd165253a1a673f8d19b3':
  fix: scope comment-triggered recovery to the affected issue
  test: await issue recovery dispatch and cancellation settlement

# Conflicts:
#	server/src/services/issue-comment-writes.ts
#	server/src/services/native-status-reassessment-notifications.ts
2026-10-30 19:41:03 -05:00
DottaandPaperclip e3fff84b6f fix: scope comment-triggered recovery to the affected issue
Preserve company reconstruction for graph, run and eligibility changes. A real PostgreSQL producer regression verifies one assignment check among1000 open tasks, with broader eligibility reconstruction still intact.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 19:39:21 -05:00
DottaandPaperclip 7bb1af657a test: await issue recovery dispatch and cancellation settlement
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 19:38:27 -05:00
Dotta 1f1b046d72 Integrate bounded attention-retention source reconciliation 2026-10-30 19:06:00 -05:00
Dotta 0afcc625e2 Integrate company-scoped status-card deletion
* commit '32044a63e138e7b6a38ec801878d0db65cce6bbe':
  fix: scope status-card deletion notifications to its company
2026-10-30 19:04:59 -05:00
DottaandPaperclip e41bde2146 fix(server): bound graph queries and scope issue retention work
Chunk graph recovery, agent and workspace inputs; prove a70000-node PostgreSQL graph stays below parameter limits. Route ordinary issue writes through identity-scoped dependency invalidation for old/new parents, blocker ancestors, run links and liveness origins. Correlate all issue-related attention sources, preserve unrelated deadlines, and canonicalize notification keys. Exercise actual held/burst producers, visibility, relation and incident transitions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 19:01:12 -05:00
Dotta 32044a63e1 fix: scope status-card deletion notifications to its company 2026-10-30 19:00:51 -05:00
Dotta b29236d341 Integrate bounded issue recovery and canonical scope hints 2026-10-30 19:00:47 -05:00
Dotta 0fe6e038c2 Restore independent recovery duties and bound committed-source work 2026-10-30 18:58:39 -05:00
Dotta 09e9d59479 Integrate coalesced status-card invalidation 2026-10-30 18:49:58 -05:00
DottaandPaperclip cd4caaab26 fix: batch status-card source notifications
Coalesce committed company hints in a fixed one-second window without flooring real deadlines. Verify one hundred ordinary issue/comment writes, company isolation, deadline preemption, retained hints and settled SQL quietness. Await actual evaluation I/O in fake-clock acceptance instead of jumping across connection timers.

Co-Authored-By: Paperclip <paperclip@paperclip.ing>
2026-10-30 18:49:20 -05:00
Dotta 7ca047f536 Integrate expired-backup retry and consumer contract fixes 2026-10-30 18:45:01 -05:00
Dotta 4c4e4a469c fix: retain expired backup cleanup after listing failures 2026-10-30 18:44:34 -05:00
Dotta fef4c0ab35 Integrate selected external resolver authority fencing 2026-10-30 18:43:50 -05:00
DottaandPaperclip 594a4ee657 fix(external-objects): fence selected plugin results
Revalidate the exact selected plugin before result persistence even when an allowed fallback still supports the object. Preserve due debt and token ownership so a fresh allowed resolver can proceed.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:41:23 -05:00
Dotta 11a0c67af9 Integrate GitHub receipt completion fencing 2026-10-30 18:34:25 -05:00
Dotta c9d27c2039 Integrate durable status-card deadline reasons 2026-10-30 18:33:19 -05:00
Dotta f657d9326c Integrate per-root retention traversal budgets 2026-10-30 18:33:04 -05:00
DottaandPaperclip 573dcfb883 Integrate GitHub receipts with refresh fences and confirmation deadlines
Use the owning receipt transaction for source hints and snapshot token invalidation. Preserve scoped confirmation candidates, cancellation, and deferred outer-commit effects.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:29:35 -05:00
DottaandPaperclip 418f9ad395 fix(github): preserve terminal receipts across competing failure
Guard the failure writer against another receiver's committed success. Prove the rollback race red/green and bounded HTTP body cancellation with unrelated-company progress.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:29:21 -05:00
Dotta 9eee45ed2d Merge branch 'codex/sleep-run-task-recovery' into codex/sleep-issue-state-recovery
* codex/sleep-run-task-recovery:
  fix: normalize run dispatch hints to company identity

# Conflicts:
#	server/src/services/run-dispatch-notifications.ts
2026-10-30 18:28:44 -05:00
DottaandPaperclip 2ee5c7d6dc fix: preserve status-card deadline ownership through restart
Use a dedicated advisory-lock connection so a one-slot write pool can finish evaluation and result writeback. Record internal deadline provenance so startup recovers lost membership hints without advancing saved policy or retry debt.

Co-Authored-By: Paperclip <paperclip@paperclip.ing>
2026-10-30 18:28:40 -05:00
DottaandPaperclip e2983645cc Integrate canonical dispatch hints while preserving issue recovery
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:27:49 -05:00
DottaandPaperclip efbe3fa67d fix(server): isolate blocker traversal budgets per root
Share queried graph facts across roots while retaining independent node/depth limits, expanded reachability and truncation for classification. Unrelated limited graphs must not change terminal subjects or delay archive deadlines. Prove depth/node overflow and overlapping-root liveness red/green, preserve the100-root SQL bound, and qualify existing owner assertions on isolated PostgreSQL.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:25:01 -05:00
DottaandPaperclip 972fbc0760 fix: normalize run dispatch hints to company identity
Wider interaction and execution objects must coalesce into one company dispatch scope.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:24:45 -05:00
Dotta bf94113254 Merge remote-tracking branch 'origin/master' into codex/sleep-github-connection-work
* origin/master:
  fix(runner): accept late Antigravity login URL during drain (#18254)
  fix(environments): persist sandbox ownership before creation (#18357)
  fix(server): bound failed lifecycle verification (#18383)
2026-10-30 18:21:05 -05:00
DottaandPaperclip a5d31c7f1f fix(github): retain transaction ownership and scoped credential debt
Preserve webhook metadata across OAuth rotation and lease cleanup; scope and coalesce GitHub work activation, retaining explicit producer coverage.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:21:05 -05:00
DottaandPaperclip 0afb5ea379 Integrate event-driven issue recovery and source fanout
Preserve routine restore, card, retention, and issue recovery notifications in their original writer transactions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:20:52 -05:00
DottaandPaperclip 04afdcdee5 Integrate scoped backup expiration notifications
Preserve backup issue identity alongside existing recovery, retention, card, routine, merge, and external-object owners.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:20:27 -05:00
DottaandPaperclip 2bca873c63 Integrate external refresh with existing deadline owners
Preserve all company mutation consumers and verify both merge-confirmation and external-refresh startup registrations.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:19:58 -05:00
DottaandPaperclip 97063b307f Integrate merge-confirmation deadline owner
Retain all scoped issue consumers beside merge-confirmation notifications.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:19:28 -05:00
DottaandPaperclip bc3559eb5e Integrate routine status with scoped execution and source notifications
Keep all owner subscriptions, restore issue identity, and remove only the replaced routine and retention sweeps.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:18:44 -05:00
DottaandPaperclip 091f5a37c6 Integrate attention retention with recovery and card notifications
Union feature-owned hints and preserve existing scoped queue behavior; replace the old retention sweep with its deadline owner.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:18:19 -05:00
DottaandPaperclip a836109fb0 Restore complete parent sources in local integration resolution
Reconstruct conflicted files from immutable parents and apply only line-bounded additive resolutions. Keep this unpublished integration correction visible in history.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:17:28 -05:00
DottaandPaperclip 4b8d9a64ca fix(server): notify routine status after subtree restore
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:16:05 -05:00
DottaandPaperclip 94ddb74c0c Integrate recovery and status-card sleep owners for combined verification
Preserve both notification subscribers and all existing execution queues; retain the union of scoped execution identities.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:15:42 -05:00
Dotta ab5108611d Run recovery producer acceptance on isolated PostgreSQL fixtures 2026-10-30 18:15:23 -05:00
Dotta ff5586cb74 Merge branch 'codex/sleep-run-task-recovery' into codex/sleep-issue-state-recovery
* codex/sleep-run-task-recovery:
  fix(environments): persist sandbox ownership before creation (#18357)
  fix(server): bound failed lifecycle verification (#18383)
2026-10-30 18:10:01 -05:00
Dotta dc4456c76b Drive issue recovery from scoped source writes and saved deadlines 2026-10-30 18:10:00 -05:00
DottaandPaperclip d199b3e0a6 Merge origin/master and retain Cloud skill verification coverage
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:09:56 -05:00
DottaandPaperclip 4e97daafa0 refactor: remove obsolete external object batch refresh entrypoints
Exercise lease, selection, and recovery behavior through the registered scheduler owner.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:09:41 -05:00
DottaandPaperclip 7e33906d14 Merge published Antigravity authentication fix
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:07:43 -05:00
DottaandPaperclip 66b71955cf Merge origin/master and preserve Cloud skill verification coverage
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:05:34 -05:00
DottaandPaperclip 18b1637b63 fix(runner): accept late Antigravity login URL during drain (#18254)
## Thinking Path

> - Paperclip manages work performed by AI agents.
> - The native Runner owns Antigravity subscription sign-in.
> - Sign-in receives completion on stdout and the browser URL on stderr.
> - The two pipes can deliver the completion result before the valid
URL.
> - The owner rejected that URL after it entered the completed phase.
> - This pull request accepts one validated URL while the same child
drains.
> - A real child regression now proves the order and the failure
controls.

## Linked Issues or Issue Description

Refs #18188, #18189, and #18190. Related qualification work: #18345 and
#18356. The duplicate search found this existing PR, so this update
preserves its history and adds the real child proof here.

**What happened?**

A valid sign-in can fail when the authenticate response arrives before
the authorization URL on the other pipe. The completed phase then
rejects the valid URL. The same existing success case failed in [current
follow-up
CI](https://github.com/paperclipai/paperclip/actions/runs/41138618869/job/124347859445).
That log has no stream-order trace, so it does not prove its inner
failure branch.

**Expected behavior**

Both valid delivery orders must succeed. Invalid or duplicate URLs,
unexpected protocol requests, failed retirement, and failed credential
verification must still fail.

**Steps to reproduce**

1. Run a synthetic native child that completes authenticate on stdout.
2. Wait for stdin EOF before it emits the authorization URL on stderr.
EOF proves that the parent accepted the result and began retirement.
3. The valid case fails on frozen master
`45a3a92e6dc52d20923b9aa34a22fee2ec5443f9`. The invalid and duplicate
controls pass there.
4. Run the same regression with this PR's existing production fix. All
three cases pass.

**Paperclip version or commit**

Existing reviewed PR parent: `646f5cdf37898ad54e1fa1cdfe39f59844da3e7c`.
Frozen actual master for the real child RED:
`45a3a92e6dc52d20923b9aa34a22fee2ec5443f9`.

## What Changed

- Accept one fully validated authorization URL in the authentication or
completed-drain phase. Keep duplicate rejection and all existing URL
checks.
- Retain the ten existing in-memory controls for both valid orders and
eight failure paths.
- Add three real child cases for valid, invalid, and duplicate late
URLs. Use stdin EOF to order the streams without sleeps or a mocked
retirement handler.
- Check exact protocol requests, child exit, close-once behavior,
Google-call counts, and persisted refresh rotation. This update changes
only the existing test file; it adds no production delta to the reviewed
parent.

## Verification

- Frozen actual master: the new valid real child case fails, while both
negative controls pass. The original eight-control parent calibration
also remains recorded in this PR's history.
- Existing fixed source plus the new tests: 24 passed. This includes 11
existing authentication tests, ten stream controls, and three real child
cases.
- Late invalid and duplicate URLs fail with zero Google calls. The valid
case makes two mocked identity calls and saves the rotated synthetic
refresh token. All three retire the real child and close the command
lease once.
- Scoped owning TypeScript `noEmit` passes for the auth module and both
test files. The temporary configuration is not committed. Diff and
credential-pattern checks pass.
- The tests use real child pipes and private synthetic files. Google
responses and the command installation are mocked. No provider account,
network request, model run, app, or QA deployment was used.
- Full monorepo typecheck, tests, and build were not run locally. Fresh
[normal
CI](https://github.com/paperclipai/paperclip/actions/runs/41140757050)
passes on `1744c9f3374f78b10c2f15c42f3cf5d3af8c3119`: 56 successful
checks, two skipped, and one neutral. Typecheck, build, Rust, static,
Runner, server and browser lanes pass. Greptile gives that exact head a
fresh 5/5 with zero unresolved threads. The PR is mergeable and clean.
The earlier parent's passing CI remains historical evidence only.

## Risks

The change accepts a URL while the same authenticated child drains. It
still validates the exact OAuth URL and rejects a second URL. Success
still requires the authenticate result, verified credentials, and proven
process retirement. No provider pins, contracts, timeout bounds,
retries, or public APIs change. Existing documentation already specifies
these sign-in semantics; no documentation change is needed.

## Model Used

OpenAI Codex, based on GPT-6, with tool use and code execution. The
exact runtime model ID and context window were 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-30 18:05:05 -05:00
DottaandPaperclip d86188c902 test: prove timer deadlines survive settled drain holds
Expect committed producers to release idle admission while retaining a resume deadline, then verify actual dispatch and final quiet after resume.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:03:34 -05:00
DottaandPaperclip 7db456e235 Merge origin/master and retain both Cloud skill fixture contracts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:03:08 -05:00
DottaandPaperclip e6ef9d3833 Merge master and preserve controlled shared storage fixture
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:03:01 -05:00
DottaandPaperclip d6a2d661f0 Merge origin/master and preserve Cloud skill verification coverage
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:02:24 -05:00
DottaandPaperclip 259a3ae4df fix(server): scope backup invalidation to retained session references
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:01:35 -05:00
DottaandPaperclip 097ac579da perf(server): batch remaining attention retention page evidence
Load company-partitioned decision/recovery links, run/agent visibility and newer-run probes once per page; share one blocker graph reconstruction and exact SQL timestamps across page entries. Keep fresh per-entry archive locks and revalidation. Add full100-source query budgets and late visibility/supersession safety controls.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 17:59:04 -05:00