Commit Graph
2972 Commits
Author SHA1 Message Date
Dotta 7e4a18ec76 test: integrate reviewed predecessor fixes for PR 18382
* commit '06c3c6e9d1fd3495643c82696b3de07fcc83c600':
  fix(server): fence status card refresh decisions and retry debt
  fix: park unchanged project budget execution waits
2026-10-30 21:20:29 -05:00
Dotta 06c3c6e9d1 test: integrate reviewed predecessor fixes for PR 18399
* commit '63bb758f01dab51e0d95dabe5832098942f65c37':
  fix(server): fence status card refresh decisions and retry debt
  fix: park unchanged project budget execution waits
2026-10-30 21:20:29 -05:00
Dotta 63bb758f01 test: integrate reviewed predecessor fixes for PR 18388
* commit '5e1a5974a74fa832a6db683726251a8cc1833c33':
  fix(server): fence status card refresh decisions and retry debt
  fix: park unchanged project budget execution waits
2026-10-30 21:20:29 -05:00
DottaandPaperclip 5e1a5974a7 Merge commit 'af7b7d3316c86cdefc0845dc90f26b7cb436b9d1' into codex/sleep-status-card-evaluation
* commit 'af7b7d3316c86cdefc0845dc90f26b7cb436b9d1':
  fix: park unchanged project budget execution waits

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 21:18:22 -05:00
DottaandPaperclip def5a23997 fix(server): fence status card refresh decisions and retry debt
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 21:18:05 -05:00
DottaandPaperclip af7b7d3316 fix: park unchanged project budget execution waits
Lock and re-read project pause eligibility before publishing budget intent. Cover actual project Retry parking/release and concurrent pause admission without no-op hints.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 21:13:42 -05:00
Dotta 4a2155d9ef Merge branch 'codex/sleep-stack-03' into codex/sleep-stack-05
* codex/sleep-stack-03:
  fix(ui): invalidate pending startup work on sign-out
  fix(server): park persisted deferred admission refusals
  test(server): preserve attention feed beyond blocker root budget
2026-10-30 20:51:05 -05:00
Dotta efe830b6b7 Merge branch 'codex/sleep-stack-01' into codex/sleep-stack-03
* codex/sleep-stack-01:
  fix(ui): invalidate pending startup work on sign-out
  fix(server): park persisted deferred admission refusals
  test(server): preserve attention feed beyond blocker root budget
2026-10-30 20:51:05 -05:00
Dotta 2248af92a8 Merge branch 'codex/sleep-stack-07' into codex/sleep-stack-01
* codex/sleep-stack-07:
  fix(ui): invalidate pending startup work on sign-out
  fix(server): park persisted deferred admission refusals
2026-10-30 20:51:05 -05:00
DottaandPaperclip 11e92e3875 merge: preserve typed admission refusals and status-card source signals
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:51:04 -05:00
Dotta a91c4280aa Merge commit '295f4f82722d92b93d8b5135399bca937116b536' into codex/sleep-stack-01
* commit '295f4f82722d92b93d8b5135399bca937116b536':
  test(server): preserve attention feed beyond blocker root budget
2026-10-30 20:51:04 -05:00
Dotta c0fe0feffb Merge commit '19a97bbe57d1ebd3691c70dd822488efe7e5d3e1' into codex/sleep-stack-c1
* commit '19a97bbe57d1ebd3691c70dd822488efe7e5d3e1':
  fix(server): park persisted deferred admission refusals
2026-10-30 20:50:39 -05:00
DottaandPaperclip 19a97bbe57 fix(server): park persisted deferred admission refusals
Distinguish a budget or agent refusal saved on the existing receipt from genuine recovery failure. Preserve HTTP409 messages and details, grant each new wait reason its existing finite grace, and retain failure backoff for unsaved or unexpected errors. Prove actual Retry admission,25-minute SQL quiet, independent warm producer-to-process release, missing/cancelled receipts and real PostgreSQL write failure.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:35:57 -05:00
DottaandPaperclip 295f4f8272 test(server): preserve attention feed beyond blocker root budget
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:35:52 -05:00
DottaandPaperclip 8cc1e2be07 merge: preserve confirmation and attention mutation notifications
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:26:35 -05:00
DottaandPaperclip 40bd4df17b merge: preserve routine projections across retained execution producers
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:26:14 -05:00
DottaandPaperclip 688f35763d merge: preserve attention, status-card and recovery source ownership
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:25:15 -05:00
DottaandPaperclip 9b4beff72b merge: preserve status-card and recovery producers in the review stack
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:24:40 -05:00
DottaandPaperclip 290d12cf4b merge: rehearse issue-recovery predecessor for saved receipts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:24:05 -05:00
DottaandPaperclip dee5296b8a merge: rehearse current dispatch predecessor for issue recovery
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:23:55 -05:00
DottaandPaperclip fcc107739c merge: rehearse current master and UI prerequisite for dispatch
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:23:37 -05:00
DottaandPaperclip 255713e0cd fix(server): bound and coalesce issue retention invalidations
Bound reverse ancestor discovery before materializing adjacency, deduplicate cycles and emit one canonical affected-issue batch per write. Overflow delegates complete company reconstruction to existing paging instead of dropping eligibility or creating per-ancestor worker debt. Prove real high-fanin producer bursts, PostgreSQL execution limits, canonical cyclic batches and far ancestor archive deadlines.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 20:02:36 -05:00
DottaandPaperclip dff6c00468 Join receipt acceptance passes before advancing saved deadlines
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 19:50:27 -05:00
DottaandPaperclip 8911cca5d0 fix(server): retain live evidence beyond blocker graph admission
Keep bounded returned child facts independent of graph node and edge admission, and use the existing live-work predicate for running status, active runs and pending waits. Cover the opposite query ordering with 1,999 explicit blockers, fresh retention checks, no archive/outbox and unchanged SQL/resource bounds.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 19:49:06 -05:00
Dotta 0adba98c10 Merge commit 'e3fff84b6f81448c730dd165253a1a673f8d19b3' into codex/sleep-deferred-execution-receipts
* commit 'e3fff84b6f81448c730dd165253a1a673f8d19b3':
  fix: scope comment-triggered recovery to the affected issue
  test: await issue recovery dispatch and cancellation settlement
