mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-03 17:51:58 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - CI verifies recovery, execution authority, and background work before changes merge. > - Diff selection saves work, but a selected file still runs its cases in sequence. > - The three longest files in a recent full master run each took over eight minutes. > - Many of these cases must observe real lease expiry or idle periods. > - This pull request gives independent cases separate fixtures so those periods can overlap. > - The benefit is a shorter test path with the same assertions and observation windows. ## Linked Issues or Issue Description Refs #18464. The latest measured successful master [Cloud readiness run](https://github.com/paperclipai/paperclip/actions/runs/41300933157) spent 581 seconds in issue recovery, 569 seconds in native restart recovery, and 512 seconds in maintenance server routes. File-level selection cannot divide those long serial files. Shortening their lease or idle windows would weaken the regressions they protect. ## What Changed - Split issue recovery into four files with separate database and worker fixtures. Keep all 18 cases. - Split native restart coverage into recovery, lease renewal, preparation, checkpoint cost, and disk-loss files. Keep all original 79 cases, including the existing container-qualified cases. The master update also retains its newly added recovery cases. - Close each native case's database clients after pending failure reports drain. The shortened file must not rely on idle timeouts to stay below PostgreSQL's connection cap. - Run the native Runner lane with two isolated fork workers. Register every new file in the lane and verify that the partition still includes every suite. - Give each maintenance case an owned database. Run at most two cases together with test-local assertion contexts. Keep both real 90-second quiet windows and all 17 cases. - Preserve serial execution when any explicit shared `PAPERCLIP_*_TEST_DATABASE_URL` is present. An admin URL that creates a separate database per fixture can run concurrently. - Refresh shard weights from the protected master run. Mark the initial split-file weights as conservative estimates until master measures them. - Anchor the attention-retention fake clock to PostgreSQL time. Its fixed clock started trailing real database timestamps after 12:00 UTC on November 1, causing an archive-deadline test to time out. Keep its deadline assertions and timeout unchanged. - Document the fixture and concurrency rules. Leave runner authorization and workflows unchanged. ## Verification - Final head `c9a4ff11b3ba81277341294c7721b34fb8705ede`: [full PR CI passed](https://github.com/paperclipai/paperclip/actions/runs/41477848686), including typecheck, build, all test shards, E2E, and the final verification gate. The rollup has 55 successful checks, one neutral review check, four expected skips, and no pending or failed checks. Greptile reviewed this exact head at 5/5 with no actionable findings. - November 2 master update: merge commit `c9a4ff11b3ba81277341294c7721b34fb8705ede` resolves the native recovery import conflict while retaining the new busy-row and remote continuity cases from master. All 38 test-runner checks and the three new busy-row cases passed locally. - Retention verification after the master update: the first local full run passed 52 cases and timed out at 15 seconds in the paged-backlog case. That case passed in isolation. The unchanged master suite passed all 53 cases (82.95 seconds), and a full PR rerun also passed all 53 (76.65 seconds). The initial timeout cause remains unproven; no timeout or assertion was weakened. - Previously verified head `fd288a8e8c88df54dcdca7b7e42366b019182782`: [full PR CI passed](https://github.com/paperclipai/paperclip/actions/runs/41312625439). There are 55 successful checks, one neutral review check, four expected skips, and no pending or failed checks. Greptile reviewed this head at 5/5 with no actionable findings. - Issue recovery: 18/18 passed before and after the split on the same local machine and PostgreSQL fixture path. Wall time changed from **630.6 seconds to 319.7 seconds** (49% less). All case titles match. - Maintenance also passed all 17 cases on AWS: structured file cost dropped from **511.8 to 282.6 seconds** across the linked master run and the first PR run. These are different CI runs, so the matched local comparison below is the stronger isolated measurement. - Maintenance: 17/17 passed before and after with the restored pinned dependencies. Wall time changed from **488.1 seconds to 317.2 seconds** (35% less). All 120 assertion lines remain. Both real 90-second windows also passed a final targeted run. - Native restart: 71 passed and eight existing container-only skips before and after the split. Wall time changed from **632.1 seconds to 346.8 seconds** (45% less). All 79 cases and 254 assertion lines remain. - `pnpm -r typecheck`: passed. - `pnpm build`: passed. - Extra TypeScript checking of the moved recovery and maintenance tests passed. The standard server config excludes `src/__tests__`. A separate check of attention-retention fixtures reports existing type errors; the unchanged baseline has identical diagnostics, with none introduced by the clock fix. - `node --test scripts/__tests__/run-vitest-stable-shard.test.mjs scripts/ci/test-selection*.test.mjs`: 61 passed. - `pnpm test:run`: stopped in the second chat partition: 335 passed and four failed (two GitHub retry-state assertions and two Teams timeouts), after 339 passed in the first partition. These chat tests are unchanged. All four pass in a focused run (19.1 seconds). The full-suite ordering/load cause remains unproven. All three CI chat jobs passed. The previously failing cases passed there in 1.3, 1.3, 2.4, and 2.2 seconds; see [the chat job log](https://github.com/paperclipai/paperclip/actions/runs/41309691650/job/124857580714). The attention-retention timeout repeated in CI and in an isolated local run. Its fake clock was fixed at November 1 noon, which had fallen behind real PostgreSQL timestamps. Anchoring it to the database clock passes all 53 cases; the failed case now takes 425 ms. - The native CI lane passed all 162 runnable cases with eight existing skips after client cleanup: **650.7 seconds on the earlier master run to 391.0 seconds on this PR**. - CI found native connection exhaustion after the long waits moved out of the main file. The same failure reproduced locally at a 100-connection cap. Per-case client cleanup fixes the shortened file at that cap, and all five native files now pass together at that cap (71 passed, eight existing skips). - Early attempts exposed a missed fixture reference and a missed reporting setup hook during extraction; both were restored. The first CI policy run also required moving the new native fixture under test helpers; that boundary check now passes locally. A separate auxiliary command picked up the host pnpm version and removed dependencies. The original maintenance baseline reproduced the same missing-package failures, so that failed attempt is excluded from timing comparisons. A later unchanged-baseline run passed all 17 cases. The pinned install was restored before the passing maintenance run. The audit also covered heartbeat process recovery, deferred receipts, chat, workspace recovery, attention, and connection management. Their shared fake clocks/provider mocks or existing partitioning need different changes. The 16,400-row attention case and the large checkpoint stream remain intact because their size protects real limits. ## Risks - Two isolated processes use more memory and database connections than one. Concurrency is capped at two. Shared database overrides force serial execution. - Moving setup into helpers can change test lifecycle order. The split suites keep the same case assertions and use independent process state; focused runs and the full CI suite check the move. - Split-file weights are estimates based on case timings from the linked run plus repeated setup cost. The next protected-master refresh replaces them. Weights never permit tests to be skipped. - Local timing varies with host load. CI measurements after merge are needed to establish the overall PR wall-time improvement. ## Model Used OpenAI Codex, GPT-6, with reasoning, repository inspection, tool use, and code execution. The exact backend revision 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 (changed suites and focused reruns; the full local-run caveat is 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>
184 lines
12 KiB
JSON
184 lines
12 KiB
JSON
{
|
|
"$comment": "Generated by node scripts/ci/refresh-test-durations.mjs from successful protected-master Cloud readiness runs. Median per-file cost includes tests, hooks, collection, setup and environment preparation when the timing reporter is present; older logs bootstrap test/hook durations only. Missing files retain their prior weight or the partitioner's median fallback. Timing changes only partition work; they never authorize skipping a test.",
|
|
"unit": "ms",
|
|
"sources": [
|
|
{
|
|
"run": 41300933157,
|
|
"attempt": 1,
|
|
"sha": "247552fe0719dcc92f7b42c50b658be6f624986d",
|
|
"url": "https://github.com/paperclipai/paperclip/actions/runs/41300933157"
|
|
}
|
|
],
|
|
"coverage": {
|
|
"measured": 164,
|
|
"withSetup": 164,
|
|
"inventory": 164
|
|
},
|
|
"durations": {
|
|
"server/src/__tests__/access-routes-hidden-floor.test.ts": 4135,
|
|
"server/src/__tests__/access-routes-permissions-upgrade.test.ts": 5005,
|
|
"server/src/__tests__/activity-routes.test.ts": 15673,
|
|
"server/src/__tests__/adapter-auth-signal-routes.test.ts": 12341,
|
|
"server/src/__tests__/adapter-model-refresh-routes.test.ts": 6883,
|
|
"server/src/__tests__/adapter-routes-authz.test.ts": 13707,
|
|
"server/src/__tests__/adapter-routes.test.ts": 3323,
|
|
"server/src/__tests__/agent-action-audit-routes.test.ts": 6056,
|
|
"server/src/__tests__/agent-adapter-validation-routes.test.ts": 84643,
|
|
"server/src/__tests__/agent-cross-tenant-authz-routes.test.ts": 4315,
|
|
"server/src/__tests__/agent-device-login-routes.test.ts": 6491,
|
|
"server/src/__tests__/agent-hire-auth-inheritance-routes.test.ts": 7530,
|
|
"server/src/__tests__/agent-hire-idempotency-routes.test.ts": 5637,
|
|
"server/src/__tests__/agent-instructions-routes.test.ts": 4157,
|
|
"server/src/__tests__/agent-live-run-routes.test.ts": 66708,
|
|
"server/src/__tests__/agent-permissions-routes.test.ts": 4758,
|
|
"server/src/__tests__/agent-runner-qualification-routes.test.ts": 5232,
|
|
"server/src/__tests__/agent-secrets-routes.test.ts": 5078,
|
|
"server/src/__tests__/agent-skills-routes.test.ts": 5414,
|
|
"server/src/__tests__/agent-test-environment-routes.test.ts": 4719,
|
|
"server/src/__tests__/ai-connection-router.test.ts": 34133,
|
|
"server/src/__tests__/announcements-routes.test.ts": 4301,
|
|
"server/src/__tests__/approval-routes-idempotency.test.ts": 3592,
|
|
"server/src/__tests__/artifact-review-document-routes.test.ts": 7252,
|
|
"server/src/__tests__/assets.test.ts": 9197,
|
|
"server/src/__tests__/auth-routes.test.ts": 1477,
|
|
"server/src/__tests__/auth-session-route.test.ts": 3303,
|
|
"server/src/__tests__/authz-company-access.test.ts": 1265,
|
|
"server/src/__tests__/authz-existence-oracle-guard.test.ts": 100,
|
|
"server/src/__tests__/authz-secret-context.test.ts": 1282,
|
|
"server/src/__tests__/board-chat-route-feature-flag.test.ts": 881,
|
|
"server/src/__tests__/bootstrap-claim-routes.test.ts": 3293,
|
|
"server/src/__tests__/browser-use-route-scope.test.ts": 3223,
|
|
"server/src/__tests__/built-in-agent-routes.test.ts": 6590,
|
|
"server/src/__tests__/cases-routes.test.ts": 26922,
|
|
"server/src/__tests__/cli-auth-routes.test.ts": 17761,
|
|
"server/src/__tests__/cloud-routes.test.ts": 1476,
|
|
"server/src/__tests__/companies-route-cross-company-authz.test.ts": 11710,
|
|
"server/src/__tests__/companies-route-path-guard.test.ts": 1523,
|
|
"server/src/__tests__/company-branding-route.test.ts": 4996,
|
|
"server/src/__tests__/company-import-transfer-routes.test.ts": 2992,
|
|
"server/src/__tests__/company-portability-routes.test.ts": 3065,
|
|
"server/src/__tests__/company-portability.test.ts": 9374,
|
|
"server/src/__tests__/company-search-extract-routes.test.ts": 4311,
|
|
"server/src/__tests__/company-search-rate-limit-routes.test.ts": 4322,
|
|
"server/src/__tests__/company-skill-policy-routes.test.ts": 3653,
|
|
"server/src/__tests__/company-skills-import-authz-routes.test.ts": 5508,
|
|
"server/src/__tests__/company-skills-routes.test.ts": 4067,
|
|
"server/src/__tests__/company-user-directory-route.test.ts": 3338,
|
|
"server/src/__tests__/cost-data-quality-routes.test.ts": 3245,
|
|
"server/src/__tests__/costs-service.test.ts": 4246,
|
|
"server/src/__tests__/decision-queues-routes.test.ts": 5259,
|
|
"server/src/__tests__/document-annotation-routes.test.ts": 8439,
|
|
"server/src/__tests__/email-routes-provider-errors.test.ts": 3201,
|
|
"server/src/__tests__/environment-custom-image-routes.test.ts": 4007,
|
|
"server/src/__tests__/environment-instance-routes.test.ts": 4041,
|
|
"server/src/__tests__/environment-routes.test.ts": 3697,
|
|
"server/src/__tests__/environment-selection-route-guards.test.ts": 4164,
|
|
"server/src/__tests__/execution-workspace-runtime-lease-route.test.ts": 4063,
|
|
"server/src/__tests__/execution-workspaces-routes.test.ts": 3474,
|
|
"server/src/__tests__/express5-auth-wildcard.test.ts": 135,
|
|
"server/src/__tests__/external-object-routes.test.ts": 3862,
|
|
"server/src/__tests__/folders-routes.test.ts": 1474,
|
|
"server/src/__tests__/health-dev-server-token.test.ts": 3152,
|
|
"server/src/__tests__/health.test.ts": 3543,
|
|
"server/src/__tests__/heartbeat-dependency-scheduling.test.ts": 31376,
|
|
"server/src/__tests__/heartbeat-issue-liveness-escalation.test.ts": 49291,
|
|
"server/src/__tests__/heartbeat-process-recovery.test.ts": 362170,
|
|
"server/src/__tests__/heartbeat-run-privacy-routes.test.ts": 9796,
|
|
"server/src/__tests__/inbox-agent-policy-routes.test.ts": 5019,
|
|
"server/src/__tests__/inbox-archive-routes.test.ts": 7129,
|
|
"server/src/__tests__/instance-database-backups-routes.test.ts": 1474,
|
|
"server/src/__tests__/instance-settings-routes.test.ts": 3499,
|
|
"server/src/__tests__/invite-accept-existing-member.test.ts": 3537,
|
|
"server/src/__tests__/invite-accept-gateway-defaults.test.ts": 4795,
|
|
"server/src/__tests__/invite-accept-replay.test.ts": 4065,
|
|
"server/src/__tests__/invite-create-route.test.ts": 7645,
|
|
"server/src/__tests__/invite-expiry.test.ts": 4250,
|
|
"server/src/__tests__/invite-join-manager.test.ts": 4317,
|
|
"server/src/__tests__/invite-list-route.test.ts": 3634,
|
|
"server/src/__tests__/invite-logo-route.test.ts": 4177,
|
|
"server/src/__tests__/invite-onboarding-text.test.ts": 4032,
|
|
"server/src/__tests__/invite-rate-limit-route.test.ts": 6008,
|
|
"server/src/__tests__/invite-summary-route.test.ts": 6090,
|
|
"server/src/__tests__/invite-test-resolution-route.test.ts": 4352,
|
|
"server/src/__tests__/invite-url-public-base-url.test.ts": 4379,
|
|
"server/src/__tests__/issue-access-grants-routes.test.ts": 6138,
|
|
"server/src/__tests__/issue-activity-events-routes.test.ts": 10999,
|
|
"server/src/__tests__/issue-agent-mutation-ownership-routes.test.ts": 14786,
|
|
"server/src/__tests__/issue-assigned-backlog-contract-routes.test.ts": 3922,
|
|
"server/src/__tests__/issue-assignee-invokability-routes.test.ts": 3837,
|
|
"server/src/__tests__/issue-attachment-routes.test.ts": 4351,
|
|
"server/src/__tests__/issue-blocker-diagnostics-routes.test.ts": 5648,
|
|
"server/src/__tests__/issue-closed-workspace-routes.test.ts": 4191,
|
|
"server/src/__tests__/issue-comment-attribution-audit-routes.test.ts": 5562,
|
|
"server/src/__tests__/issue-comment-cancel-routes.test.ts": 4176,
|
|
"server/src/__tests__/issue-comment-reopen-routes.test.ts": 4355,
|
|
"server/src/__tests__/issue-create-deduplication-routes.test.ts": 5953,
|
|
"server/src/__tests__/issue-created-from-routes.test.ts": 4860,
|
|
"server/src/__tests__/issue-creation-source-routes.test.ts": 6117,
|
|
"server/src/__tests__/issue-dependency-wakeups-routes.test.ts": 8961,
|
|
"server/src/__tests__/issue-document-restore-routes.test.ts": 7554,
|
|
"server/src/__tests__/issue-execution-policy-routes.test.ts": 4791,
|
|
"server/src/__tests__/issue-feedback-routes.test.ts": 3966,
|
|
"server/src/__tests__/issue-identifier-routes.test.ts": 4818,
|
|
"server/src/__tests__/issue-list-assignee-filter-routes.test.ts": 10945,
|
|
"server/src/__tests__/issue-list-updatedsince-filter-routes.test.ts": 5143,
|
|
"server/src/__tests__/issue-onboarding-first-task-routes.test.ts": 10593,
|
|
"server/src/__tests__/issue-queued-comments-routes.test.ts": 53688,
|
|
"server/src/__tests__/issue-scheduled-retry-routes.test.ts": 12618,
|
|
"server/src/__tests__/issue-stale-execution-lock-routes.test.ts": 6168,
|
|
"server/src/__tests__/issue-stalled-review-decision-routes.test.ts": 6305,
|
|
"server/src/__tests__/issue-status-version-route-service.test.ts": 5153,
|
|
"server/src/__tests__/issue-subtree-diagnostics-routes.test.ts": 5592,
|
|
"server/src/__tests__/issue-summaries-routes.test.ts": 5080,
|
|
"server/src/__tests__/issue-telemetry-routes.test.ts": 4631,
|
|
"server/src/__tests__/issue-thread-interaction-routes.test.ts": 15508,
|
|
"server/src/__tests__/issue-tree-control-routes.test.ts": 1520,
|
|
"server/src/__tests__/issue-update-comment-wakeup-routes.test.ts": 4994,
|
|
"server/src/__tests__/issue-wake-diagnostics-routes.test.ts": 5428,
|
|
"server/src/__tests__/issue-watchdogs-routes.test.ts": 10901,
|
|
"server/src/__tests__/issue-workspace-command-authz.test.ts": 4648,
|
|
"server/src/__tests__/issues-checkout-wakeup.test.ts": 100,
|
|
"server/src/__tests__/issues-goal-context-routes.test.ts": 4119,
|
|
"server/src/__tests__/issues-service.test.ts": 26999,
|
|
"server/src/__tests__/llms-routes.test.ts": 1838,
|
|
"server/src/__tests__/low-trust-red-team-routes.test.ts": 25961,
|
|
"server/src/__tests__/maintenance-server-routes.test.ts": 511763,
|
|
"server/src/__tests__/managed-agent-profile-routes-authz.test.ts": 3182,
|
|
"server/src/__tests__/multilingual-issues-routes.test.ts": 5137,
|
|
"server/src/__tests__/muse-qualification-routes.test.ts": 3072,
|
|
"server/src/__tests__/onboarding-seed-route.test.ts": 5499,
|
|
"server/src/__tests__/openapi-routes.test.ts": 2400,
|
|
"server/src/__tests__/openclaw-invite-prompt-route.test.ts": 3380,
|
|
"server/src/__tests__/opencode-local-adapter-environment.test.ts": 6840,
|
|
"server/src/__tests__/openrouter-attribution.test.ts": 778,
|
|
"server/src/__tests__/permissions-upgrade-boundary-routes.test.ts": 5309,
|
|
"server/src/__tests__/plugin-install-route-security.test.ts": 4283,
|
|
"server/src/__tests__/plugin-routes-authz.test.ts": 3539,
|
|
"server/src/__tests__/plugin-scoped-api-routes.test.ts": 3119,
|
|
"server/src/__tests__/project-goal-telemetry-routes.test.ts": 3626,
|
|
"server/src/__tests__/project-routes-env.test.ts": 4082,
|
|
"server/src/__tests__/project-workspace-managed-sandbox-routes.test.ts": 6431,
|
|
"server/src/__tests__/projects-list-archived-routes.test.ts": 5044,
|
|
"server/src/__tests__/redaction.test.ts": 136,
|
|
"server/src/__tests__/resource-memberships-routes.test.ts": 5339,
|
|
"server/src/__tests__/routine-document-annotation-routes.test.ts": 2206,
|
|
"server/src/__tests__/routines-e2e.test.ts": 18070,
|
|
"server/src/__tests__/routines-routes.test.ts": 6367,
|
|
"server/src/__tests__/secret-proposals-routes.test.ts": 16478,
|
|
"server/src/__tests__/secrets-routes-claude-oauth-service.test.ts": 4530,
|
|
"server/src/__tests__/secrets-routes.test.ts": 4522,
|
|
"server/src/__tests__/sidebar-preferences-routes.test.ts": 3352,
|
|
"server/src/__tests__/subscription-routes.test.ts": 3167,
|
|
"server/src/__tests__/summary-slot-routes.test.ts": 5656,
|
|
"server/src/__tests__/task-connector-read-routes.test.ts": 6058,
|
|
"server/src/__tests__/task-title-routes.test.ts": 13080,
|
|
"server/src/__tests__/teams-catalog-routes.test.ts": 4167,
|
|
"server/src/__tests__/user-profile-routes.test.ts": 2245,
|
|
"server/src/__tests__/workspace-command-authz.test.ts": 100,
|
|
"server/src/__tests__/workspace-preferences-routes.test.ts": 1477,
|
|
"server/src/__tests__/workspace-restore-repair-route.test.ts": 6027,
|
|
"server/src/__tests__/workspace-runtime-routes-authz.test.ts": 3659,
|
|
"server/src/__tests__/workspace-runtime-service-authz.test.ts": 2230
|
|
}
|
|
}
|