Files
PaperClipAI/packages
Devin FoleyandPaperclip 712671068e test(runner): use the production close budget for settled callbacks (#15720)
## Thinking Path

> - Paperclip manages autonomous AI agents and their work.
> - Paperclip Runner preserves the authority of each provider session.
> - A reusable close requires durable semantic results, provider drain,
and suspension.
> - The real-process tests gave successful close cases a shorter budget
than production.
> - Under load, the test can miss its drain deadline and then expect an
unsafe success.
> - This change tests successful close with the unchanged production
budget.
> - Deliberately stalled and failed-persistence cases keep their short
deadline and rejection checks.

## Linked Issues or Issue Description

**What happened?**

Release verification failed in `fences reusable suspension against late
semantic completion` for both successful modes. The runner suspended,
but the provider drain proof missed the test's preparation deadline.
Production correctly rejected reuse. The test expected success.

**Expected behavior**

Successful real-process cases should use the production close budget.
Failure cases should still reject without exact settlement proof.

**Steps to reproduce**

Run the affected tests with the real runner and fake provider. Add 250
ms after each actual control-store save during close. With the old
five-second override, both successful modes reject with the same
missing-drain-proof settlement. With the production default, both pass.
The controlled delay reproduces the deadline mechanism. It does not
measure the actual CI disk latency.

**Paperclip version or commit**

Base commit: `1602512820832b43afef6786bedeee4e5294db8e`.

**Deployment mode**

Release verification and local real-process tests. No application or
deployment behavior changes.

Duplicate search: #14382 and #14395 modify nearby runner tests, but do
not change this parameterized close test. They are separate work.

## What Changed

- Use the production close budget for the two successful modes.
- Keep the explicit five-second budget for stalled callbacks and
persistence failures.
- Keep all semantic-result, exact drain, suspension, and checkpoint
assertions.
- Change one test file. Production code and deadlines stay unchanged.

## Verification

- Unchanged baseline: all four affected cases passed. Ten additional
successful-mode repeats passed.
- Controlled durable-write delay: the old budget failed both successful
modes. The production budget passed both.
- Candidate: all four affected real-process cases passed.
- Parallel baseline runner sweep: 3,491 passed, 5 unrelated local
fixture failures, and 12 skipped. The affected cases passed. This is not
an aggregate pass.
- `pnpm -r typecheck` passed.
- `pnpm build` passed.
- Independent review passed all four affected cases and repeated the
real-write latency contrast with the same result. No findings.
- `pnpm test:run` was interrupted after 15 unrelated local
warm-ownership fixture failure markers (exit 130). The full local
aggregate did not complete or pass. The changed Runner test is outside
the root test project list. The completed independent and focused checks
above cover the change.
- All GitHub CI is green on the exact head: 52 successful check runs,
one successful commit status, and two expected Storybook skips. The
affected Runner lane passed.
- Greptile scored the exact head 5/5, with no open comments.

## Risks

Low risk. This changes a test option only. The two successful cases can
now wait up to the existing production deadline. The two failure cases
keep their short bound. Missing receipts still reject reusable close.
The source does not relax a permission, ownership fence, or durability
check.

## Model Used

OpenAI GPT-6 through Codex, with reasoning, terminal tools, and an
independent agent review. The exact deployed model suffix 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: #` 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 and contains no internal
Paperclip ticket id or instance-derived details
- [x] I have run the affected tests locally and they pass; aggregate
limitations are recorded above
- [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-09 12:25:42 -07:00
..