2026-10-30 19:45:15 -05:00
DottaandPaperclip c74f5f12ba Retain moved receipt deadlines and wake released execution gates
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 19:45:15 -05:00
DottaandPaperclip 6469daec07 fix: bound status-card active-hours calculation work
Reuse bounded timezone formatters and upcoming openings only within their exact searched closed ranges. Short-circuit empty windows while preserving the existing cold DST search and precise instant eligibility. Verify cost bounds, cache eviction, timezone transitions and twenty-card ordinary source delivery.

Co-Authored-By: Paperclip <paperclip@paperclip.ing>
2026-10-30 19:41:19 -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
DottaandPaperclip 71d7b9f09e fix(server): bound blocker facts and preserve origin authority
Resolve liveness/stranded references through trusted company issue rows, including valid none sentinels. Bound shared blocker nodes, edges and query results; return private deferred-root completeness so retention immediately performs finite exact source checks. Preserve already-observed live work, completed-root classification and true deadlines. Cover historical producer metadata, moved recovery tasks, many-heavy graph limits, quiet rechecks and faithful transaction fixtures.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 19:35:20 -05:00
DottaandPaperclip ac6c5191ee Drive saved execution receipts from committed work and deadlines
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 19:22:39 -05:00
Dotta f201195a92 test: await committed recovery and adapter admission outcomes 2026-10-30 19:20:10 -05:00
Dotta 4ef018cfe6 test: model retention reads in native cleanup transaction fixture 2026-10-30 19:17:14 -05:00
Devin FoleyandPaperclip 87ae20ae65 fix(server): reconcile failed sandbox cleanup with signed absence (#18407)
Reconcile failed ephemeral Cloud leases through a signed cleanup-only absence observation when local historical inspection is unavailable. Preserve failure outcomes, exact resource bindings, retention and row-version fences; grant no run-continuation authority.

All 54 current-head checks/statuses passed. Greptile is 5/5, Medium, with no findings or unresolved threads. The 38 focused tests pass; both new reconciliation cases fail without the fallback. Isolated baseline and branch idle suites each pass all 225 cases. The original broader local teardown timeout is retained in the PR, and the full local run remains in progress.

Cloud protocol support is already serving in staging. Exact candidate composition and hosted provider sleep/wake qualification follow this merge. Production has not been changed.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 17:04:04 -07: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 0fe6e038c2 Restore independent recovery duties and bound committed-source work 2026-10-30 18:58:39 -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
Nicky Leach 9e904ee519 perf(server): overlap independent heartbeat preparation reads (#18372) 2026-10-30 16:49:20 -07:00
DottaandPaperclip 91261d5a03 fix(server): preserve budget history for deleted resources (#18389)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Budget views show saved policies, incidents and spend for each
company.
> - A policy can remain after its agent or project has been deleted.
> - The overview currently stops when it cannot resolve that old
resource.
> - A current agent's budget then becomes unreadable during normal
setup.
> - This pull request preserves the historical row in display summaries.
> - Admission and policy changes still require a real company-owned
resource.

## Linked Issues or Issue Description

**What happened?**

The budget overview throws `Agent not found` when a saved policy
references a deleted agent. One old resource prevents the company from
reading its current budgets. The same problem affects historical project
policies and incident summaries.

**Expected behavior**

The overview should retain historical policy and incident IDs and spend.
It should display `Deleted agent` or `Deleted project` for a missing
resource. Read access must not grant permission to execute work or
change a budget for that resource.

**Steps to reproduce**

1. Create an agent and a budget policy for it.
2. Permanently delete the agent after its other dependencies have been
cleared.
3. Read the company's budget overview. The existing service throws
instead of returning its remaining current and historical rows.

**Paperclip version or commit**

The isolated repair starts from merged commit
`d9354bbfc35ef74333e90e596ce21dc8e59149b9` and integrates the exact
merged baseline test fix `8595efc20bda3ce20a9fbbf34a5d156a6fcf6d57`. It
also integrates the actual merged Antigravity auth fix
`18b1637b6371a6a6adade857e2a73654ee626fef` (#18254). The diff against
the selected merged parent remains two budget files.

**Related work**

Earlier reports and implementations: #11058 and #4333. This extracts the
product prerequisite from #18351 so it can qualify independently of that
journey's other dependencies. The change contains only the budget
service repair and four database regression cases.

## What Changed

- Resolve deleted agent and project scopes only when building display
summaries. Preserve their original IDs, policies, incidents and
accounting records.
- Reject a saved policy or incident that resolves to another company's
resource. Propagate other read failures.
- Keep missing-company resolution, work admission and policy changes
strict. Validate company, policy and incident scope bindings before
either incident action. A budget raise requires a live company-owned
resource. Historical dismissal may proceed only for a genuinely deleted
owned agent/project, and must reject live foreign or mismatched scopes.
- Add four canonical PostgreSQL regression cases: deleted agent history,
deleted project history, missing-scope admission and budget raises with
safe historical dismissal, and foreign/mismatched references. The
history cases also verify current ledger spend and unchanged stored
rows.

## Verification

- Real-service RED/GREEN against official PGlite with every canonical
migration: the original overview throws for deleted history; the repair
returns the historical IDs, incidents and spend while retaining current
budgets.
- Mutation regression RED/GREEN: missing-resource budget raises must
reject before writes; owned deleted-scope dismissal must reject its
linked pending approval, retain policy/agent/ledger data and incident
history, and remove the incident from the active list. Live foreign and
mismatched scopes reject both actions without mutations.
- Current integrated head `b3434f5ad05fd3067379352700c36bfe826179c4`:
all four canonical PostgreSQL regressions pass in [server
2/12](https://github.com/paperclipai/paperclip/actions/runs/41142588583/job/124361194077),
and all five existing budget-service tests pass in [server
7/12](https://github.com/paperclipai/paperclip/actions/runs/41142588583/job/124361194080).
Both use the CI merge against selected parent `18b1637`.
- Clean-build declaration typing passes in the current CI typecheck
gate. The earlier local source-alias no-emit check also passed,
including the canonical actor argument. The local worktree borrows
compiled dependencies from a sibling checkout; a later real-service
import was blocked by its stale `sandboxCreationOperations` export, so
clean-build CI is authoritative for the final integration. No production
workaround was made.
- `git diff --check` passes. Broad repository typecheck, tests and build
run in current-head CI rather than repeated locally. Native local
PostgreSQL could not start because this host exhausted its semaphore
pool; no global IPC settings or unrelated processes were changed.
- One unchanged Runner lane retry was authorized after a probable
intermittent close-settlement fixture failure. The [original
failure](https://github.com/paperclipai/paperclip/actions/runs/41142588583/job/124360234111)
occurred in `omitted-context` cleanup. A [fresh passing Linux
lane](https://github.com/paperclipai/paperclip/actions/runs/41142552195/job/124360110386)
passed the same case and all 1,998 tests with byte-identical entire
Runner and adapter-utils trees, lockfile, root package, scripts and
workflows, against the same merged base. The fixture has a five-second
close allowance with a 2.5-second suspension reserve; a host stall is
not proven. No budget path or changed close input was found. The [single
targeted
retry](https://github.com/paperclipai/paperclip/actions/runs/41142588583/job/124365812609)
passed the same case in 1,034 ms and all 1,998 lane tests; dependent
verification also passed. All 57 current PR checks are terminal and
green.
- The product helper requires all current CI and clean review before
merge. Actual QA budget-overview proof will run on the combined final
app before hiring qualification. No deployed success is claimed. The
older `b4863dd` artifact was never deployed; selected parent `18b1637`
adds sandbox/lifecycle changes and migration 0418, so whole-app identity
is not claimed. The budget module and relevant budget contracts remain
unchanged, and final hiring requires the combined final app with
explicit source identities.

## Risks

Budget summaries now return historical rows whose resources have been
deleted. These rows use explicit display names and preserve their
accounting data. They do not create a resource or relax work admission,
authorization or budget grants. Historical incident dismissal changes
only that incident and its linked approval; it does not resume work or
raise a budget. Cross-company references still fail closed. There is no
schema migration and no new background work.

## Model Used

OpenAI Codex, GPT-6 family. The session does not expose a more specific
backend model ID or fixed context window. Used reasoning, repository
tools, TypeScript and database test execution.

## 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 (the
PR description documents the display-only history and strict-mutation
contract)
- [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:36:36 -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 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
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
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 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 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